MomentumPerformance_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 // Class: MomentumPerformance
3 // Plugin Type: analyzer (art v2_11_02)
4 // File: MomentumPerformance_module.cc
5 //
6 // Generated 20 Apr 2020 by Leo Bellantoni
7 //
8 // For each e, mu, pi+, p or antiparticle thereof from the primary vertex (but
9 // no cut on location of primary vertex!) use the backtracker to get a list of
10 // possible reconstructed tracks and pick the best matching trackend from that
11 // list. Provide a little info about the matching and then provide info about
12 // the reconstructed track particularly but not only the momentum.
13 //
14 ////////////////////////////////////////////////////////////////////////////////
15 
22 #include "art_root_io/TFileService.h"
24 #include "fhiclcpp/ParameterSet.h"
27 #include "canvas/Persistency/Common/FindOne.h"
28 #include "canvas/Persistency/Common/FindOneP.h"
29 #include "canvas/Persistency/Common/FindMany.h"
30 #include "canvas/Persistency/Common/FindManyP.h"
31 
34 #include "MCCheater/BackTracker.h"
37 
38 #include "TTree.h"
39 #include "TDatabasePDG.h"
40 #include "TParticlePDG.h"
41 
42 #include <string>
43 #include <vector>
44 #include <unordered_map>
45 
46 
47 
48 namespace gar {
49 
51  public:
52  explicit MomentumPerformance(fhicl::ParameterSet const & p);
53  // The compiler-generated destructor is fine for non-base
54  // classes without bare pointers or other resource use.
55 
56  // Plugins should not be copied or assigned.
57  MomentumPerformance(MomentumPerformance const &) = delete;
61 
62  virtual void beginJob() override;
63 
64  // Required functions.
65  void analyze(art::Event const & e) override;
66 
67 
68 
69  private:
70  void ClearVectors();
71  void FillVectors(art::Event const & e);
72 
73  void processIonizationInfo(rec::TrackIoniz& ion, float ionizeTruncate,
74  float& forwardIonVal, float& backwardIonVal);
75  float processOneDirection(std::vector<std::pair<float,float>> SigData,
76  float ionizeTruncate);
77  // Helper method for processOneDirection
78  static bool lessThan_byE(std::pair<float,float> a, std::pair<float,float> b)
79  {return a.first < b.first;}
80 
81 
82 
83 
84  // Position of TPC from geometry service; 1 S Boston Ave.
85  double ItsInTulsa[3];
86 
87  // Input data labels
91 
92  // Ionization truncation parameter
94 
95  // the analysis tree
96  TTree *fTree;
97 
98  // Backtracker service
100 
101 
102 
103  // The analysis tree. Use Rtypes.h here, as these data get used by root
104  // global event info
105  Int_t fRun;
106  Int_t fSubRun;
107  Int_t fEvent;
108 
109  // MCTruth data; this analysis assumes that there is only 1 neutrino
111  Int_t fCCNC;
112  Int_t fMode;
114  Float_t fMCVertexX;
115  Float_t fMCVertexY;
116  Float_t fMCVertexZ;
117 
118  // MCParticle data
119  std::vector<Int_t> fMCP_PDG;
120  std::vector<Float_t> fMCP_X;
121  std::vector<Float_t> fMCP_Y;
122  std::vector<Float_t> fMCP_Z;
123  std::vector<Float_t> fMCP_PX;
124  std::vector<Float_t> fMCP_PY;
125  std::vector<Float_t> fMCP_PZ;
126  std::vector<Float_t> fMCP_Time;
127 
128  // track data
129  std::vector<Int_t> fBackMatchNo;
130  std::vector<ULong64_t> fTrackIDNumber;
131  std::vector<Float_t> fTrackX;
132  std::vector<Float_t> fTrackY;
133  std::vector<Float_t> fTrackZ;
134  std::vector<Float_t> fTrackPX;
135  std::vector<Float_t> fTrackPY;
136  std::vector<Float_t> fTrackPZ;
137  std::vector<Int_t> fTrackQ;
138  std::vector<Float_t> fTrackLen;
139  std::vector<Int_t> fNTPCClustersOnTrack;
140  std::vector<Float_t> fTrackAvgIon;
141 
142  // Some MC->Track matching info
143  std::vector<Int_t> fNhitPicked;
144  std::vector<Int_t> fNhitMatched;
145  std::vector<Float_t> fTrackMCcosT;
146  std::vector<Float_t> fTrackMCdelX;
147  };
148 }
149 
150 
151 
152 //==============================================================================
153 //==============================================================================
154 //==============================================================================
155 // constructor
157 
158  fGeantLabel = p.get<std::string>("GEANTLabel","geant");
159  fTPCClusterLabel = p.get<std::string>("TPCClusterLabel","tpccluster");
160  fTrackLabel = p.get<std::string>("TrackLabel","track");
161 
162  fIonizTruncate = p.get<float>("IonizTruncate", 0.70);
163 
164 
165 
166  consumesMany<std::vector<simb::MCTruth> >();
167  consumes<std::vector<simb::MCParticle> >(fGeantLabel);
168 
169  consumes<std::vector<rec::TPCCluster> >(fTPCClusterLabel);
170  consumes<art::Assns<rec::Track, rec::TPCCluster> >(fTPCClusterLabel);
171  consumes<std::vector<rec::Track> >(fTrackLabel);
172  consumes<std::vector<rec::TrackIoniz>>(fTrackLabel);
173  consumes<art::Assns<rec::TrackIoniz, rec::Track>>(fTrackLabel);
174 
175 } // end constructor
176 
177 
178 
179 //==============================================================================
180 //==============================================================================
181 //==============================================================================
183 
185  ItsInTulsa[0] = euclid->GetOriginX();
186  ItsInTulsa[1] = euclid->GetOriginY();
187  ItsInTulsa[2] = euclid->GetOriginZ();
188 
190  fTree = tfs->make<TTree>("GArAnaTree","GArAnaTree");
191 
192  cheat::BackTrackerCore const* const_bt = gar::providerFrom<cheat::BackTracker>();
193  fBack = const_cast<cheat::BackTrackerCore*>(const_bt);
194 
195 
196 
197  fTree->Branch("Run", &fRun, "Run/I");
198  fTree->Branch("SubRun", &fSubRun, "SubRun/I");
199  fTree->Branch("Event", &fEvent, "Event/I");
200 
201  fTree->Branch("NType", &fNeutrinoType, "Event/I");
202  fTree->Branch("CCNC", &fCCNC, "Event/I");
203  fTree->Branch("Mode", &fMode, "Event/I");
204  fTree->Branch("InterT", &fInteractionType, "Event/I");
205  fTree->Branch("MCVertX", &fMCVertexX, "Event/F");
206  fTree->Branch("MCVertY", &fMCVertexY, "Event/F");
207  fTree->Branch("MCVertZ", &fMCVertexZ, "Event/F");
208 
209  fTree->Branch("MCP_PDG", &fMCP_PDG);
210  fTree->Branch("MCP_X", &fMCP_X);
211  fTree->Branch("MCP_Y", &fMCP_Y);
212  fTree->Branch("MCP_Z", &fMCP_Z);
213  fTree->Branch("MCP_PX", &fMCP_PX);
214  fTree->Branch("MCP_PY", &fMCP_PY);
215  fTree->Branch("MCP_PZ", &fMCP_PZ);
216  fTree->Branch("MCP_Time", &fMCP_Time);
217 
218  fTree->Branch("BackMatchNo", &fBackMatchNo);
219  fTree->Branch("TrackIDNumber", &fTrackIDNumber);
220  fTree->Branch("TrackX", &fTrackX);
221  fTree->Branch("TrackY", &fTrackY);
222  fTree->Branch("TrackZ", &fTrackZ);
223  fTree->Branch("TrackPX", &fTrackPX);
224  fTree->Branch("TrackPY", &fTrackPY);
225  fTree->Branch("TrackPZ", &fTrackPZ);
226  fTree->Branch("TrackQ", &fTrackQ);
227  fTree->Branch("TrackLen", &fTrackLen);
228  fTree->Branch("NTPCClustersOnTrack", &fNTPCClustersOnTrack);
229  fTree->Branch("TrackAvgIon", &fTrackAvgIon);
230 
231  fTree->Branch("NhitPicked", &fNhitPicked);
232  fTree->Branch("NhitMatched", &fNhitMatched);
233  fTree->Branch("TrackMCcosT", &fTrackMCcosT);
234  fTree->Branch("TrackMCdelX", &fTrackMCdelX);
235 
236  return;
237 } // End of :MomentumPerformance::beginJob
238 
239 
240 
241 //==============================================================================
242 //==============================================================================
243 //==============================================================================
245 
246  ClearVectors();
247  FillVectors(event);
248  fTree->Fill();
249  return;
250 }
251 
252 
253 
254 //==============================================================================
255 //==============================================================================
256 //==============================================================================
258  // clear out all our vectors
259  fMCP_PDG.clear();
260  fMCP_X.clear();
261  fMCP_Y.clear();
262  fMCP_Z.clear();
263  fMCP_PX.clear();
264  fMCP_PY.clear();
265  fMCP_PZ.clear();
266  fMCP_Time.clear();
267 
268  fBackMatchNo.clear();
269  fTrackIDNumber.clear();
270  fTrackX.clear();
271  fTrackY.clear();
272  fTrackZ.clear();
273  fTrackPX.clear();
274  fTrackPY.clear();
275  fTrackPZ.clear();
276  fTrackQ.clear();
277  fTrackLen.clear();
278  fTrackAvgIon.clear();
279  fNTPCClustersOnTrack.clear();
280 
281  fTrackMCcosT.clear();
282  fTrackMCdelX.clear();
283 
284  return;
285 } // end :MomentumPerformance::ClearVectors
286 
287 
288 
289 //==============================================================================
290 //==============================================================================
291 //==============================================================================
293 
294 
295 
296  // ============= Get art handles ==========================================
297  // Get handles for MCinfo, also good for MCPTrajectory. Want to get all
298  // MCTruths, regardless of generator label.
299 
300  auto mctruthHandles = event.getMany<std::vector<simb::MCTruth> >();
301 
302  if (mctruthHandles.size()!=1) {
303  throw cet::exception("MomentumPerformance") << " Need just 1 simb::MCTruth"
304  << " Line " << __LINE__ << " in file " << __FILE__ << std::endl;
305  }
306 
307  auto MCPHandle = event.getHandle< std::vector<simb::MCParticle> >(fGeantLabel);
308  if (!MCPHandle) {
309  throw cet::exception("MomentumPerformance") << " No simb::MCParticle"
310  << " Line " << __LINE__ << " in file " << __FILE__ << std::endl;
311  }
312 
313  // Get handles for Tracks and their ionizations; also Assn's to TPCClusters, TrackIoniz
314  art::FindOneP<rec::TrackIoniz>* findIonization = NULL;
315 
316  auto TrackHandle = event.getHandle< std::vector<rec::Track> >(fTrackLabel);
317  if (!TrackHandle) {
318  throw cet::exception("MomentumPerformance") << " No rec::Track"
319  << " Line " << __LINE__ << " in file " << __FILE__ << std::endl;
320  }
321 
322  auto TrackIonHandle = event.getHandle< std::vector<rec::TrackIoniz> >(fTrackLabel);
323  if (!TrackIonHandle) {
324  throw cet::exception("MomentumPerformance") << " No rec::TrackIoniz"
325  << " Line " << __LINE__ << " in file " << __FILE__ << std::endl;
326  }
327  findIonization = new art::FindOneP<rec::TrackIoniz>(TrackHandle,event,fTrackLabel);
328 
329 
330 
331 
332 
333  // ============= Pull art handles =========================================
334  fRun = event.run();
335  fSubRun = event.subRun();
336  fEvent = event.id().event();
337 
338 
339 
340  // save MCTruth info. This analysis is designed for single-interaction MC
341  for ( simb::MCTruth const& mct : *(mctruthHandles.at(0)) ) {
342  if (!mct.NeutrinoSet()) return;
343  simb::MCNeutrino nuw = mct.GetNeutrino();
344  fNeutrinoType = nuw.Nu().PdgCode();
345  fCCNC = nuw.CCNC();
346  fMode = nuw.Mode();
348  fMCVertexX = nuw.Nu().EndX();
349  fMCVertexY = nuw.Nu().EndY();
350  fMCVertexZ = nuw.Nu().EndZ();
351  } // end MC info from MCTruth
352 
353  typedef int TrkId;
354  std::unordered_map<TrkId, Int_t> TrackIdToIndex;
355  Int_t index = 0;
356  for ( auto const& mcp : *MCPHandle ) {
357  int TrackId = mcp.TrackId();
358  TrackIdToIndex[TrackId] = index++;
359  }
360 
361 
362 
363  for ( simb::MCParticle mcp : *MCPHandle ) {
364  // If mcp.Mother() == 0, particle is from initial vertex;
365  TrkId momTrkId = mcp.Mother();
366  int momPDG = 0;
367  if (momTrkId>0) {
368  if(TrackIdToIndex.find(momTrkId) != TrackIdToIndex.end()){
369  Int_t momIndex = TrackIdToIndex[momTrkId];
370  momPDG = (*MCPHandle).at(momIndex).PdgCode();
371  } else {
372  throw cet::exception("MomentumPerformance") << " mcp trackid "
373  << mcp.TrackId() << " pdg code " << mcp.PdgCode()
374  << " could not find mother trk id " << momTrkId
375  << " in the TrackIdToIndex map; creating process is "
376  << mcp.Process() << "\nLine " << __LINE__ << " in file "
377  << __FILE__ << std::endl;
378  }
379  }
380  if (momPDG != 0) continue;
381 
382 
383 
384  // Pick up muons, electrons, charged pions, protons
385  int thisPDG = mcp.PdgCode();
386  bool isTrackable =
387  abs(thisPDG)==13 || abs(thisPDG)==11 || abs(thisPDG)==211 || abs(thisPDG)==2212;
388  if (!isTrackable) continue;
389 
390  const TLorentzVector& positionMCP = mcp.Position(0);
391  const TLorentzVector& momentumMCP = mcp.Momentum(0);
392 
393 
394 
395  // OK get the matching tracks from the backtracker. First collect yer tracks
396  std::vector<art::Ptr<rec::Track>> allTracks;
397  auto const trackPtrMaker = art::PtrMaker<rec::Track>(event,TrackHandle.id());
398  for (size_t iTrack=0; iTrack<TrackHandle->size(); ++iTrack ) {
399  allTracks.push_back( trackPtrMaker(iTrack) );
400  }
401 
402  std::vector<art::Ptr<rec::Track>> matchedTracks;
403  matchedTracks = fBack->MCParticleToTracks(&mcp,allTracks);
404 
405 
406 
407  // Which track end you want?
408  float minDist = 1e6;
409  int pickedTrack = -1;
411  size_t iTrack;
412  for (iTrack=0; iTrack<matchedTracks.size(); ++iTrack) {
413  rec::Track track = *(matchedTracks[iTrack]);
414  float distStart = std::hypot(track.Vertex()[0] -positionMCP[0],
415  track.Vertex()[1] -positionMCP[1],
416  track.Vertex()[2] -positionMCP[2]);
417  float distEnd = std::hypot(track.End()[0] -positionMCP[0],
418  track.End()[1] -positionMCP[1],
419  track.End()[2] -positionMCP[2]);
420  if (distStart<distEnd) {
421  if (distStart<minDist) {
422  pickedTrack = iTrack;
423  minDist = distStart;
424  kate = rec::TrackEndBeg;
425  }
426  } else {
427  if (distEnd<minDist) {
428  pickedTrack = iTrack;
429  minDist = distEnd;
430  kate = rec::TrackEndEnd;
431  }
432  }
433  }
434  if (pickedTrack == -1) continue;
435 
436 
437 
438  // Save that tracks info; but first you need the corresponding MC info
439  fMCP_PDG.push_back(thisPDG);
440  fMCP_X.push_back(positionMCP.X());
441  fMCP_Y.push_back(positionMCP.Y());
442  fMCP_Z.push_back(positionMCP.Z());
443  fMCP_PX.push_back(momentumMCP.Px());
444  fMCP_PY.push_back(momentumMCP.Py());
445  fMCP_PZ.push_back(momentumMCP.Pz());
446  fMCP_Time.push_back(mcp.T());
447 
448  fBackMatchNo.push_back(iTrack);
449  rec::Track theTrack = *(matchedTracks[pickedTrack]);
450  fTrackIDNumber.push_back(theTrack.getIDNumber());
451 
452  TVector3* trackInPhase; TVector3* trackInSpace;
453 
454  if (kate==rec::TrackEndBeg) {
455  fTrackX.push_back (theTrack.Vertex()[0]);
456  fTrackY.push_back (theTrack.Vertex()[1]);
457  fTrackZ.push_back (theTrack.Vertex()[2]);
458  fTrackPX.push_back (theTrack.Momentum_beg()*theTrack.VtxDir()[0]);
459  fTrackPY.push_back (theTrack.Momentum_beg()*theTrack.VtxDir()[1]);
460  fTrackPZ.push_back (theTrack.Momentum_beg()*theTrack.VtxDir()[2]);
461  fTrackQ.push_back (theTrack.ChargeBeg());
462  fTrackLen.push_back(theTrack.LengthBackward());
463  trackInPhase = new TVector3( theTrack.VtxDir() );
464  trackInSpace = new TVector3( theTrack.Vertex() );
465  } else {
466  fTrackX.push_back (theTrack.End()[0]);
467  fTrackY.push_back (theTrack.End()[1]);
468  fTrackZ.push_back (theTrack.End()[2]);
469  fTrackPX.push_back (theTrack.Momentum_end()*theTrack.EndDir()[0]);
470  fTrackPY.push_back (theTrack.Momentum_end()*theTrack.EndDir()[1]);
471  fTrackPZ.push_back (theTrack.Momentum_end()*theTrack.EndDir()[2]);
472  fTrackQ.push_back (theTrack.ChargeEnd());
473  fTrackLen.push_back(theTrack.LengthForward());
474  trackInPhase = new TVector3( theTrack.EndDir() );
475  trackInSpace = new TVector3( theTrack.End() );
476  }
477  fNTPCClustersOnTrack.push_back(theTrack.NHits());
478 
479 
480  // What fraction of the hits in all tracks matched to this MCParticle
481  // are in the pickedTrack?
482  int num, den; num = den = 0;
483  for (int iTrack_local=0; iTrack_local<(int)matchedTracks.size(); ++iTrack_local) {
484  rec::Track thisTrack = *(matchedTracks[iTrack_local]);
485  std::vector<art::Ptr<rec::Hit>> umlazi = fBack->TrackToHits(&thisTrack);
486  den += umlazi.size();
487  if (iTrack_local == pickedTrack) num += umlazi.size();
488  }
489  fNhitPicked.push_back(num);
490  fNhitMatched.push_back(den);
491 
492  // And spatial track-matching info
493  float cosT = (*trackInPhase)[0]*momentumMCP.Px()
494  +(*trackInPhase)[1]*momentumMCP.Py()
495  +(*trackInPhase)[2]*momentumMCP.Pz();
496  cosT /= momentumMCP.P();
497  fTrackMCcosT.push_back(cosT);
498 
499  TVector3 vecX( (*trackInSpace)[0] -positionMCP.X(),
500  (*trackInSpace)[1] -positionMCP.Y(),
501  (*trackInSpace)[2] -positionMCP.Z() );
502  float delX = vecX.Cross(*trackInPhase).Mag();
503  fTrackMCdelX.push_back(delX);
504 
505 
506 
507  // Need to determine which track in TrackHandle is the one
508  // picked from matchedTracks
509  int iPickedTrack = -1;
510  for (size_t iTrack_local=0; iTrack_local<TrackHandle->size(); ++iTrack_local ) {
511  if ( allTracks[iTrack_local]->getIDNumber() == theTrack.getIDNumber() ) {
512  iPickedTrack = iTrack_local;
513  break;
514  }
515  }
516  if (iPickedTrack>=0 && findIonization->isValid()) {
517  // No calibration for now. Someday this should all be in reco
518  rec::TrackIoniz ionization = *(findIonization->at(iPickedTrack));
519  float avgIonF, avgIonB;
520  processIonizationInfo(ionization, fIonizTruncate, avgIonF, avgIonB);
521  if (kate==rec::TrackEndBeg) {
522  fTrackAvgIon.push_back( avgIonF );
523  } else {
524  fTrackAvgIon.push_back( avgIonB );
525  }
526  } else {
527  // must push_back something so that fTrackAvgIon is of correct size.
528  fTrackAvgIon.push_back( 0.0 );
529  }
530 
531  } // end loop on MCParticles
532 
533 } // end MomentumPerformance::FillVectors
534 
535 
536 
537 //==============================================================================
538 //==============================================================================
539 //==============================================================================
540 // Process ionization. Copy of anatree_module code as of Apr 2020.
542 float& forwardIonVal, float& backwardIonVal) {
543 
544  // NO CALIBRATION SERVICE FOR NOW
545 
546  std::vector<std::pair<float,float>> SigData = ion.getFWD_dSigdXs();
547  forwardIonVal = processOneDirection(SigData, ionizeTruncate);
548 
549  SigData = ion.getBAK_dSigdXs();
550  backwardIonVal = processOneDirection(SigData, ionizeTruncate);
551 
552  return;
553 }
554 
555 
556 
557 float gar::MomentumPerformance::processOneDirection(std::vector<std::pair<float,float>> SigData, float ionizeTruncate) {
558 
559  std::vector<std::pair<float,float>> dEvsX; // Ionization vs distance along track
560 
561  // The first hit on the track never had its ionization info stored. Not a problem
562  // really. Each pair is a hit and the step along the track that ends at the hit
563  // For the last hit, just take the step from the n-1 hit; don't guess some distance
564  // to (nonexistant!) n+1 hit. Using pointer arithmetic because you are a real K&R
565  // C nerd! Except that C++ doesn't know you are such a nerd and if
566  // SigData.size()==0, then SigData.end()-1 is 0xFFFFFFFFFFFFFFF8.
567  if (SigData.size()==0) return 0.0;
568  float distAlongTrack = 0;
569  std::vector<std::pair<float,float>>::iterator littlebit = SigData.begin();
570  for (; littlebit<(SigData.end()-1); ++littlebit) {
571  float dE = std::get<0>(*littlebit);
572  // tpctrackfit2_module.cc fills the TrackIoniz data product so that
573  // this quantity is really dL > 0 not dX, a coordinate on the drift axis
574  float dX = std::get<1>(*littlebit);
575  distAlongTrack += dX; // But count full step to get hit position on track
576  // Take dX to be 1/2 the previous + last segment
577  dX += std::get<1>(*(littlebit+1));
578  float dEdX = dE/(0.5*dX);
579 
580  std::pair pushme = std::make_pair(dEdX,distAlongTrack);
581  dEvsX.push_back( pushme );
582  }
583 
584  // Get the truncated mean; first sort then take mean
585  std::sort(dEvsX.begin(),dEvsX.end(), lessThan_byE);
586 
587  // Get the dEdX vs length data, truncated.
588  int goUpTo = ionizeTruncate * dEvsX.size() +0.5;
589  if (goUpTo > (int)dEvsX.size()) goUpTo = dEvsX.size();
590  int i = 1; float returnvalue = 0;
591  littlebit = dEvsX.begin();
592  for (; littlebit<dEvsX.end(); ++littlebit) {
593  returnvalue += std::get<0>(*littlebit);
594  ++i;
595  if (i>goUpTo) break;
596  }
597  returnvalue /= goUpTo;
598  return returnvalue;
599 }
600 
601 
602 
603 
604 
float const & Momentum_beg() const
Definition: Track.h:146
void analyze(art::Event const &e) override
void processIonizationInfo(rec::TrackIoniz &ion, float ionizeTruncate, float &forwardIonVal, float &backwardIonVal)
int PdgCode() const
Definition: MCParticle.h:212
int CCNC() const
Definition: MCNeutrino.h:148
int TrackEnd
Definition: Track.h:32
std::vector< art::Ptr< rec::Track > > MCParticleToTracks(simb::MCParticle *const p, std::vector< art::Ptr< rec::Track >> const &tracks)
std::vector< art::Ptr< rec::Hit > > const TrackToHits(rec::Track *const t)
double EndZ() const
Definition: MCParticle.h:228
std::string string
Definition: nybbler.cc:12
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
void FillVectors(art::Event const &e)
struct vector vector
float const & LengthBackward() const
Definition: Track.h:145
TrackEnd const TrackEndEnd
Definition: Track.h:33
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
Particle class.
double EndY() const
Definition: MCParticle.h:227
double dEdX(double KE, const simb::MCParticle *part)
std::enable_if_t< std::is_arithmetic_v< T >, T > hypot(T x, T y)
Definition: hypot.h:60
const float * VtxDir() const
Definition: Track.h:141
int InteractionType() const
Definition: MCNeutrino.h:150
T abs(T value)
std::vector< Int_t > fNTPCClustersOnTrack
float const & LengthForward() const
Definition: Track.h:144
const double e
const float * Vertex() const
Definition: Track.h:139
int ChargeEnd() const
Definition: Track.cxx:236
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
MomentumPerformance(fhicl::ParameterSet const &p)
float processOneDirection(std::vector< std::pair< float, float >> SigData, float ionizeTruncate)
MomentumPerformance & operator=(MomentumPerformance const &)=delete
const double a
cheat::BackTrackerCore * fBack
int ChargeBeg() const
Definition: Track.cxx:229
T get(std::string const &key) const
Definition: ParameterSet.h:271
p
Definition: test.py:223
const float * End() const
Definition: Track.h:140
static bool lessThan_byE(std::pair< float, float > a, std::pair< float, float > b)
General GArSoft Utilities.
TrackEnd const TrackEndBeg
Definition: Track.h:33
std::vector< ULong64_t > fTrackIDNumber
static bool * b
Definition: config.cpp:1043
float const & Momentum_end() const
Definition: Track.h:147
size_t const & NHits() const
Definition: Track.h:150
gar::rec::IDNumber getIDNumber() const
Definition: Track.cxx:42
Event generator information.
Definition: MCTruth.h:32
const std::vector< std::pair< float, float > > getBAK_dSigdXs() const
Definition: TrackIoniz.h:23
double EndX() const
Definition: MCParticle.h:226
const std::vector< std::pair< float, float > > getFWD_dSigdXs() const
Definition: TrackIoniz.h:22
Event generator information.
Definition: MCNeutrino.h:18
int Mode() const
Definition: MCNeutrino.h:149
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
Event finding and building.
const float * EndDir() const
Definition: Track.h:142