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::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 &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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::endcapRecHitCollection, 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::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_, 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  strategyCfg_.useGsfPfRecTracks = cfg.getParameter<bool>("useGsfPfRecTracks") ;
169  strategyCfg_.applyPreselection = cfg.getParameter<bool>("applyPreselection") ;
170  strategyCfg_.ecalDrivenEcalEnergyFromClassBasedParameterization = cfg.getParameter<bool>("ecalDrivenEcalEnergyFromClassBasedParameterization") ;
171  strategyCfg_.ecalDrivenEcalErrorFromClassBasedParameterization = cfg.getParameter<bool>("ecalDrivenEcalErrorFromClassBasedParameterization") ;
172  strategyCfg_.pureTrackerDrivenEcalErrorFromSimpleParameterization = cfg.getParameter<bool>("pureTrackerDrivenEcalErrorFromSimpleParameterization") ;
173  strategyCfg_.applyAmbResolution = cfg.getParameter<bool>("applyAmbResolution") ;
174  strategyCfg_.ambSortingStrategy = cfg.getParameter<unsigned>("ambSortingStrategy") ;
175  strategyCfg_.ambClustersOverlapStrategy = cfg.getParameter<unsigned>("ambClustersOverlapStrategy") ;
176  strategyCfg_.addPflowElectrons = cfg.getParameter<bool>("addPflowElectrons") ;
177  strategyCfg_.ctfTracksCheck = cfg.getParameter<bool>("ctfTracksCheck");
178 
179  cutsCfg_.minSCEtBarrel = cfg.getParameter<double>("minSCEtBarrel") ;
180  cutsCfg_.minSCEtEndcaps = cfg.getParameter<double>("minSCEtEndcaps") ;
181  cutsCfg_.maxEOverPBarrel = cfg.getParameter<double>("maxEOverPBarrel") ;
182  cutsCfg_.maxEOverPEndcaps = cfg.getParameter<double>("maxEOverPEndcaps") ;
183  cutsCfg_.minEOverPBarrel = cfg.getParameter<double>("minEOverPBarrel") ;
184  cutsCfg_.minEOverPEndcaps = cfg.getParameter<double>("minEOverPEndcaps") ;
185 
186  // H/E
187  cutsCfg_.maxHOverEBarrel = cfg.getParameter<double>("maxHOverEBarrel") ;
188  cutsCfg_.maxHOverEEndcaps = cfg.getParameter<double>("maxHOverEEndcaps") ;
189  cutsCfg_.maxHBarrel = cfg.getParameter<double>("maxHBarrel") ;
190  cutsCfg_.maxHEndcaps = cfg.getParameter<double>("maxHEndcaps") ;
191 
192  cutsCfg_.maxDeltaEtaBarrel = cfg.getParameter<double>("maxDeltaEtaBarrel") ;
193  cutsCfg_.maxDeltaEtaEndcaps = cfg.getParameter<double>("maxDeltaEtaEndcaps") ;
194  cutsCfg_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrel") ;
195  cutsCfg_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcaps") ;
196  cutsCfg_.maxSigmaIetaIetaBarrel = cfg.getParameter<double>("maxSigmaIetaIetaBarrel") ;
197  cutsCfg_.maxSigmaIetaIetaEndcaps = cfg.getParameter<double>("maxSigmaIetaIetaEndcaps") ;
198  cutsCfg_.maxFbremBarrel = cfg.getParameter<double>("maxFbremBarrel") ;
199  cutsCfg_.maxFbremEndcaps = cfg.getParameter<double>("maxFbremEndcaps") ;
200  cutsCfg_.isBarrel = cfg.getParameter<bool>("isBarrel") ;
201  cutsCfg_.isEndcaps = cfg.getParameter<bool>("isEndcaps") ;
202  cutsCfg_.isFiducial = cfg.getParameter<bool>("isFiducial") ;
203  cutsCfg_.minMVA = cfg.getParameter<double>("minMVA") ;
204  cutsCfg_.minMvaByPassForIsolated = cfg.getParameter<double>("minMvaByPassForIsolated") ;
205  cutsCfg_.maxTIP = cfg.getParameter<double>("maxTIP") ;
206  cutsCfg_.seedFromTEC = cfg.getParameter<bool>("seedFromTEC") ;
207 
208  cutsCfgPflow_.minSCEtBarrel = cfg.getParameter<double>("minSCEtBarrelPflow") ;
209  cutsCfgPflow_.minSCEtEndcaps = cfg.getParameter<double>("minSCEtEndcapsPflow") ;
210  cutsCfgPflow_.maxEOverPBarrel = cfg.getParameter<double>("maxEOverPBarrelPflow") ;
211  cutsCfgPflow_.maxEOverPEndcaps = cfg.getParameter<double>("maxEOverPEndcapsPflow") ;
212  cutsCfgPflow_.minEOverPBarrel = cfg.getParameter<double>("minEOverPBarrelPflow") ;
213  cutsCfgPflow_.minEOverPEndcaps = cfg.getParameter<double>("minEOverPEndcapsPflow") ;
214 
215  // H/E
216  cutsCfgPflow_.maxHOverEBarrel = cfg.getParameter<double>("maxHOverEBarrelPflow") ;
217  cutsCfgPflow_.maxHOverEEndcaps = cfg.getParameter<double>("maxHOverEEndcapsPflow") ;
218  cutsCfgPflow_.maxHBarrel = cfg.getParameter<double>("maxHBarrelPflow") ;
219  cutsCfgPflow_.maxHEndcaps = cfg.getParameter<double>("maxHEndcapsPflow") ;
220 
221  cutsCfgPflow_.maxDeltaEtaBarrel = cfg.getParameter<double>("maxDeltaEtaBarrelPflow") ;
222  cutsCfgPflow_.maxDeltaEtaEndcaps = cfg.getParameter<double>("maxDeltaEtaEndcapsPflow") ;
223  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
224  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
225  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
226  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
227  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
228  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
229  cutsCfgPflow_.maxSigmaIetaIetaBarrel = cfg.getParameter<double>("maxSigmaIetaIetaBarrelPflow") ;
230  cutsCfgPflow_.maxSigmaIetaIetaEndcaps = cfg.getParameter<double>("maxSigmaIetaIetaEndcapsPflow") ;
231  cutsCfgPflow_.maxFbremBarrel = cfg.getParameter<double>("maxFbremBarrelPflow") ;
232  cutsCfgPflow_.maxFbremEndcaps = cfg.getParameter<double>("maxFbremEndcapsPflow") ;
233  cutsCfgPflow_.isBarrel = cfg.getParameter<bool>("isBarrelPflow") ;
234  cutsCfgPflow_.isEndcaps = cfg.getParameter<bool>("isEndcapsPflow") ;
235  cutsCfgPflow_.isFiducial = cfg.getParameter<bool>("isFiducialPflow") ;
236  cutsCfgPflow_.minMVA = cfg.getParameter<double>("minMVAPflow") ;
237  cutsCfgPflow_.minMvaByPassForIsolated = cfg.getParameter<double>("minMvaByPassForIsolatedPflow") ;
238  cutsCfgPflow_.maxTIP = cfg.getParameter<double>("maxTIPPflow") ;
239  cutsCfgPflow_.seedFromTEC = true ; // not applied for pflow
240 
241  // hcal helpers
242  hcalCfg_.hOverEConeSize = cfg.getParameter<double>("hOverEConeSize") ;
243  if (hcalCfg_.hOverEConeSize>0)
244  {
246  hcalCfg_.hcalTowers = cfg.getParameter<edm::InputTag>("hcalTowers") ;
247  hcalCfg_.hOverEPtMin = cfg.getParameter<double>("hOverEPtMin") ;
248  }
249  hcalCfgPflow_.hOverEConeSize = cfg.getParameter<double>("hOverEConeSizePflow") ;
251  {
253  hcalCfgPflow_.hcalTowers = cfg.getParameter<edm::InputTag>("hcalTowers") ;
254  hcalCfgPflow_.hOverEPtMin = cfg.getParameter<double>("hOverEPtMinPflow") ;
255  }
256 
257  // Ecal rec hits configuration
259  const std::vector<std::string> flagnamesbarrel = cfg.getParameter<std::vector<std::string> >("recHitFlagsToBeExcludedBarrel");
260  recHitsCfg.recHitFlagsToBeExcludedBarrel = StringToEnumValue<EcalRecHit::Flags>(flagnamesbarrel);
261  const std::vector<std::string> flagnamesendcaps = cfg.getParameter<std::vector<std::string> >("recHitFlagsToBeExcludedEndcaps");
262  recHitsCfg.recHitFlagsToBeExcludedEndcaps = StringToEnumValue<EcalRecHit::Flags>(flagnamesendcaps);
263  const std::vector<std::string> severitynamesbarrel = cfg.getParameter<std::vector<std::string> >("recHitSeverityToBeExcludedBarrel");
264  recHitsCfg.recHitSeverityToBeExcludedBarrel = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesbarrel);
265  const std::vector<std::string> severitynamesendcaps = cfg.getParameter<std::vector<std::string> >("recHitSeverityToBeExcludedEndcaps");
266  recHitsCfg.recHitSeverityToBeExcludedEndcaps = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesendcaps);
267  //recHitsCfg.severityLevelCut = cfg.getParameter<int>("severityLevelCut") ;
268 
269  // isolation
271  isoCfg.intRadiusBarrelTk = cfg.getParameter<double>("intRadiusBarrelTk") ;
272  isoCfg.intRadiusEndcapTk = cfg.getParameter<double>("intRadiusEndcapTk") ;
273  isoCfg.stripBarrelTk = cfg.getParameter<double>("stripBarrelTk") ;
274  isoCfg.stripEndcapTk = cfg.getParameter<double>("stripEndcapTk") ;
275  isoCfg.ptMinTk = cfg.getParameter<double>("ptMinTk") ;
276  isoCfg.maxVtxDistTk = cfg.getParameter<double>("maxVtxDistTk") ;
277  isoCfg.maxDrbTk = cfg.getParameter<double>("maxDrbTk") ;
278  isoCfg.intRadiusHcal = cfg.getParameter<double>("intRadiusHcal") ;
279  isoCfg.etMinHcal = cfg.getParameter<double>("etMinHcal") ;
280  isoCfg.intRadiusEcalBarrel = cfg.getParameter<double>("intRadiusEcalBarrel") ;
281  isoCfg.intRadiusEcalEndcaps = cfg.getParameter<double>("intRadiusEcalEndcaps") ;
282  isoCfg.jurassicWidth = cfg.getParameter<double>("jurassicWidth") ;
283  isoCfg.etMinBarrel = cfg.getParameter<double>("etMinBarrel") ;
284  isoCfg.eMinBarrel = cfg.getParameter<double>("eMinBarrel") ;
285  isoCfg.etMinEndcaps = cfg.getParameter<double>("etMinEndcaps") ;
286  isoCfg.eMinEndcaps = cfg.getParameter<double>("eMinEndcaps") ;
287  isoCfg.vetoClustered = cfg.getParameter<bool>("vetoClustered") ;
288  isoCfg.useNumCrystals = cfg.getParameter<bool>("useNumCrystals") ;
289 
290  // functions for corrector
291  EcalClusterFunctionBaseClass * superClusterErrorFunction = 0 ;
292  std::string superClusterErrorFunctionName
293  = cfg.getParameter<std::string>("superClusterErrorFunction") ;
294  if (superClusterErrorFunctionName!="")
295  {
296  superClusterErrorFunction
297  = EcalClusterFunctionFactory::get()->create(superClusterErrorFunctionName,cfg) ;
298  }
299  else
300  {
301  superClusterErrorFunction
302  = EcalClusterFunctionFactory::get()->create("EcalClusterEnergyUncertaintyObjectSpecific",cfg) ;
303  }
304  EcalClusterFunctionBaseClass * crackCorrectionFunction = 0 ;
305  std::string crackCorrectionFunctionName
306  = cfg.getParameter<std::string>("crackCorrectionFunction") ;
307  if (crackCorrectionFunctionName!="")
308  {
309  crackCorrectionFunction
310  = EcalClusterFunctionFactory::get()->create(crackCorrectionFunctionName,cfg) ;
311  }
312 
313  // create algo
314  algo_ = new GsfElectronAlgo
318  isoCfg,recHitsCfg,
319  superClusterErrorFunction,
320  crackCorrectionFunction ) ;
321  }
T getParameter(std::string const &) const
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 323 of file GsfElectronBaseProducer.cc.

