CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NuclearTester.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
7 //-----------------------------------------------------------------------------
8 #ifndef CD_NuclearTester_H_
9 #define CD_NuclearTester_H_
15 
17 private:
18 
20  typedef std::vector<TM> TMContainer;
22  typedef std::pair<TrajectoryMeasurement, TMContainer > TMPair;
23  typedef std::vector< TMPair > TMPairVector;
24 
25 public :
26  NuclearTester(unsigned int max_hits, const MeasurementEstimator* est, const TrackerGeometry* track_geom);
27 
28  bool isNuclearInteraction();
29 
30  double meanHitDistance(const std::vector<TrajectoryMeasurement>& vecTM) const;
31 
32  std::vector<GlobalPoint> HitPositions(const std::vector<TrajectoryMeasurement>& vecTM) const;
33 
34  double fwdEstimate(const std::vector<TrajectoryMeasurement>& vecTM) const;
35 
36  std::vector<TM>::const_iterator lastValidTM(const std::vector<TM>& vecTM) const;
37 
38  void push_back(const TM & init_tm, const TMContainer & vecTM) {
39  allTM.push_back(std::make_pair(init_tm, vecTM) );
40  compatible_hits.push_back(vecTM.size());
41  }
42 
43  const TMContainer& back() const { return allTM.back().second; }
44 
45  double meanHitDistance() const { return meanHitDistance( back() ); }
46 
47  double fwdEstimate() const { return fwdEstimate( back() ); }
48 
49  void reset(unsigned int nMeasurements) {
50  allTM.clear();
51  compatible_hits.clear();
52  maxHits = (nMeasurements < maxHits) ? nMeasurements : maxHits;
53  }
54 
55  int nuclearIndex() const { return NuclearIndex; }
56 
57  const TMPair& goodTMPair() const { return *(allTM.begin()+nuclearIndex()-1); }
58 
59  unsigned int nHitsChecked() const { return compatible_hits.size(); }
60 
61  std::vector<int> compatibleHits() const { return compatible_hits; }
62 
63 private :
64 
65  // data members
67  std::vector< int > compatible_hits;
69 
70  // input parameters
71  unsigned int maxHits;
74 
75  bool checkWithMultiplicity();
76 };
77 #endif
TMPairVector allTM
Definition: NuclearTester.h:66
bool checkWithMultiplicity()
double fwdEstimate() const
Definition: NuclearTester.h:47
const MeasurementEstimator * theEstimator
Definition: NuclearTester.h:72
std::vector< int > compatibleHits() const
Definition: NuclearTester.h:61
std::vector< GlobalPoint > HitPositions(const std::vector< TrajectoryMeasurement > &vecTM) const
const TMContainer & back() const
Definition: NuclearTester.h:43
std::vector< TM >::const_iterator lastValidTM(const std::vector< TM > &vecTM) const
std::vector< TM > TMContainer
Definition: NuclearTester.h:20
int nuclearIndex() const
Definition: NuclearTester.h:55
std::vector< int > compatible_hits
Definition: NuclearTester.h:67
bool isNuclearInteraction()
void push_back(const TM &init_tm, const TMContainer &vecTM)
Definition: NuclearTester.h:38
void reset(unsigned int nMeasurements)
Definition: NuclearTester.h:49
std::pair< TrajectoryMeasurement, TMContainer > TMPair
Definition: NuclearTester.h:22
unsigned int maxHits
Definition: NuclearTester.h:71
std::vector< TMPair > TMPairVector
Definition: NuclearTester.h:23
TrajectoryMeasurement::ConstRecHitPointer ConstRecHitPointer
Definition: NuclearTester.h:21
NuclearTester(unsigned int max_hits, const MeasurementEstimator *est, const TrackerGeometry *track_geom)
Definition: NuclearTester.cc:6
const TrackerGeometry * trackerGeom
Definition: NuclearTester.h:73
Class used to test if a track has interacted nuclearly.
Definition: NuclearTester.h:16
TrajectoryMeasurement TM
Definition: NuclearTester.h:19
unsigned int nHitsChecked() const
Definition: NuclearTester.h:59
const TMPair & goodTMPair() const
Definition: NuclearTester.h:57
double meanHitDistance() const
Definition: NuclearTester.h:45