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 
51 
52 
53 #include <list>
54 #include <string>
55 
56 
58 
59  public:
60 
62  {
69  //edm::EDGetTokenT tracks ;
78 
79  //IsoVals (PF and EcalDriven)
82 
83  } ;
84 
86  {
88  // if true, electron preselection is applied
90  // if true, electron level escale corrections are
91  // used on top of the cluster level corrections
95  // ambiguity solving
96  bool applyAmbResolution ; // if not true, ambiguity solving is not applied
97  unsigned ambSortingStrategy ; // 0:isBetter, 1:isInnerMost
98  unsigned ambClustersOverlapStrategy ; // 0:sc adresses, 1:bc shared energy
99  // if true, trackerDriven electrons are added
101  // for backward compatibility
104  float PreSelectMVA;
106  // GED-Regression (ECAL and combination)
109  } ;
110 
112  {
113  // minimum SC Et
114  double minSCEtBarrel ;
115  double minSCEtEndcaps ;
116  // maximum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
119  // minimum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
122 
123  // H/E
126  double maxHBarrel ;
127  double maxHEndcaps ;
128 
129  // maximum eta difference between the supercluster position and the track position at the closest impact to the supercluster
132 
133  // maximum phi difference between the supercluster position and the track position at the closest impact to the supercluster
134  // position to the supercluster
137 
138  // maximum sigma ieta ieta
141  // maximum fbrem
142 
143  double maxFbremBarrel ;
145 
146  // fiducial regions
147  bool isBarrel ;
148  bool isEndcaps ;
149  bool isFiducial ;
150 
151  // BDT output (if available)
152  double minMVA ;
154 
155  // transverse impact parameter wrt beam spot
156  double maxTIP ;
157 
158  // only make sense for ecal driven electrons
159  bool seedFromTEC ;
160  } ;
161 
162  // Ecal rec hits
164  {
165  std::vector<int> recHitFlagsToBeExcludedBarrel ;
169  //int severityLevelCut ;
170  } ;
171 
172  // isolation variables parameters
174  {
177  double stripBarrelTk ;
178  double stripEndcapTk ;
179  double ptMinTk ;
180  double maxVtxDistTk ;
181  double maxDrbTk ;
182  double intRadiusHcal ;
183  double etMinHcal ;
186  double jurassicWidth ;
187  double etMinBarrel ;
188  double eMinBarrel ;
189  double etMinEndcaps ;
190  double eMinEndcaps ;
193  } ;
194 
196  (
197  const InputTagsConfiguration &,
198  const StrategyConfiguration &,
199  const CutsConfiguration & cutsCfg,
200  const CutsConfiguration & cutsCfgPflow,
201  const ElectronHcalHelper::Configuration & hcalCfg,
202  const ElectronHcalHelper::Configuration & hcalCfgPflow,
203  const IsolationConfiguration &,
204  const EcalRecHitsConfiguration &,
205  EcalClusterFunctionBaseClass * superClusterErrorFunction,
206  EcalClusterFunctionBaseClass * crackCorrectionFunction,
208  const RegressionHelper::Configuration & regCfg
209  ) ;
210 
211  ~GsfElectronAlgo() ;
212 
213  // typedefs
214  typedef std::list<reco::GsfElectron *> GsfElectronPtrCollection ; // for temporary collections
215 
216  // main methods
217  void checkSetup( const edm::EventSetup & ) ;
218  void beginEvent( edm::Event & ) ;
219  void displayInternalElectrons( const std::string & title ) const ;
220  void clonePreviousElectrons() ;
221  void completeElectrons() ; // do not redo cloned electrons done previously
222  void addPflowInfo() ; // now deprecated
223  void setAmbiguityData( bool ignoreNotPreselected = true ) ;
225  void removeAmbiguousElectrons() ;
227  void setMVAInputs(const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaInput> & mvaInputs) ;
228  void setMVAOutputs(const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaOutput> & mvaOutputs) ;
229  void endEvent() ;
230 
231  private :
232 
233  // internal structures
234  struct GeneralData ;
235  struct EventSetupData ;
236  struct EventData ;
237  struct ElectronData ;
242 
243  void createElectron() ;
244 
248  bool isPreselected( reco::GsfElectron * ele ) ;
251 
252 
253  // associations
254  const reco::SuperClusterRef getTrSuperCluster( const reco::GsfTrackRef & trackRef ) ;
255  } ;
256 
257 #endif // GsfElectronAlgo_H
258 
259 
bool isPreselected(reco::GsfElectron *ele)
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
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::EDGetTokenT< reco::GsfElectronCollection > pflowGsfElectronsTag
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 &mvaCfg, const RegressionHelper::Configuration &regCfg)
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHitCollection
edm::EDGetTokenT< reco::GsfPFRecTrackCollection > gsfPfRecTracksTag
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 setPflowPreselectionFlag(reco::GsfElectron *ele)
void setMVAOutputs(const std::map< reco::GsfTrackRef, reco::GsfElectron::MvaOutput > &mvaOutputs)
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 &)