CMS 3D CMS Logo

PFDisplacedVertexCandidate.h
Go to the documentation of this file.
1 #ifndef DataFormat_ParticleFlowReco_PFDisplacedVertexCandidate_h
2 #define DataFormat_ParticleFlowReco_PFDisplacedVertexCandidate_h
3 
6 
7 #include <vector>
8 #include <map>
9 #include <iostream>
10 
11 namespace reco {
12 
14 
29  public:
33  struct VertexLink {
34  VertexLink() : distance_(-1), dcaPoint_(0, 0, 0), test_(0) {}
35  VertexLink(float d, GlobalPoint p, char t) : distance_(d), dcaPoint_(p), test_(t) {}
36  float distance_;
38  char test_;
39  };
40 
44 
45  typedef std::map<unsigned int, VertexLink> VertexLinkData;
46 
49  typedef std::map<float, std::pair<int, int> > DistMap;
50  typedef std::vector<float> DistVector;
51 
54 
56  void addElement(const TrackBaseRef);
57 
61  void setLink(unsigned i1,
62  unsigned i2,
63  const float dist,
64  const GlobalPoint& dcaPoint,
66 
68  void associatedElements(const unsigned i,
70  std::multimap<float, unsigned>& sortedAssociates,
71  const VertexLinkTest test = LINKTEST_DCA) const;
72 
74 
76  DistMap r2Map() const;
77 
80  DistVector r2Vector() const;
81 
83  DistVector distVector() const;
84 
86  const GlobalPoint dcaPoint(unsigned ie1, unsigned ie2) const;
87 
89  bool isValid() const { return elements_.size() > 1; }
90 
92  const TrackBaseRef& tref(unsigned ie) const { return elements_[ie]; }
93 
95  const std::vector<TrackBaseRef>& elements() const { return elements_; }
96 
98  unsigned nTracks() const { return elements_.size(); }
99 
101  const VertexLinkData& vertexLinkData() const { return vertexLinkData_; }
102 
104  void Dump(std::ostream& out = std::cout) const;
105 
106  private:
108 
110  const float dist(unsigned ie1, unsigned ie2) const;
111 
113  bool testLink(unsigned ie1, unsigned ie2) const;
114 
116  friend std::ostream& operator<<(std::ostream&, const PFDisplacedVertexCandidate&);
117 
119 
122  unsigned vertexLinkDataSize() const;
123 
126  bool matrix2vector(unsigned i, unsigned j, unsigned& index) const;
127 
129 
131  std::vector<TrackBaseRef> elements_;
132 
135  };
136 } // namespace reco
137 
138 #endif
reco::PFDisplacedVertexCandidate::vertexLinkData_
VertexLinkData vertexLinkData_
map of links between tracks
Definition: PFDisplacedVertexCandidate.h:134
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
mps_fire.i
i
Definition: mps_fire.py:428
reco::PFDisplacedVertexCandidate::testLink
bool testLink(unsigned ie1, unsigned ie2) const
test if a link between two tracks is valid: value_link =! -1
Definition: PFDisplacedVertexCandidate.cc:141
gather_cfg.cout
cout
Definition: gather_cfg.py:144
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
reco::PFDisplacedVertexCandidate::tref
const TrackBaseRef & tref(unsigned ie) const
Definition: PFDisplacedVertexCandidate.h:92
reco::PFDisplacedVertexCandidate::VertexLinkTest
VertexLinkTest
Definition: PFDisplacedVertexCandidate.h:43
reco::PFDisplacedVertexCandidate::addElement
void addElement(const TrackBaseRef)
add a track Reference to the current Candidate
Definition: PFDisplacedVertexCandidate.cc:11
reco::PFDisplacedVertexCandidate::dcaPoint
const GlobalPoint dcaPoint(unsigned ie1, unsigned ie2) const
Definition: PFDisplacedVertexCandidate.cc:126
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
reco::PFDisplacedVertexCandidate::elements
const std::vector< TrackBaseRef > & elements() const
Definition: PFDisplacedVertexCandidate.h:95
reco::PFDisplacedVertexCandidate::LINKTEST_DCA
Definition: PFDisplacedVertexCandidate.h:43
reco::PFDisplacedVertexCandidate::operator<<
friend std::ostream & operator<<(std::ostream &, const PFDisplacedVertexCandidate &)
cout function
reco::PFDisplacedVertexCandidate::DistMap
std::map< float, std::pair< int, int > > DistMap
Definition: PFDisplacedVertexCandidate.h:49
test
Definition: SmallWORMDict.h:13
TrackFwd.h
reco::PFDisplacedVertexCandidate::vertexLinkDataSize
unsigned vertexLinkDataSize() const
-----— Storage of the information -----— ///
Definition: PFDisplacedVertexCandidate.cc:163
reco::PFDisplacedVertexCandidate::Dump
void Dump(std::ostream &out=std::cout) const
cout function
Definition: PFDisplacedVertexCandidate.cc:192
reco::PFDisplacedVertexCandidate::vertexLinkData
const VertexLinkData & vertexLinkData() const
Definition: PFDisplacedVertexCandidate.h:101
reco::PFDisplacedVertexCandidate::dist
const float dist(unsigned ie1, unsigned ie2) const
-----— Internal tools -----— ///
Definition: PFDisplacedVertexCandidate.cc:148
reco::PFDisplacedVertexCandidate::r2Map
DistMap r2Map() const
-----— Provide useful information -----— ///
Definition: PFDisplacedVertexCandidate.cc:77
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::PFDisplacedVertexCandidate::PFDisplacedVertexCandidate
PFDisplacedVertexCandidate()
Default constructor.
Definition: PFDisplacedVertexCandidate.cc:9
reco::PFDisplacedVertexCandidate::distVector
DistVector distVector() const
Definition: PFDisplacedVertexCandidate.cc:111
reco::PFDisplacedVertexCandidate::associatedElements
void associatedElements(const unsigned i, const VertexLinkData &vertexLinkData, std::multimap< float, unsigned > &sortedAssociates, const VertexLinkTest test=LINKTEST_DCA) const
associate 2 elements
Definition: PFDisplacedVertexCandidate.cc:39
reco::PFDisplacedVertexCandidate::LINKTEST_DUMMY
Definition: PFDisplacedVertexCandidate.h:43
reco::PFDisplacedVertexCandidate::VertexLinkData
std::map< unsigned int, VertexLink > VertexLinkData
Definition: PFDisplacedVertexCandidate.h:45
reco::PFDisplacedVertexCandidate::isValid
bool isValid() const
A Vertex Candidate is valid if it has at least two tracks.
Definition: PFDisplacedVertexCandidate.h:89
edm::RefToBase< reco::Track >
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
math::GlobalPoint
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
reco::PFDisplacedVertexCandidate::nTracks
unsigned nTracks() const
Definition: PFDisplacedVertexCandidate.h:98
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
ztail.d
d
Definition: ztail.py:151
reco::PFDisplacedVertexCandidate::matrix2vector
bool matrix2vector(unsigned i, unsigned j, unsigned &index) const
Definition: PFDisplacedVertexCandidate.cc:172
reco::PFDisplacedVertexCandidate
A block of tracks linked together.
Definition: PFDisplacedVertexCandidate.h:28
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
GlobalPoint.h
reco::PFDisplacedVertexCandidate::DistVector
std::vector< float > DistVector
Definition: PFDisplacedVertexCandidate.h:50
reco::PFDisplacedVertexCandidate::elements_
std::vector< TrackBaseRef > elements_
-----— MEMBERS -----— ///
Definition: PFDisplacedVertexCandidate.h:131
reco::PFDisplacedVertexCandidate::setLink
void setLink(unsigned i1, unsigned i2, const float dist, const GlobalPoint &dcaPoint, const VertexLinkTest test=LINKTEST_DCA)
Definition: PFDisplacedVertexCandidate.cc:13
reco::PFDisplacedVertexCandidate::r2Vector
DistVector r2Vector() const
Definition: PFDisplacedVertexCandidate.cc:94
reco::PFDisplacedVertexCandidate::LINKTEST_ALL
Definition: PFDisplacedVertexCandidate.h:43