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  PFRecTrackRef trackRefPF() const { return trackRefPF_; }
55 
57  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  if (trType == T_TO_DISP)
79  else if (trType == T_FROM_DISP)
81  else return PFDisplacedTrackerVertexRef();
82  }
83 
86 
87  if (trType == T_TO_DISP) {
88  displacedVertexDaughterRef_ = niref; setTrackType(trType,true);}
89  else if (trType == T_FROM_DISP) {
90  displacedVertexMotherRef_ = niref; setTrackType(trType,true);}
91  }
92 
94  reco::MuonRef muonRef() const { return muonRef_; }
95 
97  void setMuonRef(const MuonRef& muref) {
98  muonRef_=muref; setTrackType(MUON,true);
99  }
100 
102  ConversionRef convRef() const {return convRef_;}
103 
106  convRef_ = convRef; setTrackType(trType,true);
107  }
108 
111 
114  v0Ref_ = V0Ref; setTrackType(trType,true);
115  }
116 
117 
118 
119  private:
120 
123 
126 
127  unsigned int trackType_;
128 
131 
134 
137 
140 
143 
146  };
147 }
148 
149 #endif
150 
Abstract base class for a PFBlock element (track, cluster...)
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)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:11
reco::TrackRef trackRef_
reference to the corresponding track
const math::XYZPointF & positionAtECALEntrance() const
double double double z
reco::MuonRef muonRef() const
void setConversionRef(const ConversionRef &convRef, TrackType trType)
the ref to gamma conversion
VertexCompositeCandidateRef v0Ref_
reference to V0
edm::Ref< PFDisplacedTrackerVertexCollection > PFDisplacedTrackerVertexRef
persistent reference to a DisplacedTrackerVertex
void setPositionAtECALEntrance(float x, float y, float z)
set position at ECAL entrance
ConversionRef convRef_
reference to reco conversion
VertexCompositeCandidateRef V0Ref() const
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
PFRecTrackRef trackRefPF() const
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
reco::TrackRef trackRef() const
void setDisplacedVertexRef(const PFDisplacedTrackerVertexRef &niref, TrackType trType)
the ref to the displaced vertex interaction
tuple cout
Definition: gather_cfg.py:41
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance
Definition: DDAxes.h:10
ConversionRef convRef() const
PFBlockElement * clone() const
necessary to have the edm::OwnVector&lt;PFBlockElement&gt; working
PFDisplacedTrackerVertexRef displacedVertexRef(TrackType trType) const