CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
21  /* Creates a VertexHistory with association given by pset.
22 
23  /param[in] config with the configuration values
24  */
26 
28  void newEvent(const edm::Event &, const edm::EventSetup &);
29 
31  /* Return false when the history cannot be determined upto a given depth.
32  If not depth is pass to the function no restriction are apply to it.
33 
34  /param[in] trackingVertexRef of a simulated track
35  /param[in] depth of the vertex history
36  /param[out] boolean that is true when history can be determined
37  */
39  if (enableSimToReco_) {
40  std::pair<reco::VertexBaseRef, double> result = match(tvr, simToReco_, bestMatchByMaxValue_);
41  recovertex_ = result.first;
42  quality_ = result.second;
43  }
44  return HistoryBase::evaluate(tvr);
45  }
46 
48  /* Return false when the track association is not possible (fake track).
49 
50  /param[in] VertexRef to a reco::track
51  /param[out] boolean that is false when a fake track is detected
52  */
54 
56  const reco::VertexBaseRef &recoVertex() const { return recovertex_; }
57 
59  double quality() const { return quality_; }
60 
61 private:
63 
65 
66  double quality_;
67 
69 
71 
73 
75 
77 
79 };
80 
81 #endif
This class traces the simulated and generated history of a given track.
Definition: VertexHistory.h:18
reco::VertexRecoToSimCollection recoToSim_
Definition: VertexHistory.h:76
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
bool bestMatchByMaxValue_
Definition: VertexHistory.h:62
const reco::VertexBaseRef & recoVertex() const
Return a reference to the reconstructed track.
Definition: VertexHistory.h:56
reco::VertexSimToRecoCollection simToReco_
Definition: VertexHistory.h:78
tuple result
Definition: mps_fire.py:311
bool evaluate(TrackingVertexRef tvr)
Evaluate track history using a TrackingParticleRef.
Definition: VertexHistory.h:38
edm::InputTag trackingTruth_
Definition: VertexHistory.h:70
edm::InputTag vertexAssociator_
Definition: VertexHistory.h:72
reco::VertexBaseRef recovertex_
Definition: VertexHistory.h:74
bool enableRecoToSim_
Definition: VertexHistory.h:64
VertexHistory(const edm::ParameterSet &, edm::ConsumesCollector)
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:96
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:59
bool enableSimToReco_
Definition: VertexHistory.h:64
edm::InputTag vertexProducer_
Definition: VertexHistory.h:68