CMS 3D CMS Logo

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  {
176  double intRadiusHcal ;
177  double etMinHcal ;
180  double jurassicWidth ;
181  double etMinBarrel ;
182  double eMinBarrel ;
183  double etMinEndcaps ;
184  double eMinEndcaps ;
187  } ;
188 
190  (
191  const InputTagsConfiguration &,
192  const StrategyConfiguration &,
193  const CutsConfiguration & cutsCfg,
194  const CutsConfiguration & cutsCfgPflow,
195  const ElectronHcalHelper::Configuration & hcalCfg,
196  const ElectronHcalHelper::Configuration & hcalCfgPflow,
197  const IsolationConfiguration &,
198  const EcalRecHitsConfiguration &,
201  const SoftElectronMVAEstimator::Configuration & mva_NIso_Cfg,
202  const ElectronMVAEstimator::Configuration & mva_Iso_Cfg,
203  const RegressionHelper::Configuration & regCfg,
204  const edm::ParameterSet& tkIsol03Cfg,
205  const edm::ParameterSet& tkIsol04Cfg
206 
207  ) ;
208 
209  ~GsfElectronAlgo() ;
210 
211  // typedefs
212  typedef std::list<reco::GsfElectron *> GsfElectronPtrCollection ; // for temporary collections
213 
214  // main methods
215  void checkSetup( const edm::EventSetup & ) ;
216  void beginEvent( edm::Event & ) ;
217  void displayInternalElectrons( const std::string & title ) const ;
218  void clonePreviousElectrons() ;
219  void completeElectrons(const gsfAlgoHelpers::HeavyObjectCache*) ; // do not redo cloned electrons done previously
220  void addPflowInfo() ; // now deprecated
221  void setAmbiguityData( bool ignoreNotPreselected = true ) ;
223  void removeAmbiguousElectrons() ;
225  void setMVAInputs(const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaInput> & mvaInputs) ;
227  const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaOutput> & mvaOutputs) ;
228  void endEvent() ;
229 
230  private :
231 
232  // internal structures
233  struct GeneralData ;
234  struct EventSetupData ;
235  struct EventData ;
236  struct ElectronData ;
241 
244 
246 
250  bool isPreselected( reco::GsfElectron * ele ) ;
251  void calculateShowerShape( const reco::SuperClusterRef &, bool pflow,
256 
257  // associations
258  const reco::SuperClusterRef getTrSuperCluster( const reco::GsfTrackRef & trackRef ) ;
259 
260  // Pixel match variables
262 
263  } ;
264 
265 #endif // GsfElectronAlgo_H
266 
267 
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
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 edm::ParameterSet &tkIsol03Cfg, const edm::ParameterSet &tkIsol04Cfg)
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
const reco::SuperClusterRef getTrSuperCluster(const reco::GsfTrackRef &trackRef)
void calculateSaturationInfo(const reco::SuperClusterRef &, reco::GsfElectron::SaturationInfo &)
void setPflowPreselectionFlag(reco::GsfElectron *ele)
EleTkIsolFromCands tkIsol04Calc_
void removeAmbiguousElectrons()
void displayInternalElectrons(const std::string &title) const
void removeNotPreselectedElectrons()
EventData * eventData_
void copyElectrons(reco::GsfElectronCollection &)
ElectronData * electronData_
void setAmbiguityData(bool ignoreNotPreselected=true)
EleTkIsolFromCands tkIsol03Calc_
void checkSetup(const edm::EventSetup &)