CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfElectronAlgo.h
Go to the documentation of this file.
1 
2 #ifndef GsfElectronAlgo_H
3 #define GsfElectronAlgo_H
4 
8 
14 
19 
23 
28 
44 
45 
49 
52 
53 #include <list>
54 #include <string>
55 
57 
59 
60  public:
61 
63  {
70  //edm::EDGetTokenT tracks ;
79 
80  //IsoVals (PF and EcalDriven)
83 
84  } ;
85 
87  {
89  // if true, electron preselection is applied
91  // if true, electron level escale corrections are
92  // used on top of the cluster level corrections
96  // ambiguity solving
97  bool applyAmbResolution ; // if not true, ambiguity solving is not applied
98  unsigned ambSortingStrategy ; // 0:isBetter, 1:isInnerMost
99  unsigned ambClustersOverlapStrategy ; // 0:sc adresses, 1:bc shared energy
100  // if true, trackerDriven electrons are added
102  // for backward compatibility
105  float PreSelectMVA;
107  // GED-Regression (ECAL and combination)
110  } ;
111 
113  {
114  // minimum SC Et
115  double minSCEtBarrel ;
116  double minSCEtEndcaps ;
117  // maximum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
120  // minimum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
123 
124  // H/E
127  double maxHBarrel ;
128  double maxHEndcaps ;
129 
130  // maximum eta difference between the supercluster position and the track position at the closest impact to the supercluster
133 
134  // maximum phi difference between the supercluster position and the track position at the closest impact to the supercluster
135  // position to the supercluster
138 
139  // maximum sigma ieta ieta
142  // maximum fbrem
143 
144  double maxFbremBarrel ;
146 
147  // fiducial regions
148  bool isBarrel ;
149  bool isEndcaps ;
150  bool isFiducial ;
151 
152  // BDT output (if available)
153  double minMVA ;
155 
156  // transverse impact parameter wrt beam spot
157  double maxTIP ;
158 
159  // only make sense for ecal driven electrons
160  bool seedFromTEC ;
161  } ;
162 
163  // Ecal rec hits
165  {
166  std::vector<int> recHitFlagsToBeExcludedBarrel ;
170  //int severityLevelCut ;
171  } ;
172 
173  // isolation variables parameters
175  {
178  double stripBarrelTk ;
179  double stripEndcapTk ;
180  double ptMinTk ;
181  double maxVtxDistTk ;
182  double maxDrbTk ;
183  double intRadiusHcal ;
184  double etMinHcal ;
187  double jurassicWidth ;
188  double etMinBarrel ;
189  double eMinBarrel ;
190  double etMinEndcaps ;
191  double eMinEndcaps ;
194  } ;
195 
197  (
198  const InputTagsConfiguration &,
199  const StrategyConfiguration &,
200  const CutsConfiguration & cutsCfg,
201  const CutsConfiguration & cutsCfgPflow,
202  const ElectronHcalHelper::Configuration & hcalCfg,
203  const ElectronHcalHelper::Configuration & hcalCfgPflow,
204  const IsolationConfiguration &,
205  const EcalRecHitsConfiguration &,
206  EcalClusterFunctionBaseClass * superClusterErrorFunction,
207  EcalClusterFunctionBaseClass * crackCorrectionFunction,
208  const SoftElectronMVAEstimator::Configuration & mva_NIso_Cfg,
209  const ElectronMVAEstimator::Configuration & mva_Iso_Cfg,
210  const RegressionHelper::Configuration & regCfg
211  ) ;
212 
213  ~GsfElectronAlgo() ;
214 
215  // typedefs
216  typedef std::list<reco::GsfElectron *> GsfElectronPtrCollection ; // for temporary collections
217 
218  // main methods
219  void checkSetup( const edm::EventSetup & ) ;
220  void beginEvent( edm::Event & ) ;
221  void displayInternalElectrons( const std::string & title ) const ;
222  void clonePreviousElectrons() ;
223  void completeElectrons(const gsfAlgoHelpers::HeavyObjectCache*) ; // do not redo cloned electrons done previously
224  void addPflowInfo() ; // now deprecated
225  void setAmbiguityData( bool ignoreNotPreselected = true ) ;
227  void removeAmbiguousElectrons() ;
229  void setMVAInputs(const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaInput> & mvaInputs) ;
231  const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaOutput> & mvaOutputs) ;
232  void endEvent() ;
233 
234  private :
235 
236  // internal structures
237  struct GeneralData ;
238  struct EventSetupData ;
239  struct EventData ;
240  struct ElectronData ;
245 
247 
251  bool isPreselected( reco::GsfElectron * ele ) ;
254 
255 
256  // associations
257  const reco::SuperClusterRef getTrSuperCluster( const reco::GsfTrackRef & trackRef ) ;
258 
259  // Pixel match variables
261 
262  } ;
263 
264 #endif // GsfElectronAlgo_H
265 
266 
void setPixelMatchInfomation(reco::GsfElectron *)
bool isPreselected(reco::GsfElectron *ele)
void setMVAOutputs(const gsfAlgoHelpers::HeavyObjectCache *, const std::map< reco::GsfTrackRef, reco::GsfElectron::MvaOutput > &mvaOutputs)
GeneralData * generalData_
edm::EDGetTokenT< reco::GsfElectronCoreCollection > gsfElectronCores
void clonePreviousElectrons()
edm::EDGetTokenT< reco::GsfElectronCollection > previousGsfElectrons
edm::EDGetTokenT< reco::VertexCollection > vtxCollectionTag
void calculateShowerShape(const reco::SuperClusterRef &, bool pflow, reco::GsfElectron::ShowerShape &)
void beginEvent(edm::Event &)
EventSetupData * eventSetupData_
void setMVAInputs(const std::map< reco::GsfTrackRef, reco::GsfElectron::MvaInput > &mvaInputs)
edm::EDGetTokenT< EcalRecHitCollection > endcapRecHitCollection
void completeElectrons(const gsfAlgoHelpers::HeavyObjectCache *)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::EDGetTokenT< reco::GsfElectronCollection > pflowGsfElectronsTag
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHitCollection
edm::EDGetTokenT< reco::GsfPFRecTrackCollection > gsfPfRecTracksTag
void createElectron(const gsfAlgoHelpers::HeavyObjectCache *)
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag
void calculateShowerShape_full5x5(const reco::SuperClusterRef &, bool pflow, reco::GsfElectron::ShowerShape &)
void setCutBasedPreselectionFlag(reco::GsfElectron *ele, const reco::BeamSpot &)
std::list< reco::GsfElectron * > GsfElectronPtrCollection
edm::EDGetTokenT< reco::SuperClusterCollection > barrelSuperClusters
edm::EDGetTokenT< reco::ElectronSeedCollection > seedsTag
edm::EDGetTokenT< edm::ValueMap< float > > pfMVA
void setMVAepiBasedPreselectionFlag(reco::GsfElectron *ele)
edm::EDGetTokenT< CaloTowerCollection > hcalTowersTag
edm::EDGetTokenT< reco::SuperClusterCollection > endcapSuperClusters
edm::EDGetTokenT< reco::TrackCollection > ctfTracks
GsfElectronAlgo(const InputTagsConfiguration &, const StrategyConfiguration &, const CutsConfiguration &cutsCfg, const CutsConfiguration &cutsCfgPflow, const ElectronHcalHelper::Configuration &hcalCfg, const ElectronHcalHelper::Configuration &hcalCfgPflow, const IsolationConfiguration &, const EcalRecHitsConfiguration &, EcalClusterFunctionBaseClass *superClusterErrorFunction, EcalClusterFunctionBaseClass *crackCorrectionFunction, const SoftElectronMVAEstimator::Configuration &mva_NIso_Cfg, const ElectronMVAEstimator::Configuration &mva_Iso_Cfg, const RegressionHelper::Configuration &regCfg)
const reco::SuperClusterRef getTrSuperCluster(const reco::GsfTrackRef &trackRef)
void setPflowPreselectionFlag(reco::GsfElectron *ele)
void removeAmbiguousElectrons()
void displayInternalElectrons(const std::string &title) const
void removeNotPreselectedElectrons()
EventData * eventData_
void copyElectrons(reco::GsfElectronCollection &)
ElectronData * electronData_
void setAmbiguityData(bool ignoreNotPreselected=true)
void checkSetup(const edm::EventSetup &)