CMS 3D CMS Logo

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 <memory>
13 #include <vector>
14 
16 
18 
22 
24 
25 class TrackerTopology;
26 
28 class TrackQuality {
29 public:
30  typedef std::vector<TrackingParticleRef> SimParticleTrail;
31 
32  struct Layer {
33  enum SubDet {
34  Invalid = 0,
45  };
46 
48 
49  struct Hit {
50  short int recHitId;
52  };
53 
55  short int layer;
56  std::vector<Hit> hits;
57  };
58 
59 public:
61  /* Creates a TrackQuality object from a pset.
62 
63  /param[in] pset with the configuration values
64  */
66 
68  void newEvent(const edm::Event &, const edm::EventSetup &);
69 
71  void evaluate(SimParticleTrail const &, reco::TrackBaseRef const &, const TrackerTopology *tTopo);
72 
74  unsigned int numberOfLayers() const { return layers_.size(); }
75 
77  const Layer &layer(unsigned int index) const { return layers_[index]; }
78 
79 private:
81  std::unique_ptr<TrackerHitAssociator> associator_;
82 
83  std::vector<Layer> layers_;
84 };
85 
86 #endif
unsigned int numberOfLayers() const
Return the number of layers with simulated and/or reconstructed hits.
Definition: TrackQuality.h:74
std::vector< TrackingParticleRef > SimParticleTrail
Definition: TrackQuality.h:30
std::unique_ptr< TrackerHitAssociator > associator_
Definition: TrackQuality.h:81
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: TrackQuality.h:80
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:77
std::vector< Layer > layers_
Definition: TrackQuality.h:83
This class analyses the reconstruction quality for a given track.
Definition: TrackQuality.h:28
std::vector< Hit > hits
Definition: TrackQuality.h:56
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
TrackQuality(const edm::ParameterSet &, edm::ConsumesCollector &iC)
Constructor by pset.