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",
"")),
215 theHBHETopology_(nullptr),
216 respCorrs_(nullptr) {
262 std::vector<bool> muon_is_good, muon_global, muon_tracker;
263 std::vector<bool> muon_is_tight, muon_is_medium;
264 std::vector<double> ptGlob, etaGlob, phiGlob, energyMuon, pMuon;
265 std::vector<float> muon_trkKink, muon_chi2LocalPosition, muon_segComp;
266 std::vector<int> trackerLayer, numPixelLayers, tight_PixelHits;
268 std::vector<double> chiTracker, dxyTracker, dzTracker;
269 std::vector<double> innerTrackpt, innerTracketa, innerTrackphi;
270 std::vector<double> tight_validFraction, outerTrackChi;
271 std::vector<double> outerTrackPt, outerTrackEta, outerTrackPhi;
272 std::vector<int> outerTrackHits, outerTrackRHits;
273 std::vector<double> globalTrckPt, globalTrckEta, globalTrckPhi;
274 std::vector<int> globalMuonHits, matchedStat;
275 std::vector<double> chiGlobal, tight_LongPara, tight_TransImpara;
277 std::vector<double> ecalEnergy, hcalEnergy, hoEnergy;
278 std::vector<bool> matchedId, hcalHot;
279 std::vector<double> ecal3x3Energy, hcal1x1Energy;
280 std::vector<unsigned int> ecalDetId, hcalDetId, ehcalDetId;
281 std::vector<int> hcal_ieta, hcal_iphi;
282 std::vector<double> hcalDepthEnergy[
depthMax_];
283 std::vector<double> hcalDepthActiveLength[
depthMax_];
284 std::vector<double> hcalDepthEnergyHot[
depthMax_];
285 std::vector<double> hcalDepthActiveLengthHot[
depthMax_];
286 std::vector<double> hcalDepthChargeHot[
depthMax_];
287 std::vector<double> hcalDepthChargeHotBG[
depthMax_];
288 std::vector<double> hcalDepthEnergyCorr[
depthMax_];
289 std::vector<double> hcalDepthEnergyHotCorr[
depthMax_];
290 std::vector<bool> hcalDepthMatch[
depthMax_];
291 std::vector<bool> hcalDepthMatchHot[
depthMax_];
292 std::vector<double> hcalActiveLength, hcalActiveLengthHot;
313 std::vector<int>
index;
314 for (
int i = 0;
i < Ntriggers;
i++) {
316 int triggerSize =
static_cast<int>(_Triggers->
size());
321 if (
index[
i] < triggerSize) {
326 <<
" trigger_index " <<
hltresults_.at(
i) <<
" hltresult";
331 <<
"\" does not exist";
356 if (!
vtx.isValid()) {
362 reco::VertexCollection::const_iterator firstGoodVertex =
vtx->end();
363 for (reco::VertexCollection::const_iterator it =
vtx->begin(); it !=
vtx->end(); it++) {
365 if (firstGoodVertex ==
vtx->end())
366 firstGoodVertex = it;
370 if (firstGoodVertex !=
vtx->end())
371 pvx = firstGoodVertex->position();
375 for (
const auto& RecMuon : (*(_Muon.
product()))) {
376 muon_is_good.push_back(RecMuon.isPFMuon());
377 muon_global.push_back(RecMuon.isGlobalMuon());
378 muon_tracker.push_back(RecMuon.isTrackerMuon());
379 ptGlob.push_back(RecMuon.pt());
380 etaGlob.push_back(RecMuon.eta());
381 phiGlob.push_back(RecMuon.phi());
382 energyMuon.push_back(RecMuon.energy());
383 pMuon.push_back(RecMuon.p());
385 edm::LogVerbatim(
"HBHEMuon") <<
"Energy:" << RecMuon.energy() <<
" P:" << RecMuon.p();
389 muon_trkKink.push_back(RecMuon.combinedQuality().trkKink);
390 muon_chi2LocalPosition.push_back(RecMuon.combinedQuality().chi2LocalPosition);
393 if (RecMuon.track().isNonnull()) {
394 trackerLayer.push_back(RecMuon.track()->hitPattern().trackerLayersWithMeasurement());
396 trackerLayer.push_back(-1);
398 if (RecMuon.innerTrack().isNonnull()) {
400 numPixelLayers.push_back(RecMuon.innerTrack()->hitPattern().pixelLayersWithMeasurement());
401 chiTracker.push_back(RecMuon.innerTrack()->normalizedChi2());
402 dxyTracker.push_back(fabs(RecMuon.innerTrack()->dxy(pvx)));
403 dzTracker.push_back(fabs(RecMuon.innerTrack()->dz(pvx)));
404 innerTrackpt.push_back(RecMuon.innerTrack()->pt());
405 innerTracketa.push_back(RecMuon.innerTrack()->eta());
406 innerTrackphi.push_back(RecMuon.innerTrack()->phi());
407 tight_PixelHits.push_back(RecMuon.innerTrack()->hitPattern().numberOfValidPixelHits());
408 tight_validFraction.push_back(RecMuon.innerTrack()->validFraction());
411 numPixelLayers.push_back(0);
412 chiTracker.push_back(0);
413 dxyTracker.push_back(0);
414 dzTracker.push_back(0);
415 innerTrackpt.push_back(0);
416 innerTracketa.push_back(0);
417 innerTrackphi.push_back(0);
418 tight_PixelHits.push_back(0);
419 tight_validFraction.push_back(-99);
422 if (RecMuon.outerTrack().isNonnull()) {
423 outerTrack.push_back(
true);
424 outerTrackPt.push_back(RecMuon.outerTrack()->pt());
425 outerTrackEta.push_back(RecMuon.outerTrack()->eta());
426 outerTrackPhi.push_back(RecMuon.outerTrack()->phi());
427 outerTrackChi.push_back(RecMuon.outerTrack()->normalizedChi2());
428 outerTrackHits.push_back(RecMuon.outerTrack()->numberOfValidHits());
429 outerTrackRHits.push_back(RecMuon.outerTrack()->recHitsSize());
431 outerTrack.push_back(
false);
432 outerTrackPt.push_back(0);
433 outerTrackEta.push_back(0);
434 outerTrackPhi.push_back(0);
435 outerTrackChi.push_back(0);
436 outerTrackHits.push_back(0);
437 outerTrackRHits.push_back(0);
440 if (RecMuon.globalTrack().isNonnull()) {
442 chiGlobal.push_back(RecMuon.globalTrack()->normalizedChi2());
443 globalMuonHits.push_back(RecMuon.globalTrack()->hitPattern().numberOfValidMuonHits());
444 matchedStat.push_back(RecMuon.numberOfMatchedStations());
445 globalTrckPt.push_back(RecMuon.globalTrack()->pt());
446 globalTrckEta.push_back(RecMuon.globalTrack()->eta());
447 globalTrckPhi.push_back(RecMuon.globalTrack()->phi());
448 tight_TransImpara.push_back(fabs(RecMuon.muonBestTrack()->dxy(pvx)));
449 tight_LongPara.push_back(fabs(RecMuon.muonBestTrack()->dz(pvx)));
452 chiGlobal.push_back(0);
453 globalMuonHits.push_back(0);
454 matchedStat.push_back(0);
455 globalTrckPt.push_back(0);
456 globalTrckEta.push_back(0);
457 globalTrckPhi.push_back(0);
458 tight_TransImpara.push_back(0);
459 tight_LongPara.push_back(0);
463 ((RecMuon.pfIsolationR04().sumChargedHadronPt +
465 RecMuon.pfIsolationR04().sumNeutralHadronEt + RecMuon.pfIsolationR04().sumPhotonEt -
466 (0.5 * RecMuon.pfIsolationR04().sumPUPt))) /
470 ((RecMuon.pfIsolationR03().sumChargedHadronPt +
472 RecMuon.pfIsolationR03().sumNeutralHadronEt + RecMuon.pfIsolationR03().sumPhotonEt -
473 (0.5 * RecMuon.pfIsolationR03().sumPUPt))) /
476 ecalEnergy.push_back(RecMuon.calEnergy().emS9);
477 hcalEnergy.push_back(RecMuon.calEnergy().hadS9);
478 hoEnergy.push_back(RecMuon.calEnergy().hoS9);
480 double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
487 unsigned int isHot(0);
488 bool tmpmatch(
false);
491 eHcalDepth[
i] = eHcalDepthHot[
i] = 0;
492 eHcalDepthC[
i] = eHcalDepthHotC[
i] = 0;
493 cHcalDepthHot[
i] = cHcalDepthHotBG[
i] = 0;
494 activeL[
i] = activeHotL[
i] = 0;
495 matchDepth[
i] = matchDepthHot[
i] =
true;
497 if (RecMuon.innerTrack().isNonnull()) {
498 const reco::Track* pTrack = (RecMuon.innerTrack()).
get();
503 ecalDetId.push_back((trackID.
detIdECAL)());
504 hcalDetId.push_back((trackID.
detIdHCAL)());
513 bool okE = trackID.
okECAL;
534 edm::LogVerbatim(
"HBHEMuon") <<
"Propagate Track to ECAL: " << okE <<
":" << trackID.
okECAL <<
" E " << eEcal;
540 if ((hcidt.ieta() ==
check.ieta()) && (hcidt.iphi() ==
check.iphi()))
566 std::vector<std::pair<double, int>> ehdepth;
582 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
587 double ene = ehdepth[
i].first;
591 edm::LogWarning(
"HBHEMuon") <<
"(1) Invalid ID " << hcid0 <<
" with E = " << ene;
593 for (
const auto& ehd : ehdepth)
607 int depth = ehdepth[
i].second - 1;
610 depth =
id.depth() - 1;
612 eHcalDepth[
depth] += ene;
613 eHcalDepthC[
depth] += enec;
614 activeL[
depth] += actL;
615 activeLengthTot += actL;
616 matchDepth[
depth] = (matchDepth[
depth] && tmpC);
620 << hcid0 <<
" E " << ene <<
":" << enec <<
" L " << actL <<
" Match " << tmpC;
627 edm::LogVerbatim(
"HBHEMuon") << hcidt <<
" Match " << tmpmatch <<
" Depths " << ehdepth.size();
628 for (
unsigned int k = 0;
k < ehdepth.size(); ++
k)
629 edm::LogVerbatim(
"HBHEMuon") <<
" [" <<
k <<
":" << ehdepth[
k].second <<
"] " << matchDepth[
k];
634 isHot =
matchId(closestCell, hotCell);
640 std::vector<std::pair<double, int>> ehdepth;
656 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
661 double ene = ehdepth[
i].first;
665 edm::LogWarning(
"HBHEMuon") <<
"(2) Invalid ID " << hcid0 <<
" with E = " << ene;
667 for (
const auto& ehd : ehdepth)
671 double chg(ene), enec(ene);
679 << hcid0 <<
":" <<
id <<
" Corr " <<
corr <<
" E " << ene <<
":" << enec;
690 int depth = ehdepth[
i].second - 1;
693 depth =
id.depth() - 1;
695 eHcalDepthHot[
depth] += ene;
696 eHcalDepthHotC[
depth] += enec;
698 activeHotL[
depth] += actL;
699 activeLengthHotTot += actL;
700 matchDepthHot[
depth] = (matchDepthHot[
depth] && tmpC);
704 <<
chg <<
" L " << actL <<
" Match " << tmpC;
711 std::vector<std::pair<double, int>> ehdeptho;
725 for (
unsigned int i = 0;
i < ehdeptho.size(); ++
i) {
729 double ene = ehdeptho[
i].first;
732 edm::LogWarning(
"HBHEMuon") <<
"(3) Invalid ID " << hcid0 <<
" with E = " << ene;
733 edm::LogWarning(
"HBHEMuon") << oppCell <<
" with " << ehdeptho.size() <<
" depths:";
734 for (
const auto& ehd : ehdeptho)
745 << hcid0 <<
":" <<
id <<
" Corr " <<
corr <<
" E " << ene <<
":" << ehdeptho[
i].first;
756 int depth = ehdeptho[
i].second - 1;
759 depth =
id.depth() - 1;
773 <<
" Hot " << isHot <<
" Energy " << eHcal << std::endl;
777 ecalDetId.push_back(0);
778 hcalDetId.push_back(0);
779 ehcalDetId.push_back(0);
782 matchedId.push_back(tmpmatch);
783 ecal3x3Energy.push_back(eEcal);
784 hcal1x1Energy.push_back(eHcal);
785 hcal_ieta.push_back(
ieta);
786 hcal_iphi.push_back(
iphi);
788 hcalDepthEnergy[
i].push_back(eHcalDepth[
i]);
789 hcalDepthActiveLength[
i].push_back(activeL[
i]);
790 hcalDepthEnergyHot[
i].push_back(eHcalDepthHot[
i]);
791 hcalDepthActiveLengthHot[
i].push_back(activeHotL[
i]);
792 hcalDepthEnergyCorr[
i].push_back(eHcalDepthC[
i]);
793 hcalDepthEnergyHotCorr[
i].push_back(eHcalDepthHotC[
i]);
794 hcalDepthChargeHot[
i].push_back(cHcalDepthHot[
i]);
795 hcalDepthChargeHotBG[
i].push_back(cHcalDepthHotBG[
i]);
796 hcalDepthMatch[
i].push_back(matchDepth[
i]);
797 hcalDepthMatchHot[
i].push_back(matchDepthHot[
i]);
799 hcalActiveLength.push_back(activeLengthTot);
800 hcalHot.push_back(isHot);
801 hcalActiveLengthHot.push_back(activeLengthHotTot);
806 for (
unsigned int i = 0;
i < hcal_ieta.size(); ++
i)
808 <<
"HCAL has value of " << hcal_ieta[
i] <<
":" << hcal_iphi[
i];
810 for (
unsigned int k = 0;
k < muon_is_good.size(); ++
k) {
887 tree_ =
fs->make<TTree>(
"TREE",
"TREE");
956 sprintf(
name,
"hcal_edepth%d", (
k + 1));
958 sprintf(
name,
"hcal_activeL%d", (
k + 1));
960 sprintf(
name,
"hcal_edepthHot%d", (
k + 1));
962 sprintf(
name,
"hcal_activeHotL%d", (
k + 1));
964 sprintf(
name,
"hcal_cdepthHot%d", (
k + 1));
966 sprintf(
name,
"hcal_cdepthHotBG%d", (
k + 1));
968 sprintf(
name,
"hcal_edepthCorrect%d", (
k + 1));
970 sprintf(
name,
"hcal_edepthHotCorrect%d", (
k + 1));
972 sprintf(
name,
"hcal_depthMatch%d", (
k + 1));
974 sprintf(
name,
"hcal_depthMatchHot%d", (
k + 1));
993 unsigned int k1(0), k2(0);
995 for (
const auto& act :
actHB) {
996 edm::LogVerbatim(
"HBHEMuon") <<
"[" << k1 <<
"] ieta " << act.ieta <<
" depth " << act.depth <<
" zside " 997 << act.zside <<
" type " << act.stype <<
" phi " << act.iphis.size() <<
":" 998 << act.iphis[0] <<
" L " << act.thick;
1005 for (
const auto& act :
actHE) {
1006 edm::LogVerbatim(
"HBHEMuon") <<
"[" << k2 <<
"] ieta " << act.ieta <<
" depth " << act.depth <<
" zside " 1007 << act.zside <<
" type " << act.stype <<
" phi " << act.iphis.size() <<
":" 1008 << act.iphis[0] <<
" L " << act.thick;
1016 bool changed =
true;
1021 edm::LogVerbatim(
"HBHEMuon") <<
"HLT config with process name HLT successfully extracted";
1024 for (
unsigned int t = 0;
t < ntriggers; ++
t) {
1026 for (
unsigned int ik = 0; ik <
triggers_.size(); ++ik) {
1027 if (hltname.find(
triggers_[ik]) != std::string::npos) {
1035 edm::LogError(
"HBHEMuon") <<
"Error! HLT config extraction with process name HLT failed";
1048 edm::LogVerbatim(
"HBHEMuon") <<
"\nTable of Correction Factors for Run " << iRun.
run() <<
"\n";
1049 for (
auto const&
id : ids) {
1067 std::vector<std::string>
trig = {
"HLT_IsoMu17",
"HLT_IsoMu20",
"HLT_IsoMu24",
"HLT_IsoMu27",
"HLT_Mu45",
"HLT_Mu50"};
1068 desc.add<std::vector<std::string>>(
"triggers",
trig);
1069 desc.add<
double>(
"pMinMuon", 10.0);
1070 desc.addUntracked<
int>(
"verbosity", 0);
1071 desc.add<
int>(
"useRaw", 0);
1072 desc.add<
bool>(
"unCorrect",
true);
1073 desc.add<
bool>(
"getCharge",
true);
1074 desc.add<
bool>(
"collapseDepth",
false);
1075 desc.add<
bool>(
"isItPlan1",
false);
1076 desc.addUntracked<
bool>(
"ignoreHECorr",
false);
1077 desc.addUntracked<
bool>(
"isItPreRecHit",
false);
1080 desc.addUntracked<
int>(
"maxDepth", 7);
1082 desc.addUntracked<
bool>(
"writeRespCorr",
false);
1083 descriptions.
add(
"hcalHBHEMuon",
desc);
1172 int match = ((kd1 == kd2) ? 1 : 0);
1178 int ieta =
id.ietaAbs();
1179 int zside =
id.zside();
1180 int iphi =
id.iphi();
1181 std::vector<int> dpths;
1183 std::vector<HcalDetId> ids;
1185 for (
auto idh : ids)
1186 dpths.emplace_back(idh.depth());
1188 dpths.emplace_back(
id.
depth());
1192 for (
unsigned int i = 0;
i <
actHB.size(); ++
i) {
1194 (
std::find(dpths.begin(), dpths.end(),
actHB[
i].depth) != dpths.end()) &&
1200 for (
unsigned int i = 0;
i <
actHE.size(); ++
i) {
1202 (
std::find(dpths.begin(), dpths.end(),
actHE[
i].depth) != dpths.end()) &&
1216 if (
vtx.position().Rho() > 2.)
1218 if (fabs(
vtx.position().Z()) > 24.)
1238 for (
int capid = 0; capid < 4; ++capid)
1253 <<
" depth " <<
depth;
1262 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)
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.
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)
bool getData(T &iHolder) const
const std::string labelVtx_
double activeLength(const DetId &)
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::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)