CMS 3D CMS Logo

TICLCandidate.h
Go to the documentation of this file.
1 #ifndef DataFormats_HGCalReco_TICLCandidate_h
2 #define DataFormats_HGCalReco_TICLCandidate_h
3 
10 
11 // A TICLCandidate is a lightweight physics object made from one or multiple Tracksters.
12 
14 public:
16 
19 
21 
23  : LeafCandidate(),
24  time_(trackster->time()),
25  timeError_(trackster->timeError()),
26  rawEnergy_(0.f),
27  tracksters_({trackster}),
28  idProbabilities_{} {}
29 
30  inline float time() const { return time_; }
31  inline float timeError() const { return timeError_; }
32 
33  void setTime(float time) { time_ = time; };
35 
36  inline const edm::Ptr<reco::Track> trackPtr() const { return trackPtr_; }
38 
39  inline float rawEnergy() const { return rawEnergy_; }
41 
42  inline const std::vector<edm::Ptr<ticl::Trackster> > tracksters() const { return tracksters_; };
43 
45  void addTrackster(const edm::Ptr<ticl::Trackster>& trackster) {
46  tracksters_.push_back(trackster);
47  time_ = trackster->time();
48  timeError_ = trackster->timeError();
49  }
50  // convenience method to return the ID probability for a certain particle type
51  inline float id_probability(ParticleType type) const {
52  // probabilities are stored in the same order as defined in the ParticleType enum
53  return idProbabilities_[(int)type];
54  }
55 
56  void setIdProbabilities(const std::array<float, 8>& idProbs) { idProbabilities_ = idProbs; }
57 
58 private:
59  float time_;
60  float timeError_;
62 
63  float rawEnergy_;
64 
65  // vector of Ptr so Tracksters can come from different collections
66  // and there can be derived classes
67  std::vector<edm::Ptr<ticl::Trackster> > tracksters_;
68 
69  // Since it contains multiple tracksters, duplicate the probability interface
70  std::array<float, 8> idProbabilities_;
71 };
72 #endif
TICLCandidate::setTrackPtr
void setTrackPtr(const edm::Ptr< reco::Track > &trackPtr)
Definition: TICLCandidate.h:37
TICLCandidate::TICLCandidate
TICLCandidate(const edm::Ptr< ticl::Trackster > &trackster)
Definition: TICLCandidate.h:22
Trackster.h
TICLCandidate::time
float time() const
Definition: TICLCandidate.h:30
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
TICLCandidate::tracksters
const std::vector< edm::Ptr< ticl::Trackster > > tracksters() const
Definition: TICLCandidate.h:42
ticl::Trackster::timeError
const float timeError() const
Definition: Trackster.h:124
reco::Candidate::Charge
int Charge
electric charge type
Definition: Candidate.h:34
TICLCandidate::rawEnergy_
float rawEnergy_
Definition: TICLCandidate.h:63
TICLCandidate::setTime
void setTime(float time)
Definition: TICLCandidate.h:33
TICLCandidate::setRawEnergy
void setRawEnergy(float rawEnergy)
Definition: TICLCandidate.h:40
Track.h
TrackFwd.h
LeafCandidate.h
TICLCandidate::idProbabilities_
std::array< float, 8 > idProbabilities_
Definition: TICLCandidate.h:70
TICLCandidate::trackPtr
const edm::Ptr< reco::Track > trackPtr() const
Definition: TICLCandidate.h:36
TICLCandidate::rawEnergy
float rawEnergy() const
Definition: TICLCandidate.h:39
TICLCandidate::TICLCandidate
TICLCandidate(Charge q, const LorentzVector &p4)
Definition: TICLCandidate.h:17
TICLCandidate::id_probability
float id_probability(ParticleType type) const
Definition: TICLCandidate.h:51
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
TICLCandidate::setIdProbabilities
void setIdProbabilities(const std::array< float, 8 > &idProbs)
Definition: TICLCandidate.h:56
TICLCandidate::setTracksters
void setTracksters(const std::vector< edm::Ptr< ticl::Trackster > > &tracksters)
Definition: TICLCandidate.h:44
createfilelist.int
int
Definition: createfilelist.py:10
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
TICLCandidate::setTimeError
void setTimeError(float timeError)
Definition: TICLCandidate.h:34
TICLCandidate::timeError
float timeError() const
Definition: TICLCandidate.h:31
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
TICLCandidate::TICLCandidate
TICLCandidate()
Definition: TICLCandidate.h:20
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
TICLCandidate
Definition: TICLCandidate.h:13
ticl::Trackster::time
const float time() const
Definition: Trackster.h:123
reco::LeafCandidate::LeafCandidate
LeafCandidate()
Definition: LeafCandidate.h:33
TICLCandidate::time_
float time_
Definition: TICLCandidate.h:59
edm::Ptr
Definition: AssociationVector.h:31
TICLCandidate::trackPtr_
edm::Ptr< reco::Track > trackPtr_
Definition: TICLCandidate.h:61
TICLCandidate::addTrackster
void addTrackster(const edm::Ptr< ticl::Trackster > &trackster)
Definition: TICLCandidate.h:45
Ref.h
Point3D.h
reco::LeafCandidate
Definition: LeafCandidate.h:16
ticl::Trackster::ParticleType
ParticleType
Definition: Trackster.h:24
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
TICLCandidate::ParticleType
ticl::Trackster::ParticleType ParticleType
Definition: TICLCandidate.h:15
TICLCandidate::timeError_
float timeError_
Definition: TICLCandidate.h:60
TICLCandidate::tracksters_
std::vector< edm::Ptr< ticl::Trackster > > tracksters_
Definition: TICLCandidate.h:67