File indexing completed on 2024-04-06 12:04:49
0001 #ifndef ParticleFlowCandidate_PFCandidateElectronExtra_h
0002 #define ParticleFlowCandidate_PFCandidateElectronExtra_h
0003
0004 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0005 #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h"
0006 #include "DataFormats/Math/interface/LorentzVector.h"
0007
0008 #include <iosfwd>
0009
0010 namespace reco {
0011
0012
0013
0014
0015
0016 class PFCandidateElectronExtra {
0017 public:
0018 enum StatusFlag {
0019 X = 0,
0020 Selected,
0021 ECALDrivenPreselected,
0022 MVASelected,
0023 Rejected
0024 };
0025
0026
0027 enum MvaVariable {
0028 MVA_FIRST = 0,
0029 MVA_LnPtGsf = MVA_FIRST,
0030 MVA_EtaGsf,
0031 MVA_SigmaPtOverPt,
0032 MVA_Fbrem,
0033 MVA_Chi2Gsf,
0034 MVA_NhitsKf,
0035 MVA_Chi2Kf,
0036 MVA_EtotOverPin,
0037 MVA_EseedOverPout,
0038 MVA_EbremOverDeltaP,
0039 MVA_DeltaEtaTrackCluster,
0040 MVA_LogSigmaEtaEta,
0041 MVA_HOverHE,
0042 MVA_LateBrem,
0043 MVA_FirstBrem,
0044 MVA_MVA,
0045 MVA_LAST
0046 };
0047
0048 public:
0049
0050 PFCandidateElectronExtra();
0051
0052 PFCandidateElectronExtra(const GsfTrackRef&);
0053
0054 ~PFCandidateElectronExtra() { ; }
0055
0056
0057 void setGsfTrackRef(const reco::GsfTrackRef& ref);
0058
0059
0060 void setKfTrackRef(const reco::TrackRef& ref);
0061
0062
0063 reco::GsfTrackRef gsfTrackRef() const { return gsfTrackRef_; }
0064
0065
0066 reco::TrackRef kfTrackRef() const { return kfTrackRef_; }
0067
0068
0069 void setLateBrem(float val);
0070
0071 void setEarlyBrem(float val);
0072
0073
0074 void setGsfTrackPout(const math::XYZTLorentzVector& pout);
0075
0076
0077 void setClusterEnergies(const std::vector<float>& energies);
0078
0079
0080 void setSigmaEtaEta(float val);
0081
0082
0083 void setDeltaEta(float val);
0084
0085
0086 void setHadEnergy(float val);
0087
0088
0089 void setMVA(float val);
0090
0091
0092 void setStatus(StatusFlag type, bool status = true);
0093
0094
0095 bool electronStatus(StatusFlag) const;
0096
0097
0098 int electronStatus() const { return status_; }
0099
0100
0101 bool mvaStatus(MvaVariable flag) const;
0102
0103
0104 const std::vector<float>& mvaVariables() const { return mvaVariables_; }
0105
0106
0107 float mvaVariable(MvaVariable var) const;
0108
0109
0110 float hadEnergy() const { return hadEnergy_; }
0111 float sigmaEtaEta() const { return sigmaEtaEta_; }
0112
0113 private:
0114 void setVariable(MvaVariable type, float var);
0115
0116 private:
0117
0118 reco::GsfTrackRef gsfTrackRef_;
0119
0120 reco::TrackRef kfTrackRef_;
0121
0122
0123 std::vector<float> clusterEnergies_;
0124
0125
0126 std::vector<float> mvaVariables_;
0127
0128
0129 int mvaStatus_;
0130
0131
0132 int status_;
0133
0134
0135 math::XYZTLorentzVector pout_;
0136 float earlyBrem_;
0137 float lateBrem_;
0138 float sigmaEtaEta_;
0139 float hadEnergy_;
0140 float deltaEta_;
0141 };
0142
0143
0144 std::ostream& operator<<(std::ostream& out, const PFCandidateElectronExtra& c);
0145
0146 }
0147 #endif