|
|
Definition at line 77 of file GsfElectronProducer.cc.
◆ GsfElectronProducer()
Definition at line 284 of file GsfElectronProducer.cc.
304 if (
cfg.getParameter<
bool>(
"fillConvVtxFitProb"))
311 cfg.getParameter<
bool>(
"ecalDrivenEcalEnergyFromClassBasedParameterization");
313 cfg.getParameter<
bool>(
"ecalDrivenEcalErrorFromClassBasedParameterization");
315 cfg.getParameter<
bool>(
"pureTrackerDrivenEcalErrorFromSimpleParameterization");
339 auto const& flagnamesbarrel =
cfg.getParameter<std::vector<std::string>>(
"recHitFlagsToBeExcludedBarrel");
341 auto const& flagnamesendcaps =
cfg.getParameter<std::vector<std::string>>(
"recHitFlagsToBeExcludedEndcaps");
343 auto const& severitynamesbarrel =
cfg.getParameter<std::vector<std::string>>(
"recHitSeverityToBeExcludedBarrel");
345 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesbarrel);
346 auto const& severitynamesendcaps =
cfg.getParameter<std::vector<std::string>>(
"recHitSeverityToBeExcludedEndcaps");
348 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesendcaps);
353 .etMinHcal =
cfg.getParameter<
double>(
"etMinHcal"),
354 .intRadiusEcalBarrel =
cfg.getParameter<
double>(
"intRadiusEcalBarrel"),
355 .intRadiusEcalEndcaps =
cfg.getParameter<
double>(
"intRadiusEcalEndcaps"),
356 .jurassicWidth =
cfg.getParameter<
double>(
"jurassicWidth"),
358 .eMinBarrel =
cfg.getParameter<
double>(
"eMinBarrel"),
359 .etMinEndcaps =
cfg.getParameter<
double>(
"etMinEndcaps"),
360 .eMinEndcaps =
cfg.getParameter<
double>(
"eMinEndcaps"),
362 .useNumCrystals =
cfg.getParameter<
bool>(
"useNumCrystals")};
366 .ecalWeightsFromDB =
cfg.getParameter<
bool>(
"ecalWeightsFromDB"),
367 .ecalRegressionWeightFiles =
cfg.getParameter<std::vector<std::string>>(
"ecalRefinedRegressionWeightFiles"),
369 cfg.getParameter<std::vector<std::string>>(
"combinationRegressionWeightLabels"),
370 .combinationWeightsFromDB =
cfg.getParameter<
bool>(
"combinationWeightsFromDB"),
371 .combinationRegressionWeightFiles =
372 cfg.getParameter<std::vector<std::string>>(
"combinationRegressionWeightFile")};
375 algo_ = std::make_unique<GsfElectronAlgo>(
388 consumesCollector());
References looper::cfg.
◆ checkEcalSeedingParameters()
void GsfElectronProducer::checkEcalSeedingParameters |
( |
edm::ParameterSet const & |
pset | ) |
|
|
private |
◆ fillDescriptions()
Definition at line 119 of file GsfElectronProducer.cc.
127 desc.add<
edm::InputTag>(
"barrelRecHitCollectionTag", {
"ecalRecHit",
"EcalRecHitsEB"});
128 desc.add<
edm::InputTag>(
"endcapRecHitCollectionTag", {
"ecalRecHit",
"EcalRecHitsEE"});
132 desc.add<
bool>(
"checkHcalStatus",
true);
135 desc.add<
bool>(
"useDefaultEnergyCorrection",
true);
136 desc.add<
bool>(
"useCombinationRegression",
false);
137 desc.add<
bool>(
"ecalDrivenEcalEnergyFromClassBasedParameterization",
true);
138 desc.add<
bool>(
"ecalDrivenEcalErrorFromClassBasedParameterization",
true);
139 desc.add<
bool>(
"applyPreselection",
false);
140 desc.add<
bool>(
"useEcalRegression",
false);
141 desc.add<
bool>(
"applyAmbResolution",
false);
142 desc.add<
bool>(
"ignoreNotPreselected",
true);
143 desc.add<
bool>(
"useGsfPfRecTracks",
true);
144 desc.add<
bool>(
"pureTrackerDrivenEcalErrorFromSimpleParameterization",
true);
145 desc.add<
unsigned int>(
"ambSortingStrategy", 1);
146 desc.add<
unsigned int>(
"ambClustersOverlapStrategy", 1);
147 desc.add<
bool>(
"fillConvVtxFitProb",
true);
148 desc.add<
bool>(
"resetMvaValuesUsingPFCandidates",
false);
151 desc.add<std::vector<std::string>>(
"recHitFlagsToBeExcludedBarrel");
152 desc.add<std::vector<std::string>>(
"recHitFlagsToBeExcludedEndcaps");
153 desc.add<std::vector<std::string>>(
"recHitSeverityToBeExcludedBarrel");
154 desc.add<std::vector<std::string>>(
"recHitSeverityToBeExcludedEndcaps");
161 desc.add<
bool>(
"useNumCrystals",
true);
162 desc.add<
double>(
"etMinBarrel", 0.0);
163 desc.add<
double>(
"etMinEndcaps", 0.11);
164 desc.add<
double>(
"etMinHcal", 0.0);
165 desc.add<
double>(
"eMinBarrel", 0.095);
166 desc.add<
double>(
"eMinEndcaps", 0.0);
167 desc.add<
double>(
"intRadiusEcalBarrel", 3.0);
168 desc.add<
double>(
"intRadiusEcalEndcaps", 3.0);
169 desc.add<
double>(
"intRadiusHcal", 0.15);
170 desc.add<
double>(
"jurassicWidth", 1.5);
171 desc.add<
bool>(
"vetoClustered",
false);
174 desc.add<
bool>(
"ctfTracksCheck",
true);
177 desc.add<
double>(
"MaxElePtForOnlyMVA", 50.0);
178 desc.add<
double>(
"PreSelectMVA", -0.1);
182 psd0.
add<
double>(
"minSCEtBarrel", 4.0);
183 psd0.add<
double>(
"minSCEtEndcaps", 4.0);
184 psd0.add<
double>(
"minEOverPBarrel", 0.0);
185 psd0.add<
double>(
"minEOverPEndcaps", 0.0);
186 psd0.add<
double>(
"maxEOverPBarrel", 999999999.0);
187 psd0.add<
double>(
"maxEOverPEndcaps", 999999999.0);
188 psd0.add<
double>(
"maxDeltaEtaBarrel", 0.02);
189 psd0.add<
double>(
"maxDeltaEtaEndcaps", 0.02);
190 psd0.add<
double>(
"maxDeltaPhiBarrel", 0.15);
191 psd0.add<
double>(
"maxDeltaPhiEndcaps", 0.15);
192 psd0.add<
double>(
"hOverEConeSize", 0.15);
193 psd0.add<
double>(
"hOverEPtMin", 0.0);
194 psd0.add<
double>(
"maxHOverEBarrelCone", 0.15);
195 psd0.add<
double>(
"maxHOverEEndcapsCone", 0.15);
196 psd0.add<
double>(
"maxHBarrelCone", 0.0);
197 psd0.add<
double>(
"maxHEndcapsCone", 0.0);
198 psd0.add<
double>(
"maxHOverEBarrelTower", 0.15);
199 psd0.add<
double>(
"maxHOverEEndcapsTower", 0.15);
200 psd0.add<
double>(
"maxHBarrelTower", 0.0);
201 psd0.add<
double>(
"maxHEndcapsTower", 0.0);
202 psd0.add<
double>(
"maxSigmaIetaIetaBarrel", 999999999.0);
203 psd0.add<
double>(
"maxSigmaIetaIetaEndcaps", 999999999.0);
204 psd0.add<
double>(
"maxFbremBarrel", 999999999.0);
205 psd0.add<
double>(
"maxFbremEndcaps", 999999999.0);
206 psd0.add<
bool>(
"isBarrel",
false);
207 psd0.add<
bool>(
"isEndcaps",
false);
208 psd0.add<
bool>(
"isFiducial",
false);
209 psd0.add<
bool>(
"seedFromTEC",
true);
210 psd0.add<
double>(
"maxTIP", 999999999.0);
218 desc.add<
std::string>(
"crackCorrectionFunction",
"EcalClusterCrackCorrection");
220 desc.add<
bool>(
"ecalWeightsFromDB",
true);
221 desc.add<std::vector<std::string>>(
"ecalRefinedRegressionWeightFiles", {})
222 ->setComment(
"if not from DB. Otherwise, keep empty");
223 desc.add<
bool>(
"combinationWeightsFromDB",
true);
224 desc.add<std::vector<std::string>>(
"combinationRegressionWeightFile", {})
225 ->setComment(
"if not from DB. Otherwise, keep empty");
228 desc.add<std::vector<std::string>>(
"ecalRefinedRegressionWeightLabels", {});
229 desc.add<std::vector<std::string>>(
"combinationRegressionWeightLabels", {});
231 desc.add<std::vector<std::string>>(
232 "ElecMVAFilesString",
234 "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_10_17Feb2011.weights.xml",
235 "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_12_17Feb2011.weights.xml",
236 "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_20_17Feb2011.weights.xml",
237 "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_22_17Feb2011.weights.xml",
239 desc.add<std::vector<std::string>>(
240 "SoftElecMVAFilesString",
242 "RecoEgamma/ElectronIdentification/data/TMVA_BDTSoftElectrons_7Feb2014.weights.xml",
245 descriptions.
add(
"gsfElectronProducer",
desc);
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, EgammaLocalCovParamDefaults::kMultThresEB, EgammaLocalCovParamDefaults::kMultThresEE, EleTkIsolFromCands::pSetDescript(), and AlCaHLTBitMon_QueryRunRegistry::string.
◆ globalEndJob()
◆ initializeGlobalCache()
Definition at line 83 of file GsfElectronProducer.cc.
84 return std::make_unique<GsfElectronAlgo::HeavyObjectCache>(conf);
◆ isPreselected()
◆ produce()
Definition at line 543 of file GsfElectronProducer.cc.
548 if (!
seeds.isValid()) {
550 <<
"Cannot check consistency of parameters with ecal seeding ones,"
551 <<
" because the original collection of seeds is not any more available.";
562 el.setMvaInput(gsfMVAInputMap.find(el.gsfTrack())->
second);
566 logElectrons(
electrons,
event,
"GsfElectronAlgo Info (before preselection)");
572 logElectrons(
electrons,
event,
"GsfElectronAlgo Info (after preselection)");
579 logElectrons(
electrons,
event,
"GsfElectronAlgo Info (after amb. solving)");
References algo_, reco::GsfElectron::ambiguous(), GsfElectronAlgo::StrategyConfiguration::applyAmbResolution, GsfElectronAlgo::StrategyConfiguration::applyPreselection, checkEcalSeedingParameters(), ecalSeedingParametersChecked_, egmPFCandidateCollection_, electronPutToken_, pwdgSkimBPark_cfi::electrons, GsfElectronAlgo::StrategyConfiguration::ignoreNotPreselected, inputCfg_, isPreselected(), eostools::move(), edm::parameterSet(), resetMvaValuesUsingPFCandidates_, edm::second(), InitialStep_cff::seeds, GsfElectronAlgo::Tokens::seedsTag, setAmbiguityData(), singleTopDQM_cfi::setup, strategyCfg_, and GsfElectronAlgo::Tokens::vtxCollectionTag.
◆ setAmbiguityData()
Definition at line 428 of file GsfElectronProducer.cc.
443 throw cms::Exception(
"GsfElectronAlgo|UnknownAmbiguitySortingStrategy")
458 if (gsfPfRecTrack.gsfTrackRef() ==
e1.gsfTrack()) {
460 edm::LogWarning(
"GsfElectronAlgo") <<
"associated gsfPfRecTrack already found";
463 for (
auto const& duplicate : gsfPfRecTrack.convBremGsfPFRecTrackRef()) {
464 e1.addAmbiguousGsfTrack(duplicate->gsfTrackRef());
481 LogDebug(
"GsfElectronAlgo") <<
"Blessing electron with E/P " <<
e1->eSuperClusterOverP() <<
", cluster "
482 << scRef1.
get() <<
" & track " <<
e1->gsfTrack().get();
484 for (
auto e2 =
e1 + 1; e2 !=
electrons.end(); ++e2) {
494 bool sameCluster =
false;
496 sameCluster = (scRef1 == scRef2);
506 throw cms::Exception(
"GsfElectronAlgo|UnknownAmbiguityClustersOverlapStrategy")
512 LogDebug(
"GsfElectronAlgo") <<
"Discarding electron with E/P " << e2->eSuperClusterOverP() <<
", cluster "
513 << scRef2.
get() <<
" and track " << e2->gsfTrack().get();
514 e1->addAmbiguousGsfTrack(e2->gsfTrack());
515 e2->setAmbiguous(
true);
516 }
else if (
e1->gsfTrack() == e2->gsfTrack()) {
517 edm::LogWarning(
"GsfElectronAlgo") <<
"Forgetting electron with E/P " << e2->eSuperClusterOverP()
518 <<
", cluster " << scRef2.
get() <<
" and track " << e2->gsfTrack().get();
519 e2->setAmbiguous(
true);
References GsfElectronAlgo::StrategyConfiguration::ambClustersOverlapStrategy, GsfElectronAlgo::StrategyConfiguration::ambSortingStrategy, GsfElectronAlgo::Tokens::barrelRecHitCollection, HLT_FULL_cff::barrelRecHits, GsfElectronAlgo::Tokens::beamSpotTag, StorageManager_cfg::e1, metsig::electron, pwdgSkimBPark_cfi::electrons, photonAnalyzer_cfi::eMin, GsfElectronAlgo::Tokens::endcapRecHitCollection, HLT_FULL_cff::endcapRecHits, PVValHelper::eta, Exception, newFWLiteAna::found, edm::Ref< C, T, F >::get(), uncleanedOnlyElectronSequence_cff::gsfPfRecTracks, gsfPfRecTracksTag_, gsfElectrons_cfi::ignoreNotPreselected, inputCfg_, egamma::isBetterElectron(), egamma::isInnermostElectron(), isPreselected(), LogDebug, egamma::sharedEnergy(), jetUpdater_cfi::sort, strategyCfg_, remoteMonitoring_LED_IterMethod_cfg::threshold, and useGsfPfRecTracks_.
Referenced by produce().
◆ algo_
◆ cutsCfg_
◆ ecalSeedingParametersChecked_
bool GsfElectronProducer::ecalSeedingParametersChecked_ |
|
private |
◆ egmPFCandidateCollection_
◆ electronPutToken_
◆ gsfPfRecTracksTag_
◆ hcalCfg_
◆ inputCfg_
◆ resetMvaValuesUsingPFCandidates_
const bool GsfElectronProducer::resetMvaValuesUsingPFCandidates_ |
|
private |
◆ strategyCfg_
◆ useGsfPfRecTracks_
const bool GsfElectronProducer::useGsfPfRecTracks_ |
|
private |
std::vector< int > recHitFlagsToBeExcludedEndcaps
double maxHOverEBarrelCone
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< std::string > ecalRegressionWeightLabels
edm::EDGetTokenT< reco::GsfElectronCoreCollection > gsfElectronCores
bool useCombinationRegression
T const * get() const
Returns C++ pointer to the item.
bool ignoreNotPreselected
GsfElectronAlgo::Tokens inputCfg_
U second(std::pair< T, U > const &p)
unsigned ambClustersOverlapStrategy
const GsfElectronAlgo::CutsConfiguration cutsCfg_
def create(alignables, pedeDump, additionalData, outputFile, config)
std::vector< int > recHitFlagsToBeExcludedBarrel
edm::EDGetTokenT< reco::ElectronSeedCollection > seedsTag
static constexpr float kMultThresEB
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHitCollection
Log< level::Warning, false > LogWarning
bool isPreselected(reco::GsfElectron const &ele) const
bool ecalDrivenEcalErrorFromClassBasedParameterization
double maxHOverEEndcapsCone
const bool resetMvaValuesUsingPFCandidates_
unsigned ambSortingStrategy
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
std::vector< int > recHitSeverityToBeExcludedBarrel
bool pureTrackerDrivenEcalErrorFromSimpleParameterization
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< CaloTowerCollection > hcalTowers
edm::EDGetTokenT< EcalRecHitCollection > endcapRecHitCollection
static constexpr float kMultThresEE
std::unique_ptr< GsfElectronAlgo > algo_
const bool useGsfPfRecTracks_
edm::EDGetTokenT< reco::ConversionCollection > conversions
edm::EDGetTokenT< reco::PFCandidateCollection > egmPFCandidateCollection_
static edm::ParameterSetDescription pSetDescript()
float sharedEnergy(reco::CaloCluster const &clu1, reco::CaloCluster const &clu2, EcalRecHitCollection const &barrelRecHits, EcalRecHitCollection const &endcapRecHits)
void checkEcalSeedingParameters(edm::ParameterSet const &)
const edm::EDPutTokenT< reco::GsfElectronCollection > electronPutToken_
bool ecalSeedingParametersChecked_
edm::EDGetTokenT< reco::VertexCollection > vtxCollectionTag
ElectronHcalHelper::Configuration hcalCfg_
bool useDefaultEnergyCorrection
T getParameter(std::string const &) const
bool isBetterElectron(reco::GsfElectron const &, reco::GsfElectron const &)
bool isInnermostElectron(reco::GsfElectron const &, reco::GsfElectron const &)
GsfElectronAlgo::StrategyConfiguration strategyCfg_
edm::EDGetTokenT< reco::TrackCollection > ctfTracks
edm::EDGetTokenT< CaloTowerCollection > hcalTowersTag
bool ecalDrivenEcalEnergyFromClassBasedParameterization
combinationRegressionWeightLabels
void setAmbiguityData(reco::GsfElectronCollection &electrons, edm::Event const &event, bool ignoreNotPreselected=true) const
const edm::EDGetTokenT< reco::GsfPFRecTrackCollection > gsfPfRecTracksTag_
std::vector< int > recHitSeverityToBeExcludedEndcaps