CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
GsfElectronBaseProducer Class Reference

#include <GsfElectronBaseProducer.h>

Inheritance diagram for GsfElectronBaseProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper GsfElectronEcalDrivenProducer GsfElectronProducer

Public Member Functions

 GsfElectronBaseProducer (const edm::ParameterSet &)
 
virtual ~GsfElectronBaseProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescription (edm::ParameterSetDescription &)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void beginEvent (edm::Event &, const edm::EventSetup &)
 
void endEvent ()
 
void fillEvent (edm::Event &)
 
reco::GsfElectronnewElectron ()
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Protected Attributes

GsfElectronAlgoalgo_
 
GsfElectronAlgo::CutsConfiguration cutsCfg_
 
GsfElectronAlgo::CutsConfiguration cutsCfgPflow_
 
ElectronHcalHelper::Configuration hcalCfg_
 
ElectronHcalHelper::Configuration hcalCfgPflow_
 
GsfElectronAlgo::InputTagsConfiguration inputCfg_
 
GsfElectronAlgo::StrategyConfiguration strategyCfg_
 

Private Member Functions

void checkEcalSeedingParameters (edm::ParameterSetID const &)
 

Private Attributes

bool ecalSeedingParametersChecked_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Detailed Description

Definition at line 25 of file GsfElectronBaseProducer.h.

Constructor & Destructor Documentation

GsfElectronBaseProducer::GsfElectronBaseProducer ( const edm::ParameterSet cfg)
explicit

Definition at line 150 of file GsfElectronBaseProducer.cc.

References GsfElectronAlgo::StrategyConfiguration::addPflowElectrons, algo_, GsfElectronAlgo::StrategyConfiguration::ambClustersOverlapStrategy, GsfElectronAlgo::StrategyConfiguration::ambSortingStrategy, GsfElectronAlgo::StrategyConfiguration::applyAmbResolution, GsfElectronAlgo::StrategyConfiguration::applyPreselection, GsfElectronAlgo::InputTagsConfiguration::barrelRecHitCollection, GsfElectronAlgo::InputTagsConfiguration::beamSpotTag, GsfElectronAlgo::InputTagsConfiguration::ctfTracks, GsfElectronAlgo::StrategyConfiguration::ctfTracksCheck, cutsCfg_, cutsCfgPflow_, GsfElectronAlgo::StrategyConfiguration::ecalDrivenEcalEnergyFromClassBasedParameterization, GsfElectronAlgo::StrategyConfiguration::ecalDrivenEcalErrorFromClassBasedParameterization, GsfElectronAlgo::InputTagsConfiguration::edIsoVals, GsfElectronAlgo::InputTagsConfiguration::endcapRecHitCollection, edm::ParameterSet::exists(), reco::get(), edm::ParameterSet::getParameter(), GsfElectronAlgo::InputTagsConfiguration::gsfElectronCores, GsfElectronAlgo::InputTagsConfiguration::gsfPfRecTracksTag, hcalCfg_, hcalCfgPflow_, ElectronHcalHelper::Configuration::hcalTowers, GsfElectronAlgo::InputTagsConfiguration::hcalTowersTag, ElectronHcalHelper::Configuration::hOverEConeSize, ElectronHcalHelper::Configuration::hOverEPtMin, inputCfg_, GsfElectronAlgo::IsolationConfiguration::intRadiusBarrelTk, GsfElectronAlgo::CutsConfiguration::isBarrel, GsfElectronAlgo::CutsConfiguration::isEndcaps, GsfElectronAlgo::CutsConfiguration::isFiducial, GsfElectronAlgo::CutsConfiguration::maxDeltaEtaBarrel, GsfElectronAlgo::CutsConfiguration::maxDeltaEtaEndcaps, GsfElectronAlgo::CutsConfiguration::maxDeltaPhiBarrel, GsfElectronAlgo::CutsConfiguration::maxDeltaPhiEndcaps, GsfElectronAlgo::CutsConfiguration::maxEOverPBarrel, GsfElectronAlgo::CutsConfiguration::maxEOverPEndcaps, GsfElectronAlgo::CutsConfiguration::maxFbremBarrel, GsfElectronAlgo::CutsConfiguration::maxFbremEndcaps, GsfElectronAlgo::CutsConfiguration::maxHBarrel, GsfElectronAlgo::CutsConfiguration::maxHEndcaps, GsfElectronAlgo::CutsConfiguration::maxHOverEBarrel, GsfElectronAlgo::CutsConfiguration::maxHOverEEndcaps, GsfElectronAlgo::CutsConfiguration::maxSigmaIetaIetaBarrel, GsfElectronAlgo::CutsConfiguration::maxSigmaIetaIetaEndcaps, GsfElectronAlgo::CutsConfiguration::maxTIP, GsfElectronAlgo::CutsConfiguration::minEOverPBarrel, GsfElectronAlgo::CutsConfiguration::minEOverPEndcaps, GsfElectronAlgo::CutsConfiguration::minMVA, GsfElectronAlgo::CutsConfiguration::minMvaByPassForIsolated, GsfElectronAlgo::CutsConfiguration::minSCEtBarrel, GsfElectronAlgo::CutsConfiguration::minSCEtEndcaps, GsfElectronAlgo::InputTagsConfiguration::pfIsoVals, GsfElectronAlgo::InputTagsConfiguration::pflowGsfElectronsTag, GsfElectronAlgo::InputTagsConfiguration::pfMVA, GsfElectronAlgo::InputTagsConfiguration::previousGsfElectrons, GsfElectronAlgo::StrategyConfiguration::pureTrackerDrivenEcalErrorFromSimpleParameterization, GsfElectronAlgo::EcalRecHitsConfiguration::recHitFlagsToBeExcludedBarrel, GsfElectronAlgo::EcalRecHitsConfiguration::recHitFlagsToBeExcludedEndcaps, GsfElectronAlgo::EcalRecHitsConfiguration::recHitSeverityToBeExcludedBarrel, GsfElectronAlgo::EcalRecHitsConfiguration::recHitSeverityToBeExcludedEndcaps, GsfElectronAlgo::CutsConfiguration::seedFromTEC, GsfElectronAlgo::InputTagsConfiguration::seedsTag, strategyCfg_, AlCaHLTBitMon_QueryRunRegistry::string, funct::true, GsfElectronAlgo::StrategyConfiguration::useGsfPfRecTracks, and ElectronHcalHelper::Configuration::useTowers.

