56 : theTrajectoryBuilder_(createBaseCkfTrajectoryBuilder(
57 config.getParameter<
edm::
ParameterSet>(
"TrajectoryBuilderPSet"), consumesCollector())),
105 const std::vector<std::string> flagnamesEB =
106 config.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEB");
108 const std::vector<std::string> flagnamesEE =
109 config.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEE");
111 flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
113 flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
115 const std::vector<std::string> severitynamesEB =
116 config.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEB");
118 severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
120 const std::vector<std::string> severitynamesEE =
121 config.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEE");
123 severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
171 auto outInTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
173 auto inOutTrackCandidate_p = std::make_unique<TrackCandidateCollection>();
175 auto outInAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
176 auto inOutAssoc_p = std::make_unique<reco::TrackCandidateCaloClusterPtrAssociation>();
179 bool validBarrelBCHandle =
true;
182 if (!bcBarrelHandle.
isValid()) {
183 edm::LogError(
"ConversionTrackCandidateProducer") <<
"Error! Can't get the Barrel Basic Clusters!";
184 validBarrelBCHandle =
false;
188 bool validEndcapBCHandle =
true;
191 if (!bcEndcapHandle.
isValid()) {
192 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the Endcap Basic Clusters";
193 validEndcapBCHandle =
false;
197 bool validBarrelSCHandle =
true;
200 if (!scBarrelHandle.
isValid()) {
201 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the barrel superclusters!";
202 validBarrelSCHandle =
false;
206 bool validEndcapSCHandle =
true;
209 if (!scEndcapHandle.
isValid()) {
210 edm::LogError(
"CoonversionTrackCandidateProducer") <<
"Error! Can't get the endcap superclusters!";
211 validEndcapSCHandle =
false;
235 if (validBarrelBCHandle && validBarrelSCHandle)
243 *outInTrackCandidate_p,
244 *inOutTrackCandidate_p,
248 if (validEndcapBCHandle && validEndcapSCHandle) {
257 *outInTrackCandidate_p,
258 *inOutTrackCandidate_p,
315 for (
auto const& aClus : scHandle->ptrs()) {
317 if (aClus->energy() / cosh(aClus->eta()) <=
minSCEt_)
319 if (aClus->eta() > 1.479 && aClus->eta() < 1.556)
324 double scEt = sc->
energy() / cosh(sc->
eta());
354 std::vector<Trajectory> theOutInTracks =
362 std::vector<Trajectory> theInOutTracks =
369 for (std::vector<Trajectory>::const_iterator it = theOutInTracks.begin(); it != theOutInTracks.end(); ++it) {
374 for (std::vector<Trajectory>::const_iterator it = theInOutTracks.begin(); it != theInOutTracks.end(); ++it) {
T getParameter(std::string const &) const
const math::XYZPoint & position() const
cluster centroid position
std::unique_ptr< OutInConversionSeedFinder > theOutInSeedFinder_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scIslandEndcapProducer_
double getEtSum(const reco::Candidate *emObject) const
std::vector< TrackCandidate > TrackCandidateCollection
~ConversionTrackCandidateProducer() override
std::string OutInTrackCandidateCollection_
void insert(const H &h, I begin, I end)
std::vector< int > severitiesexclEB_
Global3DPoint GlobalPoint
edm::EDGetTokenT< EcalRecHitCollection > endcapecalCollection_
std::vector< edm::Ptr< reco::CaloCluster > > caloPtrVecInOut_
double ecalIsoCut_offset_
edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrkEvtToken_
std::unique_ptr< BaseCkfTrajectoryBuilder > theTrajectoryBuilder_
double eta() const
pseudorapidity of cluster centroid
void doFlagChecks(const std::vector< int > &v)
std::unique_ptr< OutInConversionTrackFinder > theOutInTrackFinder_
std::vector< int > flagsexclEE_
std::string InOutTrackCandidateCollection_
std::string OutInTrackSuperClusterAssociationCollection_
void setUseNumCrystals(bool b=true)
std::vector< int > severitiesexclEE_
double energy() const
cluster energy
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
double getTowerESum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=0) const
ConversionTrackCandidateProducer(const edm::ParameterSet &ps)
void doSeverityChecks(const EcalRecHitCollection *const recHits, const std::vector< int > &v)
std::unique_ptr< InOutConversionSeedFinder > theInOutSeedFinder_
std::string InOutTrackSuperClusterAssociationCollection_
edm::ESHandle< CaloGeometry > theCaloGeom_
std::vector< edm::Ptr< reco::CaloCluster > > caloPtrVecOutIn_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scHybridBarrelProducer_
T const * product() const
std::vector< int > flagsexclEB_
void setEventSetup(const edm::EventSetup &es)
Initialize EventSetup objects at each event.
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcBarrelCollection_
char data[epos_bytes_allocation]
void setVetoClustered(bool b=true)
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcEndcapCollection_
std::unique_ptr< InOutConversionTrackFinder > theInOutTrackFinder_
void buildCollections(bool detector, const edm::Handle< edm::View< reco::CaloCluster > > &scHandle, const edm::Handle< edm::View< reco::CaloCluster > > &bcHandle, edm::Handle< EcalRecHitCollection > ecalRecHitHandle, const EcalRecHitCollection &ecalRecHits, const EcalSeverityLevelAlgo *sevLev, const edm::Handle< CaloTowerCollection > &hcalTowersHandle, TrackCandidateCollection &outInTracks, TrackCandidateCollection &inOutTracks, std::vector< edm::Ptr< reco::CaloCluster > > &vecRecOI, std::vector< edm::Ptr< reco::CaloCluster > > &vecRecIO)
void produce(edm::Event &evt, const edm::EventSetup &es) override
void beginRun(edm::Run const &, edm::EventSetup const &es) final
T const * product() const
edm::EDGetTokenT< EcalRecHitCollection > barrelecalCollection_