CMS 3D CMS Logo

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
ESHandle.h
VertexHistory::vertexAssociator_
edm::InputTag vertexAssociator_
Definition: VertexHistory.h:72
VertexAssociation.h
VertexHistory::recoVertex
const reco::VertexBaseRef & recoVertex() const
Return a reference to the reconstructed track.
Definition: VertexHistory.h:56
VertexHistory::trackingTruth_
edm::InputTag trackingTruth_
Definition: VertexHistory.h:70
VertexHistory::vertexProducer_
edm::InputTag vertexProducer_
Definition: VertexHistory.h:68
VertexHistory::enableRecoToSim_
bool enableRecoToSim_
Definition: VertexHistory.h:64
VertexHistory::quality
double quality() const
Return the quality of the match.
Definition: VertexHistory.h:59
edm::Ref< TrackingVertexCollection >
VertexHistory::VertexHistory
VertexHistory(const edm::ParameterSet &, edm::ConsumesCollector &&)
Constructor by pset.
Definition: VertexHistory.cc:6
VertexHistory::enableSimToReco_
bool enableSimToReco_
Definition: VertexHistory.h:64
VertexHistory::evaluate
bool evaluate(TrackingVertexRef tvr)
Evaluate track history using a TrackingParticleRef.
Definition: VertexHistory.h:38
Vertex.h
VertexHistory::recovertex_
reco::VertexBaseRef recovertex_
Definition: VertexHistory.h:74
HistoryBase.h
edm::ParameterSet
Definition: ParameterSet.h:36
VertexHistory::recoToSim_
reco::VertexRecoToSimCollection recoToSim_
Definition: VertexHistory.h:76
Event.h
VertexHistory
This class traces the simulated and generated history of a given track.
Definition: VertexHistory.h:18
edm::AssociationMap< edm::OneToManyWithQuality< edm::View< reco::Vertex >, TrackingVertexCollection, double > >
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
HistoryBase
Base class to all the history types.
Definition: HistoryBase.h:12
edm::EventSetup
Definition: EventSetup.h:57
VertexFwd.h
Utils.h
VertexHistory::simToReco_
reco::VertexSimToRecoCollection simToReco_
Definition: VertexHistory.h:78
VertexHistory::quality_
double quality_
Definition: VertexHistory.h:66
EventSetup.h
edm::RefToBase< reco::Vertex >
VertexHistory::bestMatchByMaxValue_
bool bestMatchByMaxValue_
Definition: VertexHistory.h:62
mps_fire.result
result
Definition: mps_fire.py:303
ConsumesCollector.h
ParameterSet.h
edm::Event
Definition: Event.h:73
VertexHistory::newEvent
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
Definition: VertexHistory.cc:34
HistoryBase::evaluate
bool evaluate(TrackingParticleRef tpr)
Evaluate track history using a TrackingParticleRef.
Definition: HistoryBase.h:96
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39