test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackQuality.h
Go to the documentation of this file.
1 /*
2  * TrackQuality.h
3  *
4  * Created by Christophe Saout on 9/25/08.
5  * 2007 __MyCompanyName__.
6  *
7  */
8 
9 #ifndef TrackQuality_h
10 #define TrackQuality_h
11 
12 #include <vector>
13 #include <memory>
14 
16 
18 
22 
24 
25 class TrackerTopology;
26 
29 {
30 public:
31  typedef std::vector<TrackingParticleRef> SimParticleTrail;
32 
33  struct Layer
34  {
35  enum SubDet
36  {
37  Invalid = 0,
41  };
42 
43  enum State
44  {
45  Unknown = 0,
49  Bad,
53  };
54 
55  struct Hit
56  {
57  short int recHitId;
59  };
60 
62  short int layer;
63  std::vector<Hit> hits;
64  };
65 
66 public:
68  /* Creates a TrackQuality object from a pset.
69 
70  /param[in] pset with the configuration values
71  */
73 
75  void newEvent(const edm::Event &, const edm::EventSetup &);
76 
78  void evaluate(SimParticleTrail const &, reco::TrackBaseRef const &, const TrackerTopology *tTopo);
79 
81  unsigned int numberOfLayers() const
82  {
83  return layers_.size();
84  }
85 
87  const Layer &layer(unsigned int index) const
88  {
89  return layers_[index];
90  }
91 
92 private:
94  std::auto_ptr<TrackerHitAssociator> associator_;
95 
96  std::vector<Layer> layers_;
97 };
98 
99 #endif
unsigned int numberOfLayers() const
Return the number of layers with simulated and/or reconstructed hits.
Definition: TrackQuality.h:81
std::vector< TrackingParticleRef > SimParticleTrail
Definition: TrackQuality.h:31
std::auto_ptr< TrackerHitAssociator > associator_
Definition: TrackQuality.h:94
TrackQuality(const edm::ParameterSet &)
Constructor by pset.
void evaluate(SimParticleTrail const &, reco::TrackBaseRef const &, const TrackerTopology *tTopo)
Compute information about the track reconstruction quality.
const Layer & layer(unsigned int index) const
Return information about the given layer by index.
Definition: TrackQuality.h:87
std::vector< Layer > layers_
Definition: TrackQuality.h:96
This class analyses the reconstruction quality for a given track.
Definition: TrackQuality.h:28
std::vector< Hit > hits
Definition: TrackQuality.h:63
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
const edm::ParameterSet associatorPSet_
Definition: TrackQuality.h:93