CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
 no-op: by design of this extractor the deposits are pulled out all at a time More...
 
virtual std::vector
< reco::IsoDeposit
deposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
 return deposits for 3 calorimeter subdetectors (ecal, hcal, ho) – in this order More...
 
virtual void fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks)
 allows to set extra vetoes (in addition to the muon) – no-op at this point More...
 
virtual ~CaloExtractorByAssociator ()
 destructor More...
 
- Public Member Functions inherited from reco::isodeposit::IsoDepositExtractor
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 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 std::vector
< reco::IsoDeposit
deposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackBaseRef &track) const
 
virtual std::vector
< reco::IsoDeposit
deposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &track) const
 
virtual std::vector
< reco::IsoDeposit
deposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::CandidateBaseRef &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

muonisolation::CaloExtractorByAssociator::CaloExtractorByAssociator ( )
inline

constructors

Definition at line 39 of file CaloExtractorByAssociator.h.

39 {};
CaloExtractorByAssociator::CaloExtractorByAssociator ( const edm::ParameterSet par,
edm::ConsumesCollector &&  iC 
)

Definition at line 34 of file CaloExtractorByAssociator.cc.

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

34  :
35  theUseRecHitsFlag(par.getParameter<bool>("UseRecHitsFlag")),
36  theDepositLabel(par.getUntrackedParameter<string>("DepositLabel")),
37  theDepositInstanceLabels(par.getParameter<std::vector<std::string> >("DepositInstanceLabels")),
38  thePropagatorName(par.getParameter<std::string>("PropagatorName")),
39  theThreshold_E(par.getParameter<double>("Threshold_E")),
40  theThreshold_H(par.getParameter<double>("Threshold_H")),
41  theThreshold_HO(par.getParameter<double>("Threshold_HO")),
42  theDR_Veto_E(par.getParameter<double>("DR_Veto_E")),
43  theDR_Veto_H(par.getParameter<double>("DR_Veto_H")),
44  theDR_Veto_HO(par.getParameter<double>("DR_Veto_HO")),
45  theCenterConeOnCalIntersection(par.getParameter<bool>("CenterConeOnCalIntersection")),
46  theDR_Max(par.getParameter<double>("DR_Max")),
47  theNoise_EB(par.getParameter<double>("Noise_EB")),
48  theNoise_EE(par.getParameter<double>("Noise_EE")),
49  theNoise_HB(par.getParameter<double>("Noise_HB")),
50  theNoise_HE(par.getParameter<double>("Noise_HE")),
51  theNoise_HO(par.getParameter<double>("Noise_HO")),
52  theNoiseTow_EB(par.getParameter<double>("NoiseTow_EB")),
53  theNoiseTow_EE(par.getParameter<double>("NoiseTow_EE")),
54  theService(0),
55  theAssociator(0),
56  thePrintTimeReport(par.getUntrackedParameter<bool>("PrintTimeReport"))
57 {
58  ParameterSet serviceParameters = par.getParameter<ParameterSet>("ServiceParameters");
59  theService = new MuonServiceProxy(serviceParameters);
60 
61  //theAssociatorParameters = new TrackAssociatorParameters(par.getParameter<edm::ParameterSet>("TrackAssociatorParameters"), iC);
63  theAssociatorParameters->loadParameters(par.getParameter<edm::ParameterSet>("TrackAssociatorParameters"), iC);
65 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string thePropagatorName
propagator name to feed into the track associator
std::string theDepositLabel
Label of deposit – suggest to set to &quot;&quot; (all info is in collection name anyways)
double theDR_Max
max cone size in which towers are considered
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
std::vector< std::string > theDepositInstanceLabels
multiple deposits: labels – expect 3 labels beginning with &quot;e&quot;, &quot;h&quot;, &quot;ho&quot;
double theDR_Veto_E
cone sizes inside which the Et (towers) are not counted
TrackAssociatorParameters * theAssociatorParameters
associator, its&#39; parameters and the propagator
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
bool thePrintTimeReport
flag to turn on/off printing of a time report
CaloExtractorByAssociator::~CaloExtractorByAssociator ( )
virtual

destructor

Definition at line 67 of file CaloExtractorByAssociator.cc.

References theAssociator, theAssociatorParameters, and theService.

67  {
69  if (theService) delete theService;
70  if (theAssociator) delete theAssociator;
71 }
TrackAssociatorParameters * theAssociatorParameters
associator, its&#39; parameters and the propagator
MuonServiceProxy * theService
the event setup proxy, it takes care the services update

Member Function Documentation

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

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

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 81 of file CaloExtractorByAssociator.cc.

References reco::TrackBase::eta(), and reco::TrackBase::phi().

82 {
83  IsoDeposit::Direction muonDir(muon.eta(), muon.phi());
84  IsoDeposit dep(muonDir );
85 
86 // LogWarning("CaloExtractorByAssociator")
87 // <<"single deposit is not an option here\n"
88 // <<"use ::deposits --> extract all and reweight as necessary";
89 
90  return dep;
91 
92 }
std::vector< IsoDeposit > CaloExtractorByAssociator::deposits ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::Track track 
) const
virtual

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 96 of file CaloExtractorByAssociator.cc.