152  {
153  produces<GsfElectronCollection>();
154 
155  inputCfg_.previousGsfElectrons = cfg.getParameter<edm::InputTag>("previousGsfElectronsTag");
156  inputCfg_.pflowGsfElectronsTag = cfg.getParameter<edm::InputTag>("pflowGsfElectronsTag");
157  inputCfg_.gsfElectronCores = cfg.getParameter<edm::InputTag>("gsfElectronCoresTag");
158  inputCfg_.hcalTowersTag = cfg.getParameter<edm::InputTag>("hcalTowers") ;
159  //inputCfg_.tracks_ = cfg.getParameter<edm::InputTag>("tracks");
160  inputCfg_.barrelRecHitCollection = cfg.getParameter<edm::InputTag>("barrelRecHitCollectionTag") ;
161  inputCfg_.endcapRecHitCollection = cfg.getParameter<edm::InputTag>("endcapRecHitCollectionTag") ;
162  inputCfg_.pfMVA = cfg.getParameter<edm::InputTag>("pfMvaTag") ;
163  inputCfg_.ctfTracks = cfg.getParameter<edm::InputTag>("ctfTracksTag");
164  inputCfg_.seedsTag = cfg.getParameter<edm::InputTag>("seedsTag"); // used to check config consistency with seeding
165  inputCfg_.beamSpotTag = cfg.getParameter<edm::InputTag>("beamSpotTag") ;
166  inputCfg_.gsfPfRecTracksTag = cfg.getParameter<edm::InputTag>("gsfPfRecTracksTag") ;
167 
168  bool useIsolationValues = cfg.getParameter<bool>("useIsolationValues") ;
169  if ( useIsolationValues ) {
170  if( ! cfg.exists("pfIsolationValues") )
171  throw cms::Exception("GsfElectronBaseProducer|InternalError")
172  <<"Missing ParameterSet pfIsolationValues" ;
173  else
175  cfg.getParameter<edm::ParameterSet> ("pfIsolationValues");
176 
177  if ( ! cfg.exists("edIsolationValues") )
178  throw cms::Exception("GsfElectronBaseProducer|InternalError")
179  <<"Missing ParameterSet edIsolationValues" ;
180  else
182  cfg.getParameter<edm::ParameterSet> ("edIsolationValues");
183  }
184 
185  strategyCfg_.useGsfPfRecTracks = cfg.getParameter<bool>("useGsfPfRecTracks") ;
186  strategyCfg_.applyPreselection = cfg.getParameter<bool>("applyPreselection") ;
187  strategyCfg_.ecalDrivenEcalEnergyFromClassBasedParameterization = cfg.getParameter<bool>("ecalDrivenEcalEnergyFromClassBasedParameterization") ;
188  strategyCfg_.ecalDrivenEcalErrorFromClassBasedParameterization = cfg.getParameter<bool>("ecalDrivenEcalErrorFromClassBasedParameterization") ;
189  strategyCfg_.pureTrackerDrivenEcalErrorFromSimpleParameterization = cfg.getParameter<bool>("pureTrackerDrivenEcalErrorFromSimpleParameterization") ;
190  strategyCfg_.applyAmbResolution = cfg.getParameter<bool>("applyAmbResolution") ;
191  strategyCfg_.ambSortingStrategy = cfg.getParameter<unsigned>("ambSortingStrategy") ;
192  strategyCfg_.ambClustersOverlapStrategy = cfg.getParameter<unsigned>("ambClustersOverlapStrategy") ;
193  strategyCfg_.addPflowElectrons = cfg.getParameter<bool>("addPflowElectrons") ;
194  strategyCfg_.ctfTracksCheck = cfg.getParameter<bool>("ctfTracksCheck");
195 
196  cutsCfg_.minSCEtBarrel = cfg.getParameter<double>("minSCEtBarrel") ;
197  cutsCfg_.minSCEtEndcaps = cfg.getParameter<double>("minSCEtEndcaps") ;
198  cutsCfg_.maxEOverPBarrel = cfg.getParameter<double>("maxEOverPBarrel") ;
199  cutsCfg_.maxEOverPEndcaps = cfg.getParameter<double>("maxEOverPEndcaps") ;
200  cutsCfg_.minEOverPBarrel = cfg.getParameter<double>("minEOverPBarrel") ;
201  cutsCfg_.minEOverPEndcaps = cfg.getParameter<double>("minEOverPEndcaps") ;
202 
203  // H/E
204  cutsCfg_.maxHOverEBarrel = cfg.getParameter<double>("maxHOverEBarrel") ;
205  cutsCfg_.maxHOverEEndcaps = cfg.getParameter<double>("maxHOverEEndcaps") ;
206  cutsCfg_.maxHBarrel = cfg.getParameter<double>("maxHBarrel") ;
207  cutsCfg_.maxHEndcaps = cfg.getParameter<double>("maxHEndcaps") ;
208 
209  cutsCfg_.maxDeltaEtaBarrel = cfg.getParameter<double>("maxDeltaEtaBarrel") ;
210  cutsCfg_.maxDeltaEtaEndcaps = cfg.getParameter<double>("maxDeltaEtaEndcaps") ;
211  cutsCfg_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrel") ;
212  cutsCfg_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcaps") ;
213  cutsCfg_.maxSigmaIetaIetaBarrel = cfg.getParameter<double>("maxSigmaIetaIetaBarrel") ;
214  cutsCfg_.maxSigmaIetaIetaEndcaps = cfg.getParameter<double>("maxSigmaIetaIetaEndcaps") ;
215  cutsCfg_.maxFbremBarrel = cfg.getParameter<double>("maxFbremBarrel") ;
216  cutsCfg_.maxFbremEndcaps = cfg.getParameter<double>("maxFbremEndcaps") ;
217  cutsCfg_.isBarrel = cfg.getParameter<bool>("isBarrel") ;
218  cutsCfg_.isEndcaps = cfg.getParameter<bool>("isEndcaps") ;
219  cutsCfg_.isFiducial = cfg.getParameter<bool>("isFiducial") ;
220  cutsCfg_.minMVA = cfg.getParameter<double>("minMVA") ;
221  cutsCfg_.minMvaByPassForIsolated = cfg.getParameter<double>("minMvaByPassForIsolated") ;
222  cutsCfg_.maxTIP = cfg.getParameter<double>("maxTIP") ;
223  cutsCfg_.seedFromTEC = cfg.getParameter<bool>("seedFromTEC") ;
224 
225  cutsCfgPflow_.minSCEtBarrel = cfg.getParameter<double>("minSCEtBarrelPflow") ;
226  cutsCfgPflow_.minSCEtEndcaps = cfg.getParameter<double>("minSCEtEndcapsPflow") ;
227  cutsCfgPflow_.maxEOverPBarrel = cfg.getParameter<double>("maxEOverPBarrelPflow") ;
228  cutsCfgPflow_.maxEOverPEndcaps = cfg.getParameter<double>("maxEOverPEndcapsPflow") ;
229  cutsCfgPflow_.minEOverPBarrel = cfg.getParameter<double>("minEOverPBarrelPflow") ;
230  cutsCfgPflow_.minEOverPEndcaps = cfg.getParameter<double>("minEOverPEndcapsPflow") ;
231 
232  // H/E
233  cutsCfgPflow_.maxHOverEBarrel = cfg.getParameter<double>("maxHOverEBarrelPflow") ;
234  cutsCfgPflow_.maxHOverEEndcaps = cfg.getParameter<double>("maxHOverEEndcapsPflow") ;
235  cutsCfgPflow_.maxHBarrel = cfg.getParameter<double>("maxHBarrelPflow") ;
236  cutsCfgPflow_.maxHEndcaps = cfg.getParameter<double>("maxHEndcapsPflow") ;
237 
238  cutsCfgPflow_.maxDeltaEtaBarrel = cfg.getParameter<double>("maxDeltaEtaBarrelPflow") ;
239  cutsCfgPflow_.maxDeltaEtaEndcaps = cfg.getParameter<double>("maxDeltaEtaEndcapsPflow") ;
240  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
241  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
242  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
243  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
244  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
245  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
246  cutsCfgPflow_.maxSigmaIetaIetaBarrel = cfg.getParameter<double>("maxSigmaIetaIetaBarrelPflow") ;
247  cutsCfgPflow_.maxSigmaIetaIetaEndcaps = cfg.getParameter<double>("maxSigmaIetaIetaEndcapsPflow") ;
248  cutsCfgPflow_.maxFbremBarrel = cfg.getParameter<double>("maxFbremBarrelPflow") ;
249  cutsCfgPflow_.maxFbremEndcaps = cfg.getParameter<double>("maxFbremEndcapsPflow") ;
250  cutsCfgPflow_.isBarrel = cfg.getParameter<bool>("isBarrelPflow") ;
251  cutsCfgPflow_.isEndcaps = cfg.getParameter<bool>("isEndcapsPflow") ;
252  cutsCfgPflow_.isFiducial = cfg.getParameter<bool>("isFiducialPflow") ;
253  cutsCfgPflow_.minMVA = cfg.getParameter<double>("minMVAPflow") ;
254  cutsCfgPflow_.minMvaByPassForIsolated = cfg.getParameter<double>("minMvaByPassForIsolatedPflow") ;
255  cutsCfgPflow_.maxTIP = cfg.getParameter<double>("maxTIPPflow") ;
256  cutsCfgPflow_.seedFromTEC = true ; // not applied for pflow
257 
258  // hcal helpers
259  hcalCfg_.hOverEConeSize = cfg.getParameter<double>("hOverEConeSize") ;
260  if (hcalCfg_.hOverEConeSize>0)
261  {
263  hcalCfg_.hcalTowers = cfg.getParameter<edm::InputTag>("hcalTowers") ;
264  hcalCfg_.hOverEPtMin = cfg.getParameter<double>("hOverEPtMin") ;
265  }
266  hcalCfgPflow_.hOverEConeSize = cfg.getParameter<double>("hOverEConeSizePflow") ;
268  {
270  hcalCfgPflow_.hcalTowers = cfg.getParameter<edm::InputTag>("hcalTowers") ;
271  hcalCfgPflow_.hOverEPtMin = cfg.getParameter<double>("hOverEPtMinPflow") ;
272  }
273 
274  // Ecal rec hits configuration
276  const std::vector<std::string> flagnamesbarrel = cfg.getParameter<std::vector<std::string> >("recHitFlagsToBeExcludedBarrel");
277  recHitsCfg.recHitFlagsToBeExcludedBarrel = StringToEnumValue<EcalRecHit::Flags>(flagnamesbarrel);
278  const std::vector<std::string> flagnamesendcaps = cfg.getParameter<std::vector<std::string> >("recHitFlagsToBeExcludedEndcaps");
279  recHitsCfg.recHitFlagsToBeExcludedEndcaps = StringToEnumValue<EcalRecHit::Flags>(flagnamesendcaps);
280  const std::vector<std::string> severitynamesbarrel = cfg.getParameter<std::vector<std::string> >("recHitSeverityToBeExcludedBarrel");
281  recHitsCfg.recHitSeverityToBeExcludedBarrel = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesbarrel);
282  const std::vector<std::string> severitynamesendcaps = cfg.getParameter<std::vector<std::string> >("recHitSeverityToBeExcludedEndcaps");
283  recHitsCfg.recHitSeverityToBeExcludedEndcaps = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesendcaps);
284  //recHitsCfg.severityLevelCut = cfg.getParameter<int>("severityLevelCut") ;
285 
286  // isolation
288  isoCfg.intRadiusBarrelTk = cfg.getParameter<double>("intRadiusBarrelTk") ;
289  isoCfg.intRadiusEndcapTk = cfg.getParameter<double>("intRadiusEndcapTk") ;
290  isoCfg.stripBarrelTk = cfg.getParameter<double>("stripBarrelTk") ;
291  isoCfg.stripEndcapTk = cfg.getParameter<double>("stripEndcapTk") ;
292  isoCfg.ptMinTk = cfg.getParameter<double>("ptMinTk") ;
293  isoCfg.maxVtxDistTk = cfg.getParameter<double>("maxVtxDistTk") ;
294  isoCfg.maxDrbTk = cfg.getParameter<double>("maxDrbTk") ;
295  isoCfg.intRadiusHcal = cfg.getParameter<double>("intRadiusHcal") ;
296  isoCfg.etMinHcal = cfg.getParameter<double>("etMinHcal") ;
297  isoCfg.intRadiusEcalBarrel = cfg.getParameter<double>("intRadiusEcalBarrel") ;
298  isoCfg.intRadiusEcalEndcaps = cfg.getParameter<double>("intRadiusEcalEndcaps") ;
299  isoCfg.jurassicWidth = cfg.getParameter<double>("jurassicWidth") ;
300  isoCfg.etMinBarrel = cfg.getParameter<double>("etMinBarrel") ;
301  isoCfg.eMinBarrel = cfg.getParameter<double>("eMinBarrel") ;
302  isoCfg.etMinEndcaps = cfg.getParameter<double>("etMinEndcaps") ;
303  isoCfg.eMinEndcaps = cfg.getParameter<double>("eMinEndcaps") ;
304  isoCfg.vetoClustered = cfg.getParameter<bool>("vetoClustered") ;
305  isoCfg.useNumCrystals = cfg.getParameter<bool>("useNumCrystals") ;
306 
307  // functions for corrector
308  EcalClusterFunctionBaseClass * superClusterErrorFunction = 0 ;
309  std::string superClusterErrorFunctionName
310  = cfg.getParameter<std::string>("superClusterErrorFunction") ;
311  if (superClusterErrorFunctionName!="")
312  {
313  superClusterErrorFunction
314  = EcalClusterFunctionFactory::get()->create(superClusterErrorFunctionName,cfg) ;
315  }
316  else
317  {
318  superClusterErrorFunction
319  = EcalClusterFunctionFactory::get()->create("EcalClusterEnergyUncertaintyObjectSpecific",cfg) ;
320  }
321  EcalClusterFunctionBaseClass * crackCorrectionFunction = 0 ;
322  std::string crackCorrectionFunctionName
323  = cfg.getParameter<std::string>("crackCorrectionFunction") ;
324  if (crackCorrectionFunctionName!="")
325  {
326  crackCorrectionFunction
327  = EcalClusterFunctionFactory::get()->create(crackCorrectionFunctionName,cfg) ;
328  }
329 
330  // create algo
331  algo_ = new GsfElectronAlgo
335  isoCfg,recHitsCfg,
336  superClusterErrorFunction,
337  crackCorrectionFunction ) ;
338  }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
GsfElectronAlgo::InputTagsConfiguration inputCfg_
GsfElectronAlgo::CutsConfiguration cutsCfg_
ElectronHcalHelper::Configuration hcalCfg_
ElectronHcalHelper::Configuration hcalCfgPflow_
GsfElectronAlgo::StrategyConfiguration strategyCfg_
T get(const Candidate &c)
Definition: component.h:56
GsfElectronAlgo::CutsConfiguration cutsCfgPflow_
GsfElectronBaseProducer::~GsfElectronBaseProducer ( )
virtual

