CMS 3D CMS Logo

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:
20 
22 
23  PFBlockElement* clone() const override { return new PFBlockElementTrack(*this); }
24 
25  void Dump(std::ostream& out = std::cout, const char* tab = " ") const override;
26 
28  bool trackType(TrackType trType) const override { return (trackType_ >> trType) & 1; }
29 
31  void setTrackType(TrackType trType, bool value) override {
32  if (value)
33  trackType_ = trackType_ | (1 << trType);
34  else
35  trackType_ = trackType_ ^ (1 << trType);
36  }
37 
39  void setPositionAtECALEntrance(float x, float y, float z) { positionAtECALEntrance_.SetCoordinates(x, y, z); }
40 
43 
46  const PFRecTrackRef& trackRefPF() const override { return trackRefPF_; }
47 
49  const reco::TrackRef& trackRef() const override { return trackRef_; }
50 
52  bool isSecondary() const override {
54  }
55 
56  bool isPrimary() const override { return trackType(T_TO_DISP); }
57 
58  bool isLinkedToDisplacedVertex() const override { return isSecondary() || isPrimary(); }
59 
62  if (trType == T_TO_DISP)
64  else if (trType == T_FROM_DISP)
66  else
67  return nullPFDispVertex_;
68  }
69 
71  void setDisplacedVertexRef(const PFDisplacedTrackerVertexRef& niref, TrackType trType) override {
72  if (trType == T_TO_DISP) {
74  setTrackType(trType, true);
75  } else if (trType == T_FROM_DISP) {
77  setTrackType(trType, true);
78  }
79  }
80 
82  const reco::MuonRef& muonRef() const override { return muonRef_; }
83 
85  void setMuonRef(const MuonRef& muref) override {
86  muonRef_ = muref;
87  setTrackType(MUON, true);
88  }
89 
91  const ConversionRefVector& convRefs() const override { return convRefs_; }
92 
94  void setConversionRef(const ConversionRef& convRef, TrackType trType) override {
95  convRefs_.push_back(convRef);
96  setTrackType(trType, true);
97  }
98 
100  const VertexCompositeCandidateRef& V0Ref() const override { return v0Ref_; }
101 
103  void setV0Ref(const VertexCompositeCandidateRef& V0Ref, TrackType trType) override {
104  v0Ref_ = V0Ref;
105  setTrackType(trType, true);
106  }
107 
108  private:
111 
114 
115  unsigned int trackType_;
116 
119 
122 
125 
128 
131 
134  };
135 } // namespace reco
136 
137 #endif
reco::PFBlockElementTrack::trackType
bool trackType(TrackType trType) const override
Definition: PFBlockElementTrack.h:28
reco::PFBlockElementTrack::v0Ref_
VertexCompositeCandidateRef v0Ref_
reference to V0
Definition: PFBlockElementTrack.h:133
reco::PFBlockElementTrack::convRefs_
ConversionRefVector convRefs_
reference to reco conversion
Definition: PFBlockElementTrack.h:130
reco::PFBlockElementTrack::V0Ref
const VertexCompositeCandidateRef & V0Ref() const override
Definition: PFBlockElementTrack.h:100
reco::PFBlockElementTrack::isLinkedToDisplacedVertex
bool isLinkedToDisplacedVertex() const override
Definition: PFBlockElementTrack.h:58
reco::PFBlockElement::T_TO_DISP
Definition: PFBlockElement.h:47
gather_cfg.cout
cout
Definition: gather_cfg.py:144
reco::PFBlockElementTrack::trackRef_
reco::TrackRef trackRef_
reference to the corresponding track
Definition: PFBlockElementTrack.h:113
reco::PFBlockElementTrack::setTrackType
void setTrackType(TrackType trType, bool value) override
\set the trackType
Definition: PFBlockElementTrack.h:31
reco::PFBlockElementTrack::trackRef
const reco::TrackRef & trackRef() const override
Definition: PFBlockElementTrack.h:49
reco::PFBlockElementTrack::muonRef_
reco::MuonRef muonRef_
reference to the corresponding muon
Definition: PFBlockElementTrack.h:127
edm::RefVector< ConversionCollection >
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Ref< PFRecTrackCollection >
reco::PFBlockElementTrack::Dump
void Dump(std::ostream &out=std::cout, const char *tab=" ") const override
print the object inside the element
Definition: PFBlockElementTrack.cc:27
reco::PFBlockElementTrack::displacedVertexRef
const PFDisplacedTrackerVertexRef & displacedVertexRef(TrackType trType) const override
Definition: PFBlockElementTrack.h:61
TrackFwd.h
reco::PFBlockElement::MUON
Definition: PFBlockElement.h:47
reco::PFBlockElementTrack::trackRefPF
const PFRecTrackRef & trackRefPF() const override
Definition: PFBlockElementTrack.h:46
reco::PFBlockElementTrack::setMuonRef
void setMuonRef(const MuonRef &muref) override
\set reference to the Muon
Definition: PFBlockElementTrack.h:85
reco::PFBlockElementTrack::displacedVertexDaughterRef_
PFDisplacedTrackerVertexRef displacedVertexDaughterRef_
reference to the corresponding pf displaced vertex which this track was created
Definition: PFBlockElementTrack.h:124
PFBlockElement.h
reco::PFBlockElementTrack::trackRefPF_
PFRecTrackRef trackRefPF_
reference to the corresponding track (transient)
Definition: PFBlockElementTrack.h:110
reco::PFBlockElement::T_FROM_V0
Definition: PFBlockElement.h:47
reco::PFBlockElement::TrackType
TrackType
Definition: PFBlockElement.h:47
reco::PFBlockElement::T_FROM_DISP
Definition: PFBlockElement.h:47
reco::PFBlockElementTrack::trackType_
unsigned int trackType_
Definition: PFBlockElementTrack.h:115
reco::PFBlockElementTrack::positionAtECALEntrance
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFBlockElementTrack.h:42
reco::PFBlockElementTrack::setDisplacedVertexRef
void setDisplacedVertexRef(const PFDisplacedTrackerVertexRef &niref, TrackType trType) override
\set the ref to the displaced vertex interaction
Definition: PFBlockElementTrack.h:71
reco::PFBlockElementTrack::setConversionRef
void setConversionRef(const ConversionRef &convRef, TrackType trType) override
\set the ref to gamma conversion
Definition: PFBlockElementTrack.h:94
reco::PFBlockElementTrack::displacedVertexMotherRef_
PFDisplacedTrackerVertexRef displacedVertexMotherRef_
reference to the corresponding pf displaced vertex where this track was created
Definition: PFBlockElementTrack.h:121
value
Definition: value.py:1
reco::PFBlockElement::T_FROM_GAMMACONV
Definition: PFBlockElement.h:47
reco::PFBlockElementTrack::setPositionAtECALEntrance
void setPositionAtECALEntrance(float x, float y, float z)
set position at ECAL entrance
Definition: PFBlockElementTrack.h:39
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition: PFBlockElement.h:26
reco::PFBlockElementTrack::positionAtECALEntrance_
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance
Definition: PFBlockElementTrack.h:118
reco::PFBlockElementTrack
Track Element.
Definition: PFBlockElementTrack.h:17
Point3D.h
reco::PFBlockElementTrack::muonRef
const reco::MuonRef & muonRef() const override
Definition: PFBlockElementTrack.h:82
PFRecTrackFwd.h
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
math::XYZPointF
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
reco::PFBlockElement::nullPFDispVertex_
const static PFDisplacedTrackerVertexRef nullPFDispVertex_
Definition: PFBlockElement.h:165
reco::PFBlockElementTrack::isSecondary
bool isSecondary() const override
check if the track is secondary
Definition: PFBlockElementTrack.h:52
reco::PFBlockElementTrack::isPrimary
bool isPrimary() const override
Definition: PFBlockElementTrack.h:56
reco::PFBlockElementTrack::PFBlockElementTrack
PFBlockElementTrack()
Definition: PFBlockElementTrack.h:19
reco::PFBlockElementTrack::clone
PFBlockElement * clone() const override
necessary to have the edm::OwnVector<PFBlockElement> working
Definition: PFBlockElementTrack.h:23
reco::PFBlockElementTrack::convRefs
const ConversionRefVector & convRefs() const override
Definition: PFBlockElementTrack.h:91
reco::PFBlockElementTrack::setV0Ref
void setV0Ref(const VertexCompositeCandidateRef &V0Ref, TrackType trType) override
\set the ref to V0
Definition: PFBlockElementTrack.h:103