167 std::vector<HcalDDDRecConstants::HcalActiveLength>
actHB,
actHE;
173 : hlTriggerResults_(iConfig.getParameter<edm::
InputTag>(
"hlTriggerResults")),
174 labelEBRecHit_(iConfig.getParameter<edm::
InputTag>(
"labelEBRecHit")),
175 labelEERecHit_(iConfig.getParameter<edm::
InputTag>(
"labelEERecHit")),
176 labelHBHERecHit_(iConfig.getParameter<edm::
InputTag>(
"labelHBHERecHit")),
177 labelVtx_(iConfig.getParameter<std::
string>(
"labelVertex")),
178 labelMuon_(iConfig.getParameter<std::
string>(
"labelMuon")),
179 fileInCorr_(iConfig.getUntrackedParameter<std::
string>(
"fileInCorr",
"")),
180 triggers_(iConfig.getParameter<std::
vector<std::
string>>(
"triggers")),
181 verbosity_(iConfig.getUntrackedParameter<int>(
"verbosity", 0)),
182 useRaw_(iConfig.getParameter<int>(
"useRaw")),
183 unCorrect_(iConfig.getParameter<bool>(
"unCorrect")),
184 collapseDepth_(iConfig.getParameter<bool>(
"collapseDepth")),
185 isItPlan1_(iConfig.getParameter<bool>(
"isItPlan1")),
186 ignoreHECorr_(iConfig.getUntrackedParameter<bool>(
"ignoreHECorr",
false)),
187 isItPreRecHit_(iConfig.getUntrackedParameter<bool>(
"isItPreRecHit",
false)),
188 getCharge_(iConfig.getParameter<bool>(
"getCharge")),
189 writeRespCorr_(iConfig.getUntrackedParameter<bool>(
"writeRespCorr",
false)),
191 theHBHETopology_(nullptr),
192 respCorrs_(nullptr) {
209 if (modnam.empty()) {
224 tok_ddrec_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
225 tok_htopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord, edm::Transition::BeginRun>();
226 tok_respcorr_ = esConsumes<HcalRespCorrs, HcalRespCorrsRcd, edm::Transition::BeginRun>();
227 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord, edm::Transition::BeginRun>();
228 tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
229 tok_chan_ = esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
230 tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
231 tok_topo_ = esConsumes<CaloTopology, CaloTopologyRecord>();
251 <<
":" << mergedDepth_ <<
" IsItPlan1 " <<
isItPlan1_ <<
" IsItPreRecHit "
263 std::vector<bool> muon_is_good, muon_global, muon_tracker;
264 std::vector<bool> muon_is_tight, muon_is_medium;
265 std::vector<double> ptGlob, etaGlob, phiGlob, energyMuon, pMuon;
266 std::vector<float> muon_trkKink, muon_chi2LocalPosition, muon_segComp;
267 std::vector<int> trackerLayer, numPixelLayers, tight_PixelHits;
268 std::vector<bool>
innerTrack, outerTrack, globalTrack;
269 std::vector<double> chiTracker, dxyTracker, dzTracker;
270 std::vector<double> innerTrackpt, innerTracketa, innerTrackphi;
271 std::vector<double> tight_validFraction, outerTrackChi;
272 std::vector<double> outerTrackPt, outerTrackEta, outerTrackPhi;
273 std::vector<int> outerTrackHits, outerTrackRHits;
274 std::vector<double> globalTrckPt, globalTrckEta, globalTrckPhi;
275 std::vector<int> globalMuonHits, matchedStat;
276 std::vector<double> chiGlobal, tight_LongPara, tight_TransImpara;
277 std::vector<double> isolationR04, isolationR03;
278 std::vector<double> ecalEnergy, hcalEnergy, hoEnergy;
279 std::vector<bool> matchedId, hcalHot;
280 std::vector<double> ecal3x3Energy, hcal1x1Energy;
281 std::vector<unsigned int> ecalDetId, hcalDetId, ehcalDetId;
282 std::vector<int> hcal_ieta, hcal_iphi;
283 std::vector<double> hcalDepthEnergy[
depthMax_];
284 std::vector<double> hcalDepthActiveLength[
depthMax_];
285 std::vector<double> hcalDepthEnergyHot[
depthMax_];
286 std::vector<double> hcalDepthActiveLengthHot[
depthMax_];
287 std::vector<double> hcalDepthChargeHot[
depthMax_];
288 std::vector<double> hcalDepthChargeHotBG[
depthMax_];
289 std::vector<double> hcalDepthEnergyCorr[
depthMax_];
290 std::vector<double> hcalDepthEnergyHotCorr[
depthMax_];
291 std::vector<bool> hcalDepthMatch[
depthMax_];
292 std::vector<bool> hcalDepthMatchHot[
depthMax_];
293 std::vector<double> hcalActiveLength, hcalActiveLengthHot;
315 std::vector<int>
index;
316 for (
int i = 0;
i < Ntriggers;
i++) {
318 int triggerSize = int(_Triggers->size());
321 edm::LogVerbatim(
"HBHEMuon") <<
"outside loop " << index[
i] <<
"\ntriggerSize " << triggerSize;
323 if (index[i] < triggerSize) {
324 hltresults_.push_back(_Triggers->accept(index[i]));
327 edm::LogVerbatim(
"HBHEMuon") <<
"Trigger_info " << triggerSize <<
" triggerSize " << index[
i]
328 <<
" trigger_index " <<
hltresults_.at(i) <<
" hltresult";
333 <<
"\" does not exist";
369 reco::VertexCollection::const_iterator firstGoodVertex = vtx->end();
370 for (reco::VertexCollection::const_iterator it = vtx->begin(); it != vtx->end(); it++) {
372 if (firstGoodVertex == vtx->end())
373 firstGoodVertex = it;
377 if (firstGoodVertex != vtx->end())
378 pvx = firstGoodVertex->position();
382 for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon != _Muon->end(); ++RecMuon) {
383 muon_is_good.push_back(RecMuon->isPFMuon());
384 muon_global.push_back(RecMuon->isGlobalMuon());
385 muon_tracker.push_back(RecMuon->isTrackerMuon());
386 ptGlob.push_back((RecMuon)->
pt());
387 etaGlob.push_back(RecMuon->eta());
388 phiGlob.push_back(RecMuon->phi());
389 energyMuon.push_back(RecMuon->energy());
390 pMuon.push_back(RecMuon->p());
392 edm::LogVerbatim(
"HBHEMuon") <<
"Energy:" << RecMuon->energy() <<
" P:" << RecMuon->p();
396 muon_trkKink.push_back(RecMuon->combinedQuality().trkKink);
397 muon_chi2LocalPosition.push_back(RecMuon->combinedQuality().chi2LocalPosition);
400 if (RecMuon->track().isNonnull()) {
401 trackerLayer.push_back(RecMuon->track()->hitPattern().trackerLayersWithMeasurement());
403 trackerLayer.push_back(-1);
405 if (RecMuon->innerTrack().isNonnull()) {
406 innerTrack.push_back(
true);
407 numPixelLayers.push_back(RecMuon->innerTrack()->hitPattern().pixelLayersWithMeasurement());
408 chiTracker.push_back(RecMuon->innerTrack()->normalizedChi2());
409 dxyTracker.push_back(fabs(RecMuon->innerTrack()->dxy(pvx)));
410 dzTracker.push_back(fabs(RecMuon->innerTrack()->dz(pvx)));
411 innerTrackpt.push_back(RecMuon->innerTrack()->pt());
412 innerTracketa.push_back(RecMuon->innerTrack()->eta());
413 innerTrackphi.push_back(RecMuon->innerTrack()->phi());
414 tight_PixelHits.push_back(RecMuon->innerTrack()->hitPattern().numberOfValidPixelHits());
415 tight_validFraction.push_back(RecMuon->innerTrack()->validFraction());
417 innerTrack.push_back(
false);
418 numPixelLayers.push_back(0);
419 chiTracker.push_back(0);
420 dxyTracker.push_back(0);
421 dzTracker.push_back(0);
422 innerTrackpt.push_back(0);
423 innerTracketa.push_back(0);
424 innerTrackphi.push_back(0);
425 tight_PixelHits.push_back(0);
426 tight_validFraction.push_back(-99);
429 if (RecMuon->outerTrack().isNonnull()) {
430 outerTrack.push_back(
true);
431 outerTrackPt.push_back(RecMuon->outerTrack()->pt());
432 outerTrackEta.push_back(RecMuon->outerTrack()->eta());
433 outerTrackPhi.push_back(RecMuon->outerTrack()->phi());
434 outerTrackChi.push_back(RecMuon->outerTrack()->normalizedChi2());
435 outerTrackHits.push_back(RecMuon->outerTrack()->numberOfValidHits());
436 outerTrackRHits.push_back(RecMuon->outerTrack()->recHitsSize());
438 outerTrack.push_back(
false);
439 outerTrackPt.push_back(0);
440 outerTrackEta.push_back(0);
441 outerTrackPhi.push_back(0);
442 outerTrackChi.push_back(0);
443 outerTrackHits.push_back(0);
444 outerTrackRHits.push_back(0);
447 if (RecMuon->globalTrack().isNonnull()) {
448 globalTrack.push_back(
true);
449 chiGlobal.push_back(RecMuon->globalTrack()->normalizedChi2());
450 globalMuonHits.push_back(RecMuon->globalTrack()->hitPattern().numberOfValidMuonHits());
451 matchedStat.push_back(RecMuon->numberOfMatchedStations());
452 globalTrckPt.push_back(RecMuon->globalTrack()->pt());
453 globalTrckEta.push_back(RecMuon->globalTrack()->eta());
454 globalTrckPhi.push_back(RecMuon->globalTrack()->phi());
455 tight_TransImpara.push_back(fabs(RecMuon->muonBestTrack()->dxy(pvx)));
456 tight_LongPara.push_back(fabs(RecMuon->muonBestTrack()->dz(pvx)));
458 globalTrack.push_back(
false);
459 chiGlobal.push_back(0);
460 globalMuonHits.push_back(0);
461 matchedStat.push_back(0);
462 globalTrckPt.push_back(0);
463 globalTrckEta.push_back(0);
464 globalTrckPhi.push_back(0);
465 tight_TransImpara.push_back(0);
466 tight_LongPara.push_back(0);
469 isolationR04.push_back(
470 ((RecMuon->pfIsolationR04().sumChargedHadronPt +
472 RecMuon->pfIsolationR04().sumNeutralHadronEt + RecMuon->pfIsolationR04().sumPhotonEt -
473 (0.5 * RecMuon->pfIsolationR04().sumPUPt))) /
476 isolationR03.push_back(
477 ((RecMuon->pfIsolationR03().sumChargedHadronPt +
479 RecMuon->pfIsolationR03().sumNeutralHadronEt + RecMuon->pfIsolationR03().sumPhotonEt -
480 (0.5 * RecMuon->pfIsolationR03().sumPUPt))) /
483 ecalEnergy.push_back(RecMuon->calEnergy().emS9);
484 hcalEnergy.push_back(RecMuon->calEnergy().hadS9);
485 hoEnergy.push_back(RecMuon->calEnergy().hoS9);
487 double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
494 unsigned int isHot(0);
495 bool tmpmatch(
false);
496 int ieta(-1000), iphi(-1000);
498 eHcalDepth[
i] = eHcalDepthHot[
i] = 0;
499 eHcalDepthC[
i] = eHcalDepthHotC[
i] = 0;
500 cHcalDepthHot[
i] = cHcalDepthHotBG[
i] = 0;
501 activeL[
i] = activeHotL[
i] = 0;
502 matchDepth[
i] = matchDepthHot[
i] =
true;
504 if (RecMuon->innerTrack().isNonnull()) {
505 const reco::Track* pTrack = (RecMuon->innerTrack()).
get();
507 if ((RecMuon->p() > 10.0) && (trackID.
okHCAL))
510 ecalDetId.push_back((trackID.
detIdECAL)());
511 hcalDetId.push_back((trackID.
detIdHCAL)());
520 bool okE = trackID.
okECAL;
541 edm::LogVerbatim(
"HBHEMuon") <<
"Propagate Track to ECAL: " << okE <<
":" << trackID.
okECAL <<
" E " << eEcal;
547 if ((hcidt.ieta() == check.
ieta()) && (hcidt.iphi() == check.
iphi()))
550 edm::LogVerbatim(
"HBHEMuon") <<
"Front " << hcidt <<
" Back " << info.first <<
":" << check <<
" Match "
557 bool hborhe = (
std::abs(ieta) == 16);
573 std::vector<std::pair<double, int>> ehdepth;
589 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
594 double ene = ehdepth[
i].first;
598 edm::LogWarning(
"HBHEMuon") <<
"(1) Invalid ID " << hcid0 <<
" with E = " << ene;
600 for (
const auto& ehd : ehdepth)
614 int depth = ehdepth[
i].second - 1;
617 depth =
id.
depth() - 1;
619 eHcalDepth[
depth] += ene;
620 eHcalDepthC[
depth] += enec;
621 activeL[
depth] += actL;
622 activeLengthTot += actL;
623 matchDepth[
depth] = (matchDepth[
depth] && tmpC);
627 << hcid0 <<
" E " << ene <<
":" << enec <<
" L " << actL <<
" Match " << tmpC;
634 edm::LogVerbatim(
"HBHEMuon") << hcidt <<
" Match " << tmpmatch <<
" Depths " << ehdepth.size();
635 for (
unsigned int k = 0;
k < ehdepth.size(); ++
k)
636 edm::LogVerbatim(
"HBHEMuon") <<
" [" <<
k <<
":" << ehdepth[
k].second <<
"] " << matchDepth[
k];
641 isHot =
matchId(closestCell, hotCell);
647 std::vector<std::pair<double, int>> ehdepth;
663 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
668 double ene = ehdepth[
i].first;
672 edm::LogWarning(
"HBHEMuon") <<
"(2) Invalid ID " << hcid0 <<
" with E = " << ene;
674 for (
const auto& ehd : ehdepth)
678 double chg(ene), enec(ene);
686 << hcid0 <<
":" <<
id <<
" Corr " << corr <<
" E " << ene <<
":" << enec;
697 int depth = ehdepth[
i].second - 1;
700 depth =
id.
depth() - 1;
702 eHcalDepthHot[
depth] += ene;
703 eHcalDepthHotC[
depth] += enec;
705 activeHotL[
depth] += actL;
706 activeLengthHotTot += actL;
707 matchDepthHot[
depth] = (matchDepthHot[
depth] && tmpC);
710 edm::LogVerbatim(
"HBHEMuon") << hcid0 <<
" depth " << depth <<
" E " << ene <<
":" << enec <<
" C "
711 <<
chg <<
" L " << actL <<
" Match " << tmpC;
718 std::vector<std::pair<double, int>> ehdeptho;
732 for (
unsigned int i = 0;
i < ehdeptho.size(); ++
i) {
736 double ene = ehdeptho[
i].first;
739 edm::LogWarning(
"HBHEMuon") <<
"(3) Invalid ID " << hcid0 <<
" with E = " << ene;
740 edm::LogWarning(
"HBHEMuon") << oppCell <<
" with " << ehdeptho.size() <<
" depths:";
741 for (
const auto& ehd : ehdeptho)
752 << hcid0 <<
":" <<
id <<
" Corr " << corr <<
" E " << ene <<
":" << ehdeptho[
i].first;
763 int depth = ehdeptho[
i].second - 1;
766 depth =
id.
depth() - 1;
771 edm::LogVerbatim(
"HBHEMuon") << hcid0 <<
" Depth " << depth <<
" E " << ene <<
" C " <<
chg;
780 <<
" Hot " << isHot <<
" Energy " << eHcal << std::endl;
784 ecalDetId.push_back(0);
785 hcalDetId.push_back(0);
786 ehcalDetId.push_back(0);
789 matchedId.push_back(tmpmatch);
790 ecal3x3Energy.push_back(eEcal);
791 hcal1x1Energy.push_back(eHcal);
792 hcal_ieta.push_back(ieta);
793 hcal_iphi.push_back(iphi);
795 hcalDepthEnergy[
i].push_back(eHcalDepth[
i]);
796 hcalDepthActiveLength[
i].push_back(activeL[i]);
797 hcalDepthEnergyHot[
i].push_back(eHcalDepthHot[i]);
798 hcalDepthActiveLengthHot[
i].push_back(activeHotL[i]);
799 hcalDepthEnergyCorr[
i].push_back(eHcalDepthC[i]);
800 hcalDepthEnergyHotCorr[
i].push_back(eHcalDepthHotC[i]);
801 hcalDepthChargeHot[
i].push_back(cHcalDepthHot[i]);
802 hcalDepthChargeHotBG[
i].push_back(cHcalDepthHotBG[i]);
803 hcalDepthMatch[
i].push_back(matchDepth[i]);
804 hcalDepthMatchHot[
i].push_back(matchDepthHot[i]);
806 hcalActiveLength.push_back(activeLengthTot);
807 hcalHot.push_back(isHot);
808 hcalActiveLengthHot.push_back(activeLengthHotTot);
813 for (
unsigned int i = 0;
i < hcal_ieta.size(); ++
i)
815 <<
"HCAL has value of " << hcal_ieta[
i] <<
":" << hcal_iphi[
i];
817 for (
unsigned int k = 0;
k < muon_is_good.size(); ++
k) {
962 sprintf(name,
"hcal_edepth%d", (
k + 1));
964 sprintf(name,
"hcal_activeL%d", (k + 1));
966 sprintf(name,
"hcal_edepthHot%d", (k + 1));
968 sprintf(name,
"hcal_activeHotL%d", (k + 1));
970 sprintf(name,
"hcal_cdepthHot%d", (k + 1));
972 sprintf(name,
"hcal_cdepthHotBG%d", (k + 1));
974 sprintf(name,
"hcal_edepthCorrect%d", (k + 1));
976 sprintf(name,
"hcal_edepthHotCorrect%d", (k + 1));
978 sprintf(name,
"hcal_depthMatch%d", (k + 1));
980 sprintf(name,
"hcal_depthMatchHot%d", (k + 1));
999 unsigned int k1(0),
k2(0);
1001 for (
const auto& act :
actHB) {
1002 edm::LogVerbatim(
"HBHEMuon") <<
"[" << k1 <<
"] ieta " << act.ieta <<
" depth " << act.depth <<
" zside "
1003 << act.zside <<
" type " << act.stype <<
" phi " << act.iphis.size() <<
":"
1004 << act.iphis[0] <<
" L " << act.thick;
1011 for (
const auto& act :
actHE) {
1012 edm::LogVerbatim(
"HBHEMuon") <<
"[" << k2 <<
"] ieta " << act.ieta <<
" depth " << act.depth <<
" zside "
1013 << act.zside <<
" type " << act.stype <<
" phi " << act.iphis.size() <<
":"
1014 << act.iphis[0] <<
" L " << act.thick;
1022 bool changed =
true;
1029 <<
" successfully extracted" << std::endl;
1032 for (
unsigned int t = 0;
t < ntriggers; ++
t) {
1034 for (
unsigned int ik = 0; ik < 6; ++ik) {
1035 if (hltname.find(
triggers_[ik]) != std::string::npos) {
1043 edm::LogError(
"HBHEMuon") <<
"Error! HLT config extraction with process "
1044 <<
"name HLT failed";
1057 edm::LogVerbatim(
"HBHEMuon") <<
"\nTable of Correction Factors for Run " << iRun.
run() <<
"\n";
1058 for (
auto const&
id : ids) {
1076 std::vector<std::string> trig = {
"HLT_IsoMu17",
"HLT_IsoMu20",
"HLT_IsoMu24",
"HLT_IsoMu27",
"HLT_Mu45",
"HLT_Mu50"};
1077 desc.
add<std::vector<std::string>>(
"triggers", trig);
1079 desc.
add<
int>(
"useRaw", 0);
1080 desc.
add<
bool>(
"unCorrect",
false);
1081 desc.
add<
bool>(
"getCharge",
false);
1082 desc.
add<
bool>(
"collapseDepth",
false);
1083 desc.
add<
bool>(
"isItPlan1",
false);
1091 descriptions.
add(
"hcalHBHEMuon", desc);
1180 int match = ((kd1 == kd2) ? 1 : 0);
1186 int ieta =
id.ietaAbs();
1187 int zside =
id.zside();
1188 int iphi =
id.iphi();
1189 std::vector<int> dpths;
1191 std::vector<HcalDetId> ids;
1193 for (
auto idh : ids)
1194 dpths.emplace_back(idh.depth());
1196 dpths.emplace_back(
id.
depth());
1200 for (
unsigned int i = 0;
i <
actHB.size(); ++
i) {
1201 if ((ieta ==
actHB[
i].ieta) && (zside ==
actHB[
i].zside) &&
1202 (
std::find(dpths.begin(), dpths.end(),
actHB[
i].depth) != dpths.end()) &&
1208 for (
unsigned int i = 0;
i <
actHE.size(); ++
i) {
1209 if ((ieta ==
actHE[
i].ieta) && (zside ==
actHE[
i].zside) &&
1210 (
std::find(dpths.begin(), dpths.end(),
actHE[
i].depth) != dpths.end()) &&
1226 if (fabs(vtx.
position().Z()) > 24.)
1246 for (
int capid = 0; capid < 4; ++capid)
1255 int zside = (ieta > 0) ? 1 : -1;
1261 <<
" depth " <<
depth;
1270 std::pair<double, double> rz =
hdc_->
getRZ(hcid);
unsigned int size() const
number of trigger paths in trigger table
double gainFactor(const HcalDbService *dbserv, const HcalDetId &id)
static const std::string kSharedResource
std::vector< int > hltresults_
Log< level::Info, true > LogVerbatim
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
EventNumber_t event() const
HcalHBHEMuonAnalyzer(const edm::ParameterSet &)
const std::string labelMuon_
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const HcalTopology * theHBHETopology_
const HcalDDDRecConstants * dddConstants() const
double hcalDepthEnergyHot_[depthMax_]
unsigned int eventNumber_
std::vector< std::string > all_triggers_
const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const override
Get a list of valid detector ids (for the given subdetector)
static const int depthMax_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void analyze(edm::Event const &, edm::EventSetup const &) override
const std::string & triggerName(unsigned int triggerIndex) const
uint16_t *__restrict__ id
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
double tight_validFraction_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HcalDetId mergedDepthDetId(const HcalDetId &id) const
#define DEFINE_FWK_MODULE(type)
std::pair< math::XYZPoint, bool > propagateHCAL(const reco::Track *, const MagneticField *, bool debug=false)
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
constexpr uint32_t rawId() const
get the raw id
int bunchCrossing() const
unsigned int triggerIndex(std::string_view name) const
double respCorr(const DetId &id)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
T * make(const Args &...args) const
make new ROOT object
double hcalDepthChargeHot_[depthMax_]
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE
bool validHcal(const HcalDetId &id) const
const edm::InputTag hlTriggerResults_
Log< level::Error, false > LogError
const bool writeRespCorr_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
LuminosityBlockNumber_t luminosityBlock() const
const Point & position() const
position
double hcalDepthActiveLengthHot_[depthMax_]
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
double hcalDepthEnergyCorr_[depthMax_]
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
const edm::InputTag labelEERecHit_
double hcalDepthActiveLength_[depthMax_]
bool getData(T &iHolder) const
U second(std::pair< T, U > const &p)
const edm::InputTag labelEBRecHit_
edm::EDGetTokenT< reco::VertexCollection > tok_Vtx_
constexpr HcalSubdetector subdet() const
get the subdetector
void beginRun(edm::Run const &, edm::EventSetup const &) override
double hcalDepthEnergyHotCorr_[depthMax_]
bool hcalDepthMatchHot_[depthMax_]
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
spr::propagatedTrackDirection propagateHCALBack(unsigned int thisTrk, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const CaloGeometry *geo, const MagneticField *bField, bool debug=false)
constexpr int iphi() const
get the cell iphi
const bool isItPreRecHit_
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
double getRZ(const int &subdet, const int &ieta, const int &depth) const
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_topo_
Abs< T >::type abs(const T &t)
constexpr int ieta() const
get the cell ieta
const CaloGeometry * geo_
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
const std::string labelVtx_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double activeLength(const DetId &)
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
bool goodCell(const HcalDetId &hcid, const reco::Track *pTrack, const CaloGeometry *geo, const MagneticField *bField)
const edm::InputTag labelHBHERecHit_
double hcalDepthChargeHotBG_[depthMax_]
float muon_chi2LocalPosition_
std::map< DetId, double > corrValue_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB
double hcalDepthEnergy_[depthMax_]
int depth16HE(int ieta, int iphi)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
void endRun(edm::Run const &, edm::EventSetup const &) override
XYZPointD XYZPoint
point in space with cartesian internal representation
bool hcalDepthMatch_[depthMax_]
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_chan_
double tight_TransImpara_
void unmergeDepthDetId(const HcalDetId &id, std::vector< HcalDetId > &ids) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_respcorr_
int matchId(const HcalDetId &, const HcalDetId &)
HcalRespCorrs * respCorrs_
const HcalDDDRecConstants * hdc_
HLTConfigProvider hltConfig_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
double hcalActiveLengthHot_
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
std::vector< HcalActiveLength > getThickActive(const int &type) const
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
const bool collapseDepth_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
constexpr int depth() const
get the tower depth
Log< level::Warning, false > LogWarning
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_dbservice_
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
edm::EDGetTokenT< HBHERecHitCollection > tok_HBHE_
const std::string fileInCorr_
edm::Service< TFileService > fs
void energyHCALCell(HcalDetId detId, edm::Handle< T > &hits, std::vector< std::pair< double, int > > &energyCell, int maxDepth=1, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, int depthHE=3, bool debug=false)
constexpr double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
void setTopo(const HcalTopology *topo)
const std::vector< std::string > triggers_
bool isGoodVertex(const reco::Vertex &vtx)
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
double eHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, bool algoNew=true, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)