Definition at line 340 of file GsfElectronBaseProducer.cc.

References algo_.

341  { delete algo_ ; }

Member Function Documentation

void GsfElectronBaseProducer::beginEvent ( edm::Event event,
const edm::EventSetup setup 
)
protected

Definition at line 343 of file GsfElectronBaseProducer.cc.

References algo_, GsfElectronAlgo::beginEvent(), checkEcalSeedingParameters(), GsfElectronAlgo::checkSetup(), ecalSeedingParametersChecked_, inputCfg_, edm::HandleBase::isValid(), edm::HandleBase::provenance(), edm::Provenance::psetID(), GsfElectronAlgo::InputTagsConfiguration::seedsTag, and funct::true.

Referenced by GsfElectronProducer::beginEvent(), and GsfElectronEcalDrivenProducer::produce().

344  {
345  // check configuration
347  {
350  event.getByLabel(inputCfg_.seedsTag,seeds) ;
351  if (!seeds.isValid())
352  {
353  edm::LogWarning("GsfElectronAlgo|UnreachableSeedsProvenance")
354  <<"Cannot check consistency of parameters with ecal seeding ones,"
355  <<" because the original collection of seeds is not any more available." ;
356  }
357  else
358  {
360  }
361  }
362 
363  // init the algo
364  algo_->checkSetup(setup) ;
365  algo_->beginEvent(event) ;
366  }
void checkEcalSeedingParameters(edm::ParameterSetID const &)
void beginEvent(edm::Event &)
ParameterSetID psetID() const
Definition: Provenance.cc:72
GsfElectronAlgo::InputTagsConfiguration inputCfg_
bool isValid() const
Definition: HandleBase.h:76
Provenance const * provenance() const
Definition: HandleBase.h:84
void checkSetup(const edm::EventSetup &)
void GsfElectronBaseProducer::checkEcalSeedingParameters ( edm::ParameterSetID const &  psetid)
private

