267 LogInfo(
"CalibConstants")<<
" Loaded: OK ";
270 LogWarning(
"CalibConstants")<<
" Not Found!! ";
311 if (isoPixelTracks->empty())
return;
314 for (reco::TrackCollection::const_iterator trit=isoProdTracks->begin(); trit!=isoProdTracks->end(); trit++)
317 reco::IsolatedPixelTrackCandidateCollection::const_iterator isoMatched=isoPixelTracks->begin();
322 for (reco::IsolatedPixelTrackCandidateCollection::const_iterator it = isoPixelTracks->begin(); it!=isoPixelTracks->end(); it++)
326 if (
abs((trit->pt() - it->pt())/it->pt()) < 0.005 &&
abs(trit->eta() - it->eta()) < 0.01)
335 if (!matched)
continue;
336 if(isoMatched->maxPtPxl() >
maxPNear)
continue;
338 ptNear = isoMatched->maxPtPxl();
344 if (fabs(trit->eta())>1.47&&trit->hitPattern().numberOfValidStripTECHits()<
MinNTECHitsEndcap)
continue;
349 numVH = trit->hitPattern().numberOfValidHits();
350 numVS = trit->hitPattern().numberOfValidStripTECHits();
354 trackE =
sqrt(trit->px()*trit->px()+trit->py()*trit->py()+trit->pz()*trit->pz()+0.14*0.14);
397 ietatrue = tempId.
ieta();
398 iphitrue = tempId.
iphi();
406 std::vector<DetId> usedHits;
423 bool hitIsUsed=
false;
424 for (uint32_t
i=0;
i<usedHits.size();
i++)
426 if (usedHits[
i]==hhit->id()) hitIsUsed=
true;
428 if (hitIsUsed)
continue;
429 usedHits.push_back(hhit->id());
440 int iphihitm = (hhit->id()).iphi();
441 int ietahitm = (hhit->id()).ieta();
442 int depthhit = (hhit->id()).
depth();
443 float enehit = hhit->energy() * recal;
445 if (depthhit!=1)
continue;
463 int iphihitm2 = (hhit2->id()).iphi();
464 int ietahitm2 = (hhit2->id()).ieta();
465 int depthhit2 = (hhit2->id()).
depth();
466 float enehit2 = hhit2->energy() * recal;
468 if (iphihitm==iphihitm2 && ietahitm==ietahitm2 && depthhit!=depthhit2) enehit = enehit+enehit2;
480 MaxHit.
ietahitm = (hhit->id()).ieta();
481 MaxHit.
iphihitm = (hhit->id()).iphi();
482 MaxHit.
dr = distAtHcal;
499 Bool_t passCuts = kFALSE;
524 bool hitIsUsed=
false;
525 for (uint32_t
i=0;
i<usedHits.size();
i++)
527 if (usedHits[
i]==hhit->id()) hitIsUsed=
true;
529 if (hitIsUsed)
continue;
530 usedHits.push_back(hhit->id());
533 if(MaxHit.
ietahitm*(hhit->id()).ieta()>0)
535 DIETA = MaxHit.
ietahitm - (hhit->id()).ieta();
537 if(MaxHit.
ietahitm*(hhit->id()).ieta()<0)
539 DIETA = MaxHit.
ietahitm - (hhit->id()).ieta();
540 DIETA = DIETA>0 ? DIETA-1 : DIETA+1;
543 int DIPHI =
abs(MaxHit.
iphihitm - (hhit->id()).iphi());
544 DIPHI = DIPHI>36 ? 72-DIPHI : DIPHI;
556 if(
abs(DIETA)<=numbercell && (
abs(DIPHI)<=numbercell || (
abs(MaxHit.
ietahitm)>=20 &&
abs(DIPHI)<=numbercell+1)) )
560 if(passCuts && hhit->energy()>0)
574 if (hhit->id().ieta() == MaxHit.
ietahitm && hhit->id().iphi() == MaxHit.
iphihitm)
iTime = hhit->time();
600 if (
abs(MaxHit.
ietahitm)==21 &&
abs((hhit->id()).ieta())<=20 &&
abs(DIPHI)>3)
continue;
608 if ((hhit->id().depth() == 1) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
613 else if((hhit->id().depth() == 2) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
627 if (
abs(MaxHit.
ietahitm)==21 &&
abs((hhit->id()).ieta())<=20 &&
abs(DIPHI)>2)
continue;
635 if ((hhit->id().depth() == 1) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
640 else if((hhit->id().depth() == 2) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
658 if ((hhit->id().depth() == 1) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
663 else if((hhit->id().depth() == 2) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
684 diphi_M_P = diphi_M_P>36 ? 72-diphi_M_P : diphi_M_P;
710 iDr =
sqrt(diphi_M_P*diphi_M_P+dieta_M_P*dieta_M_P);
724 int n = generalTracks->size();
729 gen = generalTracks->size();
730 iso = isoProdTracks->size();
731 pix = isoPixelTracks->size();
745 Int_t gencount=0, isocount=0, pixcount=0;
746 for (reco::TrackCollection::const_iterator gentr=generalTracks->begin(); gentr!=generalTracks->end(); gentr++)
748 genPt[gencount] = gentr->pt();
749 genPhi[gencount] = gentr->phi();
750 genEta[gencount] = gentr->eta();
754 for (reco::TrackCollection::const_iterator isotr=isoProdTracks->begin(); isotr!=isoProdTracks->end(); isotr++)
756 isoPt[isocount] = isotr->pt();
757 isoPhi[isocount] = isotr->phi();
758 isoEta[isocount] = isotr->eta();
762 for (reco::IsolatedPixelTrackCandidateCollection::const_iterator pixtr=isoPixelTracks->begin(); pixtr!=isoPixelTracks->end(); pixtr++)
764 pixPt[pixcount] = pixtr->pt();
765 pixPhi[pixcount] = pixtr->phi();
766 pixEta[pixcount] = pixtr->eta();
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
EventNumber_t event() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static FreeTrajectoryState getFreeTrajectoryState(const edm::EventSetup &, const reco::Track &)
get FreeTrajectoryState from different track representations
std::vector< HBHERecHit >::const_iterator const_iterator
TrackAssociatorParameters parameters_
math::XYZPoint trkGlobPosAtHcal
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_track_
double calibrationConeSize_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int ieta() const
get the cell ieta
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Abs< T >::type abs(const T &t)
TrackDetectorAssociator trackAssociator_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
const HcalRespCorrs * respRecalib
const_iterator end() const
int iphi() const
get the cell iphi
T const * product() const
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
double getDistInPlaneSimple(const GlobalPoint caloPoint, const GlobalPoint rechitPoint)
double associationConeSize_
edm::EDGetTokenT< reco::TrackCollection > tok_track1_
T const * product() const
DetId getClosestCell(const GlobalPoint &r) const override
const_iterator begin() const