170 std::vector<HcalDDDRecConstants::HcalActiveLength>
actHB,
actHE;
176 : hlTriggerResults_(iConfig.getParameter<
edm::
InputTag>(
"hlTriggerResults")),
177 labelEBRecHit_(iConfig.getParameter<
edm::
InputTag>(
"labelEBRecHit")),
178 labelEERecHit_(iConfig.getParameter<
edm::
InputTag>(
"labelEERecHit")),
179 labelHBHERecHit_(iConfig.getParameter<
edm::
InputTag>(
"labelHBHERecHit")),
180 labelVtx_(iConfig.getParameter<
std::
string>(
"labelVertex")),
181 labelMuon_(iConfig.getParameter<
std::
string>(
"labelMuon")),
182 fileInCorr_(iConfig.getUntrackedParameter<
std::
string>(
"fileInCorr",
"")),
184 pMinMuon_(iConfig.getParameter<double>(
"pMinMuon")),
185 verbosity_(iConfig.getUntrackedParameter<
int>(
"verbosity", 0)),
186 useRaw_(iConfig.getParameter<
int>(
"useRaw")),
187 unCorrect_(iConfig.getParameter<
bool>(
"unCorrect")),
188 collapseDepth_(iConfig.getParameter<
bool>(
"collapseDepth")),
189 isItPlan1_(iConfig.getParameter<
bool>(
"isItPlan1")),
190 ignoreHECorr_(iConfig.getUntrackedParameter<
bool>(
"ignoreHECorr",
false)),
191 isItPreRecHit_(iConfig.getUntrackedParameter<
bool>(
"isItPreRecHit",
false)),
192 getCharge_(iConfig.getParameter<
bool>(
"getCharge")),
193 writeRespCorr_(iConfig.getUntrackedParameter<
bool>(
"writeRespCorr",
false)),
194 maxDepth_(iConfig.getUntrackedParameter<
int>(
"maxDepth", 7)),
195 modnam_(iConfig.getUntrackedParameter<
std::
string>(
"moduleName",
"")),
196 procnm_(iConfig.getUntrackedParameter<
std::
string>(
"processName",
"")),
197 usePFThresh_(iConfig.getParameter<
bool>(
"usePFThreshold")),
217 theHBHETopology_(nullptr),
218 respCorrs_(nullptr) {
265 std::vector<bool> muon_is_good, muon_global, muon_tracker;
266 std::vector<bool> muon_is_tight, muon_is_medium;
267 std::vector<double> ptGlob, etaGlob, phiGlob, energyMuon, pMuon;
268 std::vector<float> muon_trkKink, muon_chi2LocalPosition, muon_segComp;
269 std::vector<int> trackerLayer, numPixelLayers, tight_PixelHits;
271 std::vector<double> chiTracker, dxyTracker, dzTracker;
272 std::vector<double> innerTrackpt, innerTracketa, innerTrackphi;
273 std::vector<double> tight_validFraction, outerTrackChi;
274 std::vector<double> outerTrackPt, outerTrackEta, outerTrackPhi;
275 std::vector<int> outerTrackHits, outerTrackRHits;
276 std::vector<double> globalTrckPt, globalTrckEta, globalTrckPhi;
277 std::vector<int> globalMuonHits, matchedStat;
278 std::vector<double> chiGlobal, tight_LongPara, tight_TransImpara;
280 std::vector<double>
ecalEnergy, hcalEnergy, hoEnergy;
281 std::vector<bool> matchedId, hcalHot;
282 std::vector<double> ecal3x3Energy, hcal1x1Energy;
283 std::vector<unsigned int> ecalDetId, hcalDetId, ehcalDetId;
284 std::vector<int> hcal_ieta, hcal_iphi;
285 std::vector<double> hcalDepthEnergy[
depthMax_];
286 std::vector<double> hcalDepthActiveLength[
depthMax_];
287 std::vector<double> hcalDepthEnergyHot[
depthMax_];
288 std::vector<double> hcalDepthActiveLengthHot[
depthMax_];
289 std::vector<double> hcalDepthChargeHot[
depthMax_];
290 std::vector<double> hcalDepthChargeHotBG[
depthMax_];
291 std::vector<double> hcalDepthEnergyCorr[
depthMax_];
292 std::vector<double> hcalDepthEnergyHotCorr[
depthMax_];
293 std::vector<bool> hcalDepthMatch[
depthMax_];
294 std::vector<bool> hcalDepthMatchHot[
depthMax_];
295 std::vector<double> hcalActiveLength, hcalActiveLengthHot;
316 std::vector<int>
index;
317 for (
int i = 0;
i < Ntriggers;
i++) {
319 int triggerSize =
static_cast<int>(_Triggers->
size());
324 if (
index[
i] < triggerSize) {
329 <<
" trigger_index " <<
hltresults_.at(
i) <<
" hltresult";
334 <<
"\" does not exist";
360 if (!
vtx.isValid()) {
366 reco::VertexCollection::const_iterator firstGoodVertex =
vtx->end();
367 for (reco::VertexCollection::const_iterator
it =
vtx->begin();
it !=
vtx->end();
it++) {
369 if (firstGoodVertex ==
vtx->end())
370 firstGoodVertex =
it;
374 if (firstGoodVertex !=
vtx->end())
375 pvx = firstGoodVertex->position();
379 for (
const auto& RecMuon : (*(_Muon.
product()))) {
380 muon_is_good.push_back(RecMuon.isPFMuon());
381 muon_global.push_back(RecMuon.isGlobalMuon());
382 muon_tracker.push_back(RecMuon.isTrackerMuon());
383 ptGlob.push_back(RecMuon.pt());
384 etaGlob.push_back(RecMuon.eta());
385 phiGlob.push_back(RecMuon.phi());
386 energyMuon.push_back(RecMuon.energy());
387 pMuon.push_back(RecMuon.p());
389 edm::LogVerbatim(
"HBHEMuon") <<
"Energy:" << RecMuon.energy() <<
" P:" << RecMuon.p();
393 muon_trkKink.push_back(RecMuon.combinedQuality().trkKink);
394 muon_chi2LocalPosition.push_back(RecMuon.combinedQuality().chi2LocalPosition);
397 if (RecMuon.track().isNonnull()) {
398 trackerLayer.push_back(RecMuon.track()->hitPattern().trackerLayersWithMeasurement());
400 trackerLayer.push_back(-1);
402 if (RecMuon.innerTrack().isNonnull()) {
404 numPixelLayers.push_back(RecMuon.innerTrack()->hitPattern().pixelLayersWithMeasurement());
405 chiTracker.push_back(RecMuon.innerTrack()->normalizedChi2());
406 dxyTracker.push_back(fabs(RecMuon.innerTrack()->dxy(pvx)));
407 dzTracker.push_back(fabs(RecMuon.innerTrack()->dz(pvx)));
408 innerTrackpt.push_back(RecMuon.innerTrack()->pt());
409 innerTracketa.push_back(RecMuon.innerTrack()->eta());
410 innerTrackphi.push_back(RecMuon.innerTrack()->phi());
411 tight_PixelHits.push_back(RecMuon.innerTrack()->hitPattern().numberOfValidPixelHits());
412 tight_validFraction.push_back(RecMuon.innerTrack()->validFraction());
415 numPixelLayers.push_back(0);
416 chiTracker.push_back(0);
417 dxyTracker.push_back(0);
418 dzTracker.push_back(0);
419 innerTrackpt.push_back(0);
420 innerTracketa.push_back(0);
421 innerTrackphi.push_back(0);
422 tight_PixelHits.push_back(0);
423 tight_validFraction.push_back(-99);
426 if (RecMuon.outerTrack().isNonnull()) {
427 outerTrack.push_back(
true);
428 outerTrackPt.push_back(RecMuon.outerTrack()->pt());
429 outerTrackEta.push_back(RecMuon.outerTrack()->eta());
430 outerTrackPhi.push_back(RecMuon.outerTrack()->phi());
431 outerTrackChi.push_back(RecMuon.outerTrack()->normalizedChi2());
432 outerTrackHits.push_back(RecMuon.outerTrack()->numberOfValidHits());
433 outerTrackRHits.push_back(RecMuon.outerTrack()->recHitsSize());
435 outerTrack.push_back(
false);
436 outerTrackPt.push_back(0);
437 outerTrackEta.push_back(0);
438 outerTrackPhi.push_back(0);
439 outerTrackChi.push_back(0);
440 outerTrackHits.push_back(0);
441 outerTrackRHits.push_back(0);
444 if (RecMuon.globalTrack().isNonnull()) {
446 chiGlobal.push_back(RecMuon.globalTrack()->normalizedChi2());
447 globalMuonHits.push_back(RecMuon.globalTrack()->hitPattern().numberOfValidMuonHits());
448 matchedStat.push_back(RecMuon.numberOfMatchedStations());
449 globalTrckPt.push_back(RecMuon.globalTrack()->pt());
450 globalTrckEta.push_back(RecMuon.globalTrack()->eta());
451 globalTrckPhi.push_back(RecMuon.globalTrack()->phi());
452 tight_TransImpara.push_back(fabs(RecMuon.muonBestTrack()->dxy(pvx)));
453 tight_LongPara.push_back(fabs(RecMuon.muonBestTrack()->dz(pvx)));
456 chiGlobal.push_back(0);
457 globalMuonHits.push_back(0);
458 matchedStat.push_back(0);
459 globalTrckPt.push_back(0);
460 globalTrckEta.push_back(0);
461 globalTrckPhi.push_back(0);
462 tight_TransImpara.push_back(0);
463 tight_LongPara.push_back(0);
467 ((RecMuon.pfIsolationR04().sumChargedHadronPt +
469 RecMuon.pfIsolationR04().sumNeutralHadronEt + RecMuon.pfIsolationR04().sumPhotonEt -
470 (0.5 * RecMuon.pfIsolationR04().sumPUPt))) /
474 ((RecMuon.pfIsolationR03().sumChargedHadronPt +
476 RecMuon.pfIsolationR03().sumNeutralHadronEt + RecMuon.pfIsolationR03().sumPhotonEt -
477 (0.5 * RecMuon.pfIsolationR03().sumPUPt))) /
480 ecalEnergy.push_back(RecMuon.calEnergy().emS9);
481 hcalEnergy.push_back(RecMuon.calEnergy().hadS9);
482 hoEnergy.push_back(RecMuon.calEnergy().hoS9);
484 double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
491 unsigned int isHot(0);
492 bool tmpmatch(
false);
495 eHcalDepth[
i] = eHcalDepthHot[
i] = 0;
496 eHcalDepthC[
i] = eHcalDepthHotC[
i] = 0;
497 cHcalDepthHot[
i] = cHcalDepthHotBG[
i] = 0;
498 activeL[
i] = activeHotL[
i] = 0;
499 matchDepth[
i] = matchDepthHot[
i] =
true;
501 if (RecMuon.innerTrack().isNonnull()) {
502 const reco::Track* pTrack = (RecMuon.innerTrack()).
get();
507 ecalDetId.push_back((trackID.
detIdECAL)());
508 hcalDetId.push_back((trackID.
detIdHCAL)());
517 bool okE = trackID.
okECAL;
549 edm::LogVerbatim(
"HBHEMuon") <<
"Propagate Track to ECAL: " << okE <<
":" << trackID.
okECAL <<
" E " << eEcal;
555 if ((hcidt.ieta() ==
check.ieta()) && (hcidt.iphi() ==
check.iphi()))
581 std::vector<std::pair<double, int>> ehdepth;
597 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
602 double ene = ehdepth[
i].first;
606 <<
"DetId " << subdet0 <<
":" <<
ieta <<
":" <<
iphi <<
":" << ehdepth[
i].second <<
" E " << ene;
611 edm::LogWarning(
"HBHEMuon") <<
"(1) Invalid ID " << hcid0 <<
" with E = " << ene;
613 for (
const auto& ehd : ehdepth)
627 int depth = ehdepth[
i].second - 1;
630 depth =
id.depth() - 1;
632 eHcalDepth[
depth] += ene;
633 eHcalDepthC[
depth] += enec;
634 activeL[
depth] += actL;
635 activeLengthTot += actL;
636 matchDepth[
depth] = (matchDepth[
depth] && tmpC);
640 << hcid0 <<
" E " << ene <<
":" << enec <<
" L " << actL <<
" Match " << tmpC;
647 edm::LogVerbatim(
"HBHEMuon") << hcidt <<
" Match " << tmpmatch <<
" Depths " << ehdepth.size();
648 for (
unsigned int k = 0;
k < ehdepth.size(); ++
k)
649 edm::LogVerbatim(
"HBHEMuon") <<
" [" <<
k <<
":" << ehdepth[
k].second <<
"] Match " << matchDepth[
k]
650 <<
" E " << eHcalDepth[
k] <<
":" << eHcalDepthC[
k] <<
" L " << activeL[
k];
655 isHot =
matchId(closestCell, hotCell);
661 std::vector<std::pair<double, int>> ehdepth;
677 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
682 double ene = ehdepth[
i].first;
686 <<
"DetId " << subdet0 <<
":" <<
ieta <<
":" <<
iphi <<
":" << ehdepth[
i].second <<
" E " << ene;
691 edm::LogWarning(
"HBHEMuon") <<
"(2) Invalid ID " << hcid0 <<
" with E = " << ene;
693 for (
const auto& ehd : ehdepth)
697 double chg(ene), enec(ene);
705 << hcid0 <<
":" <<
id <<
" Corr " <<
corr <<
" E " << ene <<
":" << enec;
716 int depth = ehdepth[
i].second - 1;
719 depth =
id.depth() - 1;
721 eHcalDepthHot[
depth] += ene;
722 eHcalDepthHotC[
depth] += enec;
724 activeHotL[
depth] += actL;
725 activeLengthHotTot += actL;
726 matchDepthHot[
depth] = (matchDepthHot[
depth] && tmpC);
730 <<
chg <<
" L " << actL <<
" Match " << tmpC;
737 std::vector<std::pair<double, int>> ehdeptho;
751 for (
unsigned int i = 0;
i < ehdeptho.size(); ++
i) {
755 double ene = ehdeptho[
i].first;
758 edm::LogWarning(
"HBHEMuon") <<
"(3) Invalid ID " << hcid0 <<
" with E = " << ene;
759 edm::LogWarning(
"HBHEMuon") << oppCell <<
" with " << ehdeptho.size() <<
" depths:";
760 for (
const auto& ehd : ehdeptho)
771 << hcid0 <<
":" <<
id <<
" Corr " <<
corr <<
" E " << ene <<
":" << ehdeptho[
i].first;
782 int depth = ehdeptho[
i].second - 1;
785 depth =
id.depth() - 1;
799 <<
" Hot " << isHot <<
" Energy " << eHcal << std::endl;
803 ecalDetId.push_back(0);
804 hcalDetId.push_back(0);
805 ehcalDetId.push_back(0);
808 matchedId.push_back(tmpmatch);
809 ecal3x3Energy.push_back(eEcal);
810 hcal1x1Energy.push_back(eHcal);
811 hcal_ieta.push_back(
ieta);
812 hcal_iphi.push_back(
iphi);
814 hcalDepthEnergy[
i].push_back(eHcalDepth[
i]);
815 hcalDepthActiveLength[
i].push_back(activeL[
i]);
816 hcalDepthEnergyHot[
i].push_back(eHcalDepthHot[
i]);
817 hcalDepthActiveLengthHot[
i].push_back(activeHotL[
i]);
818 hcalDepthEnergyCorr[
i].push_back(eHcalDepthC[
i]);
819 hcalDepthEnergyHotCorr[
i].push_back(eHcalDepthHotC[
i]);
820 hcalDepthChargeHot[
i].push_back(cHcalDepthHot[
i]);
821 hcalDepthChargeHotBG[
i].push_back(cHcalDepthHotBG[
i]);
822 hcalDepthMatch[
i].push_back(matchDepth[
i]);
823 hcalDepthMatchHot[
i].push_back(matchDepthHot[
i]);
825 hcalActiveLength.push_back(activeLengthTot);
826 hcalHot.push_back(isHot);
827 hcalActiveLengthHot.push_back(activeLengthHotTot);
832 for (
unsigned int i = 0;
i < hcal_ieta.size(); ++
i)
834 <<
"HCAL has value of " << hcal_ieta[
i] <<
":" << hcal_iphi[
i];
836 for (
unsigned int k = 0;
k < muon_is_good.size(); ++
k) {
913 tree_ =
fs->make<TTree>(
"TREE",
"TREE");
982 sprintf(
name,
"hcal_edepth%d", (
k + 1));
984 sprintf(
name,
"hcal_activeL%d", (
k + 1));
986 sprintf(
name,
"hcal_edepthHot%d", (
k + 1));
988 sprintf(
name,
"hcal_activeHotL%d", (
k + 1));
990 sprintf(
name,
"hcal_cdepthHot%d", (
k + 1));
992 sprintf(
name,
"hcal_cdepthHotBG%d", (
k + 1));
994 sprintf(
name,
"hcal_edepthCorrect%d", (
k + 1));
996 sprintf(
name,
"hcal_edepthHotCorrect%d", (
k + 1));
998 sprintf(
name,
"hcal_depthMatch%d", (
k + 1));
1000 sprintf(
name,
"hcal_depthMatchHot%d", (
k + 1));
1019 unsigned int k1(0), k2(0);
1021 for (
const auto& act :
actHB) {
1022 edm::LogVerbatim(
"HBHEMuon") <<
"[" << k1 <<
"] ieta " << act.ieta <<
" depth " << act.depth <<
" zside " 1023 << act.zside <<
" type " << act.stype <<
" phi " << act.iphis.size() <<
":" 1024 << act.iphis[0] <<
" L " << act.thick;
1032 for (
const auto& act :
actHE) {
1033 edm::LogVerbatim(
"HBHEMuon") <<
"[" << k2 <<
"] ieta " << act.ieta <<
" depth " << act.depth <<
" zside " 1034 << act.zside <<
" type " << act.stype <<
" phi " << act.iphis.size() <<
":" 1035 << act.iphis[0] <<
" L " << act.thick;
1044 bool changed =
true;
1049 edm::LogVerbatim(
"HBHEMuon") <<
"HLT config with process name HLT successfully extracted";
1052 for (
unsigned int t = 0;
t < ntriggers; ++
t) {
1054 for (
unsigned int ik = 0; ik <
triggers_.size(); ++ik) {
1055 if (hltname.find(
triggers_[ik]) != std::string::npos) {
1063 edm::LogError(
"HBHEMuon") <<
"Error! HLT config extraction with process name HLT failed";
1076 edm::LogVerbatim(
"HBHEMuon") <<
"\nTable of Correction Factors for Run " << iRun.
run() <<
"\n";
1077 for (
auto const&
id : ids) {
1095 std::vector<std::string>
trig = {};
1096 desc.add<std::vector<std::string>>(
"triggers",
trig);
1097 desc.add<
double>(
"pMinMuon", 5.0);
1098 desc.addUntracked<
int>(
"verbosity", 0);
1099 desc.add<
int>(
"useRaw", 0);
1100 desc.add<
bool>(
"unCorrect",
true);
1101 desc.add<
bool>(
"getCharge",
true);
1102 desc.add<
bool>(
"collapseDepth",
false);
1103 desc.add<
bool>(
"isItPlan1",
false);
1104 desc.addUntracked<
bool>(
"ignoreHECorr",
false);
1105 desc.addUntracked<
bool>(
"isItPreRecHit",
false);
1108 desc.addUntracked<
int>(
"maxDepth", 7);
1110 desc.addUntracked<
bool>(
"writeRespCorr",
false);
1111 desc.add<
bool>(
"usePFThreshold",
true);
1112 descriptions.
add(
"hcalHBHEMuon",
desc);
1201 int match = ((kd1 == kd2) ? 1 : 0);
1207 int ieta =
id.ietaAbs();
1208 int zside =
id.zside();
1209 int iphi =
id.iphi();
1210 std::vector<int> dpths;
1212 std::vector<HcalDetId> ids;
1214 for (
auto idh : ids)
1215 dpths.emplace_back(idh.depth());
1217 dpths.emplace_back(
id.
depth());
1221 std::ostringstream st1;
1222 st1 <<
"Subdet:zside:ieta:iphi:ndepth " <<
id.subdet() <<
" : " <<
zside <<
" : " <<
ieta <<
" : " <<
iphi <<
" : " 1223 << dpths.size() <<
" depths";
1224 for (
unsigned int k = 0;
k < dpths.size(); ++
k)
1225 st1 <<
" : " << dpths[
k];
1229 for (
unsigned int i = 0;
i <
actHB.size(); ++
i) {
1231 (
std::find(dpths.begin(), dpths.end(),
actHB[
i].depth) != dpths.end()) &&
1236 <<
" Depth " <<
actHB[
i].depth <<
":" 1237 << (
std::find(dpths.begin(), dpths.end(),
actHB[
i].depth) != dpths.end())
1241 <<
" Length: " <<
actHB[
i].thick <<
" : " << lx;
1246 for (
unsigned int i = 0;
i <
actHE.size(); ++
i) {
1248 (
std::find(dpths.begin(), dpths.end(),
actHE[
i].depth) != dpths.end()) &&
1253 <<
" Depth " <<
actHE[
i].depth <<
":" 1254 << (
std::find(dpths.begin(), dpths.end(),
actHE[
i].depth) != dpths.end())
1258 <<
" Length: " <<
actHE[
i].thick <<
" : " << lx;
1271 if (
vtx.position().Rho() > 2.)
1273 if (fabs(
vtx.position().Z()) > 24.)
1293 for (
int capid = 0; capid < 4; ++capid)
1308 <<
" depth " <<
depth;
1317 std::pair<double, double> rz =
hdc_->
getRZ(hcid);
double gainFactor(const HcalDbService *dbserv, const HcalDetId &id)
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
static const std::string kSharedResource
std::vector< int > hltresults_
bool accept() const
Has at least one path accepted the event?
Log< level::Info, true > LogVerbatim
const std::string & triggerName(unsigned int triggerIndex) const
HcalHBHEMuonAnalyzer(const edm::ParameterSet &)
const std::string labelMuon_
double getRZ(const int &subdet, const int &ieta, const int &depth) const
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_
double hcalDepthEnergyHot_[depthMax_]
unsigned int eventNumber_
std::vector< std::string > all_triggers_
const std::string modnam_
const edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_respcorr_
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)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
static const int depthMax_
void analyze(edm::Event const &, edm::EventSetup const &) override
HcalDetId mergedDepthDetId(const HcalDetId &id) const
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
double tight_validFraction_
std::pair< math::XYZPoint, bool > propagateHCAL(const reco::Track *, const MagneticField *, bool debug=false)
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
const edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
T const * product() const
const edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
double respCorr(const DetId &id)
double hcalDepthChargeHot_[depthMax_]
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE
const edm::InputTag hlTriggerResults_
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_topo_
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)
std::vector< Vertex > VertexCollection
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
double hcalDepthActiveLengthHot_[depthMax_]
double hcalDepthEnergyCorr_[depthMax_]
std::vector< Muon > MuonCollection
collection of Muon objects
const Item * getValues(DetId fId, bool throwOnFail=true) const
const edm::InputTag labelEERecHit_
unsigned int triggerIndex(std::string_view name) const
double hcalDepthActiveLength_[depthMax_]
U second(std::pair< T, U > const &p)
const edm::InputTag labelEBRecHit_
const edm::ESGetToken< HcalDbService, HcalDbRecord > tok_dbservice_
void beginRun(edm::Run const &, edm::EventSetup const &) override
constexpr HcalSubdetector subdet() const
get the subdetector
double hcalDepthEnergyHotCorr_[depthMax_]
bool hcalDepthMatchHot_[depthMax_]
unsigned int size() const
Get number of paths stored.
double activeLength(const DetId &, bool)
const std::string procnm_
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)
unsigned int size() const
number of trigger paths in trigger table
const bool isItPreRecHit_
constexpr int ieta() const
get the cell ieta
Abs< T >::type abs(const T &t)
const edm::EDGetTokenT< HBHERecHitCollection > tok_HBHE_
const CaloGeometry * geo_
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
#define DEFINE_FWK_MODULE(type)
const std::string labelVtx_
bool goodCell(const HcalDetId &hcid, const reco::Track *pTrack, const CaloGeometry *geo, const MagneticField *bField)
constexpr double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
const edm::InputTag labelHBHERecHit_
double hcalDepthChargeHotBG_[depthMax_]
float muon_chi2LocalPosition_
const edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
std::map< DetId, double > corrValue_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB
double hcalDepthEnergy_[depthMax_]
int depth16HE(int ieta, int iphi)
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
void endRun(edm::Run const &, edm::EventSetup const &) override
constexpr uint32_t rawId() const
get the raw id
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
double tight_TransImpara_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > tok_ecalPFRecHitThresholds_
const edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
bool validHcal(const HcalDetId &id) const
int matchId(const HcalDetId &, const HcalDetId &)
HcalRespCorrs * respCorrs_
const edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
const HcalDDDRecConstants * hdc_
HLTConfigProvider hltConfig_
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_chan_
std::vector< HcalActiveLength > getThickActive(const int &type) const
const HcalDDDRecConstants * dddConstants() const
double hcalActiveLengthHot_
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
const edm::EDGetTokenT< reco::VertexCollection > tok_Vtx_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void unmergeDepthDetId(const HcalDetId &id, std::vector< HcalDetId > &ids) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
const bool collapseDepth_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Log< level::Warning, false > LogWarning
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
const std::string fileInCorr_
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
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)
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
constexpr int iphi() const
get the cell iphi
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)