References reco::IsoDeposit::addCandEnergy(), reco::IsoDeposit::addDeposit(), TrackDetectorAssociator::associate(), ecalTB2006H4_GenSimDigiReco_cfg::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(), CaloRecHit::energy(), relval_parameters_module::energy, EcalRecHit::energy(), PV3DBase< T, PVType, FrameType >::eta(), reco::LeafCandidate::eta(), reco::TrackBase::eta(), edm::EventSetup::get(), CaloTower::hadEnergy(), CaloTower::hadEt(), TrackDetMatchInfo::hcalRecHits, TrackDetMatchInfo::hoRecHits, CaloTower::id(), reco::TransientTrack::initialFreeState(), LogDebug, noiseEcal(), noiseHcal(), noiseHOcal(), noiseRecHit(), CaloTower::outerEnergy(), CaloTower::outerEt(), PV3DBase< T, PVType, FrameType >::phi(), reco::LeafCandidate::phi(), reco::TrackBase::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.

97 {
98  theService->update(eventSetup);
100 
103  if (theDepositInstanceLabels.size() != 3){
104  LogError("MuonIsolation")<<"Configuration is inconsistent: Need 3 deposit instance labels";
105  }
106  if (! theDepositInstanceLabels[0].compare(0,1, std::string("e")) == 0
107  || ! theDepositInstanceLabels[1].compare(0,1, std::string("h")) == 0
108  || ! theDepositInstanceLabels[2].compare(0,2, std::string("ho")) == 0){
109  LogWarning("MuonIsolation")<<"Deposit instance labels do not look like (e*, h*, ho*):"
110  <<"proceed at your own risk. The extractor interprets lab0=from ecal; lab1=from hcal; lab2=from ho";
111  }
112 
113  typedef IsoDeposit::Veto Veto;
116  IsoDeposit::Direction muonDir(muon.eta(), muon.phi());
117 
118  IsoDeposit depEcal(muonDir);
119  IsoDeposit depHcal(muonDir);
120  IsoDeposit depHOcal(muonDir);
121 
123  eventSetup.get<IdealMagneticFieldRecord>().get(bField);
124 
125 
126  reco::TransientTrack tMuon(muon, &*bField);
127  FreeTrajectoryState iFTS = tMuon.initialFreeState();
129 
131  depEcal.setVeto(Veto(reco::isodeposit::Direction(mInfo.trkGlobPosAtEcal.eta(), mInfo.trkGlobPosAtEcal.phi()),
132  theDR_Veto_E));
133  depHcal.setVeto(Veto(reco::isodeposit::Direction(mInfo.trkGlobPosAtHcal.eta(), mInfo.trkGlobPosAtHcal.phi()),
134  theDR_Veto_H));
135  depHOcal.setVeto(Veto(reco::isodeposit::Direction(mInfo.trkGlobPosAtHO.eta(), mInfo.trkGlobPosAtHO.phi()),
136  theDR_Veto_HO));
137 
139  reco::isodeposit::Direction dirTmp = depEcal.veto().vetoDir;
140  double dRtmp = depEcal.veto().dR;
141  depEcal = IsoDeposit(dirTmp); depEcal.setVeto(Veto(dirTmp, dRtmp));
142 
143  dirTmp = depHcal.veto().vetoDir;
144  dRtmp = depHcal.veto().dR;
145  depHcal = IsoDeposit(dirTmp); depHcal.setVeto(Veto(dirTmp, dRtmp));
146 
147  dirTmp = depHOcal.veto().vetoDir;
148  dRtmp = depHOcal.veto().dR;
149  depHOcal = IsoDeposit(dirTmp); depHOcal.setVeto(Veto(dirTmp, dRtmp));
150  }
151 
152  if (theUseRecHitsFlag){
156  eventSetup.get<CaloGeometryRecord>().get(caloGeom);
157 
158  //Ecal
159  std::vector<const EcalRecHit*>::const_iterator eHitCI = mInfo.ecalRecHits.begin();
160  for (; eHitCI != mInfo.ecalRecHits.end(); ++eHitCI){
161  const EcalRecHit* eHitCPtr = *eHitCI;
162  GlobalPoint eHitPos = caloGeom->getPosition(eHitCPtr->detid());
163  double deltar0 = reco::deltaR(muon, eHitPos);
164  double cosTheta = 1./cosh(eHitPos.eta());
165  double energy = eHitCPtr->energy();
166  double et = energy*cosTheta;
167  if (deltar0 > theDR_Max
168  || ! (et > theThreshold_E && energy > 3*noiseRecHit(eHitCPtr->detid()))) continue;
169 
170  bool vetoHit = false;
171  double deltar = reco::deltaR(mInfo.trkGlobPosAtEcal, eHitPos);
173  if (deltar < theDR_Veto_E ){
174  LogDebug("RecoMuon|CaloExtractorByAssociator")
175  << " >>> Veto ECAL hit: Calo deltaR= " << deltar;
176  LogDebug("RecoMuon|CaloExtractorByAssociator")
177  << " >>> Calo eta phi ethcal: " << eHitPos.eta() << " " << eHitPos.phi() << " " << et;
178  vetoHit = true;
179  }
181  if (! vetoHit){
182  for (unsigned int iH = 0; iH< mInfo.crossedEcalIds.size() && ! vetoHit; ++iH){
183  if (mInfo.crossedEcalIds[iH].rawId() == eHitCPtr->detid().rawId()) vetoHit = true;
184  }
185  }
186 
187  if (vetoHit ){
188  depEcal.addCandEnergy(et);
189  } else {
190  depEcal.addDeposit(reco::isodeposit::Direction(eHitPos.eta(), eHitPos.phi()), et);
191  }
192  }
193 
194  //Hcal
195  std::vector<const HBHERecHit*>::const_iterator hHitCI = mInfo.hcalRecHits.begin();
196  for (; hHitCI != mInfo.hcalRecHits.end(); ++hHitCI){
197  const HBHERecHit* hHitCPtr = *hHitCI;
198  GlobalPoint hHitPos = caloGeom->getPosition(hHitCPtr->detid());
199  double deltar0 = reco::deltaR(muon, hHitPos);
200  double cosTheta = 1./cosh(hHitPos.eta());
201  double energy = hHitCPtr->energy();
202  double et = energy*cosTheta;
203  if (deltar0 > theDR_Max
204  || ! (et > theThreshold_H && energy > 3*noiseRecHit(hHitCPtr->detid()))) continue;
205 
206  bool vetoHit = false;
207  double deltar = reco::deltaR(mInfo.trkGlobPosAtHcal, hHitPos);
209  if (deltar < theDR_Veto_H ){
210  LogDebug("RecoMuon|CaloExtractorByAssociator")
211  << " >>> Veto HBHE hit: Calo deltaR= " << deltar;
212  LogDebug("RecoMuon|CaloExtractorByAssociator")
213  << " >>> Calo eta phi ethcal: " << hHitPos.eta() << " " << hHitPos.phi() << " " << et;
214  vetoHit = true;
215  }
217  if (! vetoHit){
218  for (unsigned int iH = 0; iH< mInfo.crossedHcalIds.size() && ! vetoHit; ++iH){
219  if (mInfo.crossedHcalIds[iH].rawId() == hHitCPtr->detid().rawId()) vetoHit = true;
220  }
221  }
222 
223  if (vetoHit ){
224  depHcal.addCandEnergy(et);
225  } else {
226  depHcal.addDeposit(reco::isodeposit::Direction(hHitPos.eta(), hHitPos.phi()), et);
227  }
228  }
229 
230  //HOcal
231  std::vector<const HORecHit*>::const_iterator hoHitCI = mInfo.hoRecHits.begin();
232  for (; hoHitCI != mInfo.hoRecHits.end(); ++hoHitCI){
233  const HORecHit* hoHitCPtr = *hoHitCI;
234  GlobalPoint hoHitPos = caloGeom->getPosition(hoHitCPtr->detid());
235  double deltar0 = reco::deltaR(muon, hoHitPos);
236  double cosTheta = 1./cosh(hoHitPos.eta());
237  double energy = hoHitCPtr->energy();
238  double et = energy*cosTheta;
239  if (deltar0 > theDR_Max
240  || ! (et > theThreshold_HO && energy > 3*noiseRecHit(hoHitCPtr->detid()))) continue;
241 
242  bool vetoHit = false;
243  double deltar = reco::deltaR(mInfo.trkGlobPosAtHO, hoHitPos);
245  if (deltar < theDR_Veto_HO ){
246  LogDebug("RecoMuon|CaloExtractorByAssociator")
247  << " >>> Veto HO hit: Calo deltaR= " << deltar;
248  LogDebug("RecoMuon|CaloExtractorByAssociator")
249  << " >>> Calo eta phi ethcal: " << hoHitPos.eta() << " " << hoHitPos.phi() << " " << et;
250  vetoHit = true;
251  }
253  if (! vetoHit){
254  for (unsigned int iH = 0; iH< mInfo.crossedHOIds.size() && ! vetoHit; ++iH){
255  if (mInfo.crossedHOIds[iH].rawId() == hoHitCPtr->detid().rawId()) vetoHit = true;
256  }
257  }
258 
259  if (vetoHit ){
260  depHOcal.addCandEnergy(et);
261  } else {
262  depHOcal.addDeposit(reco::isodeposit::Direction(hoHitPos.eta(), hoHitPos.phi()), et);
263  }
264  }
265 
266 
267  } else {
269  std::vector<const CaloTower*>::const_iterator calCI = mInfo.towers.begin();
270  for (; calCI != mInfo.towers.end(); ++calCI){
271  const CaloTower* calCPtr = *calCI;
272  double deltar0 = reco::deltaR(muon,*calCPtr);
273  if (deltar0>theDR_Max) continue;
274 
275  //even more copy-pasting .. need to refactor
276  double etecal = calCPtr->emEt();
277  double eecal = calCPtr->emEnergy();
278  bool doEcal = etecal>theThreshold_E && eecal>3*noiseEcal(*calCPtr);
279  double ethcal = calCPtr->hadEt();
280  double ehcal = calCPtr->hadEnergy();
281  bool doHcal = ethcal>theThreshold_H && ehcal>3*noiseHcal(*calCPtr);
282  double ethocal = calCPtr->outerEt();
283  double ehocal = calCPtr->outerEnergy();
284  bool doHOcal = ethocal>theThreshold_HO && ehocal>3*noiseHOcal(*calCPtr);
285  if ((!doEcal) && (!doHcal) && (!doHcal)) continue;
286 
287  bool vetoTowerEcal = false;
288  double deltarEcal = reco::deltaR(mInfo.trkGlobPosAtEcal, *calCPtr);
290  if (deltarEcal < theDR_Veto_E ){
291  LogDebug("RecoMuon|CaloExtractorByAssociator")
292  << " >>> Veto ecal tower: Calo deltaR= " << deltarEcal;
293  LogDebug("RecoMuon|CaloExtractorByAssociator")
294  << " >>> Calo eta phi ethcal: " << calCPtr->eta() << " " << calCPtr->phi() << " " << ethcal;
295  vetoTowerEcal = true;
296  }
297  bool vetoTowerHcal = false;
298  double deltarHcal = reco::deltaR(mInfo.trkGlobPosAtHcal, *calCPtr);
300  if (deltarHcal < theDR_Veto_H ){
301  LogDebug("RecoMuon|CaloExtractorByAssociator")
302  << " >>> Veto hcal tower: Calo deltaR= " << deltarHcal;
303  LogDebug("RecoMuon|CaloExtractorByAssociator")
304  << " >>> Calo eta phi ethcal: " << calCPtr->eta() << " " << calCPtr->phi() << " " << ethcal;
305  vetoTowerHcal = true;
306  }
307  bool vetoTowerHOCal = false;
308  double deltarHOcal = reco::deltaR(mInfo.trkGlobPosAtHO, *calCPtr);
310  if (deltarHOcal < theDR_Veto_HO ){
311  LogDebug("RecoMuon|CaloExtractorByAssociator")
312  << " >>> Veto HO tower: Calo deltaR= " << deltarHOcal;
313  LogDebug("RecoMuon|CaloExtractorByAssociator")
314  << " >>> Calo eta phi ethcal: " << calCPtr->eta() << " " << calCPtr->phi() << " " << ethcal;
315  vetoTowerHOCal = true;
316  }
317 
319  if (! (vetoTowerHOCal && vetoTowerHcal && vetoTowerEcal )){
320  for (unsigned int iH = 0; iH< mInfo.crossedTowerIds.size(); ++iH){
321  if (mInfo.crossedTowerIds[iH].rawId() == calCPtr->id().rawId()){
322  vetoTowerEcal = true;
323  vetoTowerHcal = true;
324  vetoTowerHOCal = true;
325  break;
326  }
327  }
328  }
329 
330  reco::isodeposit::Direction towerDir(calCPtr->eta(), calCPtr->phi());
332  if (doEcal){
333  if (vetoTowerEcal) depEcal.addCandEnergy(etecal);
334  else depEcal.addDeposit(towerDir, etecal);
335  }
336  if (doHcal){
337  if (vetoTowerHcal) depHcal.addCandEnergy(ethcal);
338  else depHcal.addDeposit(towerDir, ethcal);
339  }
340  if (doHOcal){
341  if (vetoTowerHOCal) depHOcal.addCandEnergy(ethocal);
342  else depHOcal.addDeposit(towerDir, ethocal);
343  }
344  }
345  }
346 
347  std::vector<IsoDeposit> resultDeps;
348  resultDeps.push_back(depEcal);
349  resultDeps.push_back(depHcal);
350  resultDeps.push_back(depHOcal);
351 
352  return resultDeps;
353 
354 }
#define LogDebug(id)
math::XYZPoint trkGlobPosAtHO
std::vector< const CaloTower * > towers
std::vector< DetId > crossedTowerIds
std::string thePropagatorName
propagator name to feed into the track associator
const DetId & detid() const
Definition: CaloRecHit.h:20
double hadEt() const
Definition: CaloTower.h:113
std::vector< const EcalRecHit * > ecalRecHits
hits in the cone
std::vector< DetId > crossedEcalIds
double theDR_Max
max cone size in which towers are considered
double outerEt() const
Definition: CaloTower.h:114
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const DetId & detid() const
Definition: EcalRecHit.h:71
virtual double phi() const final
momentum azimuthal angle
double noiseHOcal(const CaloTower &tower) const
std::vector< std::string > theDepositInstanceLabels
multiple deposits: labels – expect 3 labels beginning with &quot;e&quot;, &quot;h&quot;, &quot;ho&quot;
double noiseHcal(const CaloTower &tower) const
double theDR_Veto_E
cone sizes inside which the Et (towers) are not counted
TrackAssociatorParameters * theAssociatorParameters
associator, its&#39; parameters and the propagator
std::vector< DetId > crossedHcalIds
math::XYZPoint trkGlobPosAtHcal
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
double noiseEcal(const CaloTower &tower) const
Determine noise for HCAL and ECAL (take some defaults for the time being)
double emEnergy() const
Definition: CaloTower.h:107
void setPropagator(const Propagator *)
use a user configured propagator
float energy() const
Definition: CaloRecHit.h:17
std::vector< const HBHERecHit * > hcalRecHits
std::vector< DetId > crossedHOIds
float energy() const
Definition: EcalRecHit.h:68
void compare(std::vector< std::string > const &old_files, std::string const &old_process, std::vector< std::string > const &new_files, std::string const &new_process, unsigned int max_events, bool ignore_prescales, int verbose, int quiet)
Definition: hltDiff.cc:497
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
double noiseRecHit(const DetId &detId) const
double hadEnergy() const
Definition: CaloTower.h:108
CaloTowerDetId id() const
Definition: CaloTower.h:100
reco::IsoDeposit IsoDeposit
Definition: Isolation.h:7
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
T eta() const
Definition: PV3DBase.h:76
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
virtual double eta() const final
momentum pseudorapidity
std::vector< const HORecHit * > hoRecHits
double emEt() const
Definition: CaloTower.h:112
double outerEnergy() const
Definition: CaloTower.h:109
void CaloExtractorByAssociator::fillVetos ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::TrackCollection tracks 
)
virtual

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

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 73 of file CaloExtractorByAssociator.cc.

