32 using namespace muonisolation;
36 theUseRecHitsFlag(par.getParameter<bool>(
"UseRecHitsFlag")),
37 theDepositLabel(par.getUntrackedParameter<
string>(
"DepositLabel")),
38 theDepositInstanceLabels(par.getParameter<std::vector<std::
string> >(
"DepositInstanceLabels")),
39 thePropagatorName(par.getParameter<std::
string>(
"PropagatorName")),
40 theThreshold_E(par.getParameter<double>(
"Threshold_E")),
41 theThreshold_H(par.getParameter<double>(
"Threshold_H")),
42 theThreshold_HO(par.getParameter<double>(
"Threshold_HO")),
43 theDR_Veto_E(par.getParameter<double>(
"DR_Veto_E")),
44 theDR_Veto_H(par.getParameter<double>(
"DR_Veto_H")),
45 theDR_Veto_HO(par.getParameter<double>(
"DR_Veto_HO")),
46 theCenterConeOnCalIntersection(par.getParameter<bool>(
"CenterConeOnCalIntersection")),
47 theDR_Max(par.getParameter<double>(
"DR_Max")),
48 theNoise_EB(par.getParameter<double>(
"Noise_EB")),
49 theNoise_EE(par.getParameter<double>(
"Noise_EE")),
50 theNoise_HB(par.getParameter<double>(
"Noise_HB")),
51 theNoise_HE(par.getParameter<double>(
"Noise_HE")),
52 theNoise_HO(par.getParameter<double>(
"Noise_HO")),
53 theNoiseTow_EB(par.getParameter<double>(
"NoiseTow_EB")),
54 theNoiseTow_EE(par.getParameter<double>(
"NoiseTow_EE")),
57 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 depEcal.addCandEnergy(et);
197 std::vector<const HBHERecHit*>::const_iterator hHitCI = mInfo.
hcalRecHits.begin();
198 for (; hHitCI != mInfo.
hcalRecHits.end(); ++hHitCI){
202 double cosTheta = 1./cosh(hHitPos.
eta());
204 double et = energy*cosTheta;
208 bool vetoHit =
false;
212 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
213 <<
" >>> Veto HBHE hit: Calo deltaR= " << deltar;
214 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
215 <<
" >>> Calo eta phi ethcal: " << hHitPos.
eta() <<
" " << hHitPos.
phi() <<
" " << et;
220 for (
unsigned int iH = 0; iH< mInfo.
crossedHcalIds.size() && ! vetoHit; ++iH){
233 std::vector<const HORecHit*>::const_iterator hoHitCI = mInfo.
hoRecHits.begin();
234 for (; hoHitCI != mInfo.
hoRecHits.end(); ++hoHitCI){
235 const HORecHit* hoHitCPtr = *hoHitCI;
238 double cosTheta = 1./cosh(hoHitPos.
eta());
240 double et = energy*cosTheta;
244 bool vetoHit =
false;
248 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
249 <<
" >>> Veto HO hit: Calo deltaR= " << deltar;
250 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
251 <<
" >>> Calo eta phi ethcal: " << hoHitPos.
eta() <<
" " << hoHitPos.
phi() <<
" " << et;
256 for (
unsigned int iH = 0; iH< mInfo.
crossedHOIds.size() && ! vetoHit; ++iH){
271 std::vector<const CaloTower*>::const_iterator calCI = mInfo.
towers.begin();
272 for (; calCI != mInfo.
towers.end(); ++calCI){
278 double etecal = calCPtr->
emEt();
281 double ethcal = calCPtr->
hadEt();
284 double ethocal = calCPtr->
outerEt();
287 if ((!doEcal) && (!doHcal) && (!doHcal))
continue;
289 bool vetoTowerEcal =
false;
293 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
294 <<
" >>> Veto ecal tower: Calo deltaR= " << deltarEcal;
295 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
296 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
297 vetoTowerEcal =
true;
299 bool vetoTowerHcal =
false;
303 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
304 <<
" >>> Veto hcal tower: Calo deltaR= " << deltarHcal;
305 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
306 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
307 vetoTowerHcal =
true;
309 bool vetoTowerHOCal =
false;
313 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
314 <<
" >>> Veto HO tower: Calo deltaR= " << deltarHOcal;
315 LogDebug(
"RecoMuon|CaloExtractorByAssociator")
316 <<
" >>> Calo eta phi ethcal: " << calCPtr->
eta() <<
" " << calCPtr->
phi() <<
" " << ethcal;
317 vetoTowerHOCal =
true;
321 if (! (vetoTowerHOCal && vetoTowerHcal && vetoTowerEcal )){
324 vetoTowerEcal =
true;
325 vetoTowerHcal =
true;
326 vetoTowerHOCal =
true;
335 if (vetoTowerEcal) depEcal.addCandEnergy(etecal);
336 else depEcal.addDeposit(towerDir, etecal);
349 std::vector<IsoDeposit> resultDeps;
350 resultDeps.push_back(depEcal);
351 resultDeps.push_back(depHcal);
352 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
virtual float phi() const
momentum azimuthal angle
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 &)
double phi() const
azimuthal angle of momentum vector
double deltaR(const T1 &t1, const T2 &t2)
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
tuple TrackAssociatorParameters
double eta() const
pseudorapidity of momentum vector
void setPropagator(const Propagator *)
use a user configured propagator
virtual float eta() const
momentum pseudorapidity
std::vector< const HBHERecHit * > hcalRecHits
void addCandEnergy(double et)
Set energy or pT attached to cand trajectory.
std::vector< DetId > crossedHOIds
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
static TimingReport * current()
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
std::vector< const HORecHit * > hoRecHits
Detector det() const
get the detector field from this detid
void dump(std::ostream &co, bool active=false)
double outerEnergy() const