HighLAND
numuCCMultiTargetAnalysis.cxx
1 #include "numuCCMultiTargetAnalysis.hxx"
2 #include "numuCCMultiTargetUtils.hxx"
3 #include "Parameters.hxx"
4 #include "CategoriesUtils.hxx"
5 
6 bool _doMultiPi = false;
7 bool _IsAntinu = false;
8 
9 //********************************************************************
10 numuCCMultiTargetAnalysis::numuCCMultiTargetAnalysis(AnalysisAlgorithm* ana) : baseTrackerAnalysis(ana){
11 //********************************************************************
12 
13  // Add the package version
14  ND::versioning().AddPackage("numuCCMultiTargetAnalysis", anaUtils::GetSoftwareVersionFromPath((std::string)getenv("NUMUCCMULTITARGETANALYSISROOT")));
15 }
16 
17 //********************************************************************
19 //********************************************************************
20 
21  // CC or CCMultiPi analysis?
22  _doMultiPi = ND::params().GetParameterI("numuCCMultiTargetAnalysis.DoMultiPi");
23 
24  // Antineutrino or neutrino analysis?
25  _IsAntinu = ND::params().GetParameterI("numuCCMultiTargetAnalysis.DoAntiNu");
26 
27  // Add new categories (before initializing numuCC, so AddStandardCategories will add no truth and sand types automatically)
28  numuccmultitarget_utils::AddCategories();
29 
30  // Use reduced FV (needed before numuCCAnalysis->Initialize which calls GetNTargets)
31  if (ND::params().GetParameterI("numuCCMultiTargetAnalysis.UseReducedFV")) {
32  // make FGD1 and FGD2 FV identical, use smaller FV
33  double FVXmin = TMath::Max(FVDef::FVdefminFGD1[0], FVDef::FVdefminFGD2[0]);
34  double FVXmax = TMath::Max(FVDef::FVdefmaxFGD1[0], FVDef::FVdefmaxFGD2[0]);
35  double FVYmin = TMath::Max(FVDef::FVdefminFGD1[1], FVDef::FVdefminFGD2[1]);
36  double FVYmax = TMath::Max(FVDef::FVdefmaxFGD1[1], FVDef::FVdefmaxFGD2[1]);
37  double FVZmin = TMath::Max(FVDef::FVdefminFGD1[2], FVDef::FVdefminFGD2[2]);
38  double FVZmax = TMath::Max(FVDef::FVdefmaxFGD1[2], FVDef::FVdefmaxFGD2[2]);
39  FVDef::FVdefminFGD1[0] = FVXmin; FVDef::FVdefminFGD1[1] = FVYmin; FVDef::FVdefminFGD1[2] = FVZmin;
40  FVDef::FVdefmaxFGD1[0] = FVXmax; FVDef::FVdefmaxFGD1[1] = FVYmax; FVDef::FVdefmaxFGD1[2] = FVZmax;
41  FVDef::FVdefminFGD2[0] = FVXmin; FVDef::FVdefminFGD2[1] = FVYmin; FVDef::FVdefminFGD2[2] = FVZmin;
42  FVDef::FVdefmaxFGD2[0] = FVXmax; FVDef::FVdefmaxFGD2[1] = FVYmax; FVDef::FVdefmaxFGD2[2] = FVZmax;
43  }
44  // cout new values
45  std::cout << "Using a reduced Fiducial Volume: " << std::endl;
46  std::cout << " DetDef::fgd1min = " << DetDef::fgd1min[0] << " " << DetDef::fgd1min[1] << " " << DetDef::fgd1min[2] << std::endl;
47  std::cout << " DetDef::fgd1max = " << DetDef::fgd1max[0] << " " << DetDef::fgd1max[1] << " " << DetDef::fgd1max[2] << std::endl;
48  std::cout << " DetDef::fgd2min = " << DetDef::fgd2min[0] << " " << DetDef::fgd2min[1] << " " << DetDef::fgd2min[2] << std::endl;
49  std::cout << " DetDef::fgd2max = " << DetDef::fgd2max[0] << " " << DetDef::fgd2max[1] << " " << DetDef::fgd2max[2] << std::endl;
50  std::cout << " FVDef::FVdefminFGD1 = " << FVDef::FVdefminFGD1[0] << " " << FVDef::FVdefminFGD1[1] << " " << FVDef::FVdefminFGD1[2] << std::endl;
51  std::cout << " FVDef::FVdefmaxFGD1 = " << FVDef::FVdefmaxFGD1[0] << " " << FVDef::FVdefmaxFGD1[1] << " " << FVDef::FVdefmaxFGD1[2] << std::endl;
52  std::cout << " FVDef::FVdefminFGD2 = " << FVDef::FVdefminFGD2[0] << " " << FVDef::FVdefminFGD2[1] << " " << FVDef::FVdefminFGD2[2] << std::endl;
53  std::cout << " FVDef::FVdefmaxFGD2 = " << FVDef::FVdefmaxFGD2[0] << " " << FVDef::FVdefmaxFGD2[1] << " " << FVDef::FVdefmaxFGD2[2] << std::endl;
54 
55  // Create a numuCCAnalysis passing this analysis to the constructor. In that way the same managers are used
56  // UseAnalysis will make using the same box and event
57  // By default configurations, systematics, corrections and tree variables of the used algorithm will be added
58 
59  // use antiNu
60  if (_IsAntinu) {
61  std::cout << "Processing antiNumuCC selection with numuCCMultiTargetAnalysis package" << std::endl;
62  _antiNumuCCAnalysis = new antiNumuCCAnalysis(this);
63  UseAnalysis(_antiNumuCCAnalysis);
64  if (!_antiNumuCCAnalysis->Initialize()) return false;
65  }
66 
67  // use numuCCMultPi
68  else if (_doMultiPi) {
69  std::cout << "Processing numuCCMultiPi selection with numuCCMultiTargetAnalysis package" << std::endl;
70  _numuCCMultiPiAnalysis = new numuCCMultiPiAnalysis(this);
71  UseAnalysis(_numuCCMultiPiAnalysis);
72  if (!_numuCCMultiPiAnalysis->Initialize()) return false;
73  }
74 
75  // use numuCC
76  else {
77  std::cout << "Processing numuCC selection with numuCCMultiTargetAnalysis package" << std::endl;
78  _numuCCAnalysis = new numuCCAnalysis(this);
79  UseAnalysis(_numuCCAnalysis);
80  if (!_numuCCAnalysis->Initialize()) return false;
81  }
82 
83  std::cout << "----------------------------------------------------" << std::endl;
84  std::cout << "WARNING: only for events with accum_level > 5 the vars in the output microtree will surely refer to the muon candidate in that FGD" << std::endl;
85  std::cout << "----------------------------------------------------" << std::endl;
86 
87  // Minimum accum level to save event into the output tree
88  SetMinAccumCutLevelToSave(ND::params().GetParameterI("numuCCMultiTargetAnalysis.MinAccumLevelToSave"));
89 
90  return true;
91 }
92 
93 //********************************************************************
94 void numuCCMultiTargetAnalysis::DefineSelections(){
95 //********************************************************************
96 
97  // Add the selection to the Selection Manager
98  if(_IsAntinu)
99  sel().AddSelection("kTrackerAntiNumuCCMultiTarget", "antiNumuCC multi-target selection", new antiNumuCCFGD2Selection(false));
100  else
101  sel().AddSelection("kTrackerNumuCCMultiTarget", "numuCC multi-target selection", new numuCCMultiTargetSelection(_doMultiPi));
102 }
103 
104 //********************************************************************
105 void numuCCMultiTargetAnalysis::DefineCorrections(){
106 //********************************************************************
107 
108  if (_IsAntinu) _antiNumuCCAnalysis->DefineCorrections();
109  else if (_doMultiPi) _numuCCMultiPiAnalysis->DefineCorrections();
110  else _numuCCAnalysis->DefineCorrections();
111 }
112 
113 //********************************************************************
114 void numuCCMultiTargetAnalysis::DefineMicroTrees(bool addBase){
115 //********************************************************************
116 
117  // -------- Add variables to the analysis tree ----------------------
118 
119  // Variables from the numuCCAnalysis analysis (including those in baseTrackerAnalysis by default, otherwise addBase should be false
120  if (_IsAntinu) _antiNumuCCAnalysis->DefineMicroTrees(addBase);
121  else if (_doMultiPi) _numuCCMultiPiAnalysis->DefineMicroTrees(addBase);
122  else _numuCCAnalysis->DefineMicroTrees(addBase);
123 
124  // --- Add here more variables for the numuCCMultiTarget analysis -----
125 
126  AddVarI(output(), ntracks, "");
127 
128  // selmu vars
129  AddVarI(output(), selmu_fgdmoduletype, "");
130  AddVarI(output(), selmu_fgdlayer, "");
131  AddVar3VF(output(), selmu_hit1_pos, "");
132  AddVar3VF(output(), selmu_hit2_pos, "");
133  AddVarF(output(), selmu_hit1_charge, "");
134  AddVarF(output(), selmu_hit2_charge, "");
135 
136  // truelepton vars
137  AddVarI(output(), truelepton_fgdmoduletype , "");
138  AddVarI(output(), truelepton_fgdlayer, "");
139  AddVarI(output(), truelepton_targetZ, "");
140  AddVarI(output(), truelepton_targetPDG, "");
141 
142  // Extra variables used for backward migrations systematics study
143  AddVarF(output(), distance_track_hit1, "");
144  AddVarF(output(), distance_track_hit2, "");
145  AddVar3VF(output(), selmu_fittrack_hit1_pos, "");
146  AddVar3VF(output(), selmu_fittrack_hit2_pos, "");
147  AddVarF(output(), selmu_deltachi2_hit1, "");
148  AddVarF(output(), selmu_deltachi2_hit2, "");
149 
150  // Extra variables for reconstructed energy
151  AddVarF(output(), selmu_nuErecQEoxygen, "neutrino reconstructed energy with muon candidate's reconstructed kinematics in ccqe formula with Eb for oxygen");
152  AddVarF(output(), truelepton_nuErecQEoxygen, "neutrino reconstructed energy with true lepton kinematics in ccqe formula with Eb for oxygen");
153  AddVarF(output(), selmu_chi2, ""); // Chi2 of the muon candidate track
154 
155 }
156 
157 //********************************************************************
158 void numuCCMultiTargetAnalysis::DefineTruthTree(){
159 //********************************************************************
160 
161  // Variables from baseTrackerAnalysis
162  if (_IsAntinu) _antiNumuCCAnalysis->DefineTruthTree();
163  else if (_doMultiPi) _numuCCMultiPiAnalysis->DefineTruthTree();
164  else _numuCCAnalysis->DefineTruthTree();
165 
166  AddVarI(output(), truevtx_fgdmoduletype , "");
167  AddVarI(output(), truevtx_fgdlayer, "");
168  AddVarI(output(), truevtx_targetZ, "");
169  AddVarI(output(), truevtx_targetPDG, "");
170 }
171 
172 //********************************************************************
173 void numuCCMultiTargetAnalysis::FillMicroTrees(bool addBase){
174 //********************************************************************
175 
176  // Variables from the numuCCAnalysis analysis (including the ones in baseTrackerAnalysis by default, otherwise addBase should be false)
177  if (_IsAntinu) _antiNumuCCAnalysis->FillMicroTrees(addBase);
178  else if (_doMultiPi) _numuCCMultiPiAnalysis->FillMicroTrees(addBase);
179  else _numuCCAnalysis->FillMicroTrees(addBase);
180 
181  // --- Fill here more variables for the numuCCMultiTarget analysis -----
182 
183  output().FillVar(ntracks, (int)GetBunch().Particles.size());
184 
185  if( ! box().MainTrack) return;
186 
187  AnaTrack* selmu = static_cast<AnaTrack*>(box().MainTrack);
188 
189  output().FillVar(selmu_fgdmoduletype, anaUtils::GetFgdModuleType(GetEvent().GetIsMC(), selmu->PositionStart, SubDetId::kFGD2));
190  output().FillVar(selmu_fgdlayer, numuccmultitarget_utils::GetFgdLayer(GetEvent().GetIsMC(), selmu->PositionStart));
191 
192  if (selmu->GetTrueParticle() && selmu->GetTrueParticle()->TrueVertex) { // sand muons might not have the true vertex
193  AnaTrueVertex* truevtx = static_cast<AnaTrueVertex*>(selmu->GetTrueParticle()->TrueVertex);
194  output().FillVar(truelepton_fgdmoduletype, anaUtils::GetFgdModuleType(GetEvent().GetIsMC(), truevtx->Position, SubDetId::kFGD2));
195  output().FillVar(truelepton_fgdlayer, numuccmultitarget_utils::GetFgdLayer(GetEvent().GetIsMC(), truevtx->Position));
196  output().FillVar(truelepton_targetZ, anaUtils::GetTargetCode(truevtx));
197  output().FillVar(truelepton_targetPDG, truevtx->TargetPDG);
198  // Reconstructed neutrino energy (muon kinematics only)
199  Float_t Erec = anaUtils::ComputeRecNuEnergyCCQE(output().GetVarValueF(numuCCAnalysis::truelepton_mom), units::mass_muon, output().GetVarValueF(numuCCAnalysis::truelepton_costheta), 27.);
200  output().FillVar(truelepton_nuErecQEoxygen, Erec);
201  }
202 
203  // Muon candidate's first and second hit study
204 
205  // if flattrees, these vars are not saved
206  if ( ! input().InputIsFlatTree()) {
207 
208  // for forward tracks get the upstream hits
209  Float_t hit1_pos[3];
210  Float_t hit2_pos[3];
211  if (selmu->PositionStart[2] <= selmu->PositionEnd[2]) {
212  for (int i=0; i<3; i++) hit1_pos[i] = selmu->UpstreamHits_Position[0][i];
213  for (int i=0; i<3; i++) hit2_pos[i] = selmu->UpstreamHits_Position[1][i];
214  output().FillVar(selmu_hit1_charge, selmu->UpstreamHits_Charge[0]);
215  output().FillVar(selmu_hit2_charge, selmu->UpstreamHits_Charge[1]);
216  } else {
217  // for backward tracks get the downstream hits
218  for (int i=0; i<3; i++) hit1_pos[i] = selmu->DownstreamHits_Position[0][i];
219  for (int i=0; i<3; i++) hit2_pos[i] = selmu->DownstreamHits_Position[1][i];
220  output().FillVar(selmu_hit1_charge, selmu->DownstreamHits_Charge[0]);
221  output().FillVar(selmu_hit2_charge, selmu->DownstreamHits_Charge[1]);
222  }
223 
224  output().FillVectorVarFromArray(selmu_hit1_pos, hit1_pos, 3);
225  output().FillVectorVarFromArray(selmu_hit2_pos, hit2_pos, 3);
226  output().FillVar(selmu_hit1_fgdmoduletype, anaUtils::GetFgdModuleType(GetEvent().GetIsMC(), hit1_pos, SubDetId::kFGD2));
227 
228  // variables for backward migration studies
229  TVector3 fittedPos1 = numuccmultitarget_utils::GetFittedPos(anaUtils::ArrayToTVector3(selmu->PositionStart),
230  anaUtils::ArrayToTVector3(selmu->PositionEnd),
231  hit1_pos[2] );
232  TVector3 fittedPos2 = numuccmultitarget_utils::GetFittedPos(anaUtils::ArrayToTVector3(selmu->PositionStart),
233  anaUtils::ArrayToTVector3(selmu->PositionEnd),
234  hit2_pos[2] );
235  Float_t ft1pos[3]; anaUtils::VectorToArray(fittedPos1,ft1pos);
236  Float_t ft2pos[3]; anaUtils::VectorToArray(fittedPos2,ft2pos);
237  output().FillVectorVarFromArray(selmu_fittrack_hit1_pos, ft1pos, 3);
238  output().FillVectorVarFromArray(selmu_fittrack_hit2_pos, ft2pos, 3);
239  output().FillVar(selmu_deltachi2_hit1, numuccmultitarget_utils::GetDeltaChi2(hit1_pos,fittedPos1));
240  output().FillVar(selmu_deltachi2_hit2, numuccmultitarget_utils::GetDeltaChi2(hit2_pos,fittedPos2));
241 
242  TVector3 track_start_pos = anaUtils::ArrayToTVector3(selmu->PositionStart);
243  TVector3 track_end_pos = anaUtils::ArrayToTVector3(selmu->PositionEnd);
244  output().FillVar(distance_track_hit1, numuccmultitarget_utils::CalculateLineLineDistance(track_start_pos, track_end_pos, hit1_pos));
245  output().FillVar(distance_track_hit2, numuccmultitarget_utils::CalculateLineLineDistance(track_start_pos, track_end_pos, hit2_pos));
246 
247  // the second hit might be outside the FGD, but the first shouldn't
248  if (selmu_hit1_charge == -999) std::cout << "ERROR: selmu_hit1_charge is -999" << std::endl;
249 
250  } // end if ! FlatTrees
251 
252  // Reconstructed neutrino energy (muon kinematics only)
253  Float_t Erec = anaUtils::ComputeRecNuEnergyCCQE(output().GetVarValueF(numuCCAnalysis::selmu_mom), units::mass_muon, output().GetVarValueF(numuCCAnalysis::selmu_costheta), 27.);
254  output().FillVar(selmu_nuErecQEoxygen, Erec);
255 
256  output().FillVar(selmu_chi2, selmu->Chi2);
257 }
258 
259 //********************************************************************
260 void numuCCMultiTargetAnalysis::FillToyVarsInMicroTrees(bool addBase){
261 //********************************************************************
262 
263  // Variables from the numuCCAnalysis analysis (including the ones in baseTrackerAnalysis by default, otherwise addBase should be false)
264  if (_IsAntinu) _antiNumuCCAnalysis->FillToyVarsInMicroTrees(addBase);
265  else if (_doMultiPi) _numuCCMultiPiAnalysis->FillToyVarsInMicroTrees(addBase);
266  else _numuCCAnalysis->FillToyVarsInMicroTrees(addBase);
267 
268  // Fill here variables specific for the numuCCMultiTarget analysis
269 }
270 
271 //********************************************************************
272 bool numuCCMultiTargetAnalysis::CheckFillTruthTree(const AnaTrueVertex& vtx){
273 //********************************************************************
274  // do not just call the methods in numuCCAnalysis so to avoid to set _whichFGD parameter
275  // GetReactionCC get also 2p2h interactions
276  bool numuCCinFV = anaUtils::GetReactionCC(vtx, SubDetId::kFGD, _IsAntinu)==1;
277  // Since our topology definition doesn't consider the reaction code
278  // and since a muon pair can be created in the FSI (likely in DIS)
279  // in principle we might have a non-CC vertex categorized as CCother
280  // (nevertheless I didn't find any.)
281  int topo = anaUtils::GetTopology(vtx, SubDetId::kFGD, _IsAntinu);
282  bool topoCCinFV = (topo == 0 || topo == 1 || topo == 2);
283 
284  if ( ! numuCCinFV && topoCCinFV) std::cout << "WOW here you have a topoCC non-numuCC! TruthVertex ID: " << vtx.ID << std::endl;
285 
286  return (numuCCinFV || topoCCinFV);
287 }
288 
289 //********************************************************************
290 void numuCCMultiTargetAnalysis::FillTruthTree(const AnaTrueVertex& vtx){
291 //********************************************************************
292 
293  // Fill the common variables
294  if (_IsAntinu) _antiNumuCCAnalysis->FillTruthTree(vtx);
295  else if (_doMultiPi) _numuCCMultiPiAnalysis->FillTruthTree(vtx);
296  else _numuCCAnalysis->FillTruthTree(vtx);
297 
298  output().FillVar(truevtx_fgdmoduletype, anaUtils::GetFgdModuleType(GetSpill().GetIsMC(), vtx.Position, SubDetId::kFGD2));
299  output().FillVar(truevtx_fgdlayer, numuccmultitarget_utils::GetFgdLayer(GetSpill().GetIsMC(), vtx.Position));
300  output().FillVar(truevtx_targetZ, anaUtils::GetTargetCode(&vtx));
301  output().FillVar(truevtx_targetPDG, vtx.TargetPDG);
302 
303  // Fill the extra categories in truth tree
304 
305  if (GetSpill().GetIsSandMC()) {
306  cat().SetCode("fgd2moduletype", CATSAND);
307  cat().SetCode("fgd2moduletypeCC", CATSAND);
308  cat().SetCode("fgd2targetCCQE", CATSAND);
309  cat().SetCode("fgd2targetCC", CATSAND);
310  return;
311  }
312 
313  cat().SetCode("fgd2moduletype", anaUtils::GetFgdModuleType(GetSpill().GetIsMC(), vtx.Position, SubDetId::kFGD2));
314  cat().SetCode("fgd2moduletypeCC", numuccmultitarget_utils::GetFgdModuleTypeCC(GetSpill().GetIsMC(), &vtx, SubDetId::kFGD2), _IsAntinu);
315  cat().SetCode("fgd2targetCCQE", numuccmultitarget_utils::GetTargetCCQE(&vtx, SubDetId::kFGD2));
316  cat().SetCode("fgd2targetCC", numuccmultitarget_utils::GetTargetCC(&vtx, SubDetId::kFGD2));
317 }
318 
319 //********************************************************************
320 void numuCCMultiTargetAnalysis::FillCategories(){
321 //********************************************************************
322 
323  // Fill the track categories for color drawing
324  if (_IsAntinu) _antiNumuCCAnalysis->FillCategories();
325  else if (_doMultiPi) _numuCCMultiPiAnalysis->FillCategories();
326  else _numuCCAnalysis->FillCategories();
327 
328  // Fill the extra categories in default tree
329 
330  if (GetSpill().GetIsSandMC()) {
331  cat().SetCode("fgd2moduletype", CATSAND);
332  cat().SetCode("fgd2moduletypeCC", CATSAND);
333  cat().SetCode("fgd2targetCCQE", CATSAND);
334  cat().SetCode("fgd2targetCC", CATSAND);
335  return;
336  }
337 
338  cat().SetCode("fgd2moduletype", CATNOTRUTH);
339  cat().SetCode("fgd2moduletypeCC", CATNOTRUTH);
340  cat().SetCode("fgd2targetCCQE", CATNOTRUTH);
341  cat().SetCode("fgd2targetCC", CATNOTRUTH);
342 
343  if (box().MainTrack && box().MainTrack->GetTrueParticle() && box().MainTrack->GetTrueParticle()->TrueVertex) { // sand muons might not have the true vertex
344  AnaTrueVertex* truevtx = static_cast<AnaTrueVertex*>(box().MainTrack->GetTrueParticle()->TrueVertex);
345  (void)truevtx;
346  cat().SetCode("fgd2moduletype", anaUtils::GetFgdModuleType(GetEvent().GetIsMC(), truevtx->Position, SubDetId::kFGD2));
347  cat().SetCode("fgd2moduletypeCC", numuccmultitarget_utils::GetFgdModuleTypeCC(GetEvent().GetIsMC(), truevtx, SubDetId::kFGD2), _IsAntinu);
348  cat().SetCode("fgd2targetCCQE", numuccmultitarget_utils::GetTargetCCQE(truevtx, SubDetId::kFGD2));
349  cat().SetCode("fgd2targetCC", numuccmultitarget_utils::GetTargetCC(truevtx, SubDetId::kFGD2));
350  }
351 
352 }
353 
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
Float_t PositionStart[4]
The reconstructed start position of the particle.
Representation of a global track.
void SetMinAccumCutLevelToSave(Int_t level)
Set the minimum accumulated cut level to save an event into the micro-tree.
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
Definition: Parameters.cxx:217
void SetCode(const std::string &categ, int code, int defaultcode=0)
void AddPackage(const std::string &name, const std::string &version)
Add a package.
AnaTrackB * MainTrack
For storing the Main Track (The lepton candidate in geranal: HMN or HMP track)
Float_t ComputeRecNuEnergyCCQE(Float_t mom_lepton, Float_t mass_lepton, Float_t costheta_lepton, Float_t bindingEnergy=25.)
bool Initialize()
[AnalysisAlgorithm_mandatory]
AnaBunch & GetBunch()
Get a casted AnaBunchBB to AnaBunch from the InputManager (TODO the protection)
Int_t TargetPDG
The PDG code of the target nucleus.
Definition: DataClasses.hxx:85
Int_t GetTopology(const AnaTrueVertex &trueVertex, const SubDetId::SubDetEnum det=SubDetId::kFGD1, bool IsAntinu=false)
Classify reaction topologies.
Int_t GetFgdModuleType(bool IsMC, const Float_t *pos, SubDetId::SubDetEnum det, bool includeGlueSkin=true)
Int_t ID
The ID of the trueObj, which corresponds to the ID of the TTruthParticle that created it...
Float_t Chi2
The chi2 value when the track was fitted using a Kalman filter.
std::string GetSoftwareVersionFromPath(const std::string &path)
Get The software version from the path of the package.
Representation of a true Monte Carlo vertex.
Definition: DataClasses.hxx:50
virtual const ToyBoxTracker & box(Int_t isel=-1) const
Returns the ToyBoxTracker.
TVector3 UpstreamHits_Position[2]
Float_t Position[4]
The position the true interaction happened at.
AnaEvent & GetEvent()
Get a casted AnaEventC to AnaEvent.
bool Initialize()
[AnalysisAlgorithm_mandatory]
void FillVar(Int_t index, Float_t var)
Fill a single variable.
void AddSelection(const std::string &name, const std::string &title, SelectionBase *sel, Int_t presel=-1)
Add a user selection to the selection manager.
AnaSpill & GetSpill()
Get a casted AnaSpillC to AnaSpill from the InputManager.
void UseAnalysis(AnalysisAlgorithm *ana)
Used a given analysis.
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
void FillVectorVarFromArray(Int_t index, const Double_t var[], UInt_t size)
Fill a vector variable from array.
Int_t GetTargetCode(const AnaTrueVertex *trueVertex)
Get the code for filling the target PDG category.
Float_t PositionEnd[4]
The reconstructed end position of the particle.