CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFBlockElementTrack.h
Go to the documentation of this file.
1 #ifndef __PFBlockElementTrack__
2 #define __PFBlockElementTrack__
3 
4 #include <iostream>
5 
7 
11 
12 namespace reco {
13 
18  public:
19 
21 
23 
24  PFBlockElement* clone() const { return new PFBlockElementTrack(*this); }
25 
26  void Dump(std::ostream& out = std::cout,
27  const char* tab = " " ) const;
28 
30  virtual bool trackType(TrackType trType) const {
31  return (trackType_>>trType) & 1;
32  }
33 
35  virtual void setTrackType(TrackType trType, bool value) {
36  if(value) trackType_ = trackType_ | (1<<trType);
37  else trackType_ = trackType_ ^ (1<<trType);
38  }
39 
40 
42  void setPositionAtECALEntrance(float x, float y, float z) {
43  positionAtECALEntrance_.SetCoordinates(x, y, z);
44  }
45 
46 
50  }
51 
54  const PFRecTrackRef& trackRefPF() const { return trackRefPF_; }
55 
57  const reco::TrackRef& trackRef() const { return trackRef_; }
58 
60  bool isSecondary() const {
61  return
65  }
66 
67  bool isPrimary() const{
68  return trackType(T_TO_DISP);
69  }
70 
72  return isSecondary() || isPrimary();
73  }
74 
77  displacedVertexRef(TrackType trType) const {
78  if (trType == T_TO_DISP)
80  else if (trType == T_FROM_DISP)
82  else return nullPFDispVertex_;
83  }
84 
87 
88  if (trType == T_TO_DISP) {
89  displacedVertexDaughterRef_ = niref; setTrackType(trType,true);}
90  else if (trType == T_FROM_DISP) {
91  displacedVertexMotherRef_ = niref; setTrackType(trType,true);}
92  }
93 
95  const reco::MuonRef& muonRef() const { return muonRef_; }
96 
98  void setMuonRef(const MuonRef& muref) {
99  muonRef_=muref; setTrackType(MUON,true);
100  }
101 
103  const ConversionRefVector& convRefs() const {return convRefs_;}
104 
106  void setConversionRef(const ConversionRef& convRef, TrackType trType) {
107  convRefs_.push_back(convRef); setTrackType(trType,true);
108  }
109 
111  const VertexCompositeCandidateRef& V0Ref() const {return v0Ref_;}
112 
115  v0Ref_ = V0Ref; setTrackType(trType,true);
116  }
117 
118 
119 
120  private:
121 
124 
127 
128  unsigned int trackType_;
129 
132 
135 
138 
141 
144 
147  };
148 }
149 
150 #endif
151 
const VertexCompositeCandidateRef & V0Ref() const
Abstract base class for a PFBlock element (track, cluster...)
const reco::TrackRef & trackRef() const
ConversionRefVector convRefs_
reference to reco conversion
void Dump(std::ostream &out=std::cout, const char *tab=" ") const
print the object inside the element
bool isSecondary() const
check if the track is secondary
PFRecTrackRef trackRefPF_
reference to the corresponding track (transient)
static const PFDisplacedTrackerVertexRef nullPFDispVertex_
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
reco::TrackRef trackRef_
reference to the corresponding track
const math::XYZPointF & positionAtECALEntrance() const
float float float z
const ConversionRefVector & convRefs() const
void setConversionRef(const ConversionRef &convRef, TrackType trType)
the ref to gamma conversion
VertexCompositeCandidateRef v0Ref_
reference to V0
void setPositionAtECALEntrance(float x, float y, float z)
set position at ECAL entrance
void setV0Ref(const VertexCompositeCandidateRef &V0Ref, TrackType trType)
the ref to V0
tuple out
Definition: dbtoconf.py:99
bool isLinkedToDisplacedVertex() const
virtual bool trackType(TrackType trType) const
virtual void setTrackType(TrackType trType, bool value)
the trackType
void setMuonRef(const MuonRef &muref)
reference to the Muon
reco::MuonRef muonRef_
reference to the corresponding muon
PFDisplacedTrackerVertexRef displacedVertexDaughterRef_
reference to the corresponding pf displaced vertex which this track was created
PFDisplacedTrackerVertexRef displacedVertexMotherRef_
reference to the corresponding pf displaced vertex where this track was created
void setDisplacedVertexRef(const PFDisplacedTrackerVertexRef &niref, TrackType trType)
the ref to the displaced vertex interaction
const PFRecTrackRef & trackRefPF() const
const PFDisplacedTrackerVertexRef & displacedVertexRef(TrackType trType) const
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:64
tuple cout
Definition: gather_cfg.py:121
const reco::MuonRef & muonRef() const
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance
Definition: DDAxes.h:10
PFBlockElement * clone() const
necessary to have the edm::OwnVector&lt;PFBlockElement&gt; working