Definition at line 399 of file GsfElectronBaseProducer.cc.

References cutsCfg_, edm::detail::ThreadSafeRegistry< KEY, T, E >::getMapped(), edm::ParameterSet::getParameter(), hcalCfg_, ElectronHcalHelper::Configuration::hOverEConeSize, edm::detail::ThreadSafeRegistry< KEY, T, E >::instance(), GsfElectronAlgo::CutsConfiguration::maxHOverEBarrel, GsfElectronAlgo::CutsConfiguration::maxHOverEEndcaps, GsfElectronAlgo::CutsConfiguration::minSCEtBarrel, and GsfElectronAlgo::CutsConfiguration::minSCEtEndcaps.

Referenced by beginEvent().

400  {
401  edm::ParameterSet pset ;
402  edm::pset::Registry::instance()->getMapped(psetid,pset) ;
403  edm::ParameterSet seedConfiguration = pset.getParameter<edm::ParameterSet>("SeedConfiguration") ;
404  //edm::ParameterSet orderedHitsFactoryPSet = seedConfiguration.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet") ;
405  //edm::ParameterSet seedParameters = seedConfiguration.getParameter<edm::ParameterSet>("ecalDrivenElectronSeedsParameters") ;
406 
407  if (seedConfiguration.getParameter<bool>("applyHOverECut"))
408  {
409  if ((hcalCfg_.hOverEConeSize!=0)&&(hcalCfg_.hOverEConeSize!=seedConfiguration.getParameter<double>("hOverEConeSize")))
410  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The H/E cone size ("<<hcalCfg_.hOverEConeSize<<") is different from ecal seeding ("<<seedConfiguration.getParameter<double>("hOverEConeSize")<<")." ; }
411  if (cutsCfg_.maxHOverEBarrel<seedConfiguration.getParameter<double>("maxHOverEBarrel"))
412  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The max barrel H/E is lower than during ecal seeding." ; }
413  if (cutsCfg_.maxHOverEEndcaps<seedConfiguration.getParameter<double>("maxHOverEEndcaps"))
414  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The max endcaps H/E is lower than during ecal seeding." ; }
415  }
416 
417  if (cutsCfg_.minSCEtBarrel<seedConfiguration.getParameter<double>("SCEtCut"))
418  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The minimum super-cluster Et in barrel is lower than during ecal seeding." ; }
419  if (cutsCfg_.minSCEtEndcaps<seedConfiguration.getParameter<double>("SCEtCut"))
420  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The minimum super-cluster Et in endcaps is lower than during ecal seeding." ; }
421  }
T getParameter(std::string const &) const
static ThreadSafeRegistry * instance()
bool getMapped(key_type const &k, value_type &result) const
GsfElectronAlgo::CutsConfiguration cutsCfg_
ElectronHcalHelper::Configuration hcalCfg_
void GsfElectronBaseProducer::endEvent ( )
protected
void GsfElectronBaseProducer::fillDescription ( edm::ParameterSetDescription desc)
static

