174 std::vector<HcalDDDRecConstants::HcalActiveLength>
actHB,
actHE;
180 : hlTriggerResults_(iConfig.getParameter<
edm::
InputTag>(
"hlTriggerResults")),
181 labelEBRecHit_(iConfig.getParameter<
edm::
InputTag>(
"labelEBRecHit")),
182 labelEERecHit_(iConfig.getParameter<
edm::
InputTag>(
"labelEERecHit")),
183 labelHBHERecHit_(iConfig.getParameter<
edm::
InputTag>(
"labelHBHERecHit")),
184 labelVtx_(iConfig.getParameter<
std::
string>(
"labelVertex")),
185 labelMuon_(iConfig.getParameter<
std::
string>(
"labelMuon")),
186 fileInCorr_(iConfig.getUntrackedParameter<
std::
string>(
"fileInCorr",
"")),
188 pMinMuon_(iConfig.getParameter<double>(
"pMinMuon")),
189 verbosity_(iConfig.getUntrackedParameter<
int>(
"verbosity", 0)),
190 useRaw_(iConfig.getParameter<
int>(
"useRaw")),
191 unCorrect_(iConfig.getParameter<
bool>(
"unCorrect")),
192 collapseDepth_(iConfig.getParameter<
bool>(
"collapseDepth")),
193 isItPlan1_(iConfig.getParameter<
bool>(
"isItPlan1")),
194 ignoreHECorr_(iConfig.getUntrackedParameter<
bool>(
"ignoreHECorr",
false)),
195 isItPreRecHit_(iConfig.getUntrackedParameter<
bool>(
"isItPreRecHit",
false)),
196 getCharge_(iConfig.getParameter<
bool>(
"getCharge")),
197 writeRespCorr_(iConfig.getUntrackedParameter<
bool>(
"writeRespCorr",
false)),
198 maxDepth_(iConfig.getUntrackedParameter<
int>(
"maxDepth", 7)),
199 modnam_(iConfig.getUntrackedParameter<
std::
string>(
"moduleName",
"")),
200 procnm_(iConfig.getUntrackedParameter<
std::
string>(
"processName",
"")),
201 usePFThresh_(iConfig.getParameter<
bool>(
"usePFThreshold")),
221 theHBHETopology_(nullptr),
222 respCorrs_(nullptr) {
269 std::vector<bool> muon_is_good, muon_global, muon_tracker;
270 std::vector<bool> muon_is_tight, muon_is_medium;
271 std::vector<double> ptGlob, etaGlob, phiGlob, energyMuon, pMuon;
272 std::vector<float> muon_trkKink, muon_chi2LocalPosition, muon_segComp;
273 std::vector<int> trackerLayer, numPixelLayers, tight_PixelHits;
275 std::vector<double> chiTracker, dxyTracker, dzTracker;
276 std::vector<double> innerTrackpt, innerTracketa, innerTrackphi;
277 std::vector<double> tight_validFraction, outerTrackChi;
278 std::vector<double> outerTrackPt, outerTrackEta, outerTrackPhi;
279 std::vector<int> outerTrackHits, outerTrackRHits;
280 std::vector<double> globalTrckPt, globalTrckEta, globalTrckPhi;
281 std::vector<int> globalMuonHits, matchedStat;
282 std::vector<double> chiGlobal, tight_LongPara, tight_TransImpara;
284 std::vector<double> ecalEnergy, hcalEnergy, hoEnergy;
285 std::vector<bool> matchedId, hcalHot;
286 std::vector<double> ecal3x3Energy, hcal1x1Energy;
287 std::vector<unsigned int> ecalDetId, hcalDetId, ehcalDetId;
288 std::vector<int> hcal_ieta, hcal_iphi;
289 std::vector<double> hcalDepthEnergy[
depthMax_];
290 std::vector<double> hcalDepthActiveLength[
depthMax_];
291 std::vector<double> hcalDepthEnergyHot[
depthMax_];
292 std::vector<double> hcalDepthActiveLengthHot[
depthMax_];
293 std::vector<double> hcalDepthChargeHot[
depthMax_];
294 std::vector<double> hcalDepthChargeHotBG[
depthMax_];
295 std::vector<double> hcalDepthEnergyCorr[
depthMax_];
296 std::vector<double> hcalDepthEnergyHotCorr[
depthMax_];
297 std::vector<bool> hcalDepthMatch[
depthMax_];
298 std::vector<bool> hcalDepthMatchHot[
depthMax_];
299 std::vector<double> hcalActiveLength, hcalActiveLengthHot;
320 std::vector<int>
index;
321 for (
int i = 0;
i < Ntriggers;
i++) {
323 int triggerSize =
static_cast<int>(_Triggers->
size());
328 if (
index[
i] < triggerSize) {
333 <<
" trigger_index " <<
hltresults_.at(
i) <<
" hltresult";
338 <<
"\" does not exist";
364 if (!
vtx.isValid()) {
370 reco::VertexCollection::const_iterator firstGoodVertex =
vtx->end();
371 for (reco::VertexCollection::const_iterator it =
vtx->begin(); it !=
vtx->end(); it++) {
373 if (firstGoodVertex ==
vtx->end())
374 firstGoodVertex = it;
378 if (firstGoodVertex !=
vtx->end())
379 pvx = firstGoodVertex->position();
383 for (
const auto& RecMuon : (*(_Muon.
product()))) {
384 muon_is_good.push_back(RecMuon.isPFMuon());
385 muon_global.push_back(RecMuon.isGlobalMuon());
386 muon_tracker.push_back(RecMuon.isTrackerMuon());
387 ptGlob.push_back(RecMuon.pt());
388 etaGlob.push_back(RecMuon.eta());
389 phiGlob.push_back(RecMuon.phi());
390 energyMuon.push_back(RecMuon.energy());
391 pMuon.push_back(RecMuon.p());
393 edm::LogVerbatim(
"HBHEMuon") <<
"Energy:" << RecMuon.energy() <<
" P:" << RecMuon.p();
397 muon_trkKink.push_back(RecMuon.combinedQuality().trkKink);
398 muon_chi2LocalPosition.push_back(RecMuon.combinedQuality().chi2LocalPosition);
401 if (RecMuon.track().isNonnull()) {
402 trackerLayer.push_back(RecMuon.track()->hitPattern().trackerLayersWithMeasurement());
404 trackerLayer.push_back(-1);
406 if (RecMuon.innerTrack().isNonnull()) {
408 numPixelLayers.push_back(RecMuon.innerTrack()->hitPattern().pixelLayersWithMeasurement());
409 chiTracker.push_back(RecMuon.innerTrack()->normalizedChi2());
410 dxyTracker.push_back(fabs(RecMuon.innerTrack()->dxy(pvx)));
411 dzTracker.push_back(fabs(RecMuon.innerTrack()->dz(pvx)));
412 innerTrackpt.push_back(RecMuon.innerTrack()->pt());
413 innerTracketa.push_back(RecMuon.innerTrack()->eta());
414 innerTrackphi.push_back(RecMuon.innerTrack()->phi());
415 tight_PixelHits.push_back(RecMuon.innerTrack()->hitPattern().numberOfValidPixelHits());
416 tight_validFraction.push_back(RecMuon.innerTrack()->validFraction());
419 numPixelLayers.push_back(0);
420 chiTracker.push_back(0);
421 dxyTracker.push_back(0);
422 dzTracker.push_back(0);
423 innerTrackpt.push_back(0);
424 innerTracketa.push_back(0);
425 innerTrackphi.push_back(0);
426 tight_PixelHits.push_back(0);
427 tight_validFraction.push_back(-99);
430 if (RecMuon.outerTrack().isNonnull()) {
431 outerTrack.push_back(
true);
432 outerTrackPt.push_back(RecMuon.outerTrack()->pt());
433 outerTrackEta.push_back(RecMuon.outerTrack()->eta());
434 outerTrackPhi.push_back(RecMuon.outerTrack()->phi());
435 outerTrackChi.push_back(RecMuon.outerTrack()->normalizedChi2());
436 outerTrackHits.push_back(RecMuon.outerTrack()->numberOfValidHits());
437 outerTrackRHits.push_back(RecMuon.outerTrack()->recHitsSize());
439 outerTrack.push_back(
false);
440 outerTrackPt.push_back(0);
441 outerTrackEta.push_back(0);
442 outerTrackPhi.push_back(0);
443 outerTrackChi.push_back(0);
444 outerTrackHits.push_back(0);
445 outerTrackRHits.push_back(0);
448 if (RecMuon.globalTrack().isNonnull()) {
450 chiGlobal.push_back(RecMuon.globalTrack()->normalizedChi2());
451 globalMuonHits.push_back(RecMuon.globalTrack()->hitPattern().numberOfValidMuonHits());
452 matchedStat.push_back(RecMuon.numberOfMatchedStations());
453 globalTrckPt.push_back(RecMuon.globalTrack()->pt());
454 globalTrckEta.push_back(RecMuon.globalTrack()->eta());
455 globalTrckPhi.push_back(RecMuon.globalTrack()->phi());
456 tight_TransImpara.push_back(fabs(RecMuon.muonBestTrack()->dxy(pvx)));
457 tight_LongPara.push_back(fabs(RecMuon.muonBestTrack()->dz(pvx)));
460 chiGlobal.push_back(0);
461 globalMuonHits.push_back(0);
462 matchedStat.push_back(0);
463 globalTrckPt.push_back(0);
464 globalTrckEta.push_back(0);
465 globalTrckPhi.push_back(0);
466 tight_TransImpara.push_back(0);
467 tight_LongPara.push_back(0);
471 ((RecMuon.pfIsolationR04().sumChargedHadronPt +
473 RecMuon.pfIsolationR04().sumNeutralHadronEt + RecMuon.pfIsolationR04().sumPhotonEt -
474 (0.5 * RecMuon.pfIsolationR04().sumPUPt))) /
478 ((RecMuon.pfIsolationR03().sumChargedHadronPt +
480 RecMuon.pfIsolationR03().sumNeutralHadronEt + RecMuon.pfIsolationR03().sumPhotonEt -
481 (0.5 * RecMuon.pfIsolationR03().sumPUPt))) /
484 ecalEnergy.push_back(RecMuon.calEnergy().emS9);
485 hcalEnergy.push_back(RecMuon.calEnergy().hadS9);
486 hoEnergy.push_back(RecMuon.calEnergy().hoS9);
488 double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
495 unsigned int isHot(0);
496 bool tmpmatch(
false);
499 eHcalDepth[
i] = eHcalDepthHot[
i] = 0;
500 eHcalDepthC[
i] = eHcalDepthHotC[
i] = 0;
501 cHcalDepthHot[
i] = cHcalDepthHotBG[
i] = 0;
502 activeL[
i] = activeHotL[
i] = 0;
503 matchDepth[
i] = matchDepthHot[
i] =
true;
505 if (RecMuon.innerTrack().isNonnull()) {
506 const reco::Track* pTrack = (RecMuon.innerTrack()).
get();
511 ecalDetId.push_back((trackID.
detIdECAL)());
512 hcalDetId.push_back((trackID.
detIdHCAL)());
521 bool okE = trackID.
okECAL;
553 edm::LogVerbatim(
"HBHEMuon") <<
"Propagate Track to ECAL: " << okE <<
":" << trackID.
okECAL <<
" E " << eEcal;
559 if ((hcidt.ieta() ==
check.ieta()) && (hcidt.iphi() ==
check.iphi()))
585 std::vector<std::pair<double, int>> ehdepth;
601 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
606 double ene = ehdepth[
i].first;
610 <<
"DetId " << subdet0 <<
":" <<
ieta <<
":" <<
iphi <<
":" << ehdepth[
i].second <<
" E " << ene;
615 edm::LogWarning(
"HBHEMuon") <<
"(1) Invalid ID " << hcid0 <<
" with E = " << ene;
617 for (
const auto& ehd : ehdepth)
631 int depth = ehdepth[
i].second - 1;
634 depth =
id.depth() - 1;
636 eHcalDepth[
depth] += ene;
637 eHcalDepthC[
depth] += enec;
638 activeL[
depth] += actL;
639 activeLengthTot += actL;
640 matchDepth[
depth] = (matchDepth[
depth] && tmpC);
644 << hcid0 <<
" E " << ene <<
":" << enec <<
" L " << actL <<
" Match " << tmpC;
651 edm::LogVerbatim(
"HBHEMuon") << hcidt <<
" Match " << tmpmatch <<
" Depths " << ehdepth.size();
652 for (
unsigned int k = 0;
k < ehdepth.size(); ++
k)
653 edm::LogVerbatim(
"HBHEMuon") <<
" [" <<
k <<
":" << ehdepth[
k].second <<
"] Match " << matchDepth[
k]
654 <<
" E " << eHcalDepth[
k] <<
":" << eHcalDepthC[
k] <<
" L " << activeL[
k];
659 isHot =
matchId(closestCell, hotCell);
665 std::vector<std::pair<double, int>> ehdepth;
681 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
686 double ene = ehdepth[
i].first;
690 <<
"DetId " << subdet0 <<
":" <<
ieta <<
":" <<
iphi <<
":" << ehdepth[
i].second <<
" E " << ene;
695 edm::LogWarning(
"HBHEMuon") <<
"(2) Invalid ID " << hcid0 <<
" with E = " << ene;
697 for (
const auto& ehd : ehdepth)
701 double chg(ene), enec(ene);
709 << hcid0 <<
":" <<
id <<
" Corr " <<
corr <<
" E " << ene <<
":" << enec;
720 int depth = ehdepth[
i].second - 1;
723 depth =
id.depth() - 1;
725 eHcalDepthHot[
depth] += ene;
726 eHcalDepthHotC[
depth] += enec;
728 activeHotL[
depth] += actL;
729 activeLengthHotTot += actL;
730 matchDepthHot[
depth] = (matchDepthHot[
depth] && tmpC);
734 <<
chg <<
" L " << actL <<
" Match " << tmpC;
741 std::vector<std::pair<double, int>> ehdeptho;
755 for (
unsigned int i = 0;
i < ehdeptho.size(); ++
i) {
759 double ene = ehdeptho[
i].first;
762 edm::LogWarning(
"HBHEMuon") <<
"(3) Invalid ID " << hcid0 <<
" with E = " << ene;
763 edm::LogWarning(
"HBHEMuon") << oppCell <<
" with " << ehdeptho.size() <<
" depths:";
764 for (
const auto& ehd : ehdeptho)
775 << hcid0 <<
":" <<
id <<
" Corr " <<
corr <<
" E " << ene <<
":" << ehdeptho[
i].first;
786 int depth = ehdeptho[
i].second - 1;
789 depth =
id.depth() - 1;
803 <<
" Hot " << isHot <<
" Energy " << eHcal << std::endl;
807 ecalDetId.push_back(0);
808 hcalDetId.push_back(0);
809 ehcalDetId.push_back(0);
812 matchedId.push_back(tmpmatch);
813 ecal3x3Energy.push_back(eEcal);
814 hcal1x1Energy.push_back(eHcal);
815 hcal_ieta.push_back(
ieta);
816 hcal_iphi.push_back(
iphi);
818 hcalDepthEnergy[
i].push_back(eHcalDepth[
i]);
819 hcalDepthActiveLength[
i].push_back(activeL[
i]);
820 hcalDepthEnergyHot[
i].push_back(eHcalDepthHot[
i]);
821 hcalDepthActiveLengthHot[
i].push_back(activeHotL[
i]);
822 hcalDepthEnergyCorr[
i].push_back(eHcalDepthC[
i]);
823 hcalDepthEnergyHotCorr[
i].push_back(eHcalDepthHotC[
i]);
824 hcalDepthChargeHot[
i].push_back(cHcalDepthHot[
i]);
825 hcalDepthChargeHotBG[
i].push_back(cHcalDepthHotBG[
i]);
826 hcalDepthMatch[
i].push_back(matchDepth[
i]);
827 hcalDepthMatchHot[
i].push_back(matchDepthHot[
i]);
829 hcalActiveLength.push_back(activeLengthTot);
830 hcalHot.push_back(isHot);
831 hcalActiveLengthHot.push_back(activeLengthHotTot);
836 for (
unsigned int i = 0;
i < hcal_ieta.size(); ++
i)
838 <<
"HCAL has value of " << hcal_ieta[
i] <<
":" << hcal_iphi[
i];
840 for (
unsigned int k = 0;
k < muon_is_good.size(); ++
k) {
917 tree_ =
fs->make<TTree>(
"TREE",
"TREE");
986 sprintf(
name,
"hcal_edepth%d", (
k + 1));
988 sprintf(
name,
"hcal_activeL%d", (
k + 1));
990 sprintf(
name,
"hcal_edepthHot%d", (
k + 1));
992 sprintf(
name,
"hcal_activeHotL%d", (
k + 1));
994 sprintf(
name,
"hcal_cdepthHot%d", (
k + 1));
996 sprintf(
name,
"hcal_cdepthHotBG%d", (
k + 1));
998 sprintf(
name,
"hcal_edepthCorrect%d", (
k + 1));
1000 sprintf(
name,
"hcal_edepthHotCorrect%d", (
k + 1));
1002 sprintf(
name,
"hcal_depthMatch%d", (
k + 1));
1004 sprintf(
name,
"hcal_depthMatchHot%d", (
k + 1));
1023 unsigned int k1(0), k2(0);
1025 for (
const auto& act :
actHB) {
1026 edm::LogVerbatim(
"HBHEMuon") <<
"[" << k1 <<
"] ieta " << act.ieta <<
" depth " << act.depth <<
" zside " 1027 << act.zside <<
" type " << act.stype <<
" phi " << act.iphis.size() <<
":" 1028 << act.iphis[0] <<
" L " << act.thick;
1036 for (
const auto& act :
actHE) {
1037 edm::LogVerbatim(
"HBHEMuon") <<
"[" << k2 <<
"] ieta " << act.ieta <<
" depth " << act.depth <<
" zside " 1038 << act.zside <<
" type " << act.stype <<
" phi " << act.iphis.size() <<
":" 1039 << act.iphis[0] <<
" L " << act.thick;
1048 bool changed =
true;
1053 edm::LogVerbatim(
"HBHEMuon") <<
"HLT config with process name HLT successfully extracted";
1056 for (
unsigned int t = 0;
t < ntriggers; ++
t) {
1058 for (
unsigned int ik = 0; ik <
triggers_.size(); ++ik) {
1059 if (hltname.find(
triggers_[ik]) != std::string::npos) {
1067 edm::LogError(
"HBHEMuon") <<
"Error! HLT config extraction with process name HLT failed";
1080 edm::LogVerbatim(
"HBHEMuon") <<
"\nTable of Correction Factors for Run " << iRun.
run() <<
"\n";
1081 for (
auto const&
id : ids) {
1099 std::vector<std::string>
trig = {};
1100 desc.add<std::vector<std::string>>(
"triggers",
trig);
1101 desc.add<
double>(
"pMinMuon", 5.0);
1102 desc.addUntracked<
int>(
"verbosity", 0);
1103 desc.add<
int>(
"useRaw", 0);
1104 desc.add<
bool>(
"unCorrect",
true);
1105 desc.add<
bool>(
"getCharge",
true);
1106 desc.add<
bool>(
"collapseDepth",
false);
1107 desc.add<
bool>(
"isItPlan1",
false);
1108 desc.addUntracked<
bool>(
"ignoreHECorr",
false);
1109 desc.addUntracked<
bool>(
"isItPreRecHit",
false);
1112 desc.addUntracked<
int>(
"maxDepth", 7);
1114 desc.addUntracked<
bool>(
"writeRespCorr",
false);
1115 desc.add<
bool>(
"usePFThreshold",
true);
1116 descriptions.
add(
"hcalHBHEMuon",
desc);
1205 int match = ((kd1 == kd2) ? 1 : 0);
1211 int ieta =
id.ietaAbs();
1212 int zside =
id.zside();
1213 int iphi =
id.iphi();
1214 std::vector<int> dpths;
1216 std::vector<HcalDetId> ids;
1218 for (
auto idh : ids)
1219 dpths.emplace_back(idh.depth());
1221 dpths.emplace_back(
id.
depth());
1225 std::ostringstream st1;
1226 st1 <<
"Subdet:zside:ieta:iphi:ndepth " <<
id.subdet() <<
" : " <<
zside <<
" : " <<
ieta <<
" : " <<
iphi <<
" : " 1227 << dpths.size() <<
" depths";
1228 for (
unsigned int k = 0;
k < dpths.size(); ++
k)
1229 st1 <<
" : " << dpths[
k];
1233 for (
unsigned int i = 0;
i <
actHB.size(); ++
i) {
1235 (
std::find(dpths.begin(), dpths.end(),
actHB[
i].depth) != dpths.end()) &&
1240 <<
" Depth " <<
actHB[
i].depth <<
":" 1241 << (
std::find(dpths.begin(), dpths.end(),
actHB[
i].depth) != dpths.end())
1245 <<
" Length: " <<
actHB[
i].thick <<
" : " << lx;
1250 for (
unsigned int i = 0;
i <
actHE.size(); ++
i) {
1252 (
std::find(dpths.begin(), dpths.end(),
actHE[
i].depth) != dpths.end()) &&
1257 <<
" Depth " <<
actHE[
i].depth <<
":" 1258 << (
std::find(dpths.begin(), dpths.end(),
actHE[
i].depth) != dpths.end())
1262 <<
" Length: " <<
actHE[
i].thick <<
" : " << lx;
1275 if (
vtx.position().Rho() > 2.)
1277 if (fabs(
vtx.position().Z()) > 24.)
1297 for (
int capid = 0; capid < 4; ++capid)
1312 <<
" depth " <<
depth;
1321 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)