CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
reco::GsfTrackRef gsfTrackRef() const
return a reference to the corresponding GSF track
std::vector< float > clusterEnergies_
energy of individual clusters (corrected). The first cluster is the seed
const edm::EventSetup & c
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
list status
Definition: mps_update.py:107
void setEarlyBrem(float val)
set EarlyBrem
int mvaStatus_
status of mva variables
int electronStatus() const
access to the status
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
reco::TrackRef kfTrackRef_
Ref to the KF track.
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
list var
if using global norm cols_to_minmax = [&#39;t_delta&#39;, &#39;t_hmaxNearP&#39;,&#39;t_emaxNearP&#39;, &#39;t_hAnnular&#39;, &#39;t_eAnnular&#39;,&#39;t_pt&#39;,&#39;t_nVtx&#39;,&#39;t_ieta&#39;,&#39;t_eHcal10&#39;, &#39;t_eHcal30&#39;,&#39;t_rhoh&#39;,&#39;t_eHcal&#39;] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() &gt; 0) else 1.0/200.0)
reco::TrackRef kfTrackRef() const
return a reference to the corresponding KF track
float hadEnergy() const
access to specific variables
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 !
void setKfTrackRef(const reco::TrackRef &ref)
set kf track reference
bool mvaStatus(MvaVariable flag) const
access to mva variable status
const std::vector< float > & mvaVariables() const
access to the mva variables
float mvaVariable(MvaVariable var) const
access to any variable
void setHadEnergy(float val)
set the had energy. The cluster energies should be entered before