CMS 3D CMS Logo

PFCandidateEGammaExtra.h
Go to the documentation of this file.
1 #ifndef ParticleFlowCandidate_PFCandidateEGammaExtra_h
2 #define ParticleFlowCandidate_PFCandidateEGammaExtra_h
3 
13 
14 #include <iosfwd>
15 
16 namespace reco {
22  typedef std::pair<reco::PFBlockRef, unsigned> ElementInBlock;
23  typedef std::vector<ElementInBlock> ElementsInBlocks;
24 
26  public:
27  enum StatusFlag {
28  X = 0, // undefined
29  Selected, // selected
30  ECALDrivenPreselected, // ECAL-driven electron pre-selected
31  MVASelected, // Passed the internal particle-flow selection (mva selection)
32  Rejected // Rejected
33  };
34 
35  // if you had a variable update NMvaVariables
36  enum MvaVariable {
37  MVA_FIRST = 0,
55  };
56 
59  kKFTracksOnGSFCluster, // any number of additional tracks on GSF cluster
60  kFailsTrackAndHCALIso, // > 3 kfs on Gsf-cluster, bad h/e
61  kKillAdditionalKFs, // tracks with hcal linkbut good gsf etot/p_in
62  kItIsAPion, // bad H/P_in, H/H+E, and E_tot/P_in
63  kCrazyEoverP, // screwey track linking / weird GSFs
64  kTooLargeAngle, // angle between GSF and RSC centroid too large
66  };
67 
68  enum PhotonVetoes {
69  kFailsTrackIso, // the photon fails tracker isolation
71  };
72 
73  public:
80 
82  void setGsfTrackRef(const reco::GsfTrackRef& ref);
83 
85  void setKfTrackRef(const reco::TrackRef& ref);
86 
89  eleGsfCluster_ = ElementInBlock(blk, ref.index());
90  }
91 
94 
97 
100 
103 
106 
109 
112 
114  void addSingleLegConvTrackRefMva(const std::pair<reco::TrackRef, float>& trackrefmva);
115 
117  const std::vector<std::pair<reco::TrackRef, float> >& singleLegConvTrackRefMva() const { return assoSingleLeg_; }
118 
120  void addConversionRef(const reco::ConversionRef& convref);
121 
124 
126  void addSingleLegConversionRef(const reco::ConversionRef& convref);
127 
130 
132  void setLateBrem(float val);
134  void setEarlyBrem(float val);
135 
137  void setGsfTrackPout(const math::XYZTLorentzVector& pout);
138 
140  void setClusterEnergies(const std::vector<float>& energies);
141 
143  void setSigmaEtaEta(float val);
144 
146  void setDeltaEta(float val);
147 
149  void setHadEnergy(float val);
150 
152  void setMVA(float val);
153 
155  void setStatus(StatusFlag type, bool status = true);
156 
158  bool electronStatus(StatusFlag) const;
159 
161  int electronStatus() const { return status_; }
162 
164  bool mvaStatus(MvaVariable flag) const;
165 
167  const std::vector<float>& mvaVariables() const { return mvaVariables_; }
168 
170  float mvaVariable(MvaVariable var) const;
171 
173  float hadEnergy() const { return hadEnergy_; }
174  float sigmaEtaEta() const { return sigmaEtaEta_; }
175 
179  assoNonConvExtraTracks_.push_back(std::make_pair(blk, tkref.index()));
180  }
181  }
183 
184  private:
185  void setVariable(MvaVariable type, float var);
186 
187  private:
194 
197 
200 
202  std::vector<std::pair<reco::TrackRef, float> > assoSingleLeg_;
203 
204  // information for track matching
206 
209 
210  //associated single leg conversions
212 
215  std::vector<float> clusterEnergies_;
216 
218  std::vector<float> mvaVariables_;
219 
222 
224  int status_;
225 
228  float earlyBrem_;
229  float lateBrem_;
231  float hadEnergy_;
232  float deltaEta_;
233  };
234 
236  std::ostream& operator<<(std::ostream& out, const PFCandidateEGammaExtra& c);
237 
238 } // namespace reco
239 #endif
reco::PFBlockElementTrack::trackType
bool trackType(TrackType trType) const override
Definition: PFBlockElementTrack.h:28
reco::PFCandidateEGammaExtra::kN_EVETOS
Definition: PFCandidateEGammaExtra.h:65
reco::PFCandidateEGammaExtra::setHadEnergy
void setHadEnergy(float val)
set the had energy. The cluster energies should be entered before
Definition: PFCandidateEGammaExtra.cc:74
reco::PFCandidateEGammaExtra::eleGsfCluster_
ElementInBlock eleGsfCluster_
Ref to the electron gsf cluster;.
Definition: PFCandidateEGammaExtra.h:193
reco::PFCandidateEGammaExtra::kItIsAPion
Definition: PFCandidateEGammaExtra.h:62
reco::PFCandidateEGammaExtra::MVA_LnPtGsf
Definition: PFCandidateEGammaExtra.h:38
reco::PFCandidateEGammaExtra::MVA_LAST
Definition: PFCandidateEGammaExtra.h:54
reco::PFCandidateEGammaExtra::PhotonVetoes
PhotonVetoes
Definition: PFCandidateEGammaExtra.h:68
reco::PFCandidateEGammaExtra::pout_
math::XYZTLorentzVector pout_
Variables entering the MVA that should be saved.
Definition: PFCandidateEGammaExtra.h:227
reco::PFCandidateEGammaExtra::setDeltaEta
void setDeltaEta(float val)
set the delta eta
Definition: PFCandidateEGammaExtra.cc:85
reco::PFCandidateEGammaExtra::kfTrackRef
reco::TrackRef kfTrackRef() const
return a reference to the corresponding KF track
Definition: PFCandidateEGammaExtra.h:96
PFBlockElementCluster.h
reco::PFCandidateEGammaExtra::extraNonConvTracks
const ElementsInBlocks & extraNonConvTracks() const
Definition: PFCandidateEGammaExtra.h:182
reco::PFCandidateEGammaExtra::kKFTracksOnGSFCluster
Definition: PFCandidateEGammaExtra.h:59
mps_update.status
status
Definition: mps_update.py:69
reco::PFCandidateEGammaExtra::addExtraNonConvTrack
void addExtraNonConvTrack(const reco::PFBlockRef &blk, const reco::PFBlockElementTrack &tkref)
track counting for electrons and photons
Definition: PFCandidateEGammaExtra.h:177
reco::PFCandidateEGammaExtra::ECALDrivenPreselected
Definition: PFCandidateEGammaExtra.h:30
reco::PFCandidateEGammaExtra::deltaEta_
float deltaEta_
Definition: PFCandidateEGammaExtra.h:232
reco::PFCandidateEGammaExtra::addConversionRef
void addConversionRef(const reco::ConversionRef &convref)
add Conversions from PF
Definition: PFCandidateEGammaExtra.cc:143
reco::PFCandidateEGammaExtra::setClusterEnergies
void setClusterEnergies(const std::vector< float > &energies)
set the cluster energies. the Pout should be saved first
Definition: PFCandidateEGammaExtra.cc:90
reco::ElementsInBlocks
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidateEGammaExtra.h:23
reco::PFCandidateEGammaExtra::kFailsTrackAndHCALIso
Definition: PFCandidateEGammaExtra.h:60
reco::PFCandidateEGammaExtra::singleLegConvTrackRefMva
const std::vector< std::pair< reco::TrackRef, float > > & singleLegConvTrackRefMva() const
return vector of Single Leg Conversion TrackRef from
Definition: PFCandidateEGammaExtra.h:117
edm::RefVector< ConversionCollection >
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
ConversionFwd.h
reco::PFCandidateEGammaExtra::MVA_MVA
Definition: PFCandidateEGammaExtra.h:53
reco::PFCandidateEGammaExtra::mvaVariables_
std::vector< float > mvaVariables_
mva variables - transient !
Definition: PFCandidateEGammaExtra.h:218
reco::PFCandidateEGammaExtra::~PFCandidateEGammaExtra
~PFCandidateEGammaExtra()
destructor
Definition: PFCandidateEGammaExtra.h:79
reco::PFCandidateEGammaExtra
Definition: PFCandidateEGammaExtra.h:25
reco::PFCandidateEGammaExtra::setSuperClusterRef
void setSuperClusterRef(reco::SuperClusterRef sc)
set reference to the corresponding supercluster
Definition: PFCandidateEGammaExtra.h:108
reco::PFCandidateEGammaExtra::MVA_NhitsKf
Definition: PFCandidateEGammaExtra.h:43
reco::PFCandidateEGammaExtra::setMVA
void setMVA(float val)
set the result (mostly for debugging)
Definition: PFCandidateEGammaExtra.cc:116
edm::Ref< GsfTrackCollection >
reco::PFCandidateEGammaExtra::kfTrackRef_
reco::TrackRef kfTrackRef_
Ref to the KF track.
Definition: PFCandidateEGammaExtra.h:191
reco::PFCandidateEGammaExtra::mvaVariable
float mvaVariable(MvaVariable var) const
access to any variable
Definition: PFCandidateEGammaExtra.cc:135
reco::PFCandidateEGammaExtra::setEarlyBrem
void setEarlyBrem(float val)
set EarlyBrem
Definition: PFCandidateEGammaExtra.cc:69
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
reco::PFCandidateEGammaExtra::lateBrem_
float lateBrem_
Definition: PFCandidateEGammaExtra.h:229
reco::PFCandidateEGammaExtra::gsfTrackRef
reco::GsfTrackRef gsfTrackRef() const
return a reference to the corresponding GSF track
Definition: PFCandidateEGammaExtra.h:93
reco::PFCandidateEGammaExtra::scPFECALRef_
reco::SuperClusterRef scPFECALRef_
Ref to PF-ECAL only supercluster.
Definition: PFCandidateEGammaExtra.h:199
reco::PFCandidateEGammaExtra::setGsfElectronClusterRef
void setGsfElectronClusterRef(const reco::PFBlockRef &blk, const reco::PFBlockElementCluster &ref)
set gsf electron cluster ref
Definition: PFCandidateEGammaExtra.h:88
reco::PFCandidateEGammaExtra::assoNonConvExtraTracks_
ElementsInBlocks assoNonConvExtraTracks_
Definition: PFCandidateEGammaExtra.h:205
reco::PFCandidateEGammaExtra::setKfTrackRef
void setKfTrackRef(const reco::TrackRef &ref)
set kf track reference
Definition: PFCandidateEGammaExtra.cc:51
reco::PFCandidateEGammaExtra::gsfTrackRef_
reco::GsfTrackRef gsfTrackRef_
Ref to the GSF track.
Definition: PFCandidateEGammaExtra.h:189
reco::PFCandidateEGammaExtra::electronStatus
int electronStatus() const
access to the status
Definition: PFCandidateEGammaExtra.h:161
reco::PFCandidateEGammaExtra::setGsfTrackPout
void setGsfTrackPout(const math::XYZTLorentzVector &pout)
set the pout (not trivial to get from the GSF track)
Definition: PFCandidateEGammaExtra.cc:49
TrackFwd.h
reco::PFCandidateEGammaExtra::kFailsMVA
Definition: PFCandidateEGammaExtra.h:58
reco::PFCandidateEGammaExtra::MVA_Chi2Gsf
Definition: PFCandidateEGammaExtra.h:42
reco::PFCandidateEGammaExtra::conversionRef
reco::ConversionRefVector conversionRef() const
return Conversions from PF
Definition: PFCandidateEGammaExtra.h:123
reco::PFCandidateEGammaExtra::kTooLargeAngle
Definition: PFCandidateEGammaExtra.h:64
reco::PFCandidateEGammaExtra::setLateBrem
void setLateBrem(float val)
set LateBrem
Definition: PFCandidateEGammaExtra.cc:64
reco::PFCandidateEGammaExtra::MVA_HOverHE
Definition: PFCandidateEGammaExtra.h:50
reco::PFCandidateEGammaExtra::MVA_EbremOverDeltaP
Definition: PFCandidateEGammaExtra.h:47
reco::PFCandidateEGammaExtra::Selected
Definition: PFCandidateEGammaExtra.h:29
reco::PFCandidateEGammaExtra::setGsfTrackRef
void setGsfTrackRef(const reco::GsfTrackRef &ref)
set gsftrack reference
Definition: PFCandidateEGammaExtra.cc:47
reco::PFCandidateEGammaExtra::setSuperClusterPFECALRef
void setSuperClusterPFECALRef(reco::SuperClusterRef sc)
set reference to the corresponding supercluster
Definition: PFCandidateEGammaExtra.h:111
reco::PFCandidateEGammaExtra::X
Definition: PFCandidateEGammaExtra.h:28
reco::PFCandidateEGammaExtra::setSigmaEtaEta
void setSigmaEtaEta(float val)
set the sigmaetaeta
Definition: PFCandidateEGammaExtra.cc:80
reco::PFCandidateEGammaExtra::hadEnergy_
float hadEnergy_
Definition: PFCandidateEGammaExtra.h:231
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
reco::PFCandidateEGammaExtra::singleLegConversionRef
reco::ConversionRefVector singleLegConversionRef() const
return Conversions from PF
Definition: PFCandidateEGammaExtra.h:129
reco::PFCandidateEGammaExtra::earlyBrem_
float earlyBrem_
Definition: PFCandidateEGammaExtra.h:228
reco::PFCandidateEGammaExtra::kFailsTrackIso
Definition: PFCandidateEGammaExtra.h:69
reco::PFCandidateEGammaExtra::MVA_LogSigmaEtaEta
Definition: PFCandidateEGammaExtra.h:49
LorentzVector.h
reco::PFCandidateEGammaExtra::setStatus
void setStatus(StatusFlag type, bool status=true)
set status
Definition: PFCandidateEGammaExtra.cc:123
reco::PFCandidateEGammaExtra::ElectronVetoes
ElectronVetoes
Definition: PFCandidateEGammaExtra.h:57
reco::PFBlockElement::T_FROM_GAMMACONV
Definition: PFBlockElement.h:47
reco::operator<<
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
reco::PFCandidateEGammaExtra::mvaVariables
const std::vector< float > & mvaVariables() const
access to the mva variables
Definition: PFCandidateEGammaExtra.h:167
reco::PFCandidateEGammaExtra::addSingleLegConvTrackRefMva
void addSingleLegConvTrackRefMva(const std::pair< reco::TrackRef, float > &trackrefmva)
add Single Leg Conversion TrackRef
Definition: PFCandidateEGammaExtra.cc:139
reco::PFCandidateEGammaExtra::PFCandidateEGammaExtra
PFCandidateEGammaExtra()
constructor
Definition: PFCandidateEGammaExtra.cc:8
reco::PFCandidateEGammaExtra::hadEnergy
float hadEnergy() const
access to specific variables
Definition: PFCandidateEGammaExtra.h:173
reco::PFCandidateEGammaExtra::Rejected
Definition: PFCandidateEGammaExtra.h:32
reco::PFCandidateEGammaExtra::sigmaEtaEta_
float sigmaEtaEta_
Definition: PFCandidateEGammaExtra.h:230
reco::PFCandidateEGammaExtra::mvaStatus
bool mvaStatus(MvaVariable flag) const
access to mva variable status
Definition: PFCandidateEGammaExtra.cc:133
reco::PFCandidateEGammaExtra::kN_PHOVETOS
Definition: PFCandidateEGammaExtra.h:70
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
reco::PFCandidateEGammaExtra::setVariable
void setVariable(MvaVariable type, float var)
Definition: PFCandidateEGammaExtra.cc:118
reco::PFCandidateEGammaExtra::sigmaEtaEta
float sigmaEtaEta() const
Definition: PFCandidateEGammaExtra.h:174
reco::PFCandidateEGammaExtra::status_
int status_
Status of the electron.
Definition: PFCandidateEGammaExtra.h:224
PFBlockFwd.h
reco::PFCandidateEGammaExtra::singleLegConversions_
reco::ConversionRefVector singleLegConversions_
Definition: PFCandidateEGammaExtra.h:211
reco::PFCandidateEGammaExtra::assoSingleLeg_
std::vector< std::pair< reco::TrackRef, float > > assoSingleLeg_
vector of TrackRef from Single Leg conversions and associated mva value
Definition: PFCandidateEGammaExtra.h:202
PFBlock.h
reco::PFCandidateEGammaExtra::addSingleLegConversionRef
void addSingleLegConversionRef(const reco::ConversionRef &convref)
add Conversions from PF
Definition: PFCandidateEGammaExtra.cc:147
reco::PFCandidateEGammaExtra::mvaStatus_
int mvaStatus_
status of mva variables
Definition: PFCandidateEGammaExtra.h:221
reco::PFCandidateEGammaExtra::MVA_Fbrem
Definition: PFCandidateEGammaExtra.h:41
reco::PFCandidateEGammaExtra::MVA_SigmaPtOverPt
Definition: PFCandidateEGammaExtra.h:40
reco::PFCandidateEGammaExtra::MVA_EtaGsf
Definition: PFCandidateEGammaExtra.h:39
heppy_batch.val
val
Definition: heppy_batch.py:351
reco::PFCandidateEGammaExtra::MVA_EtotOverPin
Definition: PFCandidateEGammaExtra.h:45
reco::PFCandidateEGammaExtra::gsfElectronClusterRef
const ElementInBlock & gsfElectronClusterRef() const
return a reference to the electron cluster ref
Definition: PFCandidateEGammaExtra.h:99
GsfTrackFwd.h
reco::PFCandidateEGammaExtra::MVASelected
Definition: PFCandidateEGammaExtra.h:31
reco::PFCandidateEGammaExtra::MVA_Chi2Kf
Definition: PFCandidateEGammaExtra.h:44
reco::PFCandidateEGammaExtra::superClusterRef
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding supercluster
Definition: PFCandidateEGammaExtra.h:102
SuperClusterFwd.h
reco::PFCandidateEGammaExtra::MvaVariable
MvaVariable
Definition: PFCandidateEGammaExtra.h:36
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
reco::PFBlockElementCluster
Cluster Element.
Definition: PFBlockElementCluster.h:16
reco::ElementInBlock
std::pair< reco::PFBlockRef, unsigned > ElementInBlock
Definition: PFCandidateEGammaExtra.h:22
reco::PFBlockElementTrack
Track Element.
Definition: PFBlockElementTrack.h:17
reco::PFCandidateEGammaExtra::assoConversionsRef_
reco::ConversionRefVector assoConversionsRef_
vector of ConversionRef from PF
Definition: PFCandidateEGammaExtra.h:208
reco::PFCandidateEGammaExtra::MVA_DeltaEtaTrackCluster
Definition: PFCandidateEGammaExtra.h:48
reco::PFCandidateEGammaExtra::MVA_LateBrem
Definition: PFCandidateEGammaExtra.h:51
reco::PFCandidateEGammaExtra::superClusterPFECALRef
reco::SuperClusterRef superClusterPFECALRef() const
return a reference to the corresponding box supercluster
Definition: PFCandidateEGammaExtra.h:105
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
reco::PFCandidateEGammaExtra::clusterEnergies_
std::vector< float > clusterEnergies_
Definition: PFCandidateEGammaExtra.h:215
reco::PFCandidateEGammaExtra::scRef_
reco::SuperClusterRef scRef_
Ref to (refined) supercluster.
Definition: PFCandidateEGammaExtra.h:196
reco::PFCandidateEGammaExtra::MVA_FirstBrem
Definition: PFCandidateEGammaExtra.h:52
reco::PFCandidateEGammaExtra::MVA_FIRST
Definition: PFCandidateEGammaExtra.h:37
reco::PFBlockElement::index
unsigned index() const
Definition: PFBlockElement.h:86
reco::PFCandidateEGammaExtra::kCrazyEoverP
Definition: PFCandidateEGammaExtra.h:63
reco::PFCandidateEGammaExtra::kKillAdditionalKFs
Definition: PFCandidateEGammaExtra.h:61
reco::PFCandidateEGammaExtra::StatusFlag
StatusFlag
Definition: PFCandidateEGammaExtra.h:27
PFBlockElementTrack.h
reco::PFCandidateEGammaExtra::MVA_EseedOverPout
Definition: PFCandidateEGammaExtra.h:46
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116