74 {
75 // LogWarning("CaloExtractorByAssociator")
76 // <<"fillVetos does nothing now: IsoDeposit provides enough functionality\n"
77 // <<"to remove a deposit at/around given (eta, phi)";
78 
79 }
double CaloExtractorByAssociator::noiseEcal ( const CaloTower tower) const
private

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

Definition at line 356 of file CaloExtractorByAssociator.cc.

References eta, reco::LeafCandidate::eta(), HLT_25ns10e33_v2_cff::noise, theNoiseTow_EB, and theNoiseTow_EE.

Referenced by deposits().

356  {
357  double noise = theNoiseTow_EB;
358  double eta = tower.eta();
359  if (fabs(eta)>1.479) noise = theNoiseTow_EE;
360  return noise;
361 }
virtual double eta() const final
momentum pseudorapidity
double CaloExtractorByAssociator::noiseHcal ( const CaloTower tower) const
private

Definition at line 363 of file CaloExtractorByAssociator.cc.

References reco::LeafCandidate::eta(), HLT_25ns10e33_v2_cff::noise, theNoise_HB, and theNoise_HE.

Referenced by deposits().

363  {
364  double noise = fabs(tower.eta())> 1.479 ? theNoise_HE : theNoise_HB;
365  return noise;
366 }
virtual double eta() const final
momentum pseudorapidity
double CaloExtractorByAssociator::noiseHOcal ( const CaloTower tower) const
private

