CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/DataFormats/ParticleFlowCandidate/interface/PFCandidateElectronExtra.h

Go to the documentation of this file.
00001 #ifndef ParticleFlowCandidate_PFCandidateElectronExtra_h
00002 #define ParticleFlowCandidate_PFCandidateElectronExtra_h
00003 
00004 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00005 #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h"
00006 #include "DataFormats/Math/interface/LorentzVector.h"
00007 
00008 #include <iosfwd>
00009 
00010 namespace reco {
00016   class PFCandidateElectronExtra { 
00017   public:    
00018     enum StatusFlag {
00019       X=0,                            // undefined
00020       Selected,                       // selected 
00021       ECALDrivenPreselected,          // ECAL-driven electron pre-selected
00022       MVASelected,                    // Passed the internal particle-flow selection (mva selection)
00023       Rejected                        // Rejected 
00024     };
00025 
00026     // if you had a variable update NMvaVariables 
00027     enum MvaVariable {
00028       MVA_FIRST=0,
00029       MVA_LnPtGsf=MVA_FIRST,
00030       MVA_EtaGsf,
00031       MVA_SigmaPtOverPt,
00032       MVA_Fbrem,
00033       MVA_Chi2Gsf,
00034       MVA_NhitsKf,
00035       MVA_Chi2Kf,
00036       MVA_EtotOverPin,
00037       MVA_EseedOverPout,
00038       MVA_EbremOverDeltaP,
00039       MVA_DeltaEtaTrackCluster,
00040       MVA_LogSigmaEtaEta,
00041       MVA_HOverHE,
00042       MVA_LateBrem,
00043       MVA_FirstBrem,
00044       MVA_MVA,
00045       MVA_LAST
00046     };
00047 
00048 
00049   public:
00051     PFCandidateElectronExtra();
00053     PFCandidateElectronExtra(const GsfTrackRef&);
00055     ~PFCandidateElectronExtra(){;}
00056 
00058     void setGsfTrackRef(const reco::GsfTrackRef& ref);   
00059 
00061     void setKfTrackRef(const reco::TrackRef & ref);
00062 
00064     reco::GsfTrackRef gsfTrackRef() const { return gsfTrackRef_; }     
00065 
00067     reco::TrackRef kfTrackRef() const { return kfTrackRef_; }     
00068 
00070     void setLateBrem(float val); 
00072     void setEarlyBrem(float val);
00073 
00075     void setGsfTrackPout(const math::XYZTLorentzVector& pout);
00076     
00078     void setClusterEnergies(const std::vector<float>& energies);
00079 
00081     void setSigmaEtaEta(float val);
00082 
00084     void setDeltaEta(float val);
00085 
00087     void setHadEnergy(float val);
00088 
00090     void setMVA(float val);
00091 
00093     void setStatus(StatusFlag type,bool status=true);
00094 
00096     bool electronStatus(StatusFlag) const ;
00097 
00099     int electronStatus() const {return status_;}
00100 
00102     bool mvaStatus(MvaVariable flag) const;
00103 
00105     const std::vector<float> & mvaVariables() const {return mvaVariables_;}
00106 
00108     float mvaVariable(MvaVariable var) const;
00109 
00111     float hadEnergy() const {return hadEnergy_;}
00112     float sigmaEtaEta() const {return sigmaEtaEta_;}
00113 
00114 
00115  private:
00116     void  setVariable(MvaVariable type,float var);
00117     
00118  private:
00120     reco::GsfTrackRef gsfTrackRef_;
00122     reco::TrackRef kfTrackRef_;
00123 
00125     std::vector<float> clusterEnergies_;
00126 
00128     std::vector<float> mvaVariables_;
00129     
00131     int mvaStatus_;
00132 
00134     int status_;
00135 
00137     math::XYZTLorentzVector pout_;
00138     float earlyBrem_;
00139     float lateBrem_;
00140     float sigmaEtaEta_;
00141     float hadEnergy_;
00142     float deltaEta_;
00143   };
00144 
00146   std::ostream& operator<<( std::ostream& out, const PFCandidateElectronExtra& c );
00147 
00148 }
00149 #endif