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 
10 
14 
19 
23 
27 
41 
45 
46 #include <list>
47 #include <string>
48 
50 
51  public:
52 
54  {
61  //edm::InputTag tracks ;
69 
70  //IsoVals (PF and EcalDriven)
73 
74  } ;
75 
77  {
79  // if true, electron preselection is applied
81  // if true, electron level escale corrections are
82  // used on top of the cluster level corrections
86  // ambiguity solving
87  bool applyAmbResolution ; // if not true, ambiguity solving is not applied
88  unsigned ambSortingStrategy ; // 0:isBetter, 1:isInnerMost
89  unsigned ambClustersOverlapStrategy ; // 0:sc adresses, 1:bc shared energy
90  // if true, trackerDriven electrons are added
92  // for backward compatibility
94  } ;
95 
97  {
98  // minimum SC Et
99  double minSCEtBarrel ;
100  double minSCEtEndcaps ;
101  // maximum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
104  // minimum E/p where E is the supercluster corrected energy and p the track momentum at innermost state
107 
108  // H/E
111  double maxHBarrel ;
112  double maxHEndcaps ;
113 
114  // maximum eta difference between the supercluster position and the track position at the closest impact to the supercluster
117 
118  // maximum phi difference between the supercluster position and the track position at the closest impact to the supercluster
119  // position to the supercluster
122 
123  // maximum sigma ieta ieta
126  // maximum fbrem
127 
128  double maxFbremBarrel ;
130 
131  // fiducial regions
132  bool isBarrel ;
133  bool isEndcaps ;
134  bool isFiducial ;
135 
136  // BDT output (if available)
137  double minMVA ;
139 
140  // transverse impact parameter wrt beam spot
141  double maxTIP ;
142 
143  // only make sense for ecal driven electrons
144  bool seedFromTEC ;
145  } ;
146 
147  // Ecal rec hits
149  {
150  std::vector<int> recHitFlagsToBeExcludedBarrel ;
154  //int severityLevelCut ;
155  } ;
156 
157  // isolation variables parameters
159  {
162  double stripBarrelTk ;
163  double stripEndcapTk ;
164  double ptMinTk ;
165  double maxVtxDistTk ;
166  double maxDrbTk ;
167  double intRadiusHcal ;
168  double etMinHcal ;
171  double jurassicWidth ;
172  double etMinBarrel ;
173  double eMinBarrel ;
174  double etMinEndcaps ;
175  double eMinEndcaps ;
178  } ;
179 
181  (
182  const InputTagsConfiguration &,
183  const StrategyConfiguration &,
184  const CutsConfiguration & cutsCfg,
185  const CutsConfiguration & cutsCfgPflow,
186  const ElectronHcalHelper::Configuration & hcalCfg,
187  const ElectronHcalHelper::Configuration & hcalCfgPflow,
188  const IsolationConfiguration &,
189  const EcalRecHitsConfiguration &,
190  EcalClusterFunctionBaseClass * superClusterErrorFunction,
191  EcalClusterFunctionBaseClass * crackCorrectionFunction
192  ) ;
193 
194  ~GsfElectronAlgo() ;
195 
196  // typedefs
197  typedef std::list<reco::GsfElectron *> GsfElectronPtrCollection ; // for temporary collections
198 
199  // main methods
200  void checkSetup( const edm::EventSetup & ) ;
201  void beginEvent( edm::Event & ) ;
202  void displayInternalElectrons( const std::string & title ) const ;
203  void clonePreviousElectrons() ;
204  void completeElectrons() ; // do not redo cloned electrons done previously
205  void addPflowInfo() ;
206  void setAmbiguityData( bool ignoreNotPreselected = true ) ;
208  void removeAmbiguousElectrons() ;
210  void endEvent() ;
211 
212 
213  private :
214 
215  // internal structures
216  struct GeneralData ;
217  struct EventSetupData ;
218  struct EventData ;
219  struct ElectronData ;
224 
225  void createElectron() ;
226 
229  bool isPreselected( reco::GsfElectron * ele ) ;
231 
232  // associations
233  const reco::SuperClusterRef getTrSuperCluster( const reco::GsfTrackRef & trackRef ) ;
234  } ;
235 
236 #endif // GsfElectronAlgo_H
237 
238 
bool isPreselected(reco::GsfElectron *ele)
GeneralData * generalData_
void clonePreviousElectrons()
void calculateShowerShape(const reco::SuperClusterRef &, bool pflow, reco::GsfElectron::ShowerShape &)
void beginEvent(edm::Event &)
EventSetupData * eventSetupData_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
void setCutBasedPreselectionFlag(reco::GsfElectron *ele, const reco::BeamSpot &)
std::list< reco::GsfElectron * > GsfElectronPtrCollection
const reco::SuperClusterRef getTrSuperCluster(const reco::GsfTrackRef &trackRef)
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)
void setPflowPreselectionFlag(reco::GsfElectron *ele)
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 &)