Definition at line 368 of file CaloExtractorByAssociator.cc.

References HLT_25ns10e33_v2_cff::noise, and theNoise_HO.

Referenced by deposits().

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

Definition at line 374 of file CaloExtractorByAssociator.cc.

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

Referenced by deposits().

374  {
375  double noise = 100;
376  DetId::Detector det = detId.det();
377  if (det == DetId::Ecal){
378  EcalSubdetector subDet = (EcalSubdetector)(detId.subdetId());
379  if (subDet == EcalBarrel){
380  noise = theNoise_EB;
381  } else if (subDet == EcalEndcap){
382  noise = theNoise_EE;
383  }
384  } else if (det == DetId::Hcal){
385  HcalSubdetector subDet = (HcalSubdetector)(detId.subdetId());
386  if (subDet == HcalBarrel){
387  noise = theNoise_HB;
388  } else if (subDet == HcalEndcap){
389  noise = theNoise_HE;
390  } else if (subDet == HcalOuter){
391  noise = theNoise_HO;
392  }
393  }
394  return noise;
395 }
HcalSubdetector
Definition: HcalAssistant.h:31
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Detector
Definition: DetId.h:24
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
EcalSubdetector

Member Data Documentation

TrackDetectorAssociator* muonisolation::CaloExtractorByAssociator::theAssociator
private
TrackAssociatorParameters* muonisolation::CaloExtractorByAssociator::theAssociatorParameters
private