Definition at line 29 of file GsfElectronBaseProducer.cc.

References edm::ParameterSetDescription::add(), and AlCaHLTBitMon_QueryRunRegistry::string.

30  {
31  // input collections
32  desc.add<edm::InputTag>("previousGsfElectronsTag",edm::InputTag("ecalDrivenGsfElectrons")) ;
33  desc.add<edm::InputTag>("pflowGsfElectronsTag",edm::InputTag("pflowGsfElectrons")) ;
34  desc.add<edm::InputTag>("gsfElectronCoresTag",edm::InputTag("gsfElectronCores")) ;
35  desc.add<edm::InputTag>("hcalTowers",edm::InputTag("towerMaker")) ;
36  desc.add<edm::InputTag>("barrelRecHitCollectionTag",edm::InputTag("ecalRecHit","EcalRecHitsEB")) ;
37  desc.add<edm::InputTag>("endcapRecHitCollectionTag",edm::InputTag("ecalRecHit","EcalRecHitsEE")) ;
38  //desc.add<edm::InputTag>("pfMvaTag",edm::InputTag("pfElectronTranslator:pf")) ;
39  desc.add<edm::InputTag>("seedsTag",edm::InputTag("ecalDrivenElectronSeeds")) ;
40  desc.add<edm::InputTag>("beamSpotTag",edm::InputTag("offlineBeamSpot")) ;
41  desc.add<edm::InputTag>("gsfPfRecTracksTag",edm::InputTag("pfTrackElec")) ;
42 
43  // backward compatibility mechanism for ctf tracks
44  desc.add<bool>("ctfTracksCheck",true) ;
45  desc.add<edm::InputTag>("ctfTracksTag",edm::InputTag("generalTracks")) ;
46 
47  // steering
48  desc.add<bool>("useGsfPfRecTracks",true) ;
49  desc.add<bool>("applyPreselection",false) ;
50  desc.add<bool>("ecalDrivenEcalEnergyFromClassBasedParameterization",false) ;
51  desc.add<bool>("ecalDrivenEcalErrorFromClassBasedParameterization",false) ;
52  desc.add<bool>("pureTrackerDrivenEcalErrorFromSimpleParameterization",false) ;
53  desc.add<bool>("applyAmbResolution",false) ;
54  desc.add<unsigned>("ambSortingStrategy",1) ;
55  desc.add<unsigned>("ambClustersOverlapStrategy",1) ;
56  //desc.add<bool>("addPflowElectrons",true) ;
57 
58 // // preselection parameters (ecal driven electrons)
59 // desc.add<bool>("seedFromTEC",true) ;
60 // desc.add<double>("minSCEtBarrel",4.0) ;
61 // desc.add<double>("minSCEtEndcaps",4.0) ;
62 // desc.add<double>("minEOverPBarrel",0.0) ;
63 // desc.add<double>("maxEOverPBarrel",999999999.) ;
64 // desc.add<double>("minEOverPEndcaps",0.0) ;
65 // desc.add<double>("maxEOverPEndcaps",999999999.) ;
66 // desc.add<double>("maxDeltaEtaBarrel",0.02) ;
67 // desc.add<double>("maxDeltaEtaEndcaps",0.02) ;
68 // desc.add<double>("maxDeltaPhiBarrel",0.15) ;
69 // desc.add<double>("maxDeltaPhiEndcaps",0.15) ;
70 // desc.add<double>("hOverEConeSize",0.15) ;
71 // desc.add<double>("hOverEPtMin",0.) ;
72 // desc.add<double>("maxHOverEBarrel",0.15) ;
73 // desc.add<double>("maxHOverEEndcaps",0.15) ;
74 // desc.add<double>("maxHBarrel",0.0) ;
75 // desc.add<double>("maxHEndcaps",0.0) ;
76 // desc.add<double>("maxSigmaIetaIetaBarrel",999999999.) ;
77 // desc.add<double>("maxSigmaIetaIetaEndcaps",999999999.) ;
78 // desc.add<double>("maxFbremBarrel",999999999.) ;
79 // desc.add<double>("maxFbremEndcaps",999999999.) ;
80 // desc.add<bool>("isBarrel",false) ;
81 // desc.add<bool>("isEndcaps",false) ;
82 // desc.add<bool>("isFiducial",false) ;
83 // desc.add<double>("maxTIP",999999999.) ;
84 // desc.add<double>("minMVA",-0.4) ;
85 //
86 // // preselection parameters (tracker driven only electrons)
87 // desc.add<double>("minSCEtBarrelPflow",0.0) ;
88 // desc.add<double>("minSCEtEndcapsPflow",0.0) ;
89 // desc.add<double>("minEOverPBarrelPflow",0.0) ;
90 // desc.add<double>("maxEOverPBarrelPflow",999999999.) ;
91 // desc.add<double>("minEOverPEndcapsPflow",0.0) ;
92 // desc.add<double>("maxEOverPEndcapsPflow",999999999.) ;
93 // desc.add<double>("maxDeltaEtaBarrelPflow",999999999.) ;
94 // desc.add<double>("maxDeltaEtaEndcapsPflow",999999999.) ;
95 // desc.add<double>("maxDeltaPhiBarrelPflow",999999999.) ;
96 // desc.add<double>("maxDeltaPhiEndcapsPflow",999999999.) ;
97 // desc.add<double>("hOverEConeSizePflow",0.15) ;
98 // desc.add<double>("hOverEPtMinPflow",0.) ;
99 // desc.add<double>("maxHOverEBarrelPflow",999999999.) ;
100 // desc.add<double>("maxHOverEEndcapsPflow",999999999.) ;
101 // desc.add<double>("maxHBarrelPflow",0.0) ;
102 // desc.add<double>("maxHEndcapsPflow",0.0) ;
103 // desc.add<double>("maxSigmaIetaIetaBarrelPflow",999999999.) ;
104 // desc.add<double>("maxSigmaIetaIetaEndcapsPflow",999999999.) ;
105 // desc.add<double>("maxFbremBarrelPflow",999999999.) ;
106 // desc.add<double>("maxFbremEndcapsPflow",999999999.) ;
107 // desc.add<bool>("isBarrelPflow",false) ;
108 // desc.add<bool>("isEndcapsPflow",false) ;
109 // desc.add<bool>("isFiducialPflow",false) ;
110 // desc.add<double>("maxTIPPflow",999999999.) ;
111 // desc.add<double>("minMVAPflow",-0.4) ;
112 
113  // Ecal rec hits configuration
114  desc.add<std::vector<int> >("recHitFlagsToBeExcludedBarrel") ;
115  desc.add<std::vector<int> >("recHitFlagsToBeExcludedEndcaps") ;
116  desc.add<std::vector<int> >("recHitSeverityToBeExcludedBarrel") ;
117  desc.add<std::vector<int> >("recHitSeverityToBeExcludedEndcaps") ;
118  //desc.add<int>("severityLevelCut",4) ;
119 
120  // Isolation algos configuration
121  desc.add<double>("intRadiusBarrelTk",0.015) ;
122  desc.add<double>("intRadiusEndcapTk",0.015) ;
123  desc.add<double>("stripBarrelTk",0.015) ;
124  desc.add<double>("stripEndcapTk",0.015) ;
125  desc.add<double>("ptMinTk",0.7) ;
126  desc.add<double>("maxVtxDistTk",0.2) ;
127  desc.add<double>("maxDrbTk",999999999.) ;
128  desc.add<double>("intRadiusHcal",0.15) ;
129  desc.add<double>("etMinHcal",0.0) ;
130  desc.add<double>("intRadiusEcalBarrel",3.0) ;
131  desc.add<double>("intRadiusEcalEndcaps",3.0) ;
132  desc.add<double>("jurassicWidth",1.5) ;
133  desc.add<double>("etMinBarrel",0.0) ;
134  desc.add<double>("eMinBarrel",0.08) ;
135  desc.add<double>("etMinEndcaps",0.1) ;
136  desc.add<double>("eMinEndcaps",0.0) ;
137  desc.add<bool>("vetoClustered",false) ;
138  desc.add<bool>("useNumCrystals",true) ;
139 
140  edm::ParameterSetDescription descNested ;
141  descNested.add<std::string>("propagatorAlongTISE","PropagatorWithMaterial") ;
142  descNested.add<std::string>("propagatorOppositeTISE","PropagatorWithMaterialOpposite") ;
143  desc.add<edm::ParameterSetDescription>("TransientInitialStateEstimatorParameters",descNested) ;
144 
145  // Corrections
146  desc.add<std::string>("superClusterErrorFunction","EcalClusterEnergyUncertaintyObjectSpecific") ;
147  desc.add<std::string>("crackCorrectionFunction","EcalClusterCrackCorrection") ;
148  }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void GsfElectronBaseProducer::fillEvent ( edm::Event event)
protected

