CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
muonisolation::CaloExtractorByAssociator Class Reference

#include <CaloExtractorByAssociator.h>

Inheritance diagram for muonisolation::CaloExtractorByAssociator:
reco::isodeposit::IsoDepositExtractor

Public Member Functions

 CaloExtractorByAssociator ()
 constructors More...
 
 CaloExtractorByAssociator (const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
 
reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const override
 no-op: by design of this extractor the deposits are pulled out all at a time More...
 
std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const override
 return deposits for 3 calorimeter subdetectors (ecal, hcal, ho) – in this order More...
 
void fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks) override
 allows to set extra vetoes (in addition to the muon) – no-op at this point More...
 
 ~CaloExtractorByAssociator () override
 destructor More...
 
- Public Member Functions inherited from reco::isodeposit::IsoDepositExtractor
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &track) const
 
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::CandidateBaseRef &track) const
 make single IsoDeposit based on a CandidateBaseRef as input More...
 
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackBaseRef &track) const
 make single IsoDeposit based on trackRef as input More...
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &track) const
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::CandidateBaseRef &track) const
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackBaseRef &track) const
 
virtual void initEvent (const edm::Event &, const edm::EventSetup &)
 perform some constly initialization More...
 
virtual ~IsoDepositExtractor ()
 Destructor. More...
 

Private Member Functions

double noiseEcal (const CaloTower &tower) const
 Determine noise for HCAL and ECAL (take some defaults for the time being) More...
 
double noiseHcal (const CaloTower &tower) const
 
double noiseHOcal (const CaloTower &tower) const
 
double noiseRecHit (const DetId &detId) const
 

Private Attributes

TrackDetectorAssociatortheAssociator
 
TrackAssociatorParameterstheAssociatorParameters
 associator, its' parameters and the propagator More...
 
bool theCenterConeOnCalIntersection
 
std::vector< std::string > theDepositInstanceLabels
 multiple deposits: labels – expect 3 labels beginning with "e", "h", "ho" More...
 
std::string theDepositLabel
 Label of deposit – suggest to set to "" (all info is in collection name anyways) More...
 
double theDR_Max
 max cone size in which towers are considered More...
 
double theDR_Veto_E
 cone sizes inside which the Et (towers) are not counted More...
 
double theDR_Veto_H
 
double theDR_Veto_HO
 
double theNoise_EB
 
double theNoise_EE
 
double theNoise_HB
 
double theNoise_HE
 
double theNoise_HO
 
double theNoiseTow_EB
 
double theNoiseTow_EE
 
bool thePrintTimeReport
 flag to turn on/off printing of a time report More...
 
std::string thePropagatorName
 propagator name to feed into the track associator More...
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
double theThreshold_E
 
double theThreshold_H
 
double theThreshold_HO
 
bool theUseRecHitsFlag
 use towers or rec hits More...
 
std::vector< DetIdtheVetoCollection
 Vector of calo Ids to veto – not used. More...
 

Detailed Description

Definition at line 34 of file CaloExtractorByAssociator.h.

Constructor & Destructor Documentation

◆ CaloExtractorByAssociator() [1/2]

muonisolation::CaloExtractorByAssociator::CaloExtractorByAssociator ( )
inline

constructors

Definition at line 37 of file CaloExtractorByAssociator.h.

37 {};

◆ CaloExtractorByAssociator() [2/2]

CaloExtractorByAssociator::CaloExtractorByAssociator ( const edm::ParameterSet par,
edm::ConsumesCollector &&  iC 
)

Definition at line 36 of file CaloExtractorByAssociator.cc.

37  : theUseRecHitsFlag(par.getParameter<bool>("UseRecHitsFlag")),
38  theDepositLabel(par.getUntrackedParameter<string>("DepositLabel")),
39  theDepositInstanceLabels(par.getParameter<std::vector<std::string> >("DepositInstanceLabels")),
40  thePropagatorName(par.getParameter<std::string>("PropagatorName")),
41  theThreshold_E(par.getParameter<double>("Threshold_E")),
42  theThreshold_H(par.getParameter<double>("Threshold_H")),
43  theThreshold_HO(par.getParameter<double>("Threshold_HO")),
44  theDR_Veto_E(par.getParameter<double>("DR_Veto_E")),
45  theDR_Veto_H(par.getParameter<double>("DR_Veto_H")),
46  theDR_Veto_HO(par.getParameter<double>("DR_Veto_HO")),
47  theCenterConeOnCalIntersection(par.getParameter<bool>("CenterConeOnCalIntersection")),
48  theDR_Max(par.getParameter<double>("DR_Max")),
49  theNoise_EB(par.getParameter<double>("Noise_EB")),
50  theNoise_EE(par.getParameter<double>("Noise_EE")),
51  theNoise_HB(par.getParameter<double>("Noise_HB")),
52  theNoise_HE(par.getParameter<double>("Noise_HE")),
53  theNoise_HO(par.getParameter<double>("Noise_HO")),
54  theNoiseTow_EB(par.getParameter<double>("NoiseTow_EB")),
55  theNoiseTow_EE(par.getParameter<double>("NoiseTow_EE")),
56  theService(nullptr),
57  theAssociator(nullptr),
58  thePrintTimeReport(par.getUntrackedParameter<bool>("PrintTimeReport")) {
59  ParameterSet serviceParameters = par.getParameter<ParameterSet>("ServiceParameters");
60  theService = new MuonServiceProxy(serviceParameters, edm::ConsumesCollector(iC));
61 
62  //theAssociatorParameters = new TrackAssociatorParameters(par.getParameter<edm::ParameterSet>("TrackAssociatorParameters"), iC);
64  theAssociatorParameters->loadParameters(par.getParameter<edm::ParameterSet>("TrackAssociatorParameters"), iC);
66 }

