137 scHybridBarrelProducer_{consumes(
config.getParameter<
edm::InputTag>(
"scHybridBarrelProducer"))},
138 scIslandEndcapProducer_{consumes(
config.getParameter<
edm::InputTag>(
"scIslandEndcapProducer"))},
141 barrelecalCollection_{consumes(
config.getParameter<
edm::InputTag>(
"barrelEcalRecHitCollection"))},
142 endcapecalCollection_{consumes(
config.getParameter<
edm::InputTag>(
"endcapEcalRecHitCollection"))},
143 measurementTrkEvtToken_{consumes(
edm::InputTag(
"MeasurementTrackerEvent"))},
145 theTrajectoryBuilder_(createBaseCkfTrajectoryBuilder(
147 outInSeedFinder_{
config, consumesCollector()},
148 outInTrackFinder_{
config, theTrajectoryBuilder_.get()},
149 inOutSeedFinder_{
config, consumesCollector()},
150 inOutTrackFinder_{
config, theTrajectoryBuilder_.get()} {
151 OutInTrackCandidateCollection_ =
config.getParameter<
std::string>(
"outInTrackCandidateCollection");
152 InOutTrackCandidateCollection_ =
config.getParameter<
std::string>(
"inOutTrackCandidateCollection");
154 OutInTrackSCAssociationCollection_ =
config.getParameter<
std::string>(
"outInTrackCandidateSCAssociationCollection");
155 InOutTrackSCAssociationCollection_ =
config.getParameter<
std::string>(
"inOutTrackCandidateSCAssociationCollection");
157 hOverEConeSize_ =
config.getParameter<
double>(
"hOverEConeSize");
158 maxHOverE_ =
config.getParameter<
double>(
"maxHOverE");
159 minSCEt_ =
config.getParameter<
double>(
"minSCEt");
160 isoConeR_ =
config.getParameter<
double>(
"isoConeR");
161 isoInnerConeR_ =
config.getParameter<
double>(
"isoInnerConeR");
162 isoEtaSlice_ =
config.getParameter<
double>(
"isoEtaSlice");
163 isoEtMin_ =
config.getParameter<
double>(
"isoEtMin");
164 isoEMin_ =
config.getParameter<
double>(
"isoEMin");
165 vetoClusteredHits_ =
config.getParameter<
bool>(
"vetoClusteredHits");
166 useNumXtals_ =
config.getParameter<
bool>(
"useNumXstals");
167 ecalIsoCut_offset_ =
config.getParameter<
double>(
"ecalIsoCut_offset");
168 ecalIsoCut_slope_ =
config.getParameter<
double>(
"ecalIsoCut_slope");
171 auto const& flagnamesEB =
config.getParameter<std::vector<std::string>>(
"RecHitFlagToBeExcludedEB");
172 auto const& flagnamesEE =
config.getParameter<std::vector<std::string>>(
"RecHitFlagToBeExcludedEE");
174 flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
175 flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
177 auto const& severitynamesEB =
config.getParameter<std::vector<std::string>>(
"RecHitSeverityToBeExcludedEB");
178 auto const& severitynamesEE =
config.getParameter<std::vector<std::string>>(
"RecHitSeverityToBeExcludedEE");
180 severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
181 severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
184 produces<TrackCandidateCollection>(OutInTrackCandidateCollection_);
185 produces<TrackCandidateCollection>(InOutTrackCandidateCollection_);
187 produces<reco::TrackCandidateCaloClusterPtrAssociation>(OutInTrackSCAssociationCollection_);
188 produces<reco::TrackCandidateCaloClusterPtrAssociation>(InOutTrackSCAssociationCollection_);
204 hcalHelper_ = std::make_unique<ElectronHcalHelper>(cfgCone, consumesCollector());
237 auto outInTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
239 auto inOutTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
241 auto outInAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
242 auto inOutAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
245 bool validBarrelBCHandle =
true;
247 if (!bcBarrelHandle.isValid()) {
248 edm::LogError(
"ConversionTrackCandidateProducer") <<
"Error! Can't get the Barrel Basic Clusters!";
249 validBarrelBCHandle =
false;
253 bool validEndcapBCHandle =
true;
255 if (!bcEndcapHandle.isValid()) {
256 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the Endcap Basic Clusters";
257 validEndcapBCHandle =
false;
261 bool validBarrelSCHandle =
true;
263 if (!scBarrelHandle.isValid()) {
264 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the barrel superclusters!";
265 validBarrelSCHandle =
false;
269 bool validEndcapSCHandle =
true;
271 if (!scEndcapHandle.isValid()) {
272 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the endcap superclusters!";
273 validEndcapSCHandle =
false;
292 if (validBarrelBCHandle && validBarrelSCHandle)
299 *outInTrackCandidate_p,
300 *inOutTrackCandidate_p,
304 if (validEndcapBCHandle && validEndcapSCHandle) {
312 *outInTrackCandidate_p,
313 *inOutTrackCandidate_p,
360 for (
auto const& aClus : scHandle->ptrs()) {
362 if (aClus->energy() / cosh(aClus->eta()) <=
minSCEt_)
364 if (aClus->eta() > 1.479 && aClus->eta() < 1.556)
369 double scEt = sc->
energy() / cosh(sc->
eta());
410 for (
auto it = theOutInTracks.begin(); it != theOutInTracks.end(); ++it) {
411 vecRecOI.push_back(aClus);
415 for (
auto it = theInOutTracks.begin(); it != theInOutTracks.end(); ++it) {
416 vecRecIO.push_back(aClus);
426 desc.add<
edm::InputTag>(
"bcBarrelCollection", {
"particleFlowSuperClusterECAL",
"particleFlowBasicClusterECALBarrel"});
427 desc.add<
edm::InputTag>(
"bcEndcapCollection", {
"particleFlowSuperClusterECAL",
"particleFlowBasicClusterECALEndcap"});
429 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALBarrel"});
431 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALEndcapWithPreshower"});
433 desc.add<
std::string>(
"outInTrackCandidateSCAssociationCollection",
"outInTrackCandidateSCAssociationCollection");
434 desc.add<
std::string>(
"inOutTrackCandidateSCAssociationCollection",
"inOutTrackCandidateSCAssociationCollection");
435 desc.add<
std::string>(
"outInTrackCandidateCollection",
"outInTracksFromConversions");
436 desc.add<
std::string>(
"inOutTrackCandidateCollection",
"inOutTracksFromConversions");
438 desc.add<
edm::InputTag>(
"barrelEcalRecHitCollection", {
"ecalRecHit",
"EcalRecHitsEB"});
439 desc.add<
edm::InputTag>(
"endcapEcalRecHitCollection", {
"ecalRecHit",
"EcalRecHitsEE"});
441 desc.add<
std::string>(
"OutInRedundantSeedCleaner",
"CachingSeedCleanerBySharedInput");
442 desc.add<
std::string>(
"InOutRedundantSeedCleaner",
"CachingSeedCleanerBySharedInput");
443 desc.add<
bool>(
"useHitsSplitting",
false);
444 desc.add<
int>(
"maxNumOfSeedsOutIn", 50);
445 desc.add<
int>(
"maxNumOfSeedsInOut", 50);
446 desc.add<
double>(
"bcEtCut", 1.5);
447 desc.add<
double>(
"bcECut", 1.5);
448 desc.add<
bool>(
"useEtCut",
true);
451 desc.add<std::vector<double>>(
"recHitEThresholdHB", {0., 0., 0., 0.});
452 desc.add<std::vector<double>>(
"recHitEThresholdHE", {0., 0., 0., 0., 0., 0., 0.});
453 desc.add<
int>(
"maxHcalRecHitSeverity", 999999);
455 desc.add<
double>(
"minSCEt", 20.0);
456 desc.add<
double>(
"hOverEConeSize", 0.15);
457 desc.add<
double>(
"maxHOverE", 0.15);
458 desc.add<
double>(
"isoInnerConeR", 3.5);
459 desc.add<
double>(
"isoConeR", 0.4);
460 desc.add<
double>(
"isoEtaSlice", 2.5);
461 desc.add<
double>(
"isoEtMin", 0.0);
462 desc.add<
double>(
"isoEMin", 0.08);
463 desc.add<
bool>(
"vetoClusteredHits",
false);
464 desc.add<
bool>(
"useNumXstals",
true);
465 desc.add<
double>(
"ecalIsoCut_offset", 999999999);
466 desc.add<
double>(
"ecalIsoCut_slope", 0.0);
468 desc.add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEB", {});
469 desc.add<std::vector<std::string>>(
"RecHitSeverityToBeExcludedEB", {});
470 desc.add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEE", {});
471 desc.add<std::vector<std::string>>(
"RecHitSeverityToBeExcludedEE", {});
473 desc.add<
double>(
"fractionShared", 0.5);
474 desc.add<
std::string>(
"TrajectoryBuilder",
"TrajectoryBuilderForConversions");
482 psd0.
add<
std::string>(
"propagatorAlongTISE",
"alongMomElePropagator");
483 psd0.
add<
int>(
"numberMeasurementsForFit", 4);
484 psd0.
add<
std::string>(
"propagatorOppositeTISE",
"oppositeToMomElePropagator");
487 desc.add<
bool>(
"allowSharedFirstHit",
true);
488 desc.add<
double>(
"ValidHitBonus", 5.0);
489 desc.add<
double>(
"MissingHitPenalty", 20.0);
491 descriptions.
add(
"conversionTrackCandidatesDefault",
desc);