Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DHistogramActions_Thrown.h
Go to the documentation of this file.
1 #ifndef _DHistogramActions_Thrown_
2 #define _DHistogramActions_Thrown_
3 
4 #include <map>
5 #include <set>
6 #include <deque>
7 #include <string>
8 #include <iostream>
9 #include <sstream>
10 #include <limits>
11 
12 #include "TROOT.h"
13 #include "TDirectoryFile.h"
14 #include "TH1I.h"
15 #include "TH2I.h"
16 #include "TH1D.h"
17 #include "TH2D.h"
18 #include "TTree.h"
19 
20 #include "JANA/JEventLoop.h"
21 #include "particleType.h"
22 
23 #include "RF/DRFTime.h"
24 #include "PID/DChargedTrack.h"
26 #include "PID/DNeutralParticle.h"
27 #include "PID/DNeutralShower.h"
28 #include "PID/DVertex.h"
29 #include "PID/DDetectorMatches.h"
31 #include "PID/DEventRFBunch.h"
32 #include "TRACKING/DMCThrown.h"
33 
34 #include "ANALYSIS/DReaction.h"
41 #include "ANALYSIS/DCutActions.h"
42 
43 #include "START_COUNTER/DSCHit.h"
44 #include "TAGGER/DTAGHHit.h"
45 #include "TAGGER/DTAGMHit.h"
46 #include "CDC/DCDCHit.h"
47 #include "FDC/DFDCHit.h"
48 #include "TOF/DTOFPoint.h"
49 #include "TOF/DTOFHit.h"
50 #include "TOF/DTOFTruth.h"
51 #include "BCAL/DBCALShower.h"
52 #include "BCAL/DBCALHit.h"
53 #include "BCAL/DBCALTruthShower.h"
54 #include "FCAL/DFCALShower.h"
55 #include "FCAL/DFCALHit.h"
56 #include "FCAL/DFCALTruthShower.h"
57 
61 
62 using namespace std;
63 using namespace jana;
64 
65 /*
66 THROWN_ONLY:
67  REACTION:
68  DHistogramAction_ParticleComboGenReconComparison
69  DHistogramAction_TruePID
70  INDEPENDENT:
71  DHistogramAction_ThrownParticleKinematics
72  DHistogramAction_ReconnedThrownKinematics
73  DHistogramAction_GenReconTrackComparison
74 */
75 
77 {
78  public:
79  DHistogramAction_ParticleComboGenReconComparison(const DReaction* locReaction, bool locUseKinFitResultsFlag, string locActionUniqueString = "") :
80  DAnalysisAction(locReaction, "Hist_ParticleComboGenReconComparison", locUseKinFitResultsFlag, locActionUniqueString),
81  dNumDeltaPOverPBins(2500), dNumDeltaThetaBins(240), dNumDeltaPhiBins(400), dNumDeltaTBins(500), dNumDeltaVertexZBins(300), dNum2DPBins(250), dNum2DThetaBins(140),
82  dNumRFDeltaTBins(202), dNumPullBins(500), dNum2DPullBins(250), dMinDeltaPOverP(-2.0), dMaxDeltaPOverP(2.0), dMinDeltaTheta(-1.0), dMaxDeltaTheta(1.0), dMinDeltaPhi(-6.0), dMaxDeltaPhi(6.0), dMinDeltaT(-5.0),
83  dMaxDeltaT(5.0), dMinDeltaVertexZ(-15.0), dMaxDeltaVertexZ(15.0), dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinRFDeltaT(-10.1), dMaxRFDeltaT(10.1)
84  {
85  dPullTypes.resize(8);
86  dPullTypes[0] = d_EPull; dPullTypes[1] = d_PxPull; dPullTypes[2] = d_PyPull; dPullTypes[3] = d_PzPull;
87  dPullTypes[4] = d_XxPull; dPullTypes[5] = d_XyPull; dPullTypes[6] = d_XzPull; dPullTypes[7] = d_TPull;
88  }
89 
90  unsigned int dNumDeltaPOverPBins, dNumDeltaThetaBins, dNumDeltaPhiBins, dNumDeltaTBins, dNumDeltaVertexZBins, dNum2DPBins, dNum2DThetaBins, dNumRFDeltaTBins, dNumPullBins, dNum2DPullBins;
91  double dMinDeltaPOverP, dMaxDeltaPOverP, dMinDeltaTheta, dMaxDeltaTheta, dMinDeltaPhi, dMaxDeltaPhi, dMinDeltaT, dMaxDeltaT, dMinDeltaVertexZ, dMaxDeltaVertexZ;
92  double dMinP, dMaxP, dMinTheta, dMaxTheta, dMinRFDeltaT, dMaxRFDeltaT;
93 
94  void Initialize(JEventLoop* locEventLoop);
95  void Reset_NewEvent(void)
96  {
97  DAnalysisAction::Reset_NewEvent();
98  dPreviouslyHistogrammedParticles.clear();
99  dPreviouslyHistogrammedBeamParticles.clear();
100  }
101 
102  private:
103  bool Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo);
104 
105  void Fill_BeamHists(const DKinematicData* locKinematicData, const DKinematicData* locThrownKinematicData);
106  void Fill_ChargedHists(const DChargedTrackHypothesis* locChargedTrackHypothesis, const DMCThrown* locMCThrown, const DEventRFBunch* locThrownEventRFBunch, size_t locStepIndex);
107  void Fill_NeutralHists(const DNeutralParticleHypothesis* locNeutralParticleHypothesis, const DMCThrown* locMCThrown, const DEventRFBunch* locThrownEventRFBunch, size_t locStepIndex);
108 
109  deque<DKinFitPullType> dPullTypes;
111 
113 
117 
118  deque<map<Particle_t, TH1I*> > dHistDeque_DeltaPOverP;
119  deque<map<Particle_t, TH1I*> > dHistDeque_DeltaTheta;
120  deque<map<Particle_t, TH1I*> > dHistDeque_DeltaPhi;
121  deque<map<Particle_t, TH1I*> > dHistDeque_DeltaT;
122  deque<map<Particle_t, TH1I*> > dHistDeque_DeltaT_TOF;
123  deque<map<Particle_t, TH1I*> > dHistDeque_DeltaT_BCAL;
124  deque<map<Particle_t, TH1I*> > dHistDeque_DeltaT_FCAL;
125  deque<map<Particle_t, TH1I*> > dHistDeque_DeltaVertexZ;
126  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaPOverPVsP;
127  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaPOverPVsTheta;
128  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaThetaVsP;
129  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaThetaVsTheta;
130  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaPhiVsP;
131  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaPhiVsTheta;
132  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaTVsTheta;
133  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaTVsP;
134  deque<map<Particle_t, TH2I*> > dHistDeque_DeltaVertexZVsTheta;
135 
136  deque<map<Particle_t, map<DKinFitPullType, TH1I*> > > dHistDeque_Pulls;
137  deque<map<Particle_t, map<DKinFitPullType, TH2I*> > > dHistDeque_PullsVsP;
138  deque<map<Particle_t, map<DKinFitPullType, TH2I*> > > dHistDeque_PullsVsTheta;
139 
140  deque<map<Particle_t, TH1I*> > dHistDeque_TimePull_CDC;
141  deque<map<Particle_t, TH1I*> > dHistDeque_TimePull_ST;
142  deque<map<Particle_t, TH1I*> > dHistDeque_TimePull_BCAL;
143  deque<map<Particle_t, TH1I*> > dHistDeque_TimePull_TOF;
144  deque<map<Particle_t, TH1I*> > dHistDeque_TimePull_FCAL;
145 
146  deque<map<Particle_t, TH2I*> > dHistDeque_TimePullVsTheta_CDC;
147  deque<map<Particle_t, TH2I*> > dHistDeque_TimePullVsTheta_BCAL;
148  deque<map<Particle_t, TH2I*> > dHistDeque_TimePullVsTheta_ST;
149 
150  deque<map<Particle_t, TH2I*> > dHistDeque_TimePullVsP_CDC;
151  deque<map<Particle_t, TH2I*> > dHistDeque_TimePullVsP_BCAL;
152  deque<map<Particle_t, TH2I*> > dHistDeque_TimePullVsP_ST;
153  deque<map<Particle_t, TH2I*> > dHistDeque_TimePullVsP_TOF;
154  deque<map<Particle_t, TH2I*> > dHistDeque_TimePullVsP_FCAL;
155 
157  set<pair<size_t, pair<Particle_t, const JObject*> > > dPreviouslyHistogrammedParticles;
158 };
159 
161 {
162  public:
163  DHistogramAction_ThrownParticleKinematics(const DReaction* locReaction, string locActionUniqueString = "") :
164  DAnalysisAction(locReaction, "Hist_ThrownParticleKinematics", false, locActionUniqueString),
165  dNumPBins(600), dNumThetaBins(560), dNumPhiBins(360), dNumVertexZBins(750), dNumTBins(400), dNumVertexXYBins(400), dNum2DPBins(250), dNum2DThetaBins(140), dNum2DPhiBins(180),
166  dMinT(-20.0), dMaxT(20.0), dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinPhi(-180.0), dMaxPhi(180.0), dMinVertexZ(-50.), dMaxVertexZ(200.0), dMinVertexXY(-10.0), dMaxVertexXY(10.0)
167  {
168  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
169  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
170  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
171  }
172 
173  DHistogramAction_ThrownParticleKinematics(string locActionUniqueString) :
174  DAnalysisAction(NULL, "Hist_ThrownParticleKinematics", false, locActionUniqueString),
175  dNumPBins(600), dNumThetaBins(560), dNumPhiBins(360), dNumVertexZBins(750), dNumTBins(400), dNumVertexXYBins(400), dNum2DPBins(250), dNum2DThetaBins(140), dNum2DPhiBins(180),
176  dMinT(-20.0), dMaxT(20.0), dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinPhi(-180.0), dMaxPhi(180.0), dMinVertexZ(-50.), dMaxVertexZ(200.0), dMinVertexXY(-10.0), dMaxVertexXY(10.0)
177  {
178  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
179  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
180  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
181  }
182 
184  DAnalysisAction(NULL, "Hist_ThrownParticleKinematics", false, ""),
185  dNumPBins(600), dNumThetaBins(560), dNumPhiBins(360), dNumVertexZBins(750), dNumTBins(400), dNumVertexXYBins(400), dNum2DPBins(250), dNum2DThetaBins(140), dNum2DPhiBins(180),
186  dMinT(-20.0), dMaxT(20.0), dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinPhi(-180.0), dMaxPhi(180.0), dMinVertexZ(-50.), dMaxVertexZ(200.0), dMinVertexXY(-10.0), dMaxVertexXY(10.0)
187  {
188  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
189  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
190  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
191  }
192 
193  unsigned int dNumPBins, dNumThetaBins, dNumPhiBins, dNumVertexZBins, dNumTBins, dNumVertexXYBins, dNum2DPBins, dNum2DThetaBins, dNum2DPhiBins;
194  double dMinT, dMaxT, dMinP, dMaxP, dMinTheta, dMaxTheta, dMinPhi, dMaxPhi, dMinVertexZ, dMaxVertexZ, dMinVertexXY, dMaxVertexXY;
195 
196  deque<Particle_t> dFinalStatePIDs;
197 
198  void Initialize(JEventLoop* locEventLoop);
199 
200 //so: in multi-thread, make direct call. in the main func, no check!
201  //in single-thread, call pre-func to check flag
202  private:
203  bool Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo = NULL);
204 
209 
210  map<Particle_t, TH2I*> dHistMap_PVsTheta;
211  map<Particle_t, TH2I*> dHistMap_PhiVsTheta;
212  map<Particle_t, TH1I*> dHistMap_P;
213  map<Particle_t, TH1I*> dHistMap_Theta;
214  map<Particle_t, TH1I*> dHistMap_Phi;
215  map<Particle_t, TH1I*> dHistMap_VertexZ;
216  map<Particle_t, TH2I*> dHistMap_VertexYVsX;
217  map<Particle_t, TH1I*> dHistMap_VertexT;
218 };
219 
221 {
222  public:
223  DHistogramAction_ReconnedThrownKinematics(const DReaction* locReaction, string locActionUniqueString = "") :
224  DAnalysisAction(locReaction, "Hist_ReconnedThrownKinematics", false, locActionUniqueString),
225  dMinThrownMatchFOM(5.73303E-7), dNumPBins(600), dNumThetaBins(560), dNumPhiBins(360), dNumVertexZBins(750), dNumTBins(400), dNumVertexXYBins(400),
226  dNum2DPBins(250), dNum2DThetaBins(140), dNum2DPhiBins(180), dNumBetaBins(400),
227  dMinT(-20.0), dMaxT(20.0), dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinPhi(-180.0), dMaxPhi(180.0), dMinVertexZ(-50.),
228  dMaxVertexZ(200.0), dMinVertexXY(-10.0), dMaxVertexXY(10.0), dMinBeta(-0.2), dMaxBeta(1.2)
229  {
230  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
231  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
232  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
233 
234  dAnalysisUtilities = NULL;
235  }
236 
237  DHistogramAction_ReconnedThrownKinematics(string locActionUniqueString) :
238  DAnalysisAction(NULL, "Hist_ReconnedThrownKinematics", false, locActionUniqueString),
239  dMinThrownMatchFOM(5.73303E-7), dNumPBins(600), dNumThetaBins(560), dNumPhiBins(360), dNumVertexZBins(750), dNumTBins(400), dNumVertexXYBins(400),
240  dNum2DPBins(250), dNum2DThetaBins(140), dNum2DPhiBins(180), dNumBetaBins(400),
241  dMinT(-20.0), dMaxT(20.0), dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinPhi(-180.0), dMaxPhi(180.0), dMinVertexZ(-50.),
242  dMaxVertexZ(200.0), dMinVertexXY(-10.0), dMaxVertexXY(10.0), dMinBeta(-0.2), dMaxBeta(1.2)
243  {
244  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
245  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
246  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
247 
248  dAnalysisUtilities = NULL;
249  }
250 
252  DAnalysisAction(NULL, "Hist_ReconnedThrownKinematics", false, ""),
253  dMinThrownMatchFOM(5.73303E-7), dNumPBins(600), dNumThetaBins(560), dNumPhiBins(360), dNumVertexZBins(750), dNumTBins(400), dNumVertexXYBins(400),
254  dNum2DPBins(250), dNum2DThetaBins(140), dNum2DPhiBins(180), dNumBetaBins(400),
255  dMinT(-20.0), dMaxT(20.0), dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinPhi(-180.0), dMaxPhi(180.0), dMinVertexZ(-50.),
256  dMaxVertexZ(200.0), dMinVertexXY(-10.0), dMaxVertexXY(10.0), dMinBeta(-0.2), dMaxBeta(1.2)
257  {
258  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
259  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
260  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
261 
262  dAnalysisUtilities = NULL;
263  }
264 
266 
267  unsigned int dNumPBins, dNumThetaBins, dNumPhiBins, dNumVertexZBins, dNumTBins, dNumVertexXYBins, dNum2DPBins, dNum2DThetaBins, dNum2DPhiBins, dNumBetaBins;
268  double dMinT, dMaxT, dMinP, dMaxP, dMinTheta, dMaxTheta, dMinPhi, dMaxPhi, dMinVertexZ, dMaxVertexZ, dMinVertexXY, dMaxVertexXY, dMinBeta, dMaxBeta;
269 
270  deque<Particle_t> dFinalStatePIDs;
271 
272  void Initialize(JEventLoop* locEventLoop);
273 
274  private:
275  bool Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo = NULL);
276 
278 
280 
281  //PID
282  map<int, TH2I*> dHistMap_QBetaVsP; //int is charge: -1, 1
283 
284  map<Particle_t, TH2I*> dHistMap_PVsTheta;
285  map<Particle_t, TH2I*> dHistMap_PhiVsTheta;
286  map<Particle_t, TH1I*> dHistMap_P;
287  map<Particle_t, TH1I*> dHistMap_Theta;
288  map<Particle_t, TH1I*> dHistMap_Phi;
289  map<Particle_t, TH1I*> dHistMap_VertexZ;
290  map<Particle_t, TH2I*> dHistMap_VertexYVsX;
291  map<Particle_t, TH1I*> dHistMap_VertexT;
292 };
293 
295 {
296  public:
297  DHistogramAction_GenReconTrackComparison(const DReaction* locReaction, string locActionUniqueString = "") :
298  DAnalysisAction(locReaction, "Hist_GenReconTrackComparison", false, locActionUniqueString),
299  dNumDeltaPOverPBins(500), dNumDeltaThetaBins(240), dNumDeltaPhiBins(400), dNumDeltaTBins(500), dNumDeltaVertexZBins(300), dNum2DPBins(250), dNum2DThetaBins(140),
300  dNumRFDeltaTBins(202), dNumPullBins(500), dNum2DPullBins(250), dNumMCMatchingFOMBins(500), dMinDeltaPOverP(-0.4), dMaxDeltaPOverP(0.4), dMinDeltaTheta(-1.0),
301  dMaxDeltaTheta(1.0), dMinDeltaPhi(-6.0), dMaxDeltaPhi(6.0), dMinDeltaT(-5.0), dMaxDeltaT(5.0), dMinDeltaVertexZ(-15.0), dMaxDeltaVertexZ(15.0),
302  dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinRFDeltaT(-10.1), dMaxRFDeltaT(10.1)
303  {
304  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
305  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
306  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
307 
308  dPullTypes.resize(8);
309  dPullTypes[0] = d_EPull; dPullTypes[1] = d_PxPull; dPullTypes[2] = d_PyPull; dPullTypes[3] = d_PzPull;
310  dPullTypes[4] = d_XxPull; dPullTypes[5] = d_XyPull; dPullTypes[6] = d_XzPull; dPullTypes[7] = d_TPull;
311  }
312 
313  DHistogramAction_GenReconTrackComparison(string locActionUniqueString) :
314  DAnalysisAction(NULL, "Hist_GenReconTrackComparison", false, locActionUniqueString),
315  dNumDeltaPOverPBins(500), dNumDeltaThetaBins(240), dNumDeltaPhiBins(400), dNumDeltaTBins(500), dNumDeltaVertexZBins(300), dNum2DPBins(250), dNum2DThetaBins(140),
316  dNumRFDeltaTBins(202), dNumPullBins(500), dNum2DPullBins(250), dNumMCMatchingFOMBins(500), dMinDeltaPOverP(-0.4), dMaxDeltaPOverP(0.4), dMinDeltaTheta(-1.0),
317  dMaxDeltaTheta(1.0), dMinDeltaPhi(-6.0), dMaxDeltaPhi(6.0), dMinDeltaT(-5.0), dMaxDeltaT(5.0), dMinDeltaVertexZ(-15.0), dMaxDeltaVertexZ(15.0),
318  dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinRFDeltaT(-10.1), dMaxRFDeltaT(10.1)
319  {
320  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
321  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
322  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
323 
324  dPullTypes.resize(8);
325  dPullTypes[0] = d_EPull; dPullTypes[1] = d_PxPull; dPullTypes[2] = d_PyPull; dPullTypes[3] = d_PzPull;
326  dPullTypes[4] = d_XxPull; dPullTypes[5] = d_XyPull; dPullTypes[6] = d_XzPull; dPullTypes[7] = d_TPull;
327  }
328 
330  DAnalysisAction(NULL, "Hist_GenReconTrackComparison", false, ""),
331  dNumDeltaPOverPBins(500), dNumDeltaThetaBins(240), dNumDeltaPhiBins(400), dNumDeltaTBins(500), dNumDeltaVertexZBins(300), dNum2DPBins(250), dNum2DThetaBins(140),
332  dNumRFDeltaTBins(202), dNumPullBins(500), dNum2DPullBins(250), dNumMCMatchingFOMBins(500), dMinDeltaPOverP(-0.4), dMaxDeltaPOverP(0.4), dMinDeltaTheta(-1.0),
333  dMaxDeltaTheta(1.0), dMinDeltaPhi(-6.0), dMaxDeltaPhi(6.0), dMinDeltaT(-5.0), dMaxDeltaT(5.0), dMinDeltaVertexZ(-15.0), dMaxDeltaVertexZ(15.0),
334  dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0), dMinRFDeltaT(-10.1), dMaxRFDeltaT(10.1)
335  {
336  dFinalStatePIDs.push_back(Gamma); dFinalStatePIDs.push_back(Neutron);
337  dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton);
338  dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus);
339 
340  dPullTypes.resize(8);
341  dPullTypes[0] = d_EPull; dPullTypes[1] = d_PxPull; dPullTypes[2] = d_PyPull; dPullTypes[3] = d_PzPull;
342  dPullTypes[4] = d_XxPull; dPullTypes[5] = d_XyPull; dPullTypes[6] = d_XzPull; dPullTypes[7] = d_TPull;
343  }
344 
345  unsigned int dNumDeltaPOverPBins, dNumDeltaThetaBins, dNumDeltaPhiBins, dNumDeltaTBins, dNumDeltaVertexZBins, dNum2DPBins;
346  unsigned int dNum2DThetaBins, dNumRFDeltaTBins, dNumPullBins, dNum2DPullBins, dNumMCMatchingFOMBins;
347  double dMinDeltaPOverP, dMaxDeltaPOverP, dMinDeltaTheta, dMaxDeltaTheta, dMinDeltaPhi, dMaxDeltaPhi, dMinDeltaT, dMaxDeltaT, dMinDeltaVertexZ, dMaxDeltaVertexZ;
348  double dMinP, dMaxP, dMinTheta, dMaxTheta, dMinRFDeltaT, dMaxRFDeltaT;
349 
350  deque<Particle_t> dFinalStatePIDs;
351 
352  void Initialize(JEventLoop* locEventLoop);
353 
354  private:
355  bool Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo = NULL);
356 
357  deque<DKinFitPullType> dPullTypes;
360 
361  map<Particle_t, TH1I*> dHistMap_MatchFOM;
362  map<Particle_t, TH1I*> dHistMap_DeltaPOverP;
363  map<Particle_t, TH1I*> dHistMap_DeltaTheta;
364  map<Particle_t, TH1I*> dHistMap_DeltaPhi;
365  map<Particle_t, TH1I*> dHistMap_DeltaT;
366  map<Particle_t, TH1I*> dHistMap_DeltaT_TOF;
367  map<Particle_t, TH1I*> dHistMap_DeltaT_BCAL;
368  map<Particle_t, TH1I*> dHistMap_DeltaT_FCAL;
369  map<Particle_t, TH1I*> dHistMap_DeltaVertexZ;
370  map<Particle_t, TH2I*> dHistMap_DeltaPOverPVsP;
371  map<Particle_t, TH2I*> dHistMap_DeltaPOverPVsTheta;
372  map<Particle_t, TH2I*> dHistMap_DeltaThetaVsP;
373  map<Particle_t, TH2I*> dHistMap_DeltaThetaVsTheta;
374  map<Particle_t, TH2I*> dHistMap_DeltaPhiVsP;
375  map<Particle_t, TH2I*> dHistMap_DeltaPhiVsTheta;
376  map<Particle_t, TH2I*> dHistMap_DeltaTVsTheta;
377  map<Particle_t, TH2I*> dHistMap_DeltaTVsP;
378  map<Particle_t, TH2I*> dHistMap_DeltaVertexZVsTheta;
379  map<Particle_t, TH2I*> dHistMap_PVsTheta_LargeDeltaT;
380 
381  map<Particle_t, map<DKinFitPullType, TH1I*> > dHistMap_Pulls;
382  map<Particle_t, map<DKinFitPullType, TH2I*> > dHistMap_PullsVsP;
383  map<Particle_t, map<DKinFitPullType, TH2I*> > dHistMap_PullsVsTheta;
384 
385  map<Particle_t, TH1I*> dHistMap_TimePull_CDC;
386  map<Particle_t, TH1I*> dHistMap_TimePull_ST;
387  map<Particle_t, TH1I*> dHistMap_TimePull_BCAL;
388  map<Particle_t, TH1I*> dHistMap_TimePull_TOF;
389  map<Particle_t, TH1I*> dHistMap_TimePull_FCAL;
390 
391  map<Particle_t, TH2I*> dHistMap_TimePullVsTheta_CDC;
392  map<Particle_t, TH2I*> dHistMap_TimePullVsTheta_BCAL;
393  map<Particle_t, TH2I*> dHistMap_TimePullVsTheta_ST;
394 
395  map<Particle_t, TH2I*> dHistMap_TimePullVsP_CDC;
396  map<Particle_t, TH2I*> dHistMap_TimePullVsP_BCAL;
397  map<Particle_t, TH2I*> dHistMap_TimePullVsP_ST;
398  map<Particle_t, TH2I*> dHistMap_TimePullVsP_TOF;
399  map<Particle_t, TH2I*> dHistMap_TimePullVsP_FCAL;
400 };
401 
403 {
404  public:
405  DHistogramAction_TruePID(const DReaction* locReaction, string locActionUniqueString = "") :
406  DAnalysisAction(locReaction, "Hist_TruePID", false, locActionUniqueString),
407  dNumPBins(300), dNum2DPBins(150), dNumThetaBins(140), dMinP(0.0), dMaxP(12.0), dMinTheta(0.0), dMaxTheta(140.0)/*, dMinThrownMatchFOM(5.73303E-7)*/
408  {
409  dAnalysisUtilities = NULL;
410  }
411 
412  unsigned int dNumPBins, dNum2DPBins, dNumThetaBins;
413  double dMinP, dMaxP, dMinTheta, dMaxTheta;
414 
415  void Initialize(JEventLoop* locEventLoop);
416  void Reset_NewEvent(void)
417  {
418  DAnalysisAction::Reset_NewEvent();
419  dPreviouslyHistogrammedParticles.clear();
420  }
421 
422  private:
423  bool Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo);
424 
425 // double dMinThrownMatchFOM;
427 
429  deque<map<Particle_t, TH1I*> > dHistDeque_P_CorrectID;
430  deque<map<Particle_t, TH1I*> > dHistDeque_P_IncorrectID;
431  deque<map<Particle_t, TH2I*> > dHistDeque_PVsTheta_CorrectID;
432  deque<map<Particle_t, TH2I*> > dHistDeque_PVsTheta_IncorrectID;
433 
434  set<pair<size_t, pair<Particle_t, const JObject*> > > dPreviouslyHistogrammedParticles;
435 };
436 
437 #endif // _DHistogramActions_Thrown_
deque< map< Particle_t, TH1I * > > dHistDeque_DeltaT_TOF
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaVertexZVsTheta
DHistogramAction_ReconnedThrownKinematics(string locActionUniqueString)
DHistogramAction_ThrownParticleKinematics(string locActionUniqueString)
DHistogramAction_ReconnedThrownKinematics(const DReaction *locReaction, string locActionUniqueString="")
deque< map< Particle_t, TH2I * > > dHistDeque_PVsTheta_IncorrectID
const DAnalysisUtilities * dAnalysisUtilities
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaThetaVsTheta
map< Particle_t, map< DKinFitPullType, TH1I * > > dHistMap_Pulls
deque< map< Particle_t, TH1I * > > dHistDeque_TimePull_CDC
set< pair< size_t, pair< Particle_t, const JObject * > > > dPreviouslyHistogrammedParticles
deque< map< Particle_t, TH2I * > > dHistDeque_TimePullVsTheta_CDC
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaTVsTheta
deque< map< Particle_t, TH1I * > > dHistDeque_TimePull_ST
deque< map< Particle_t, TH2I * > > dHistDeque_TimePullVsP_FCAL
deque< map< Particle_t, TH2I * > > dHistDeque_TimePullVsP_BCAL
deque< map< Particle_t, TH1I * > > dHistDeque_TimePull_BCAL
DHistogramAction_ParticleComboGenReconComparison(const DReaction *locReaction, bool locUseKinFitResultsFlag, string locActionUniqueString="")
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaPhiVsP
deque< map< Particle_t, TH1I * > > dHistDeque_DeltaT_BCAL
DHistogramAction_TruePID(const DReaction *locReaction, string locActionUniqueString="")
deque< map< Particle_t, TH1I * > > dHistDeque_DeltaPOverP
set< pair< size_t, pair< Particle_t, const JObject * > > > dPreviouslyHistogrammedParticles
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaPhiVsTheta
deque< map< Particle_t, TH2I * > > dHistDeque_TimePullVsP_TOF
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaPOverPVsTheta
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaThetaVsP
deque< map< Particle_t, TH1I * > > dHistDeque_DeltaVertexZ
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaPOverPVsP
deque< map< Particle_t, map< DKinFitPullType, TH2I * > > > dHistDeque_PullsVsP
deque< map< Particle_t, TH1I * > > dHistDeque_DeltaTheta
deque< map< Particle_t, map< DKinFitPullType, TH1I * > > > dHistDeque_Pulls
map< Particle_t, map< DKinFitPullType, TH2I * > > dHistMap_PullsVsP
map< Particle_t, map< DKinFitPullType, TH2I * > > dHistMap_PullsVsTheta
deque< map< Particle_t, TH1I * > > dHistDeque_TimePull_TOF
DHistogramAction_ThrownParticleKinematics(const DReaction *locReaction, string locActionUniqueString="")
deque< map< Particle_t, TH2I * > > dHistDeque_TimePullVsP_ST
deque< map< Particle_t, map< DKinFitPullType, TH2I * > > > dHistDeque_PullsVsTheta
deque< map< Particle_t, TH1I * > > dHistDeque_TimePull_FCAL
deque< map< Particle_t, TH1I * > > dHistDeque_P_IncorrectID
deque< map< Particle_t, TH2I * > > dHistDeque_TimePullVsTheta_BCAL
deque< map< Particle_t, TH2I * > > dHistDeque_DeltaTVsP
deque< map< Particle_t, TH1I * > > dHistDeque_DeltaPhi
DHistogramAction_GenReconTrackComparison(string locActionUniqueString)
deque< map< Particle_t, TH2I * > > dHistDeque_TimePullVsTheta_ST
DHistogramAction_GenReconTrackComparison(const DReaction *locReaction, string locActionUniqueString="")
deque< map< Particle_t, TH1I * > > dHistDeque_DeltaT_FCAL
deque< map< Particle_t, TH1I * > > dHistDeque_P_CorrectID
deque< map< Particle_t, TH2I * > > dHistDeque_PVsTheta_CorrectID
deque< map< Particle_t, TH2I * > > dHistDeque_TimePullVsP_CDC