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 
230 private:
231  // internal structures
232 
233  struct Configuration {
234  // configurables
235  const Tokens tokens;
241  };
242 
243  struct EventData;
244  struct ElectronData;
245 
248  CaloGeometry const& caloGeometry,
249  EcalSeverityLevelAlgo const& ecalSeveretyLevelAlgo);
250 
252  ElectronData& electronData,
253  EventData& eventData,
254  CaloTopology const& topology,
255  CaloGeometry const& geometry,
256  MultiTrajectoryStateTransform const& mtsTransform,
257  double magneticFieldInTesla,
258  const HeavyObjectCache*,
262 
264 
265  template <bool full5x5>
267  ElectronHcalHelper const& hcalHelperCone,
268  ElectronHcalHelper const& hcalHelperBc,
269  EventData const& eventData,
270  CaloTopology const& topology,
271  CaloGeometry const& geometry,
272  EcalPFRecHitThresholds const& thresholds) const;
274  EventData const& eventData) const;
275 
276  // Pixel match variables
278 
279  // constant class members
281 
286 
293 
294  // additional configuration and helpers
297  std::unique_ptr<EcalClusterFunctionBaseClass> crackCorrectionFunction_;
299 
300  // Algos for PfCluster Isolation
302  std::unique_ptr<ElectronEcalPFClusterIsolation> ecalisoAlgo_;
304  std::unique_ptr<ElectronHcalPFClusterIsolation> hcalisoAlgo_;
305 };
306 
307 #endif // GsfElectronAlgo_H
reco::GsfElectronCollection completeElectrons(edm::Event const &event, edm::EventSetup const &eventSetup, const HeavyObjectCache *hoc)
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
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
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_
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)
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
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