CMS 3D CMS Logo

GsfElectronAlgo.h
Go to the documentation of this file.
1 #ifndef GsfElectronAlgo_H
2 #define GsfElectronAlgo_H
3 
53 
55 public:
57  public:
59  std::unique_ptr<const SoftElectronMVAEstimator> sElectronMVAEstimator;
60  std::unique_ptr<const ElectronMVAEstimator> iElectronMVAEstimator;
61  std::unique_ptr<const ElectronDNNEstimator> iElectronDNNEstimator;
62  };
63 
64  struct Tokens {
76 
81  };
82 
84  // if true, electron preselection is applied
86  // if true, electron level escale corrections are
87  // used on top of the cluster level corrections
91  // ambiguity solving
92  bool applyAmbResolution; // if not true, ambiguity solving is not applied
94  unsigned ambSortingStrategy; // 0:isBetter, 1:isInnermost
95  unsigned ambClustersOverlapStrategy; // 0:sc adresses, 1:bc shared energy
96  // for backward compatibility
98  float PreSelectMVA;
101  // GED-Regression (ECAL and combination)
104  //heavy ion in 2015 has no conversions and so cant fill conv vtx fit prob so this bool
105  //stops it from being filled
107  // Compute PFcluster isolation for egamma PFID DNN
109  };
110 
112  // minimum SC Et
115  // maximum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
118  // minimum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
121 
122  // H/E
129  double maxHBarrelBc;
131 
132  // maximum eta difference between the supercluster position and the track position at the closest impact to the supercluster
135 
136  // maximum phi difference between the supercluster position and the track position at the closest impact to the supercluster
137  // position to the supercluster
140 
141  // maximum sigma ieta ieta
144  // maximum fbrem
145 
148 
149  // fiducial regions
150  bool isBarrel;
151  bool isEndcaps;
153 
154  // transverse impact parameter wrt beam spot
155  double maxTIP;
156 
157  // only make sense for ecal driven electrons
159 
160  // noise cleaning
161  double multThresEB;
162  double multThresEE;
163  };
164 
165  // Ecal rec hits
171  //int severityLevelCut ;
172  };
173 
174  // isolation variables parameters
177  double etMinHcal;
181  double etMinBarrel;
182  double eMinBarrel;
183  double etMinEndcaps;
184  double eMinEndcaps;
187  };
188 
190  double ecaldrMax;
197 
198  bool useHF;
199  double hcaldrMax;
206  bool hcaluseEt;
207  };
208 
209  GsfElectronAlgo(const Tokens&,
210  const StrategyConfiguration&,
211  const CutsConfiguration& cutsCfg,
212  const ElectronHcalHelper::Configuration& hcalCone,
213  const ElectronHcalHelper::Configuration& hcalBc,
214  const IsolationConfiguration&,
217  std::unique_ptr<EcalClusterFunctionBaseClass>&& crackCorrectionFunction,
218  const RegressionHelper::Configuration& regCfg,
219  const edm::ParameterSet& tkIsol03Cfg,
220  const edm::ParameterSet& tkIsol04Cfg,
221  const edm::ParameterSet& tkIsolHEEP03Cfg,
222  const edm::ParameterSet& tkIsolHEEP04Cfg,
224 
225  // main methods
228  const HeavyObjectCache* hoc,
229  const HcalPFCuts* hcalCuts);
230 
231 private:
232  // internal structures
233 
234  struct Configuration {
235  // configurables
236  const Tokens tokens;
242  };
243 
244  struct EventData;
245  struct ElectronData;
246 
249  CaloGeometry const& caloGeometry,
250  EcalSeverityLevelAlgo const& ecalSeveretyLevelAlgo);
251 
253  ElectronData& electronData,
254  EventData& eventData,
255  CaloTopology const& topology,
256  CaloGeometry const& geometry,
257  MultiTrajectoryStateTransform const& mtsTransform,
258  double magneticFieldInTesla,
259  const HeavyObjectCache*,
263  const HcalPFCuts* hcalCuts);
264 
266 
267  template <bool full5x5>
269  ElectronHcalHelper const& hcalHelperCone,
270  ElectronHcalHelper const& hcalHelperBc,
271  EventData const& eventData,
272  CaloTopology const& topology,
273  CaloGeometry const& geometry,
275  const HcalPFCuts* hcalCuts) const;
277  EventData const& eventData) const;
278 
279  // Pixel match variables
281 
282  // constant class members
284 
289 
296 
297  // additional configuration and helpers
300  std::unique_ptr<EcalClusterFunctionBaseClass> crackCorrectionFunction_;
302 
303  // Algos for PfCluster Isolation
305  std::unique_ptr<ElectronEcalPFClusterIsolation> ecalisoAlgo_;
307  std::unique_ptr<ElectronHcalPFClusterIsolation> hcalisoAlgo_;
308 };
309 
310 #endif // GsfElectronAlgo_H
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitsTag
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
edm::EDGetTokenT< reco::ConversionCollection > conversions
void setCutBasedPreselectionFlag(reco::GsfElectron &ele, const reco::BeamSpot &) const
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFEM
void createElectron(reco::GsfElectronCollection &electrons, ElectronData &electronData, EventData &eventData, CaloTopology const &topology, CaloGeometry const &geometry, MultiTrajectoryStateTransform const &mtsTransform, double magneticFieldInTesla, const HeavyObjectCache *, egamma::conv::TrackTableView ctfTable, egamma::conv::TrackTableView gsfTable, EcalPFRecHitThresholds const &thresholds, const HcalPFCuts *hcalCuts)
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHCAL
edm::EDGetTokenT< reco::SuperClusterCollection > endcapSuperClusters
GsfElectronAlgo(const Tokens &, const StrategyConfiguration &, const CutsConfiguration &cutsCfg, const ElectronHcalHelper::Configuration &hcalCone, const ElectronHcalHelper::Configuration &hcalBc, const IsolationConfiguration &, const PFClusterIsolationConfiguration &, const EcalRecHitsConfiguration &, 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)
edm::EDGetTokenT< reco::VertexCollection > vtxCollectionTag
edm::EDGetTokenT< EcalRecHitCollection > endcapRecHitCollection
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFHAD
edm::EDGetTokenT< reco::GsfElectronCoreCollection > gsfElectronCores
RegressionHelper regHelper_
std::unique_ptr< const ElectronMVAEstimator > iElectronMVAEstimator
const Configuration cfg_
reco::GsfElectronCollection completeElectrons(edm::Event const &event, edm::EventSetup const &eventSetup, const HeavyObjectCache *hoc, const HcalPFCuts *hcalCuts)
edm::EDGetTokenT< reco::SuperClusterCollection > barrelSuperClusters
HcalPFClusterIsolation< reco::GsfElectron > ElectronHcalPFClusterIsolation
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > ecalPFRechitThresholdsToken_
const edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > ecalSeveretyLevelAlgoToken_
edm::soa::ViewFromTable_t< TrackTable > TrackTableView
void checkSetup(edm::EventSetup const &eventSetup)
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag
const EleTkIsolFromCands::Configuration tkIsol03CalcCfg_
HeavyObjectCache(const edm::ParameterSet &)
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
std::unique_ptr< EcalClusterFunctionBaseClass > crackCorrectionFunction_
const IsolationConfiguration iso
edm::EDGetTokenT< reco::TrackCollection > ctfTracks
reco::GsfElectron::ShowerShape calculateShowerShape(const reco::SuperClusterRef &, ElectronHcalHelper const &hcalHelperCone, ElectronHcalHelper const &hcalHelperBc, EventData const &eventData, CaloTopology const &topology, CaloGeometry const &geometry, EcalPFRecHitThresholds const &thresholds, const HcalPFCuts *hcalCuts) const
edm::EDGetTokenT< reco::ElectronSeedCollection > seedsTag
std::unique_ptr< const ElectronDNNEstimator > iElectronDNNEstimator
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
reco::GsfElectron::SaturationInfo calculateSaturationInfo(const reco::SuperClusterRef &, EventData const &eventData) const
const EleTkIsolFromCands::Configuration tkIsolHEEP04CalcCfg_
const PFClusterIsolationConfiguration pfiso
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer
void setPixelMatchInfomation(reco::GsfElectron &) const
EcalPFClusterIsolation< reco::GsfElectron > ElectronEcalPFClusterIsolation
const StrategyConfiguration strategy
const CutsConfiguration cuts
const EcalRecHitsConfiguration recHits
ElectronHcalHelper hcalHelperCone_
ElectronHcalHelper hcalHelperBc_
std::unique_ptr< ElectronHcalPFClusterIsolation > hcalisoAlgo_
std::unique_ptr< ElectronEcalPFClusterIsolation > ecalisoAlgo_
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHitCollection
std::unique_ptr< const SoftElectronMVAEstimator > sElectronMVAEstimator
EventData beginEvent(edm::Event const &event, CaloGeometry const &caloGeometry, EcalSeverityLevelAlgo const &ecalSeveretyLevelAlgo)
const EleTkIsolFromCands::Configuration tkIsolHEEP03CalcCfg_
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
const EleTkIsolFromCands::Configuration tkIsol04CalcCfg_
Definition: event.py:1