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 
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,
207  const SoftElectronMVAEstimator::Configuration & mva_NIso_Cfg,
208  const ElectronMVAEstimator::Configuration & mva_Iso_Cfg,
209  const RegressionHelper::Configuration & regCfg
210  ) ;
211 
212  ~GsfElectronAlgo() ;
213 
214  // typedefs
215  typedef std::list<reco::GsfElectron *> GsfElectronPtrCollection ; // for temporary collections
216 
217  // main methods
218  void checkSetup( const edm::EventSetup & ) ;
219  void beginEvent( edm::Event & ) ;
220  void displayInternalElectrons( const std::string & title ) const ;
221  void clonePreviousElectrons() ;
222  void completeElectrons() ; // do not redo cloned electrons done previously
223  void addPflowInfo() ; // now deprecated
224  void setAmbiguityData( bool ignoreNotPreselected = true ) ;
226  void removeAmbiguousElectrons() ;
228  void setMVAInputs(const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaInput> & mvaInputs) ;
229  void setMVAOutputs(const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaOutput> & mvaOutputs) ;
230  void endEvent() ;
231 
232  private :
233 
234  // internal structures
235  struct GeneralData ;
236  struct EventSetupData ;
237  struct EventData ;
238  struct ElectronData ;
243 
244  void createElectron() ;
245 
249  bool isPreselected( reco::GsfElectron * ele ) ;
252 
253 
254  // associations
255  const reco::SuperClusterRef getTrSuperCluster( const reco::GsfTrackRef & trackRef ) ;
256 
257  // Pixel match variables
259 
260  } ;
261 
262 #endif // GsfElectronAlgo_H
263 
264 
void setPixelMatchInfomation(reco::GsfElectron *)
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
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
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 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 &)