41 : theUseEcalRecHitsFlag(par.getParameter<
bool>(
"UseEcalRecHitsFlag")),
42 theUseHcalRecHitsFlag(par.getParameter<
bool>(
"UseHcalRecHitsFlag")),
43 theUseHORecHitsFlag(par.getParameter<
bool>(
"UseHORecHitsFlag")),
44 theDepositLabel(par.getUntrackedParameter<
string>(
"DepositLabel")),
45 theDepositInstanceLabels(par.getParameter<
std::
vector<
std::
string> >(
"DepositInstanceLabels")),
47 theThreshold_E(par.getParameter<double>(
"Threshold_E")),
48 theThreshold_H(par.getParameter<double>(
"Threshold_H")),
49 theThreshold_HO(par.getParameter<double>(
"Threshold_HO")),
50 theMaxSeverityHB(par.getParameter<
int>(
"MaxSeverityHB")),
51 theMaxSeverityHE(par.getParameter<
int>(
"MaxSeverityHE")),
52 theDR_Veto_E(par.getParameter<double>(
"DR_Veto_E")),
53 theDR_Veto_H(par.getParameter<double>(
"DR_Veto_H")),
54 theDR_Veto_HO(par.getParameter<double>(
"DR_Veto_HO")),
55 theCenterConeOnCalIntersection(par.getParameter<
bool>(
"CenterConeOnCalIntersection")),
56 theDR_Max(par.getParameter<double>(
"DR_Max")),
57 theNoise_EB(par.getParameter<double>(
"Noise_EB")),
58 theNoise_EE(par.getParameter<double>(
"Noise_EE")),
59 theNoise_HB(par.getParameter<double>(
"Noise_HB")),
60 theNoise_HE(par.getParameter<double>(
"Noise_HE")),
61 theNoise_HO(par.getParameter<double>(
"Noise_HO")),
62 theNoiseTow_EB(par.getParameter<double>(
"NoiseTow_EB")),
63 theNoiseTow_EE(par.getParameter<double>(
"NoiseTow_EE")),
65 theAssociator(nullptr),
67 thePrintTimeReport(par.getUntrackedParameter<
bool>(
"PrintTimeReport")) {
107 IsoDeposit::Direction muonDir(
muon.eta(),
muon.phi());
133 LogError(
"MuonIsolation") <<
"Configuration is inconsistent: Need 3 deposit instance labels";
139 <<
"Deposit instance labels do not look like (e*, h*, ho*):" 140 <<
"proceed at your own risk. The extractor interprets lab0=from ecal; lab1=from hcal; lab2=from ho";
143 typedef IsoDeposit::Veto Veto;
146 IsoDeposit::Direction muonDir(
muon.eta(),
muon.phi());
168 double dRtmp = depEcal.veto().dR;
170 depEcal.setVeto(Veto(dirTmp, dRtmp));
173 dRtmp = depHcal.
veto().
dR;
175 depHcal.
setVeto(Veto(dirTmp, dRtmp));
178 dRtmp = depHOcal.
veto().
dR;
180 depHOcal.
setVeto(Veto(dirTmp, dRtmp));
186 std::vector<const EcalRecHit*>::const_iterator eHitCI = mInfo.
ecalRecHits.begin();
187 for (; eHitCI != mInfo.
ecalRecHits.end(); ++eHitCI) {
191 double cosTheta = 1. / cosh(eHitPos.
eta());
206 bool vetoHit =
false;
209 LogDebug(
"RecoMuon|CaloExtractorByAssociator") <<
" >>> Veto ECAL hit: Calo deltaR2= " <<
deltaR2;
210 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
211 <<
" >>> Calo eta phi ethcal: " << eHitPos.
eta() <<
" " << eHitPos.
phi() <<
" " <<
et;
216 for (
unsigned int iH = 0; iH < mInfo.
crossedEcalIds.size() && !vetoHit; ++iH) {
227 depEcal.addCandEnergy(
et);
237 std::vector<const HBHERecHit*>::const_iterator hHitCI = mInfo.
hcalRecHits.begin();
238 for (; hHitCI != mInfo.
hcalRecHits.end(); ++hHitCI) {
242 double cosTheta = 1. / cosh(hHitPos.
eta());
267 if (!goodHB and !goodHE)
270 bool vetoHit =
false;
273 LogDebug(
"RecoMuon|CaloExtractorByAssociator") <<
" >>> Veto HBHE hit: Calo deltaR2= " <<
deltaR2;
274 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
275 <<
" >>> Calo eta phi ethcal: " << hHitPos.
eta() <<
" " << hHitPos.
phi() <<
" " <<
et;
280 for (
unsigned int iH = 0; iH < mInfo.
crossedHcalIds.size() && !vetoHit; ++iH) {
301 std::vector<const HORecHit*>::const_iterator hoHitCI = mInfo.
hoRecHits.begin();
302 for (; hoHitCI != mInfo.
hoRecHits.end(); ++hoHitCI) {
303 const HORecHit* hoHitCPtr = *hoHitCI;
306 double cosTheta = 1. / cosh(hoHitPos.
eta());
313 bool vetoHit =
false;
316 LogDebug(
"RecoMuon|CaloExtractorByAssociator") <<
" >>> Veto HO hit: Calo deltaR2= " <<
deltaR2;
317 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
318 <<
" >>> Calo eta phi ethcal: " << hoHitPos.
eta() <<
" " << hoHitPos.
phi() <<
" " <<
et;
323 for (
unsigned int iH = 0; iH < mInfo.
crossedHOIds.size() && !vetoHit; ++iH) {
343 std::vector<const CaloTower*>::const_iterator calCI = mInfo.
towers.begin();
344 for (; calCI != mInfo.
towers.end(); ++calCI) {
351 double etecal = calCPtr->
emEt();
354 double ethcal = calCPtr->
hadEt();
357 double ethocal = calCPtr->
outerEt();
360 if ((!doEcal) && (!doHcal) && (!doHcal))
363 bool vetoTowerEcal =
false;
367 LogDebug(
"RecoMuon|CaloExtractorByAssociator") <<
" >>> Veto ecal tower: Calo deltaR= " << deltar2Ecal;
368 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
369 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
370 vetoTowerEcal =
true;
372 bool vetoTowerHcal =
false;
376 LogDebug(
"RecoMuon|CaloExtractorByAssociator") <<
" >>> Veto hcal tower: Calo deltaR= " << deltar2Hcal;
377 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
378 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
379 vetoTowerHcal =
true;
381 bool vetoTowerHOCal =
false;
385 LogDebug(
"RecoMuon|CaloExtractorByAssociator") <<
" >>> Veto HO tower: Calo deltaR= " << deltar2HOcal;
386 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
387 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
388 vetoTowerHOCal =
true;
392 if (!(vetoTowerHOCal && vetoTowerHcal && vetoTowerEcal)) {
395 vetoTowerEcal =
true;
396 vetoTowerHcal =
true;
397 vetoTowerHOCal =
true;
410 depEcal.addCandEnergy(etecal);
412 depEcal.addDeposit(towerDir, etecal);
429 std::vector<IsoDeposit> resultDeps;
430 resultDeps.push_back(depEcal);
431 resultDeps.push_back(depHcal);
432 resultDeps.push_back(depHOcal);
440 if (fabs(
eta) > 1.479)
bool compare(const P &i, const P &j)
math::XYZPoint trkGlobPosAtHO
T getParameter(std::string const &) const
constexpr const DetId & detid() const
double outerEnergy() const
std::vector< const CaloTower * > towers
void setVeto(const Veto &aVeto)
Set veto.
std::vector< DetId > crossedTowerIds
Geom::Phi< T > phi() const
bool recoveredRecHit(const DetId &myid, const uint32_t &myflag) const
std::vector< const EcalRecHit * > ecalRecHits
hits in the cone
std::vector< DetId > crossedEcalIds
std::vector< Track > TrackCollection
collection of Tracks
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
Log< level::Error, false > LogError
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
std::vector< DetId > crossedHcalIds
TrackAssociatorParameters
void addDeposit(double dr, double deposit)
Add deposit (ie. transverse energy or pT)
math::XYZPoint trkGlobPosAtHcal
const Item * getValues(DetId fId, bool throwOnFail=true) const
constexpr float energy() const
constexpr uint32_t flags() const
HcalDetId idFront(const HcalDetId &id) const
FreeTrajectoryState initialFreeState() const
void setPropagator(const Propagator *)
use a user configured propagator
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< const HBHERecHit * > hcalRecHits
void addCandEnergy(double et)
Set energy or pT attached to cand trajectory.
std::vector< DetId > crossedHOIds
uint32_t getValue() const
const Veto & veto() const
Get veto area.
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
constexpr HcalDetId id() const
get the id
reco::IsoDeposit IsoDeposit
constexpr uint32_t rawId() const
get the raw id
const DetId & detid() const
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
Log< level::Warning, false > LogWarning
std::vector< const HORecHit * > hoRecHits
double phi() const final
momentum azimuthal angle
CaloTowerDetId id() const
Power< A, B >::type pow(const A &a, const B &b)
double eta() const final
momentum pseudorapidity