References algo_.

324  { delete algo_ ; }

Member Function Documentation

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

Definition at line 326 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().

327  {
328  // check configuration
330  {
333  event.getByLabel(inputCfg_.seedsTag,seeds) ;
334  if (!seeds.isValid())
335  {
336  edm::LogWarning("GsfElectronAlgo|UnreachableSeedsProvenance")
337  <<"Cannot check consistency of parameters with ecal seeding ones,"
338  <<" because the original collection of seeds is not any more available." ;
339  }
340  else
341  {
343  }
344  }
345 
346  // init the algo
347  algo_->checkSetup(setup) ;
348  algo_->beginEvent(event) ;
349  }
void checkEcalSeedingParameters(edm::ParameterSetID const &)
void beginEvent(edm::Event &)
ParameterSetID psetID() const
Definition: Provenance.cc:76
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 382 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().

383  {
384  edm::ParameterSet pset ;
385  edm::pset::Registry::instance()->getMapped(psetid,pset) ;
386  edm::ParameterSet seedConfiguration = pset.getParameter<edm::ParameterSet>("SeedConfiguration") ;
387  //edm::ParameterSet orderedHitsFactoryPSet = seedConfiguration.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet") ;
388  //edm::ParameterSet seedParameters = seedConfiguration.getParameter<edm::ParameterSet>("ecalDrivenElectronSeedsParameters") ;
389 
390  if (seedConfiguration.getParameter<bool>("applyHOverECut"))
391  {
392  if ((hcalCfg_.hOverEConeSize!=0)&&(hcalCfg_.hOverEConeSize!=seedConfiguration.getParameter<double>("hOverEConeSize")))
393  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The H/E cone size ("<<hcalCfg_.hOverEConeSize<<") is different from ecal seeding ("<<seedConfiguration.getParameter<double>("hOverEConeSize")<<")." ; }
394  if (cutsCfg_.maxHOverEBarrel<seedConfiguration.getParameter<double>("maxHOverEBarrel"))
395  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The max barrel H/E is lower than during ecal seeding." ; }
396  if (cutsCfg_.maxHOverEEndcaps<seedConfiguration.getParameter<double>("maxHOverEEndcaps"))
397  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The max endcaps H/E is lower than during ecal seeding." ; }
398  }
399 
400  if (cutsCfg_.minSCEtBarrel<seedConfiguration.getParameter<double>("SCEtCut"))
401  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The minimum super-cluster Et in barrel is lower than during ecal seeding." ; }
402  if (cutsCfg_.minSCEtEndcaps<seedConfiguration.getParameter<double>("SCEtCut"))
403  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The minimum super-cluster Et in endcaps is lower than during ecal seeding." ; }
404  }
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().

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 351 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().

352  {
353  // all electrons
354  algo_->displayInternalElectrons("GsfElectronAlgo Info (before preselection)") ;
355 
356  // preselection
358  {
360  algo_->displayInternalElectrons("GsfElectronAlgo Info (after preselection)") ;
361  }
362 
363  // ambiguity
366  {
368  algo_->displayInternalElectrons("GsfElectronAlgo Info (after amb. solving)") ;
369  }
370 
371  // final filling
372  std::auto_ptr<GsfElectronCollection> finalCollection( new GsfElectronCollection ) ;
373  algo_->copyElectrons(*finalCollection) ;
374  event.put(finalCollection) ;
375  }
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