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(), time_(0.f), timeError_(-1.f), rawEnergy_(0.f), tracksters_({trackster}), idProbabilities_{} {}
24 
25  inline float time() const { return time_; }
26  inline float timeError() const { return timeError_; }
27 
28  void setTime(float time) { time_ = time; };
30 
31  inline const edm::Ptr<reco::Track> trackPtr() const { return trackPtr_; }
33 
34  inline float rawEnergy() const { return rawEnergy_; }
36 
37  inline const std::vector<edm::Ptr<ticl::Trackster> > tracksters() const { return tracksters_; };
38 
40  void addTrackster(const edm::Ptr<ticl::Trackster>& trackster) { tracksters_.push_back(trackster); }
41  // convenience method to return the ID probability for a certain particle type
42  inline float id_probability(ParticleType type) const {
43  // probabilities are stored in the same order as defined in the ParticleType enum
44  return idProbabilities_[(int)type];
45  }
46 
47  void setIdProbabilities(const std::array<float, 8>& idProbs) { idProbabilities_ = idProbs; }
48 
49 private:
50  float time_;
51  float timeError_;
53 
54  float rawEnergy_;
55 
56  // vector of Ptr so Tracksters can come from different collections
57  // and there can be derived classes
58  std::vector<edm::Ptr<ticl::Trackster> > tracksters_;
59 
60  // Since it contains multiple tracksters, duplicate the probability interface
61  std::array<float, 8> idProbabilities_;
62 };
63 #endif
TICLCandidate::setTrackPtr
void setTrackPtr(const edm::Ptr< reco::Track > &trackPtr)
Definition: TICLCandidate.h:32
TICLCandidate::TICLCandidate
TICLCandidate(const edm::Ptr< ticl::Trackster > &trackster)
Definition: TICLCandidate.h:22
Trackster.h
TICLCandidate::time
float time() const
Definition: TICLCandidate.h:25
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
TICLCandidate::tracksters
const std::vector< edm::Ptr< ticl::Trackster > > tracksters() const
Definition: TICLCandidate.h:37
data-class-funcs.q
q
Definition: data-class-funcs.py:169
reco::Candidate::Charge
int Charge
electric charge type
Definition: Candidate.h:34
TICLCandidate::rawEnergy_
float rawEnergy_
Definition: TICLCandidate.h:54
TICLCandidate::setTime
void setTime(float time)
Definition: TICLCandidate.h:28
TICLCandidate::setRawEnergy
void setRawEnergy(float rawEnergy)
Definition: TICLCandidate.h:35
Track.h
TrackFwd.h
LeafCandidate.h
TICLCandidate::idProbabilities_
std::array< float, 8 > idProbabilities_
Definition: TICLCandidate.h:61
TICLCandidate::trackPtr
const edm::Ptr< reco::Track > trackPtr() const
Definition: TICLCandidate.h:31
TICLCandidate::rawEnergy
float rawEnergy() const
Definition: TICLCandidate.h:34
TICLCandidate::TICLCandidate
TICLCandidate(Charge q, const LorentzVector &p4)
Definition: TICLCandidate.h:17
TICLCandidate::id_probability
float id_probability(ParticleType type) const
Definition: TICLCandidate.h:42
TICLCandidate::setIdProbabilities
void setIdProbabilities(const std::array< float, 8 > &idProbs)
Definition: TICLCandidate.h:47
TICLCandidate::setTracksters
void setTracksters(const std::vector< edm::Ptr< ticl::Trackster > > &tracksters)
Definition: TICLCandidate.h:39
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:29
TICLCandidate::timeError
float timeError() const
Definition: TICLCandidate.h:26
TICLCandidate::TICLCandidate
TICLCandidate()
Definition: TICLCandidate.h:20
TICLCandidate
Definition: TICLCandidate.h:13
reco::LeafCandidate::LeafCandidate
LeafCandidate()
Definition: LeafCandidate.h:33
TICLCandidate::time_
float time_
Definition: TICLCandidate.h:50
edm::Ptr
Definition: AssociationVector.h:31
TICLCandidate::trackPtr_
edm::Ptr< reco::Track > trackPtr_
Definition: TICLCandidate.h:52
TICLCandidate::addTrackster
void addTrackster(const edm::Ptr< ticl::Trackster > &trackster)
Definition: TICLCandidate.h:40
type
type
Definition: HCALResponse.h:21
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:51
TICLCandidate::tracksters_
std::vector< edm::Ptr< ticl::Trackster > > tracksters_
Definition: TICLCandidate.h:58