References edm::ParameterSet::getParameter(), TrackAssociatorParameters::loadParameters(), MuonServiceProxy_cff::MuonServiceProxy, theAssociator, theAssociatorParameters, theService, and PDWG_EXOHSCP_cff::TrackAssociatorParameters.

◆ ~CaloExtractorByAssociator()

CaloExtractorByAssociator::~CaloExtractorByAssociator ( )
override

destructor

Definition at line 68 of file CaloExtractorByAssociator.cc.

68  {
71  if (theService)
72  delete theService;
73  if (theAssociator)
74  delete theAssociator;
75 }

References theAssociator, theAssociatorParameters, and theService.

Member Function Documentation

◆ deposit()

IsoDeposit CaloExtractorByAssociator::deposit ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::Track track 
) const
overridevirtual

no-op: by design of this extractor the deposits are pulled out all at a time

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 85 of file CaloExtractorByAssociator.cc.

87  {
88  IsoDeposit::Direction muonDir(muon.eta(), muon.phi());
89  IsoDeposit dep(muonDir);
90 
91  // LogWarning("CaloExtractorByAssociator")
92  // <<"single deposit is not an option here\n"
93  // <<"use ::deposits --> extract all and reweight as necessary";
94 
95  return dep;
96 }

◆ deposits()

std::vector< IsoDeposit > CaloExtractorByAssociator::deposits ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::Track track 
) const
overridevirtual

return deposits for 3 calorimeter subdetectors (ecal, hcal, ho) – in this order

Make separate deposits: for ECAL, HCAL, HO.

check configuration consistency could've been made at construction stage (fix later?)

this should be (eventually) set to the eta-phi of the crossing point of a straight line tangent to a muon at IP and the calorimeter

each deposit type veto is at the point of intersect with that detector

do things based on rec-hits here too much copy-pasting now (refactor later?)

first check if the hit is inside the veto cone by dR-alone

and now pitch those in the crossed list

first check if the hit is inside the veto cone by dR-alone

and now pitch those in the crossed list

first check if the hit is inside the veto cone by dR-alone

and now pitch those in the crossed list

use calo towers

first check if the tower is inside the veto cone by dR-alone

first check if the tower is inside the veto cone by dR-alone

first check if the tower is inside the veto cone by dR-alone

and now pitch those in the crossed list

add the Et of the tower to deposits if it's not a vetoed; put into muonEnergy otherwise

Reimplemented from reco::isodeposit::IsoDepositExtractor.

Definition at line 99 of file CaloExtractorByAssociator.cc.

