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 
99  const ElementInBlock& gsfElectronClusterRef() const { return eleGsfCluster_; }
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  }
182  const ElementsInBlocks& extraNonConvTracks() const { return assoNonConvExtraTracks_; }
183 
184  private:
185  void setVariable(MvaVariable type, float var);
186 
187  private:
193  ElementInBlock eleGsfCluster_;
194 
197 
200 
202  std::vector<std::pair<reco::TrackRef, float> > assoSingleLeg_;
203 
204  // information for track matching
205  ElementsInBlocks assoNonConvExtraTracks_;
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
type
Definition: HCALResponse.h:21
void setSuperClusterRef(reco::SuperClusterRef sc)
set reference to the corresponding supercluster
reco::TrackRef kfTrackRef_
Ref to the KF track.
void setStatus(StatusFlag type, bool status=true)
set status
int status_
Status of the electron.
const std::vector< std::pair< reco::TrackRef, float > > & singleLegConvTrackRefMva() const
return vector of Single Leg Conversion TrackRef from
void setGsfElectronClusterRef(const reco::PFBlockRef &blk, const reco::PFBlockElementCluster &ref)
set gsf electron cluster ref
const ElementInBlock & gsfElectronClusterRef() const
return a reference to the electron cluster ref
void addSingleLegConvTrackRefMva(const std::pair< reco::TrackRef, float > &trackrefmva)
add Single Leg Conversion TrackRef
void setHadEnergy(float val)
set the had energy. The cluster energies should be entered before
ElementInBlock eleGsfCluster_
Ref to the electron gsf cluster;.
reco::TrackRef kfTrackRef() const
return a reference to the corresponding KF track
bool trackType(TrackType trType) const override
int mvaStatus_
status of mva variables
std::vector< std::pair< reco::TrackRef, float > > assoSingleLeg_
vector of TrackRef from Single Leg conversions and associated mva value
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding supercluster
void setGsfTrackRef(const reco::GsfTrackRef &ref)
set gsftrack reference
float hadEnergy() const
access to specific variables
reco::ConversionRefVector singleLegConversionRef() const
return Conversions from PF
reco::ConversionRefVector assoConversionsRef_
vector of ConversionRef from PF
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void setSigmaEtaEta(float val)
set the sigmaetaeta
std::vector< float > mvaVariables_
mva variables - transient !
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
unsigned index() const
std::vector< ElementInBlock > ElementsInBlocks
void setEarlyBrem(float val)
set EarlyBrem
void setVariable(MvaVariable type, float var)
void setGsfTrackPout(const math::XYZTLorentzVector &pout)
set the pout (not trivial to get from the GSF track)
void addSingleLegConversionRef(const reco::ConversionRef &convref)
add Conversions from PF
reco::GsfTrackRef gsfTrackRef_
Ref to the GSF track.
int electronStatus() const
access to the status
void setClusterEnergies(const std::vector< float > &energies)
set the cluster energies. the Pout should be saved first
reco::GsfTrackRef gsfTrackRef() const
return a reference to the corresponding GSF track
reco::SuperClusterRef scRef_
Ref to (refined) supercluster.
math::XYZTLorentzVector pout_
Variables entering the MVA that should be saved.
void setDeltaEta(float val)
set the delta eta
std::pair< reco::PFBlockRef, unsigned > ElementInBlock
bool mvaStatus(MvaVariable flag) const
access to mva variable status
void setSuperClusterPFECALRef(reco::SuperClusterRef sc)
set reference to the corresponding supercluster
void addConversionRef(const reco::ConversionRef &convref)
add Conversions from PF
reco::SuperClusterRef scPFECALRef_
Ref to PF-ECAL only supercluster.
fixed size matrix
const ElementsInBlocks & extraNonConvTracks() const
void setKfTrackRef(const reco::TrackRef &ref)
set kf track reference
void setMVA(float val)
set the result (mostly for debugging)
reco::ConversionRefVector conversionRef() const
return Conversions from PF
void setLateBrem(float val)
set LateBrem
reco::ConversionRefVector singleLegConversions_
float mvaVariable(MvaVariable var) const
access to any variable
reco::SuperClusterRef superClusterPFECALRef() const
return a reference to the corresponding box supercluster
void addExtraNonConvTrack(const reco::PFBlockRef &blk, const reco::PFBlockElementTrack &tkref)
track counting for electrons and photons
const std::vector< float > & mvaVariables() const
access to the mva variables