CMS 3D CMS Logo

PFCandidateElectronExtra.h
Go to the documentation of this file.
1 #ifndef ParticleFlowCandidate_PFCandidateElectronExtra_h
2 #define ParticleFlowCandidate_PFCandidateElectronExtra_h
3 
7 
8 #include <iosfwd>
9 
10 namespace reco {
17  public:
18  enum StatusFlag {
19  X = 0, // undefined
20  Selected, // selected
21  ECALDrivenPreselected, // ECAL-driven electron pre-selected
22  MVASelected, // Passed the internal particle-flow selection (mva selection)
23  Rejected // Rejected
24  };
25 
26  // if you had a variable update NMvaVariables
27  enum MvaVariable {
28  MVA_FIRST = 0,
46  };
47 
48  public:
55 
57  void setGsfTrackRef(const reco::GsfTrackRef& ref);
58 
60  void setKfTrackRef(const reco::TrackRef& ref);
61 
64 
67 
69  void setLateBrem(float val);
71  void setEarlyBrem(float val);
72 
74  void setGsfTrackPout(const math::XYZTLorentzVector& pout);
75 
77  void setClusterEnergies(const std::vector<float>& energies);
78 
80  void setSigmaEtaEta(float val);
81 
83  void setDeltaEta(float val);
84 
86  void setHadEnergy(float val);
87 
89  void setMVA(float val);
90 
92  void setStatus(StatusFlag type, bool status = true);
93 
95  bool electronStatus(StatusFlag) const;
96 
98  int electronStatus() const { return status_; }
99 
101  bool mvaStatus(MvaVariable flag) const;
102 
104  const std::vector<float>& mvaVariables() const { return mvaVariables_; }
105 
107  float mvaVariable(MvaVariable var) const;
108 
110  float hadEnergy() const { return hadEnergy_; }
111  float sigmaEtaEta() const { return sigmaEtaEta_; }
112 
113  private:
114  void setVariable(MvaVariable type, float var);
115 
116  private:
121 
123  std::vector<float> clusterEnergies_;
124 
126  std::vector<float> mvaVariables_;
127 
130 
132  int status_;
133 
136  float earlyBrem_;
137  float lateBrem_;
139  float hadEnergy_;
140  float deltaEta_;
141  };
142 
144  std::ostream& operator<<(std::ostream& out, const PFCandidateElectronExtra& c);
145 
146 } // namespace reco
147 #endif
std::vector< float > clusterEnergies_
energy of individual clusters (corrected). The first cluster is the seed
void setGsfTrackRef(const reco::GsfTrackRef &ref)
set gsftrack reference
void setMVA(float val)
set the result (mostly for debugging)
void setLateBrem(float val)
set LateBrem
void setVariable(MvaVariable type, float var)
math::XYZTLorentzVector pout_
Variables entering the MVA that should be saved.
void setSigmaEtaEta(float val)
set the sigmaetaeta
void setGsfTrackPout(const math::XYZTLorentzVector &pout)
set the pout (not trivial to get from the GSF track)
void setClusterEnergies(const std::vector< float > &energies)
set the cluster energies. the Pout should be saved first
float mvaVariable(MvaVariable var) const
access to any variable
void setEarlyBrem(float val)
set EarlyBrem
int mvaStatus_
status of mva variables
int electronStatus() const
access to the status
const std::vector< float > & mvaVariables() const
access to the mva variables
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
float hadEnergy() const
access to specific variables
reco::TrackRef kfTrackRef_
Ref to the KF track.
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
reco::GsfTrackRef gsfTrackRef_
Ref to the GSF track.
void setStatus(StatusFlag type, bool status=true)
set status
void setDeltaEta(float val)
set the delta eta
int status_
Status of the electron.
std::vector< float > mvaVariables_
mva variables - transient !
reco::TrackRef kfTrackRef() const
return a reference to the corresponding KF track
void setKfTrackRef(const reco::TrackRef &ref)
set kf track reference
reco::GsfTrackRef gsfTrackRef() const
return a reference to the corresponding GSF track
fixed size matrix
bool mvaStatus(MvaVariable flag) const
access to mva variable status
void setHadEnergy(float val)
set the had energy. The cluster energies should be entered before