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 
11 
15 
17 class VertexHistory : public HistoryBase
18 {
19 
20 public:
21 
23  /* Creates a VertexHistory with association given by pset.
24 
25  /param[in] config with the configuration values
26  */
28 
30  void newEvent(const edm::Event &, const edm::EventSetup &);
31 
33  /* Return false when the history cannot be determined upto a given depth.
34  If not depth is pass to the function no restriction are apply to it.
35 
36  /param[in] trackingVertexRef of a simulated track
37  /param[in] depth of the vertex history
38  /param[out] boolean that is true when history can be determined
39  */
41  {
42  if ( enableSimToReco_ )
43  {
44 
45  std::pair<reco::VertexBaseRef, double> result = match(tvr, simToReco_, bestMatchByMaxValue_);
46  recovertex_ = result.first;
47  quality_ = result.second;
48  }
49  return HistoryBase::evaluate(tvr);
50  }
51 
52 
54  /* Return false when the track association is not possible (fake track).
55 
56  /param[in] VertexRef to a reco::track
57  /param[out] boolean that is false when a fake track is detected
58  */
60 
63  {
64  return recovertex_;
65  }
66 
68  double quality() const
69  {
70  return quality_;
71  }
72 
73 
74 private:
75 
77 
79 
80  double quality_;
81 
83 
85 
87 
88  std::string trackAssociator_;
89 
90  std::string vertexAssociator_;
91 
93 
95 
97 };
98 
99 #endif
This class traces the simulated and generated history of a given track.
Definition: VertexHistory.h:17
reco::VertexRecoToSimCollection recoToSim_
Definition: VertexHistory.h:94
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
std::string trackAssociator_
Definition: VertexHistory.h:88
bool bestMatchByMaxValue_
Definition: VertexHistory.h:76
edm::InputTag trackProducer_
Definition: VertexHistory.h:82
const reco::VertexBaseRef & recoVertex() const
Return a reference to the reconstructed track.
Definition: VertexHistory.h:62
reco::VertexSimToRecoCollection simToReco_
Definition: VertexHistory.h:96
bool evaluate(TrackingVertexRef tvr)
Evaluate track history using a TrackingParticleRef.
Definition: VertexHistory.h:40
edm::InputTag trackingTruth_
Definition: VertexHistory.h:86
reco::VertexBaseRef recovertex_
Definition: VertexHistory.h:92
tuple result
Definition: query.py:137
bool enableRecoToSim_
Definition: VertexHistory.h:78
VertexHistory(const edm::ParameterSet &)
Constructor by pset.
Definition: VertexHistory.cc:6
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::string vertexAssociator_
Definition: VertexHistory.h:90
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
double quality() const
Return the quality of the match.
Definition: VertexHistory.h:68
bool enableSimToReco_
Definition: VertexHistory.h:78
edm::InputTag vertexProducer_
Definition: VertexHistory.h:84