266 LogInfo(
"CalibConstants")<<
" Loaded: OK ";
269 LogWarning(
"CalibConstants")<<
" Not Found!! ";
310 if (isoPixelTracks->size()==0)
return;
313 for (reco::TrackCollection::const_iterator trit=isoProdTracks->begin(); trit!=isoProdTracks->end(); trit++)
316 reco::IsolatedPixelTrackCandidateCollection::const_iterator isoMatched=isoPixelTracks->begin();
321 for (reco::IsolatedPixelTrackCandidateCollection::const_iterator it = isoPixelTracks->begin(); it!=isoPixelTracks->end(); it++)
325 if (
abs((trit->pt() - it->pt())/it->pt()) < 0.005 &&
abs(trit->eta() - it->eta()) < 0.01)
334 if (!matched)
continue;
335 if(isoMatched->maxPtPxl() >
maxPNear)
continue;
337 ptNear = isoMatched->maxPtPxl();
343 if (fabs(trit->eta())>1.47&&trit->hitPattern().numberOfValidStripTECHits()<
MinNTECHitsEndcap)
continue;
348 numVH = trit->hitPattern().numberOfValidHits();
349 numVS = trit->hitPattern().numberOfValidStripTECHits();
353 trackE =
sqrt(trit->px()*trit->px()+trit->py()*trit->py()+trit->pz()*trit->pz()+0.14*0.14);
395 const HcalDetId tempId = gHcal->getClosestCell(gPointHcal);
396 ietatrue = tempId.
ieta();
397 iphitrue = tempId.
iphi();
405 std::vector<DetId> usedHits;
422 bool hitIsUsed=
false;
423 for (uint32_t
i=0;
i<usedHits.size();
i++)
425 if (usedHits[
i]==hhit->id()) hitIsUsed=
true;
427 if (hitIsUsed)
continue;
428 usedHits.push_back(hhit->id());
439 int iphihitm = (hhit->id()).iphi();
440 int ietahitm = (hhit->id()).ieta();
441 int depthhit = (hhit->id()).depth();
442 float enehit = hhit->energy() * recal;
444 if (depthhit!=1)
continue;
462 int iphihitm2 = (hhit2->id()).iphi();
463 int ietahitm2 = (hhit2->id()).ieta();
464 int depthhit2 = (hhit2->id()).depth();
465 float enehit2 = hhit2->energy() * recal;
467 if (iphihitm==iphihitm2 && ietahitm==ietahitm2 && depthhit!=depthhit2) enehit = enehit+enehit2;
479 MaxHit.
ietahitm = (hhit->id()).ieta();
480 MaxHit.
iphihitm = (hhit->id()).iphi();
481 MaxHit.
dr = distAtHcal;
498 Bool_t passCuts = kFALSE;
523 bool hitIsUsed=
false;
524 for (uint32_t
i=0;
i<usedHits.size();
i++)
526 if (usedHits[
i]==hhit->id()) hitIsUsed=
true;
528 if (hitIsUsed)
continue;
529 usedHits.push_back(hhit->id());
532 if(MaxHit.
ietahitm*(hhit->id()).ieta()>0)
534 DIETA = MaxHit.
ietahitm - (hhit->id()).ieta();
536 if(MaxHit.
ietahitm*(hhit->id()).ieta()<0)
538 DIETA = MaxHit.
ietahitm - (hhit->id()).ieta();
539 DIETA = DIETA>0 ? DIETA-1 : DIETA+1;
542 int DIPHI =
abs(MaxHit.
iphihitm - (hhit->id()).iphi());
543 DIPHI = DIPHI>36 ? 72-DIPHI : DIPHI;
555 if(
abs(DIETA)<=numbercell && (
abs(DIPHI)<=numbercell || (
abs(MaxHit.
ietahitm)>=20 &&
abs(DIPHI)<=numbercell+1)) )
559 if(passCuts && hhit->energy()>0)
573 if (hhit->id().ieta() == MaxHit.
ietahitm && hhit->id().iphi() == MaxHit.
iphihitm)
iTime = hhit->time();
599 if (
abs(MaxHit.
ietahitm)==21 &&
abs((hhit->id()).ieta())<=20 &&
abs(DIPHI)>3)
continue;
607 if ((hhit->id().depth() == 1) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
612 else if((hhit->id().depth() == 2) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
626 if (
abs(MaxHit.
ietahitm)==21 &&
abs((hhit->id()).ieta())<=20 &&
abs(DIPHI)>2)
continue;
634 if ((hhit->id().depth() == 1) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
639 else if((hhit->id().depth() == 2) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
657 if ((hhit->id().depth() == 1) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
662 else if((hhit->id().depth() == 2) && (
abs(hhit->id().ieta()) > 17) && (
abs(hhit->id().ieta()) < 29))
683 diphi_M_P = diphi_M_P>36 ? 72-diphi_M_P : diphi_M_P;
709 iDr =
sqrt(diphi_M_P*diphi_M_P+dieta_M_P*dieta_M_P);
729 iso = isoProdTracks->size();
730 pix = isoPixelTracks->size();
744 Int_t gencount=0, isocount=0, pixcount=0;
747 genPt[gencount] = gentr->pt();
748 genPhi[gencount] = gentr->phi();
749 genEta[gencount] = gentr->eta();
753 for (reco::TrackCollection::const_iterator isotr=isoProdTracks->begin(); isotr!=isoProdTracks->end(); isotr++)
755 isoPt[isocount] = isotr->pt();
756 isoPhi[isocount] = isotr->phi();
757 isoEta[isocount] = isotr->eta();
761 for (reco::IsolatedPixelTrackCandidateCollection::const_iterator pixtr=isoPixelTracks->begin(); pixtr!=isoPixelTracks->end(); pixtr++)
763 pixPt[pixcount] = pixtr->pt();
764 pixPhi[pixcount] = pixtr->phi();
765 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
Abs< T >::type abs(const T &t)
TrackDetectorAssociator trackAssociator_
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
const HcalRespCorrs * respRecalib
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_