associator, its' parameters and the propagator

Definition at line 102 of file CaloExtractorByAssociator.h.

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

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 80 of file CaloExtractorByAssociator.h.

Referenced by deposits().

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

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

Definition at line 63 of file CaloExtractorByAssociator.h.

Referenced by deposits().

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

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

Definition at line 60 of file CaloExtractorByAssociator.h.

double muonisolation::CaloExtractorByAssociator::theDR_Max
private

max cone size in which towers are considered

Definition at line 82 of file CaloExtractorByAssociator.h.

Referenced by deposits().

double muonisolation::CaloExtractorByAssociator::theDR_Veto_E
private

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

Definition at line 75 of file CaloExtractorByAssociator.h.

Referenced by deposits().

double muonisolation::CaloExtractorByAssociator::theDR_Veto_H
private

Definition at line 76 of file CaloExtractorByAssociator.h.

Referenced by deposits().

double muonisolation::CaloExtractorByAssociator::theDR_Veto_HO
private

Definition at line 77 of file CaloExtractorByAssociator.h.

Referenced by deposits().

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 86 of file CaloExtractorByAssociator.h.

Referenced by noiseRecHit().

double muonisolation::CaloExtractorByAssociator::theNoise_EE
private

Definition at line 87 of file CaloExtractorByAssociator.h.

