29 using namespace muonisolation;
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")),
58 thePrintTimeReport(par.getUntrackedParameter<bool>(
"PrintTimeReport"))
85 IsoDeposit::Direction muonDir(muon.
eta(), muon.
phi());
106 LogError(
"MuonIsolation")<<
"Configuration is inconsistent: Need 3 deposit instance labels";
111 LogWarning(
"MuonIsolation")<<
"Deposit instance labels do not look like (e*, h*, ho*):"
112 <<
"proceed at your own risk. The extractor interprets lab0=from ecal; lab1=from hcal; lab2=from ho";
115 typedef IsoDeposit::Veto Veto;
118 IsoDeposit::Direction muonDir(muon.
eta(), muon.
phi());
142 double dRtmp = depEcal.veto().dR;
143 depEcal =
IsoDeposit(dirTmp); depEcal.setVeto(Veto(dirTmp, dRtmp));
146 dRtmp = depHcal.
veto().
dR;
150 dRtmp = depHOcal.
veto().
dR;
161 std::vector<const EcalRecHit*>::const_iterator eHitCI = mInfo.
ecalRecHits.begin();
162 for (; eHitCI != mInfo.
ecalRecHits.end(); ++eHitCI){
166 double cosTheta = 1./cosh(eHitPos.
eta());
168 double et = energy*cosTheta;
172 bool vetoHit =
false;
176 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
177 <<
" >>> Veto ECAL hit: Calo deltaR= " << deltar;
178 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
179 <<
" >>> Calo eta phi ethcal: " << eHitPos.
eta() <<
" " << eHitPos.
phi() <<
" " << et;
184 for (
unsigned int iH = 0; iH< mInfo.
crossedEcalIds.size() && ! vetoHit; ++iH){
190 if (deltar0 >
theDR_Max && ! vetoHit)
continue;
193 depEcal.addCandEnergy(et);
200 std::vector<const HBHERecHit*>::const_iterator hHitCI = mInfo.
hcalRecHits.begin();
201 for (; hHitCI != mInfo.
hcalRecHits.end(); ++hHitCI){
205 double cosTheta = 1./cosh(hHitPos.
eta());
207 double et = energy*cosTheta;
211 bool vetoHit =
false;
215 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
216 <<
" >>> Veto HBHE hit: Calo deltaR= " << deltar;
217 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
218 <<
" >>> Calo eta phi ethcal: " << hHitPos.
eta() <<
" " << hHitPos.
phi() <<
" " << et;
223 for (
unsigned int iH = 0; iH< mInfo.
crossedHcalIds.size() && ! vetoHit; ++iH){
229 if (deltar0 >
theDR_Max && ! vetoHit)
continue;
239 std::vector<const HORecHit*>::const_iterator hoHitCI = mInfo.
hoRecHits.begin();
240 for (; hoHitCI != mInfo.
hoRecHits.end(); ++hoHitCI){
241 const HORecHit* hoHitCPtr = *hoHitCI;
244 double cosTheta = 1./cosh(hoHitPos.
eta());
246 double et = energy*cosTheta;
250 bool vetoHit =
false;
254 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
255 <<
" >>> Veto HO hit: Calo deltaR= " << deltar;
256 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
257 <<
" >>> Calo eta phi ethcal: " << hoHitPos.
eta() <<
" " << hoHitPos.
phi() <<
" " << et;
262 for (
unsigned int iH = 0; iH< mInfo.
crossedHOIds.size() && ! vetoHit; ++iH){
268 if (deltar0 >
theDR_Max && ! vetoHit)
continue;
280 std::vector<const CaloTower*>::const_iterator calCI = mInfo.
towers.begin();
281 for (; calCI != mInfo.
towers.end(); ++calCI){
287 double etecal = calCPtr->
emEt();
290 double ethcal = calCPtr->
hadEt();
293 double ethocal = calCPtr->
outerEt();
296 if ((!doEcal) && (!doHcal) && (!doHcal))
continue;
298 bool vetoTowerEcal =
false;
302 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
303 <<
" >>> Veto ecal tower: Calo deltaR= " << deltarEcal;
304 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
305 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
306 vetoTowerEcal =
true;
308 bool vetoTowerHcal =
false;
312 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
313 <<
" >>> Veto hcal tower: Calo deltaR= " << deltarHcal;
314 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
315 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
316 vetoTowerHcal =
true;
318 bool vetoTowerHOCal =
false;
322 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
323 <<
" >>> Veto HO tower: Calo deltaR= " << deltarHOcal;
324 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
325 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
326 vetoTowerHOCal =
true;
330 if (! (vetoTowerHOCal && vetoTowerHcal && vetoTowerEcal )){
333 vetoTowerEcal =
true;
334 vetoTowerHcal =
true;
335 vetoTowerHOCal =
true;
341 if (deltar0>
theDR_Max && !(vetoTowerEcal || vetoTowerHcal || vetoTowerHOCal))
continue;
346 if (vetoTowerEcal) depEcal.addCandEnergy(etecal);
347 else if (deltar0<=
theDR_Max) depEcal.addDeposit(towerDir, etecal);
360 std::vector<IsoDeposit> resultDeps;
361 resultDeps.push_back(depEcal);
362 resultDeps.push_back(depHcal);
363 resultDeps.push_back(depHOcal);
T getParameter(std::string const &) const
math::XYZPoint trkGlobPosAtHO
const Veto & veto() const
Get veto area.
std::vector< const CaloTower * > towers
void setVeto(const Veto &aVeto)
Set veto.
std::vector< DetId > crossedTowerIds
const DetId & detid() const
std::vector< const EcalRecHit * > ecalRecHits
hits in the cone
std::vector< DetId > crossedEcalIds
Geom::Phi< T > phi() const
const DetId & detid() const
std::vector< Track > TrackCollection
collection of Tracks
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
virtual double phi() const final
momentum azimuthal angle
double phi() const
azimuthal angle of momentum vector
std::vector< DetId > crossedHcalIds
void addDeposit(double dr, double deposit)
Add deposit (ie. transverse energy or pT)
math::XYZPoint trkGlobPosAtHcal
uint32_t rawId() const
get the raw id
double eta() const
pseudorapidity of momentum vector
void setPropagator(const Propagator *)
use a user configured propagator
std::vector< const HBHERecHit * > hcalRecHits
void addCandEnergy(double et)
Set energy or pT attached to cand trajectory.
std::vector< DetId > crossedHOIds
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
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
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
FreeTrajectoryState initialFreeState() const
CaloTowerDetId id() const
reco::IsoDeposit IsoDeposit
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
tuple TrackAssociatorParameters
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
virtual double eta() const final
momentum pseudorapidity
std::vector< const HORecHit * > hoRecHits
Detector det() const
get the detector field from this detid
double outerEnergy() const