135 scHybridBarrelProducer_{consumes(
config.getParameter<
edm::InputTag>(
"scHybridBarrelProducer"))},
136 scIslandEndcapProducer_{consumes(
config.getParameter<
edm::InputTag>(
"scIslandEndcapProducer"))},
139 barrelecalCollection_{consumes(
config.getParameter<
edm::InputTag>(
"barrelEcalRecHitCollection"))},
140 endcapecalCollection_{consumes(
config.getParameter<
edm::InputTag>(
"endcapEcalRecHitCollection"))},
141 measurementTrkEvtToken_{consumes(
edm::InputTag(
"MeasurementTrackerEvent"))},
143 theTrajectoryBuilder_(createBaseCkfTrajectoryBuilder(
145 outInSeedFinder_{
config, consumesCollector()},
146 outInTrackFinder_{
config, theTrajectoryBuilder_.get()},
147 inOutSeedFinder_{
config, consumesCollector()},
148 inOutTrackFinder_{
config, theTrajectoryBuilder_.get()} {
149 OutInTrackCandidateCollection_ =
config.getParameter<
std::string>(
"outInTrackCandidateCollection");
150 InOutTrackCandidateCollection_ =
config.getParameter<
std::string>(
"inOutTrackCandidateCollection");
152 OutInTrackSCAssociationCollection_ =
config.getParameter<
std::string>(
"outInTrackCandidateSCAssociationCollection");
153 InOutTrackSCAssociationCollection_ =
config.getParameter<
std::string>(
"inOutTrackCandidateSCAssociationCollection");
155 hOverEConeSize_ =
config.getParameter<
double>(
"hOverEConeSize");
156 maxHOverE_ =
config.getParameter<
double>(
"maxHOverE");
157 minSCEt_ =
config.getParameter<
double>(
"minSCEt");
158 isoConeR_ =
config.getParameter<
double>(
"isoConeR");
159 isoInnerConeR_ =
config.getParameter<
double>(
"isoInnerConeR");
160 isoEtaSlice_ =
config.getParameter<
double>(
"isoEtaSlice");
161 isoEtMin_ =
config.getParameter<
double>(
"isoEtMin");
162 isoEMin_ =
config.getParameter<
double>(
"isoEMin");
163 vetoClusteredHits_ =
config.getParameter<
bool>(
"vetoClusteredHits");
164 useNumXtals_ =
config.getParameter<
bool>(
"useNumXstals");
165 ecalIsoCut_offset_ =
config.getParameter<
double>(
"ecalIsoCut_offset");
166 ecalIsoCut_slope_ =
config.getParameter<
double>(
"ecalIsoCut_slope");
169 auto const& flagnamesEB =
config.getParameter<std::vector<std::string>>(
"RecHitFlagToBeExcludedEB");
170 auto const& flagnamesEE =
config.getParameter<std::vector<std::string>>(
"RecHitFlagToBeExcludedEE");
172 flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
173 flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
175 auto const& severitynamesEB =
config.getParameter<std::vector<std::string>>(
"RecHitSeverityToBeExcludedEB");
176 auto const& severitynamesEE =
config.getParameter<std::vector<std::string>>(
"RecHitSeverityToBeExcludedEE");
178 severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
179 severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
182 produces<TrackCandidateCollection>(OutInTrackCandidateCollection_);
183 produces<TrackCandidateCollection>(InOutTrackCandidateCollection_);
185 produces<reco::TrackCandidateCaloClusterPtrAssociation>(OutInTrackSCAssociationCollection_);
186 produces<reco::TrackCandidateCaloClusterPtrAssociation>(InOutTrackSCAssociationCollection_);
219 auto outInTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
221 auto inOutTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
223 auto outInAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
224 auto inOutAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
227 bool validBarrelBCHandle =
true;
229 if (!bcBarrelHandle.isValid()) {
230 edm::LogError(
"ConversionTrackCandidateProducer") <<
"Error! Can't get the Barrel Basic Clusters!";
231 validBarrelBCHandle =
false;
235 bool validEndcapBCHandle =
true;
237 if (!bcEndcapHandle.isValid()) {
238 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the Endcap Basic Clusters";
239 validEndcapBCHandle =
false;
243 bool validBarrelSCHandle =
true;
245 if (!scBarrelHandle.isValid()) {
246 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the barrel superclusters!";
247 validBarrelSCHandle =
false;
251 bool validEndcapSCHandle =
true;
253 if (!scEndcapHandle.isValid()) {
254 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the endcap superclusters!";
255 validEndcapSCHandle =
false;
274 if (validBarrelBCHandle && validBarrelSCHandle)
281 *outInTrackCandidate_p,
282 *inOutTrackCandidate_p,
286 if (validEndcapBCHandle && validEndcapSCHandle) {
294 *outInTrackCandidate_p,
295 *inOutTrackCandidate_p,
342 for (
auto const& aClus : scHandle->ptrs()) {
344 if (aClus->energy() / cosh(aClus->eta()) <=
minSCEt_)
346 if (aClus->eta() > 1.479 && aClus->eta() < 1.556)
351 double scEt = sc->
energy() / cosh(sc->
eta());
353 double HoE = towerIso.getTowerESum(sc) / sc->
energy();
393 for (
auto it = theOutInTracks.begin(); it != theOutInTracks.end(); ++it) {
394 vecRecOI.push_back(aClus);
398 for (
auto it = theInOutTracks.begin(); it != theInOutTracks.end(); ++it) {
399 vecRecIO.push_back(aClus);
409 desc.add<
edm::InputTag>(
"bcBarrelCollection", {
"particleFlowSuperClusterECAL",
"particleFlowBasicClusterECALBarrel"});
410 desc.add<
edm::InputTag>(
"bcEndcapCollection", {
"particleFlowSuperClusterECAL",
"particleFlowBasicClusterECALEndcap"});
412 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALBarrel"});
414 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALEndcapWithPreshower"});
416 desc.add<
std::string>(
"outInTrackCandidateSCAssociationCollection",
"outInTrackCandidateSCAssociationCollection");
417 desc.add<
std::string>(
"inOutTrackCandidateSCAssociationCollection",
"inOutTrackCandidateSCAssociationCollection");
418 desc.add<
std::string>(
"outInTrackCandidateCollection",
"outInTracksFromConversions");
419 desc.add<
std::string>(
"inOutTrackCandidateCollection",
"inOutTracksFromConversions");
421 desc.add<
edm::InputTag>(
"barrelEcalRecHitCollection", {
"ecalRecHit",
"EcalRecHitsEB"});
422 desc.add<
edm::InputTag>(
"endcapEcalRecHitCollection", {
"ecalRecHit",
"EcalRecHitsEE"});
424 desc.add<
std::string>(
"OutInRedundantSeedCleaner",
"CachingSeedCleanerBySharedInput");
425 desc.add<
std::string>(
"InOutRedundantSeedCleaner",
"CachingSeedCleanerBySharedInput");
426 desc.add<
bool>(
"useHitsSplitting",
false);
427 desc.add<
int>(
"maxNumOfSeedsOutIn", 50);
428 desc.add<
int>(
"maxNumOfSeedsInOut", 50);
429 desc.add<
double>(
"bcEtCut", 1.5);
430 desc.add<
double>(
"bcECut", 1.5);
431 desc.add<
bool>(
"useEtCut",
true);
433 desc.add<
double>(
"minSCEt", 20.0);
434 desc.add<
double>(
"hOverEConeSize", 0.15);
435 desc.add<
double>(
"maxHOverE", 0.15);
436 desc.add<
double>(
"isoInnerConeR", 3.5);
437 desc.add<
double>(
"isoConeR", 0.4);
438 desc.add<
double>(
"isoEtaSlice", 2.5);
439 desc.add<
double>(
"isoEtMin", 0.0);
440 desc.add<
double>(
"isoEMin", 0.08);
441 desc.add<
bool>(
"vetoClusteredHits",
false);
442 desc.add<
bool>(
"useNumXstals",
true);
443 desc.add<
double>(
"ecalIsoCut_offset", 999999999);
444 desc.add<
double>(
"ecalIsoCut_slope", 0.0);
446 desc.add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEB", {});
447 desc.add<std::vector<std::string>>(
"RecHitSeverityToBeExcludedEB", {});
448 desc.add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEE", {});
449 desc.add<std::vector<std::string>>(
"RecHitSeverityToBeExcludedEE", {});
451 desc.add<
double>(
"fractionShared", 0.5);
452 desc.add<
std::string>(
"TrajectoryBuilder",
"TrajectoryBuilderForConversions");
460 psd0.
add<
std::string>(
"propagatorAlongTISE",
"alongMomElePropagator");
461 psd0.
add<
int>(
"numberMeasurementsForFit", 4);
462 psd0.
add<
std::string>(
"propagatorOppositeTISE",
"oppositeToMomElePropagator");
465 desc.add<
bool>(
"allowSharedFirstHit",
true);
466 desc.add<
double>(
"ValidHitBonus", 5.0);
467 desc.add<
double>(
"MissingHitPenalty", 20.0);
469 descriptions.
add(
"conversionTrackCandidates",
desc);