101  {
102  theService->update(eventSetup);
104 
107  if (theDepositInstanceLabels.size() != 3) {
108  LogError("MuonIsolation") << "Configuration is inconsistent: Need 3 deposit instance labels";
109  }
110  if (!(theDepositInstanceLabels[0].compare(0, 1, std::string("e")) == 0) ||
111  !(theDepositInstanceLabels[1].compare(0, 1, std::string("h")) == 0) ||
112  !(theDepositInstanceLabels[2].compare(0, 2, std::string("ho")) == 0)) {
113  LogWarning("MuonIsolation")
114  << "Deposit instance labels do not look like (e*, h*, ho*):"
115  << "proceed at your own risk. The extractor interprets lab0=from ecal; lab1=from hcal; lab2=from ho";
116  }
117 
118  typedef IsoDeposit::Veto Veto;
121  IsoDeposit::Direction muonDir(muon.eta(), muon.phi());
122 
123  IsoDeposit depEcal(muonDir);
124  IsoDeposit depHcal(muonDir);
125  IsoDeposit depHOcal(muonDir);
126 
128  eventSetup.get<IdealMagneticFieldRecord>().get(bField);
129 
130  reco::TransientTrack tMuon(muon, &*bField);
131  FreeTrajectoryState iFTS = tMuon.initialFreeState();
133 
135  depEcal.setVeto(
137  depHcal.setVeto(
139  depHOcal.setVeto(
141 
143  reco::isodeposit::Direction dirTmp = depEcal.veto().vetoDir;
144  double dRtmp = depEcal.veto().dR;
145  depEcal = IsoDeposit(dirTmp);
146  depEcal.setVeto(Veto(dirTmp, dRtmp));
147 
148  dirTmp = depHcal.veto().vetoDir;
149  dRtmp = depHcal.veto().dR;
150  depHcal = IsoDeposit(dirTmp);
151  depHcal.setVeto(Veto(dirTmp, dRtmp));
152 
153  dirTmp = depHOcal.veto().vetoDir;
154  dRtmp = depHOcal.veto().dR;
155  depHOcal = IsoDeposit(dirTmp);
156  depHOcal.setVeto(Veto(dirTmp, dRtmp));
157  }
158 
159  if (theUseRecHitsFlag) {
163  eventSetup.get<CaloGeometryRecord>().get(caloGeom);
164 
165  //Ecal
166  std::vector<const EcalRecHit*>::const_iterator eHitCI = mInfo.ecalRecHits.begin();
167  for (; eHitCI != mInfo.ecalRecHits.end(); ++eHitCI) {
168  const EcalRecHit* eHitCPtr = *eHitCI;
169  GlobalPoint eHitPos = caloGeom->getPosition(eHitCPtr->detid());
170  double deltar0 = reco::deltaR(muon, eHitPos);
171  double cosTheta = 1. / cosh(eHitPos.eta());
172  double energy = eHitCPtr->energy();
173  double et = energy * cosTheta;
174  if (deltar0 > std::max(dRMax_CandDep, theDR_Max) ||
175  !(et > theThreshold_E && energy > 3 * noiseRecHit(eHitCPtr->detid())))
176  continue;
177 
178  bool vetoHit = false;
179  double deltar = reco::deltaR(mInfo.trkGlobPosAtEcal, eHitPos);
181  if (deltar < theDR_Veto_E) {
182  LogDebug("RecoMuon|CaloExtractorByAssociator") << " >>> Veto ECAL hit: Calo deltaR= " << deltar;
183  LogDebug("RecoMuon|CaloExtractorByAssociator")
184  << " >>> Calo eta phi ethcal: " << eHitPos.eta() << " " << eHitPos.phi() << " " << et;
185  vetoHit = true;
186  }
188  if (!vetoHit) {
189  for (unsigned int iH = 0; iH < mInfo.crossedEcalIds.size() && !vetoHit; ++iH) {
190  if (mInfo.crossedEcalIds[iH].rawId() == eHitCPtr->detid().rawId())
191  vetoHit = true;
192  }
193  }
194 
195  //check theDR_Max only here to keep vetoHits being added to the veto energy
196  if (deltar0 > theDR_Max && !vetoHit)
197  continue;
198 
199  if (vetoHit) {
200  depEcal.addCandEnergy(et);
201  } else {
202  depEcal.addDeposit(reco::isodeposit::Direction(eHitPos.eta(), eHitPos.phi()), et);
203  }
204  }
205 
206  //Hcal
207  std::vector<const HBHERecHit*>::const_iterator hHitCI = mInfo.hcalRecHits.begin();
208  for (; hHitCI != mInfo.hcalRecHits.end(); ++hHitCI) {
209  const HBHERecHit* hHitCPtr = *hHitCI;
210  GlobalPoint hHitPos = caloGeom->getPosition(hHitCPtr->detid());
211  double deltar0 = reco::deltaR(muon, hHitPos);
212  double cosTheta = 1. / cosh(hHitPos.eta());
213  double energy = hHitCPtr->energy();
214  double et = energy * cosTheta;
215  if (deltar0 > std::max(dRMax_CandDep, theDR_Max) ||
216  !(et > theThreshold_H && energy > 3 * noiseRecHit(hHitCPtr->detid())))
217  continue;
218 
219  bool vetoHit = false;
220  double deltar = reco::deltaR(mInfo.trkGlobPosAtHcal, hHitPos);
222  if (deltar < theDR_Veto_H) {
223  LogDebug("RecoMuon|CaloExtractorByAssociator") << " >>> Veto HBHE hit: Calo deltaR= " << deltar;
224  LogDebug("RecoMuon|CaloExtractorByAssociator")
225  << " >>> Calo eta phi ethcal: " << hHitPos.eta() << " " << hHitPos.phi() << " " << et;
226  vetoHit = true;
227  }
229  if (!vetoHit) {
230  for (unsigned int iH = 0; iH < mInfo.crossedHcalIds.size() && !vetoHit; ++iH) {
231  if (mInfo.crossedHcalIds[iH].rawId() == hHitCPtr->detid().rawId())
232  vetoHit = true;
233  }
234  }
235 
236  //check theDR_Max only here to keep vetoHits being added to the veto energy
237  if (deltar0 > theDR_Max && !vetoHit)
238  continue;
239 
240  if (vetoHit) {
241  depHcal.addCandEnergy(et);
242  } else {
243  depHcal.addDeposit(reco::isodeposit::Direction(hHitPos.eta(), hHitPos.phi()), et);
244  }
245  }
246 
247  //HOcal
248  std::vector<const HORecHit*>::const_iterator hoHitCI = mInfo.hoRecHits.begin();
249  for (; hoHitCI != mInfo.hoRecHits.end(); ++hoHitCI) {
250  const HORecHit* hoHitCPtr = *hoHitCI;
251  GlobalPoint hoHitPos = caloGeom->getPosition(hoHitCPtr->detid());
252  double deltar0 = reco::deltaR(muon, hoHitPos);
253  double cosTheta = 1. / cosh(hoHitPos.eta());
254  double energy = hoHitCPtr->energy();
255  double et = energy * cosTheta;
256  if (deltar0 > std::max(dRMax_CandDep, theDR_Max) ||
257  !(et > theThreshold_HO && energy > 3 * noiseRecHit(hoHitCPtr->detid())))
258  continue;
259 
260  bool vetoHit = false;
261  double deltar = reco::deltaR(mInfo.trkGlobPosAtHO, hoHitPos);
263  if (deltar < theDR_Veto_HO) {
264  LogDebug("RecoMuon|CaloExtractorByAssociator") << " >>> Veto HO hit: Calo deltaR= " << deltar;
265  LogDebug("RecoMuon|CaloExtractorByAssociator")
266  << " >>> Calo eta phi ethcal: " << hoHitPos.eta() << " " << hoHitPos.phi() << " " << et;
267  vetoHit = true;
268  }
270  if (!vetoHit) {
271  for (unsigned int iH = 0; iH < mInfo.crossedHOIds.size() && !vetoHit; ++iH) {
272  if (mInfo.crossedHOIds[iH].rawId() == hoHitCPtr->detid().rawId())
273  vetoHit = true;
274  }
275  }
276 
277  //check theDR_Max only here to keep vetoHits being added to the veto energy
278  if (deltar0 > theDR_Max && !vetoHit)
279  continue;
280 
281  if (vetoHit) {
282  depHOcal.addCandEnergy(et);
283  } else {
284  depHOcal.addDeposit(reco::isodeposit::Direction(hoHitPos.eta(), hoHitPos.phi()), et);
285  }
286  }
287 
288  } else {
290  std::vector<const CaloTower*>::const_iterator calCI = mInfo.towers.begin();
291  for (; calCI != mInfo.towers.end(); ++calCI) {
292  const CaloTower* calCPtr = *calCI;
293  double deltar0 = reco::deltaR(muon, *calCPtr);
294  if (deltar0 > std::max(dRMax_CandDep, theDR_Max))
295  continue;
296 
297  //even more copy-pasting .. need to refactor
298  double etecal = calCPtr->emEt();
299  double eecal = calCPtr->emEnergy();
300  bool doEcal = etecal > theThreshold_E && eecal > 3 * noiseEcal(*calCPtr);
301  double ethcal = calCPtr->hadEt();
302  double ehcal = calCPtr->hadEnergy();
303  bool doHcal = ethcal > theThreshold_H && ehcal > 3 * noiseHcal(*calCPtr);
304  double ethocal = calCPtr->outerEt();
305  double ehocal = calCPtr->outerEnergy();
306  bool doHOcal = ethocal > theThreshold_HO && ehocal > 3 * noiseHOcal(*calCPtr);
307  if ((!doEcal) && (!doHcal) && (!doHcal))
308  continue;
309 
310  bool vetoTowerEcal = false;
311  double deltarEcal = reco::deltaR(mInfo.trkGlobPosAtEcal, *calCPtr);
313  if (deltarEcal < theDR_Veto_E) {
314  LogDebug("RecoMuon|CaloExtractorByAssociator") << " >>> Veto ecal tower: Calo deltaR= " << deltarEcal;
315  LogDebug("RecoMuon|CaloExtractorByAssociator")
316  << " >>> Calo eta phi ethcal: " << calCPtr->eta() << " " << calCPtr->phi() << " " << ethcal;
317  vetoTowerEcal = true;
318  }
319  bool vetoTowerHcal = false;
320  double deltarHcal = reco::deltaR(mInfo.trkGlobPosAtHcal, *calCPtr);
322  if (deltarHcal < theDR_Veto_H) {
323  LogDebug("RecoMuon|CaloExtractorByAssociator") << " >>> Veto hcal tower: Calo deltaR= " << deltarHcal;
324  LogDebug("RecoMuon|CaloExtractorByAssociator")
325  << " >>> Calo eta phi ethcal: " << calCPtr->eta() << " " << calCPtr->phi() << " " << ethcal;
326  vetoTowerHcal = true;
327  }
328  bool vetoTowerHOCal = false;
329  double deltarHOcal = reco::deltaR(mInfo.trkGlobPosAtHO, *calCPtr);
331  if (deltarHOcal < theDR_Veto_HO) {
332  LogDebug("RecoMuon|CaloExtractorByAssociator") << " >>> Veto HO tower: Calo deltaR= " << deltarHOcal;
333  LogDebug("RecoMuon|CaloExtractorByAssociator")
334  << " >>> Calo eta phi ethcal: " << calCPtr->eta() << " " << calCPtr->phi() << " " << ethcal;
335  vetoTowerHOCal = true;
336  }
337 
339  if (!(vetoTowerHOCal && vetoTowerHcal && vetoTowerEcal)) {
340  for (unsigned int iH = 0; iH < mInfo.crossedTowerIds.size(); ++iH) {
341  if (mInfo.crossedTowerIds[iH].rawId() == calCPtr->id().rawId()) {
342  vetoTowerEcal = true;
343  vetoTowerHcal = true;
344  vetoTowerHOCal = true;
345  break;
346  }
347  }
348  }
349 
350  if (deltar0 > theDR_Max && !(vetoTowerEcal || vetoTowerHcal || vetoTowerHOCal))
351  continue;
352 
353  reco::isodeposit::Direction towerDir(calCPtr->eta(), calCPtr->phi());
355  if (doEcal) {
356  if (vetoTowerEcal)
357  depEcal.addCandEnergy(etecal);
358  else if (deltar0 <= theDR_Max)
359  depEcal.addDeposit(towerDir, etecal);
360  }
361  if (doHcal) {
362  if (vetoTowerHcal)
363  depHcal.addCandEnergy(ethcal);
364  else if (deltar0 <= theDR_Max)
365  depHcal.addDeposit(towerDir, ethcal);
366  }
367  if (doHOcal) {
368  if (vetoTowerHOCal)
369  depHOcal.addCandEnergy(ethocal);
370  else if (deltar0 <= theDR_Max)
371  depHOcal.addDeposit(towerDir, ethocal);
372  }
373  }
374  }
375 
376  std::vector<IsoDeposit> resultDeps;
377  resultDeps.push_back(depEcal);
378  resultDeps.push_back(depHcal);
379  resultDeps.push_back(depHOcal);
380 
381  return resultDeps;
382 }

References reco::IsoDeposit::addCandEnergy(), reco::IsoDeposit::addDeposit(), TrackDetectorAssociator::associate(), Calorimetry_cff::bField, compare(), TrackDetMatchInfo::crossedEcalIds, TrackDetMatchInfo::crossedHcalIds, TrackDetMatchInfo::crossedHOIds, TrackDetMatchInfo::crossedTowerIds, reco::deltaR(), CaloRecHit::detid(), EcalRecHit::detid(), reco::IsoDeposit::Veto::dR, TrackDetMatchInfo::ecalRecHits, CaloTower::emEnergy(), CaloTower::emEt(), HCALHighEnergyHPDFilter_cfi::energy, CaloRecHit::energy(), EcalRecHit::energy(), EgHLTOffHistBins_cfi::et, PV3DBase< T, PVType, FrameType >::eta(), reco::LeafCandidate::eta(), edm::EventSetup::get(), get, CaloGeometry::getPosition(), CaloTower::hadEnergy(), CaloTower::hadEt(), TrackDetMatchInfo::hcalRecHits, TrackDetMatchInfo::hoRecHits, CaloTower::id(), reco::TransientTrack::initialFreeState(), LogDebug, SiStripPI::max, noiseEcal(), noiseHcal(), noiseHOcal(), noiseRecHit(), CaloTower::outerEnergy(), CaloTower::outerEt(), PV3DBase< T, PVType, FrameType >::phi(), reco::LeafCandidate::phi(), DetId::rawId(), TrackDetectorAssociator::setPropagator(), reco::IsoDeposit::setVeto(), AlCaHLTBitMon_QueryRunRegistry::string, theAssociator, theAssociatorParameters, theCenterConeOnCalIntersection, theDepositInstanceLabels, theDR_Max, theDR_Veto_E, theDR_Veto_H, theDR_Veto_HO, thePropagatorName, theService, theThreshold_E, theThreshold_H, theThreshold_HO, theUseRecHitsFlag, TrackDetMatchInfo::towers, TrackDetMatchInfo::trkGlobPosAtEcal, TrackDetMatchInfo::trkGlobPosAtHcal, TrackDetMatchInfo::trkGlobPosAtHO, reco::IsoDeposit::veto(), and reco::IsoDeposit::Veto::vetoDir.

◆ fillVetos()

void CaloExtractorByAssociator::fillVetos ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::TrackCollection tracks 
)
overridevirtual

allows to set extra vetoes (in addition to the muon) – no-op at this point

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 77 of file CaloExtractorByAssociator.cc.

79  {
80  // LogWarning("CaloExtractorByAssociator")
81  // <<"fillVetos does nothing now: IsoDeposit provides enough functionality\n"
82  // <<"to remove a deposit at/around given (eta, phi)";
83 }

◆ noiseEcal()

double CaloExtractorByAssociator::noiseEcal ( const CaloTower tower) const
private

Determine noise for HCAL and ECAL (take some defaults for the time being)

Definition at line 384 of file CaloExtractorByAssociator.cc.

384  {
385  double noise = theNoiseTow_EB;
386  double eta = tower.eta();
387  if (fabs(eta) > 1.479)
389  return noise;
390 }

References PVValHelper::eta, hgcalDigitizer_cfi::noise, theNoiseTow_EB, theNoiseTow_EE, and hgcalTowerProducer_cfi::tower.

Referenced by deposits().

◆ noiseHcal()

double CaloExtractorByAssociator::noiseHcal ( const CaloTower tower) const
private

Definition at line 392 of file CaloExtractorByAssociator.cc.

392  {
393  double noise = fabs(tower.eta()) > 1.479 ? theNoise_HE : theNoise_HB;
394  return noise;
395 }

References hgcalDigitizer_cfi::noise, theNoise_HB, theNoise_HE, and hgcalTowerProducer_cfi::tower.

Referenced by deposits().

◆ noiseHOcal()

double CaloExtractorByAssociator::noiseHOcal ( const CaloTower tower) const
private

Definition at line 397 of file CaloExtractorByAssociator.cc.

397  {
398  double noise = theNoise_HO;
399  return noise;
400 }

References hgcalDigitizer_cfi::noise, and theNoise_HO.

Referenced by deposits().

◆ noiseRecHit()

double CaloExtractorByAssociator::noiseRecHit ( const DetId detId) const
private

Definition at line 402 of file CaloExtractorByAssociator.cc.

402  {
403  double noise = 100;
404  DetId::Detector det = detId.det();
405  if (det == DetId::Ecal) {
406  EcalSubdetector subDet = (EcalSubdetector)(detId.subdetId());
407  if (subDet == EcalBarrel) {
408  noise = theNoise_EB;
409  } else if (subDet == EcalEndcap) {
410  noise = theNoise_EE;
411  }
412  } else if (det == DetId::Hcal) {
413  HcalSubdetector subDet = (HcalSubdetector)(detId.subdetId());
414  if (subDet == HcalBarrel) {
415  noise = theNoise_HB;
416  } else if (subDet == HcalEndcap) {
417  noise = theNoise_HE;
418  } else if (subDet == HcalOuter) {
419  noise = theNoise_HO;
420  }
421  }
422  return noise;
423 }

References DetId::det(), DetId::Ecal, EcalBarrel, EcalEndcap, DetId::Hcal, HcalBarrel, HcalEndcap, HcalOuter, hgcalDigitizer_cfi::noise, DetId::subdetId(), theNoise_EB, theNoise_EE, theNoise_HB, theNoise_HE, and theNoise_HO.

Referenced by deposits().

Member Data Documentation

◆ theAssociator

TrackDetectorAssociator* muonisolation::CaloExtractorByAssociator::theAssociator
private

◆ theAssociatorParameters

TrackAssociatorParameters* muonisolation::CaloExtractorByAssociator::theAssociatorParameters
private

associator, its' parameters and the propagator

Definition at line 100 of file CaloExtractorByAssociator.h.

Referenced by CaloExtractorByAssociator(), deposits(), and ~CaloExtractorByAssociator().

◆ theCenterConeOnCalIntersection

bool muonisolation::CaloExtractorByAssociator::theCenterConeOnCalIntersection
private

centers the cone on the veto direction – makes more sense for very displaced tracks like in cosmics

Definition at line 79 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theDepositInstanceLabels

std::vector<std::string> muonisolation::CaloExtractorByAssociator::theDepositInstanceLabels
private

multiple deposits: labels – expect 3 labels beginning with "e", "h", "ho"

Definition at line 62 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theDepositLabel

std::string muonisolation::CaloExtractorByAssociator::theDepositLabel
private

Label of deposit – suggest to set to "" (all info is in collection name anyways)

Definition at line 59 of file CaloExtractorByAssociator.h.

◆ theDR_Max

double muonisolation::CaloExtractorByAssociator::theDR_Max
private

max cone size in which towers are considered

Definition at line 81 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theDR_Veto_E

double muonisolation::CaloExtractorByAssociator::theDR_Veto_E
private

cone sizes inside which the Et (towers) are not counted

Definition at line 74 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theDR_Veto_H

double muonisolation::CaloExtractorByAssociator::theDR_Veto_H
private

Definition at line 75 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theDR_Veto_HO

double muonisolation::CaloExtractorByAssociator::theDR_Veto_HO
private

Definition at line 76 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theNoise_EB

double muonisolation::CaloExtractorByAssociator::theNoise_EB
private

the noise "sigmas" for a hit or tower to be considered consider if Energy > 3.*sigma

Definition at line 85 of file CaloExtractorByAssociator.h.

Referenced by noiseRecHit().

◆ theNoise_EE

double muonisolation::CaloExtractorByAssociator::theNoise_EE
private

Definition at line 86 of file CaloExtractorByAssociator.h.

Referenced by noiseRecHit().

◆ theNoise_HB

double muonisolation::CaloExtractorByAssociator::theNoise_HB
private

Definition at line 87 of file CaloExtractorByAssociator.h.

Referenced by noiseHcal(), and noiseRecHit().

◆ theNoise_HE

double muonisolation::CaloExtractorByAssociator::theNoise_HE
private

Definition at line 88 of file CaloExtractorByAssociator.h.

Referenced by noiseHcal(), and noiseRecHit().

◆ theNoise_HO

double muonisolation::CaloExtractorByAssociator::theNoise_HO
private

Definition at line 89 of file CaloExtractorByAssociator.h.

Referenced by noiseHOcal(), and noiseRecHit().

◆ theNoiseTow_EB

double muonisolation::CaloExtractorByAssociator::theNoiseTow_EB
private

Definition at line 90 of file CaloExtractorByAssociator.h.

Referenced by noiseEcal().

◆ theNoiseTow_EE

double muonisolation::CaloExtractorByAssociator::theNoiseTow_EE
private

Definition at line 91 of file CaloExtractorByAssociator.h.

Referenced by noiseEcal().

◆ thePrintTimeReport

bool muonisolation::CaloExtractorByAssociator::thePrintTimeReport
private

flag to turn on/off printing of a time report

Definition at line 104 of file CaloExtractorByAssociator.h.

◆ thePropagatorName

std::string muonisolation::CaloExtractorByAssociator::thePropagatorName
private

propagator name to feed into the track associator

Definition at line 65 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theService

MuonServiceProxy* muonisolation::CaloExtractorByAssociator::theService
private

the event setup proxy, it takes care the services update

Definition at line 97 of file CaloExtractorByAssociator.h.

Referenced by CaloExtractorByAssociator(), deposits(), and ~CaloExtractorByAssociator().

◆ theThreshold_E

double muonisolation::CaloExtractorByAssociator::theThreshold_E
private

Cone cuts and thresholds min values of Et to be included in deposits

Definition at line 69 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theThreshold_H

double muonisolation::CaloExtractorByAssociator::theThreshold_H
private

Definition at line 70 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theThreshold_HO

double muonisolation::CaloExtractorByAssociator::theThreshold_HO
private

Definition at line 71 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theUseRecHitsFlag

bool muonisolation::CaloExtractorByAssociator::theUseRecHitsFlag
private

use towers or rec hits

Definition at line 56 of file CaloExtractorByAssociator.h.

Referenced by deposits().

◆ theVetoCollection

std::vector<DetId> muonisolation::CaloExtractorByAssociator::theVetoCollection
private

Vector of calo Ids to veto – not used.

Definition at line 94 of file CaloExtractorByAssociator.h.

muonisolation::CaloExtractorByAssociator::theNoiseTow_EB
double theNoiseTow_EB
Definition: CaloExtractorByAssociator.h:90
CaloTower::emEnergy
double emEnergy() const
Definition: CaloTower.h:134
EcalRecHit
Definition: EcalRecHit.h:15
muonisolation::CaloExtractorByAssociator::thePrintTimeReport
bool thePrintTimeReport
flag to turn on/off printing of a time report
Definition: CaloExtractorByAssociator.h:104
TrackDetMatchInfo::towers
std::vector< const CaloTower * > towers
Definition: TrackDetMatchInfo.h:57
CaloTower::outerEt
double outerEt() const
Definition: CaloTower.h:141
EcalRecHit::detid
const DetId & detid() const
Definition: EcalRecHit.h:72
CaloRecHit::energy
constexpr float energy() const
Definition: CaloRecHit.h:29
muonisolation::CaloExtractorByAssociator::theDR_Veto_E
double theDR_Veto_E
cone sizes inside which the Et (towers) are not counted
Definition: CaloExtractorByAssociator.h:74
muonisolation::CaloExtractorByAssociator::theThreshold_E
double theThreshold_E
Definition: CaloExtractorByAssociator.h:69
muonisolation::CaloExtractorByAssociator::theNoiseTow_EE
double theNoiseTow_EE
Definition: CaloExtractorByAssociator.h:91
muon
Definition: MuonCocktails.h:17
TrackDetMatchInfo::ecalRecHits
std::vector< const EcalRecHit * > ecalRecHits
hits in the cone
Definition: TrackDetMatchInfo.h:54
TrackDetMatchInfo::crossedEcalIds
std::vector< DetId > crossedEcalIds
Definition: TrackDetMatchInfo.h:67
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
HORecHit
Definition: HORecHit.h:11
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
HBHERecHit
Definition: HBHERecHit.h:13
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
DetId::Hcal
Definition: DetId.h:28
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:3
pat::IsoDeposit
reco::IsoDeposit IsoDeposit
Definition: Isolation.h:7
TrackDetMatchInfo::trkGlobPosAtHcal
math::XYZPoint trkGlobPosAtHcal
Definition: TrackDetMatchInfo.h:40
CaloTower::id
CaloTowerDetId id() const
Definition: CaloTower.h:127
CaloTower::outerEnergy
double outerEnergy() const
Definition: CaloTower.h:136
deltar
Definition: deltar.py:1
reco::IsoDeposit::Veto
Definition: IsoDeposit.h:59
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
muonisolation::CaloExtractorByAssociator::thePropagatorName
std::string thePropagatorName
propagator name to feed into the track associator
Definition: CaloExtractorByAssociator.h:65
muonisolation::CaloExtractorByAssociator::theService
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
Definition: CaloExtractorByAssociator.h:97
EcalSubdetector
EcalSubdetector
Definition: EcalSubdetector.h:10
EcalRecHit::energy
float energy() const
Definition: EcalRecHit.h:68
HcalBarrel
Definition: HcalAssistant.h:33
CaloRecHit::detid
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
muonisolation::CaloExtractorByAssociator::noiseEcal
double noiseEcal(const CaloTower &tower) const
Determine noise for HCAL and ECAL (take some defaults for the time being)
Definition: CaloExtractorByAssociator.cc:384
EcalBarrel
Definition: EcalSubdetector.h:10
TrackDetMatchInfo::crossedTowerIds
std::vector< DetId > crossedTowerIds
Definition: TrackDetMatchInfo.h:70
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:15
muonisolation::CaloExtractorByAssociator::theCenterConeOnCalIntersection
bool theCenterConeOnCalIntersection
Definition: CaloExtractorByAssociator.h:79
muonisolation::CaloExtractorByAssociator::theNoise_HB
double theNoise_HB
Definition: CaloExtractorByAssociator.h:87
muonisolation::CaloExtractorByAssociator::theNoise_HO
double theNoise_HO
Definition: CaloExtractorByAssociator.h:89
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
TrackDetMatchInfo::crossedHcalIds
std::vector< DetId > crossedHcalIds
Definition: TrackDetMatchInfo.h:68
muonisolation::CaloExtractorByAssociator::theDR_Veto_HO
double theDR_Veto_HO
Definition: CaloExtractorByAssociator.h:76
PDWG_EXOHSCP_cff.TrackAssociatorParameters
TrackAssociatorParameters
Definition: PDWG_EXOHSCP_cff.py:60
muonisolation::CaloExtractorByAssociator::theNoise_EE
double theNoise_EE
Definition: CaloExtractorByAssociator.h:86
muonisolation::CaloExtractorByAssociator::theUseRecHitsFlag
bool theUseRecHitsFlag
use towers or rec hits
Definition: CaloExtractorByAssociator.h:56
PVValHelper::eta
Definition: PVValidationHelpers.h:69
muonisolation::CaloExtractorByAssociator::theAssociator
TrackDetectorAssociator * theAssociator
Definition: CaloExtractorByAssociator.h:101
CaloTower::hadEnergy
double hadEnergy() const
Definition: CaloTower.h:135
edm::ESHandle< MagneticField >
HcalOuter
Definition: HcalAssistant.h:35
TrackDetMatchInfo::crossedHOIds
std::vector< DetId > crossedHOIds
Definition: TrackDetMatchInfo.h:69
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
muonisolation::CaloExtractorByAssociator::theNoise_HE
double theNoise_HE
Definition: CaloExtractorByAssociator.h:88
Point3DBase< float, GlobalTag >
TrackAssociatorParameters::loadParameters
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
Definition: TrackAssociatorParameters.cc:18
TrackDetectorAssociator::setPropagator
void setPropagator(const Propagator *)
use a user configured propagator
Definition: TrackDetectorAssociator.cc:115
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
edm::LogWarning
Definition: MessageLogger.h:141
muonisolation::CaloExtractorByAssociator::noiseHcal
double noiseHcal(const CaloTower &tower) const
Definition: CaloExtractorByAssociator.cc:392
muonisolation::CaloExtractorByAssociator::theDR_Veto_H
double theDR_Veto_H
Definition: CaloExtractorByAssociator.h:75
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
TrackDetMatchInfo::hcalRecHits
std::vector< const HBHERecHit * > hcalRecHits
Definition: TrackDetMatchInfo.h:55
muonisolation::CaloExtractorByAssociator::theNoise_EB
double theNoise_EB
Definition: CaloExtractorByAssociator.h:85
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
hgcalDigitizer_cfi.noise
noise
Definition: hgcalDigitizer_cfi.py:150
TrackDetectorAssociator
Definition: TrackDetectorAssociator.h:49
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
CaloTower
Definition: CaloTower.h:26
muonisolation::CaloExtractorByAssociator::theDepositLabel
std::string theDepositLabel
Label of deposit – suggest to set to "" (all info is in collection name anyways)
Definition: CaloExtractorByAssociator.h:59
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
DetId::Detector
Detector
Definition: DetId.h:24
muonisolation::CaloExtractorByAssociator::noiseRecHit
double noiseRecHit(const DetId &detId) const
Definition: CaloExtractorByAssociator.cc:402
muonisolation::CaloExtractorByAssociator::theDR_Max
double theDR_Max
max cone size in which towers are considered
Definition: CaloExtractorByAssociator.h:81
DetId::Ecal
Definition: DetId.h:27
get
#define get
TrackDetMatchInfo::trkGlobPosAtEcal
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
Definition: TrackDetMatchInfo.h:39
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
muonisolation::CaloExtractorByAssociator::theDepositInstanceLabels
std::vector< std::string > theDepositInstanceLabels
multiple deposits: labels – expect 3 labels beginning with "e", "h", "ho"
Definition: CaloExtractorByAssociator.h:62
TrackDetMatchInfo
Definition: TrackDetMatchInfo.h:14
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
reco::TransientTrack
Definition: TransientTrack.h:19
TrackDetMatchInfo::hoRecHits
std::vector< const HORecHit * > hoRecHits
Definition: TrackDetMatchInfo.h:56
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:292
CaloTower::hadEt
double hadEt() const
Definition: CaloTower.h:140
HcalEndcap
Definition: HcalAssistant.h:34
reco::isodeposit::Direction
Definition: IsoDepositDirection.h:19
muonisolation::CaloExtractorByAssociator::theThreshold_H
double theThreshold_H
Definition: CaloExtractorByAssociator.h:70
muonisolation::CaloExtractorByAssociator::theAssociatorParameters
TrackAssociatorParameters * theAssociatorParameters
associator, its' parameters and the propagator
Definition: CaloExtractorByAssociator.h:100
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
reco::IsoDeposit
Definition: IsoDeposit.h:49
CaloTower::emEt
double emEt() const
Definition: CaloTower.h:139
muonisolation::CaloExtractorByAssociator::theThreshold_HO
double theThreshold_HO
Definition: CaloExtractorByAssociator.h:71
TrackDetectorAssociator::associate
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
Definition: TrackDetectorAssociator.cc:154
TrackDetMatchInfo::trkGlobPosAtHO
math::XYZPoint trkGlobPosAtHO
Definition: TrackDetMatchInfo.h:41
muonisolation::CaloExtractorByAssociator::noiseHOcal
double noiseHOcal(const CaloTower &tower) const
Definition: CaloExtractorByAssociator.cc:397
event
Definition: event.py:1
compare
bool compare(const P &i, const P &j)
Definition: BDHadronTrackMonitoringAnalyzer.cc:203
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66