Definition at line 368 of file GsfElectronBaseProducer.cc.

References algo_, GsfElectronAlgo::StrategyConfiguration::applyAmbResolution, GsfElectronAlgo::StrategyConfiguration::applyPreselection, GsfElectronAlgo::copyElectrons(), GsfElectronAlgo::displayInternalElectrons(), GsfElectronAlgo::removeAmbiguousElectrons(), GsfElectronAlgo::removeNotPreselectedElectrons(), GsfElectronAlgo::setAmbiguityData(), and strategyCfg_.

Referenced by GsfElectronEcalDrivenProducer::produce(), and GsfElectronProducer::produce().

369  {
370  // all electrons
371  algo_->displayInternalElectrons("GsfElectronAlgo Info (before preselection)") ;
372 
373  // preselection
375  {
377  algo_->displayInternalElectrons("GsfElectronAlgo Info (after preselection)") ;
378  }
379 
380  // ambiguity
383  {
385  algo_->displayInternalElectrons("GsfElectronAlgo Info (after amb. solving)") ;
386  }
387 
388  // final filling
389  std::auto_ptr<GsfElectronCollection> finalCollection( new GsfElectronCollection ) ;
390  algo_->copyElectrons(*finalCollection) ;
391  event.put(finalCollection) ;
392  }
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
GsfElectronAlgo::StrategyConfiguration strategyCfg_
void removeAmbiguousElectrons()
void displayInternalElectrons(const std::string &title) const
void removeNotPreselectedElectrons()
void copyElectrons(reco::GsfElectronCollection &)
void setAmbiguityData(bool ignoreNotPreselected=true)
reco::GsfElectron* GsfElectronBaseProducer::newElectron ( )
inlineprotected

Definition at line 42 of file GsfElectronBaseProducer.h.

42 { return 0 ; }

Member Data Documentation

GsfElectronAlgo* GsfElectronBaseProducer::algo_
protected
GsfElectronAlgo::CutsConfiguration GsfElectronBaseProducer::cutsCfg_
protected
GsfElectronAlgo::CutsConfiguration GsfElectronBaseProducer::cutsCfgPflow_
protected
bool GsfElectronBaseProducer::ecalSeedingParametersChecked_
private

Definition at line 55 of file GsfElectronBaseProducer.h.

Referenced by beginEvent().

ElectronHcalHelper::Configuration GsfElectronBaseProducer::hcalCfg_
protected
ElectronHcalHelper::Configuration GsfElectronBaseProducer::hcalCfgPflow_
protected

Definition at line 50 of file GsfElectronBaseProducer.h.

Referenced by GsfElectronBaseProducer().

GsfElectronAlgo::InputTagsConfiguration GsfElectronBaseProducer::inputCfg_
protected
GsfElectronAlgo::StrategyConfiguration GsfElectronBaseProducer::strategyCfg_
protected