mirror of
https://github.com/sesps/SPS_SABRE_EventBuilder.git
synced 2024-11-22 10:08:50 -05:00
Added a nudge parameter
This commit is contained in:
parent
f053847fb9
commit
673b12af93
|
@ -369,7 +369,7 @@ namespace EventBuilder {
|
|||
startIndex = 0;
|
||||
CoincEvent this_event;
|
||||
SlowSort coincidizer(m_params.slowCoincidenceWindow, m_params.channelMapFile);
|
||||
SFPAnalyzer analyzer(m_params.ZT, m_params.AT, m_params.ZP, m_params.AP, m_params.ZE, m_params.AE, m_params.beamEnergy, m_params.spsAngle, m_params.BField);
|
||||
SFPAnalyzer analyzer(m_params);
|
||||
|
||||
std::vector<TParameter<Double_t>> parvec;
|
||||
parvec.reserve(9);
|
||||
|
@ -459,7 +459,7 @@ namespace EventBuilder {
|
|||
std::vector<CoincEvent> fast_events;
|
||||
SlowSort coincidizer(m_params.slowCoincidenceWindow, m_params.channelMapFile);
|
||||
FastSort speedyCoincidizer(m_params.fastCoincidenceWindowSABRE, m_params.fastCoincidenceWindowIonCh);
|
||||
SFPAnalyzer analyzer(m_params.ZT, m_params.AT, m_params.ZP, m_params.AP, m_params.ZE, m_params.AE, m_params.beamEnergy, m_params.spsAngle, m_params.BField);
|
||||
SFPAnalyzer analyzer(m_params);
|
||||
|
||||
std::vector<TParameter<Double_t>> parvec;
|
||||
parvec.reserve(9);
|
||||
|
|
|
@ -72,6 +72,7 @@ namespace EventBuilder {
|
|||
m_params.BField = data["BField(kG)"].as<double>();
|
||||
m_params.beamEnergy = data["BeamEnergy(MeV)"].as<double>();
|
||||
m_params.spsAngle = data["SPSAngle(deg)"].as<double>();
|
||||
m_params.nudge = data["Nudge(cm)"].as<double>();
|
||||
m_params.runMin = data["MinRun"].as<int>();
|
||||
m_params.runMax = data["MaxRun"].as<int>();
|
||||
|
||||
|
@ -116,6 +117,7 @@ namespace EventBuilder {
|
|||
yamlStream << YAML::Key << "BField(kG)" << YAML::Value << m_params.BField;
|
||||
yamlStream << YAML::Key << "BeamEnergy(MeV)" << YAML::Value << m_params.beamEnergy;
|
||||
yamlStream << YAML::Key << "SPSAngle(deg)" << YAML::Value << m_params.spsAngle;
|
||||
yamlStream << YAML::Key << "Nudge(cm)" << YAML::Value << m_params.nudge;
|
||||
yamlStream << YAML::Key << "MinRun" << YAML::Value << m_params.runMin;
|
||||
yamlStream << YAML::Key << "MaxRun" << YAML::Value << m_params.runMax;
|
||||
yamlStream << YAML::EndMap;
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace EventBuilder {
|
|||
//requires (Z,A) for T, P, and E, as well as energy of P,
|
||||
// spectrograph angle of interest, and field value
|
||||
double DeltaZ(int ZT, int AT, int ZP, int AP, int ZE, int AE,
|
||||
double EP, double angle, double B)
|
||||
double EP, double angle, double B, double nudge)
|
||||
{
|
||||
|
||||
/* CONSTANTS */
|
||||
|
@ -94,7 +94,7 @@ namespace EventBuilder {
|
|||
double K = (std::sqrt(mp*me*EP / ejectileEnergy) * std::sin(angle)) /
|
||||
(me + mr - std::sqrt(mp*me*EP / ejectileEnergy) * std::cos(angle));
|
||||
|
||||
return -1.0*rho*s_dispersion*s_magnification*K * std::cos(s_centralTrajAngle); //delta-Z in cm
|
||||
return -1.0*rho*s_dispersion*s_magnification*K * std::cos(s_centralTrajAngle) + nudge; //delta-Z in cm
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace EventBuilder {
|
|||
//requires (Z,A) for T, P, and E, as well as energy of P,
|
||||
// spectrograph angle of interest, and field value
|
||||
double DeltaZ(int ZT, int AT, int ZP, int AP, int ZE, int AE,
|
||||
double EP, double angle, double B);
|
||||
double EP, double angle, double B, double nudge = 0);
|
||||
|
||||
static constexpr double WireDist() { return 4.28625; } //cm
|
||||
|
||||
|
|
|
@ -14,10 +14,11 @@
|
|||
namespace EventBuilder {
|
||||
|
||||
/*Constructor takes in kinematic parameters for generating focal plane weights*/
|
||||
SFPAnalyzer::SFPAnalyzer(int zt, int at, int zp, int ap, int ze, int ae, double ep,
|
||||
double angle, double b)
|
||||
SFPAnalyzer::SFPAnalyzer(const EVBParameters& params)
|
||||
{
|
||||
zfp = DeltaZ(zt, at, zp, ap, ze, ae, ep, angle, b);
|
||||
zfp = DeltaZ(params.ZT, params.AT, params.ZP, params.AP, params.ZE, params.AE, params.beamEnergy,
|
||||
params.spsAngle, params.BField, params.nudge);
|
||||
EVB_INFO("Focal Plane Z-Offset (nudge + kinematics): {}", zfp);
|
||||
event_address = new CoincEvent();
|
||||
rootObj = new THashTable();
|
||||
GetWeights();
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
|
||||
#include "DataStructs.h"
|
||||
#include "FP_kinematics.h"
|
||||
#include "EVBParameters.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
||||
class SFPAnalyzer
|
||||
{
|
||||
public:
|
||||
SFPAnalyzer(int zt, int at, int zp, int ap, int ze, int ae, double ep, double angle,
|
||||
double b);
|
||||
SFPAnalyzer(const EVBParameters& params);
|
||||
~SFPAnalyzer();
|
||||
ProcessedEvent GetProcessedEvent(CoincEvent& event);
|
||||
inline void ClearHashTable() { rootObj->Clear(); }
|
||||
|
|
|
@ -145,9 +145,15 @@ EVBMainFrame::EVBMainFrame(const TGWindow* p, UInt_t w, UInt_t h) :
|
|||
fThetaField = new TGNumberEntryField(thetaFrame, Theta, 0, TGNumberEntry::kNESRealFour, TGNumberEntry::kNEANonNegative);
|
||||
thetaFrame->AddFrame(thetalabel, lhints);
|
||||
thetaFrame->AddFrame(fThetaField, fhints);
|
||||
TGHorizontalFrame* nudgeFrame = new TGHorizontalFrame(extraFrame, w*0.175, h*0.15);
|
||||
TGLabel* nudgeLabel = new TGLabel(nudgeFrame, "Nudge (cm):");
|
||||
fNudgeField = new TGNumberEntryField(nudgeFrame, Nudge, 0, TGNumberEntry::kNESRealFour);
|
||||
nudgeFrame->AddFrame(nudgeLabel, lhints);
|
||||
nudgeFrame->AddFrame(fNudgeField, fhints);
|
||||
extraFrame->AddFrame(beamFrame, fhints);
|
||||
extraFrame->AddFrame(bfFrame, fhints);
|
||||
extraFrame->AddFrame(thetaFrame, fhints);
|
||||
extraFrame->AddFrame(nudgeFrame, fhints);
|
||||
|
||||
reactionFrame->AddFrame(targFrame, fhints);
|
||||
reactionFrame->AddFrame(projFrame, fhints);
|
||||
|
@ -399,7 +405,8 @@ bool EVBMainFrame::SetParameters()
|
|||
m_parameters.BField = fBField->GetNumber();
|
||||
m_parameters.beamEnergy = fBKEField->GetNumber();
|
||||
m_parameters.spsAngle = fThetaField->GetNumber();
|
||||
|
||||
m_parameters.nudge = fNudgeField->GetNumber();
|
||||
|
||||
m_builder.SetParameters(m_parameters);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ public:
|
|||
TypeBox,
|
||||
RMin,
|
||||
RMax,
|
||||
Nudge,
|
||||
M_Load_Config,
|
||||
M_Save_Config,
|
||||
M_Exit
|
||||
|
@ -85,6 +86,7 @@ private:
|
|||
TGNumberEntryField *fBField, *fBKEField, *fThetaField;
|
||||
TGNumberEntryField *fSlowWindowField, *fFastICField, *fFastSABREField;
|
||||
TGNumberEntryField *fRMinField, *fRMaxField;
|
||||
TGNumberEntryField *fNudgeField;
|
||||
|
||||
TGHProgressBar* fProgressBar;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user