Referenced by noiseRecHit().

double muonisolation::CaloExtractorByAssociator::theNoise_HB
private

Definition at line 88 of file CaloExtractorByAssociator.h.

Referenced by noiseHcal(), and noiseRecHit().

double muonisolation::CaloExtractorByAssociator::theNoise_HE
private

Definition at line 89 of file CaloExtractorByAssociator.h.

Referenced by noiseHcal(), and noiseRecHit().

double muonisolation::CaloExtractorByAssociator::theNoise_HO
private

Definition at line 90 of file CaloExtractorByAssociator.h.

Referenced by noiseHOcal(), and noiseRecHit().

double muonisolation::CaloExtractorByAssociator::theNoiseTow_EB
private

Definition at line 91 of file CaloExtractorByAssociator.h.

Referenced by noiseEcal().

double muonisolation::CaloExtractorByAssociator::theNoiseTow_EE
private

Definition at line 92 of file CaloExtractorByAssociator.h.

Referenced by noiseEcal().

bool muonisolation::CaloExtractorByAssociator::thePrintTimeReport
private

flag to turn on/off printing of a time report

Definition at line 106 of file CaloExtractorByAssociator.h.

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

propagator name to feed into the track associator

Definition at line 66 of file CaloExtractorByAssociator.h.

Referenced by deposits().

MuonServiceProxy* muonisolation::CaloExtractorByAssociator::theService
private

the event setup proxy, it takes care the services update

Definition at line 98 of file CaloExtractorByAssociator.h.

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

double muonisolation::CaloExtractorByAssociator::theThreshold_E
private

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

Definition at line 70 of file CaloExtractorByAssociator.h.

Referenced by deposits().

double muonisolation::CaloExtractorByAssociator::theThreshold_H
private

Definition at line 71 of file CaloExtractorByAssociator.h.

Referenced by deposits().

double muonisolation::CaloExtractorByAssociator::theThreshold_HO
private

Definition at line 72 of file CaloExtractorByAssociator.h.

Referenced by deposits().

bool muonisolation::CaloExtractorByAssociator::theUseRecHitsFlag
private

use towers or rec hits

Definition at line 57 of file CaloExtractorByAssociator.h.

Referenced by deposits().

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

Vector of calo Ids to veto – not used.

Definition at line 95 of file CaloExtractorByAssociator.h.