56 theTrajectoryBuilder_(createBaseCkfTrajectoryBuilder(config.getParameter<edm::
ParameterSet>(
"TrajectoryBuilderPSet"), consumesCollector())),
92 consumes<MeasurementTrackerEvent>(
edm::InputTag(
"MeasurementTrackerEvent"));
107 const std::vector<std::string> flagnamesEB =
108 config.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEB");
110 const std::vector<std::string> flagnamesEE =
111 config.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEE");
114 StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
117 StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
119 const std::vector<std::string> severitynamesEB =
120 config.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEB");
123 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
125 const std::vector<std::string> severitynamesEE =
126 config.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEE");
129 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
196 bool validBarrelBCHandle=
true;
199 if (!bcBarrelHandle.isValid()) {
201 <<
"Error! Can't get the Barrel Basic Clusters!";
202 validBarrelBCHandle=
false;
207 bool validEndcapBCHandle=
true;
210 if (!bcEndcapHandle.isValid()) {
212 <<
"Error! Can't get the Endcap Basic Clusters";
213 validEndcapBCHandle=
false;
219 bool validBarrelSCHandle=
true;
222 if (!scBarrelHandle.isValid()) {
224 <<
"Error! Can't get the barrel superclusters!";
225 validBarrelSCHandle=
false;
230 bool validEndcapSCHandle=
true;
233 if (!scEndcapHandle.isValid()) {
235 <<
"Error! Can't get the endcap superclusters!";
236 validEndcapSCHandle=
false;
261 if ( validBarrelBCHandle && validBarrelSCHandle )
262 buildCollections(
isBarrel, scBarrelHandle, bcBarrelHandle, ecalhitsCollEB, *ecalhitsCollEB, sevLevel, hcalTowersHandle, *outInTrackCandidate_p, *inOutTrackCandidate_p,
caloPtrVecOutIn_,
caloPtrVecInOut_);
264 if ( validEndcapBCHandle && validEndcapSCHandle ) {
266 buildCollections(
isBarrel, scEndcapHandle, bcEndcapHandle, ecalhitsCollEE, *ecalhitsCollEE, sevLevel, hcalTowersHandle, *outInTrackCandidate_p, *inOutTrackCandidate_p,
caloPtrVecOutIn_,
caloPtrVecInOut_);
328 for (
unsigned i = 0;
i < scHandle->size(); ++
i ) {
333 if (aClus->energy()/cosh(aClus->eta()) <=
minSCEt_)
continue;
334 if (aClus->eta() > 1.479 && aClus->eta() < 1.556 )
continue;
338 double scEt = sc->
energy()/cosh(sc->
eta());
385 for (std::vector<Trajectory>::const_iterator it = theOutInTracks.begin(); it != theOutInTracks.end(); ++it) {
390 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_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scIslandEndcapProducer_
double getEtSum(const reco::Candidate *emObject) const
bool isBarrel(GeomDetEnumerators::SubDetector m)
std::vector< TrackCandidate > TrackCandidateCollection
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_
~ConversionTrackCandidateProducer()
void setUseNumCrystals(bool b=true)
std::vector< int > severitiesexclEE_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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
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_
void setVetoClustered(bool b=true)
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcEndcapCollection_
std::unique_ptr< InOutConversionTrackFinder > theInOutTrackFinder_
virtual void beginRun(edm::Run const &, edm::EventSetup const &es) overridefinal
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)
virtual void produce(edm::Event &evt, const edm::EventSetup &es) override
edm::EDGetTokenT< EcalRecHitCollection > barrelecalCollection_
T get(const Candidate &c)