CMS 3D CMS Logo

GsfElectronAlgo.h
Go to the documentation of this file.
1 #ifndef GsfElectronAlgo_H
2 #define GsfElectronAlgo_H
3 
49 
50 #include <list>
51 #include <string>
52 
54 public:
56  public:
58  std::unique_ptr<const SoftElectronMVAEstimator> sElectronMVAEstimator;
59  std::unique_ptr<const ElectronMVAEstimator> iElectronMVAEstimator;
60  };
61 
62  struct Tokens {
77  };
78 
81  // if true, electron preselection is applied
83  // if true, electron level escale corrections are
84  // used on top of the cluster level corrections
88  // ambiguity solving
89  bool applyAmbResolution; // if not true, ambiguity solving is not applied
90  unsigned ambSortingStrategy; // 0:isBetter, 1:isInnermost
91  unsigned ambClustersOverlapStrategy; // 0:sc adresses, 1:bc shared energy
92  // if true, trackerDriven electrons are added
94  // for backward compatibility
97  float PreSelectMVA;
99  // GED-Regression (ECAL and combination)
102  //heavy ion in 2015 has no conversions and so cant fill conv vtx fit prob so this bool
103  //stops it from being filled
105  };
106 
108  // minimum SC Et
111  // maximum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
114  // minimum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
117 
118  // H/E
127 
128  // maximum eta difference between the supercluster position and the track position at the closest impact to the supercluster
131 
132  // maximum phi difference between the supercluster position and the track position at the closest impact to the supercluster
133  // position to the supercluster
136 
137  // maximum sigma ieta ieta
140  // maximum fbrem
141 
144 
145  // fiducial regions
146  bool isBarrel;
147  bool isEndcaps;
149 
150  // BDT output (if available)
151  double minMVA;
153 
154  // transverse impact parameter wrt beam spot
155  double maxTIP;
156 
157  // only make sense for ecal driven electrons
159  };
160 
161  // Ecal rec hits
167  //int severityLevelCut ;
168  };
169 
170  // isolation variables parameters
173  double etMinHcal;
177  double etMinBarrel;
178  double eMinBarrel;
179  double etMinEndcaps;
180  double eMinEndcaps;
183  };
184 
185  GsfElectronAlgo(const Tokens&,
186  const StrategyConfiguration&,
187  const CutsConfiguration& cutsCfg,
188  const CutsConfiguration& cutsCfgPflow,
189  const ElectronHcalHelper::Configuration& hcalCfg,
190  const ElectronHcalHelper::Configuration& hcalCfgPflow,
191  const IsolationConfiguration&,
193  std::unique_ptr<EcalClusterFunctionBaseClass>&& superClusterErrorFunction,
194  std::unique_ptr<EcalClusterFunctionBaseClass>&& crackCorrectionFunction,
195  const RegressionHelper::Configuration& regCfg,
196  const edm::ParameterSet& tkIsol03Cfg,
197  const edm::ParameterSet& tkIsol04Cfg,
198  const edm::ParameterSet& tkIsolHEEP03Cfg,
199  const edm::ParameterSet& tkIsolHEEP04Cfg,
201 
202  // main methods
203  void completeElectrons(reco::GsfElectronCollection& electrons, // do not redo cloned electrons done previously
204  edm::Event const& event,
205  edm::EventSetup const& eventSetup,
206  const HeavyObjectCache* hoc);
207 
208 private:
209  // internal structures
210 
211  struct Configuration {
212  // configurables
213  const Tokens tokens;
219  };
220 
221  struct EventData;
222  struct ElectronData;
223 
224  void checkSetup(edm::EventSetup const& eventSetup);
226  CaloGeometry const& caloGeometry,
227  EcalSeverityLevelAlgo const& ecalSeveretyLevelAlgo);
228 
230  ElectronData& electronData,
231  EventData& eventData,
232  CaloTopology const& topology,
233  CaloGeometry const& geometry,
234  MultiTrajectoryStateTransform const& mtsTransform,
235  double magneticFieldInTesla,
236  const HeavyObjectCache*);
237 
239 
240  template <bool full5x5>
242  ElectronHcalHelper const& hcalHelper,
243  EventData const& eventData,
244  CaloTopology const& topology,
245  CaloGeometry const& geometry) const;
247  EventData const& eventData) const;
248 
249  // Pixel match variables
251 
252  // constant class members
254 
259 
265 
266  // additional configuration and helpers
269  std::unique_ptr<EcalClusterFunctionBaseClass> superClusterErrorFunction_;
270  std::unique_ptr<EcalClusterFunctionBaseClass> crackCorrectionFunction_;
272 };
273 
274 #endif // GsfElectronAlgo_H
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
void setCutBasedPreselectionFlag(reco::GsfElectron &ele, const reco::BeamSpot &) const
const EleTkIsolFromCands tkIsol03Calc_
edm::EDGetTokenT< reco::ConversionCollection > conversions
edm::EDGetTokenT< CaloTowerCollection > hcalTowersTag
const EleTkIsolFromCands tkIsolHEEP04Calc_
edm::EDGetTokenT< reco::GsfPFRecTrackCollection > gsfPfRecTracksTag
void completeElectrons(reco::GsfElectronCollection &electrons, edm::Event const &event, edm::EventSetup const &eventSetup, const HeavyObjectCache *hoc)
CaloTopology const * topology(0)
edm::EDGetTokenT< reco::SuperClusterCollection > endcapSuperClusters
void setPixelMatchInfomation(reco::GsfElectron &) const
std::unique_ptr< EcalClusterFunctionBaseClass > superClusterErrorFunction_
edm::EDGetTokenT< reco::VertexCollection > vtxCollectionTag
edm::EDGetTokenT< EcalRecHitCollection > endcapRecHitCollection
reco::GsfElectron::ShowerShape calculateShowerShape(const reco::SuperClusterRef &, ElectronHcalHelper const &hcalHelper, EventData const &eventData, CaloTopology const &topology, CaloGeometry const &geometry) const
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
ElectronHcalHelper hcalHelper_
edm::EDGetTokenT< reco::GsfElectronCoreCollection > gsfElectronCores
edm::EDGetTokenT< reco::GsfElectronCollection > pflowGsfElectronsTag
RegressionHelper regHelper_
std::unique_ptr< const ElectronMVAEstimator > iElectronMVAEstimator
const Configuration cfg_
edm::EDGetTokenT< reco::SuperClusterCollection > barrelSuperClusters
const edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > ecalSeveretyLevelAlgoToken_
void checkSetup(edm::EventSetup const &eventSetup)
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag
HeavyObjectCache(const edm::ParameterSet &)
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
std::unique_ptr< EcalClusterFunctionBaseClass > crackCorrectionFunction_
const IsolationConfiguration iso
edm::EDGetTokenT< reco::TrackCollection > ctfTracks
edm::EDGetTokenT< reco::ElectronSeedCollection > seedsTag
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
const CutsConfiguration cutsPflow
GsfElectronAlgo(const Tokens &, const StrategyConfiguration &, const CutsConfiguration &cutsCfg, const CutsConfiguration &cutsCfgPflow, const ElectronHcalHelper::Configuration &hcalCfg, const ElectronHcalHelper::Configuration &hcalCfgPflow, const IsolationConfiguration &, const EcalRecHitsConfiguration &, std::unique_ptr< EcalClusterFunctionBaseClass > &&superClusterErrorFunction, std::unique_ptr< EcalClusterFunctionBaseClass > &&crackCorrectionFunction, const RegressionHelper::Configuration &regCfg, const edm::ParameterSet &tkIsol03Cfg, const edm::ParameterSet &tkIsol04Cfg, const edm::ParameterSet &tkIsolHEEP03Cfg, const edm::ParameterSet &tkIsolHEEP04Cfg, edm::ConsumesCollector &&cc)
reco::GsfElectron::SaturationInfo calculateSaturationInfo(const reco::SuperClusterRef &, EventData const &eventData) const
const StrategyConfiguration strategy
edm::EDGetTokenT< reco::GsfElectronCollection > previousGsfElectrons
const CutsConfiguration cuts
const EcalRecHitsConfiguration recHits
const EleTkIsolFromCands tkIsol04Calc_
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHitCollection
const EleTkIsolFromCands tkIsolHEEP03Calc_
std::unique_ptr< const SoftElectronMVAEstimator > sElectronMVAEstimator
EventData beginEvent(edm::Event const &event, CaloGeometry const &caloGeometry, EcalSeverityLevelAlgo const &ecalSeveretyLevelAlgo)
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
Definition: event.py:1
ElectronHcalHelper hcalHelperPflow_
void createElectron(reco::GsfElectronCollection &electrons, ElectronData &electronData, EventData &eventData, CaloTopology const &topology, CaloGeometry const &geometry, MultiTrajectoryStateTransform const &mtsTransform, double magneticFieldInTesla, const HeavyObjectCache *)