CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VertexHistory.h
Go to the documentation of this file.
1 #ifndef VertexHistory_h
2 #define VertexHistory_h
3 
6 
12 
16 
18 class VertexHistory : public HistoryBase
19 {
20 
21 public:
22 
24  /* Creates a VertexHistory with association given by pset.
25 
26  /param[in] config with the configuration values
27  */
30 
32  void newEvent(const edm::Event &, const edm::EventSetup &);
33 
35  /* Return false when the history cannot be determined upto a given depth.
36  If not depth is pass to the function no restriction are apply to it.
37 
38  /param[in] trackingVertexRef of a simulated track
39  /param[in] depth of the vertex history
40  /param[out] boolean that is true when history can be determined
41  */
43  {
44  if ( enableSimToReco_ )
45  {
46 
47  std::pair<reco::VertexBaseRef, double> result = match(tvr, simToReco_, bestMatchByMaxValue_);
48  recovertex_ = result.first;
49  quality_ = result.second;
50  }
51  return HistoryBase::evaluate(tvr);
52  }
53 
54 
56  /* Return false when the track association is not possible (fake track).
57 
58  /param[in] VertexRef to a reco::track
59  /param[out] boolean that is false when a fake track is detected
60  */
62 
65  {
66  return recovertex_;
67  }
68 
70  double quality() const
71  {
72  return quality_;
73  }
74 
75 
76 private:
77 
79 
81 
82  double quality_;
83 
85 
87 
89 
91 
93 
95 };
96 
97 #endif
This class traces the simulated and generated history of a given track.
Definition: VertexHistory.h:18
reco::VertexRecoToSimCollection recoToSim_
Definition: VertexHistory.h:92
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
bool bestMatchByMaxValue_
Definition: VertexHistory.h:78
VertexHistory(const edm::ParameterSet &, edm::ConsumesCollector &&)
Constructor by pset.
Definition: VertexHistory.cc:6
const reco::VertexBaseRef & recoVertex() const
Return a reference to the reconstructed track.
Definition: VertexHistory.h:64
reco::VertexSimToRecoCollection simToReco_
Definition: VertexHistory.h:94
tuple result
Definition: mps_fire.py:95
bool evaluate(TrackingVertexRef tvr)
Evaluate track history using a TrackingParticleRef.
Definition: VertexHistory.h:42
edm::InputTag trackingTruth_
Definition: VertexHistory.h:86
edm::InputTag vertexAssociator_
Definition: VertexHistory.h:88
reco::VertexBaseRef recovertex_
Definition: VertexHistory.h:90
bool enableRecoToSim_
Definition: VertexHistory.h:80
Base class to all the history types.
Definition: HistoryBase.h:12
bool evaluate(TrackingParticleRef tpr)
Evaluate track history using a TrackingParticleRef.
Definition: HistoryBase.h:114
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
double quality() const
Return the quality of the match.
Definition: VertexHistory.h:70
bool enableSimToReco_
Definition: VertexHistory.h:80
edm::InputTag vertexProducer_
Definition: VertexHistory.h:84