31 using namespace muonisolation;
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")),
56 thePrintTimeReport(par.getUntrackedParameter<bool>(
"PrintTimeReport"))
83 IsoDeposit::Direction muonDir(muon.
eta(), muon.
phi());
104 LogError(
"MuonIsolation")<<
"Configuration is inconsistent: Need 3 deposit instance labels";
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";
113 typedef IsoDeposit::Veto Veto;
116 IsoDeposit::Direction muonDir(muon.
eta(), muon.
phi());
140 double dRtmp = depEcal.veto().dR;
141 depEcal =
IsoDeposit(dirTmp); depEcal.setVeto(Veto(dirTmp, dRtmp));
144 dRtmp = depHcal.
veto().
dR;
148 dRtmp = depHOcal.
veto().
dR;
159 std::vector<const EcalRecHit*>::const_iterator eHitCI = mInfo.
ecalRecHits.begin();
160 for (; eHitCI != mInfo.
ecalRecHits.end(); ++eHitCI){
164 double cosTheta = 1./cosh(eHitPos.
eta());
166 double et = energy*cosTheta;
170 bool vetoHit =
false;
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;
182 for (
unsigned int iH = 0; iH< mInfo.
crossedEcalIds.size() && ! vetoHit; ++iH){
188 depEcal.addCandEnergy(et);
195 std::vector<const HBHERecHit*>::const_iterator hHitCI = mInfo.
hcalRecHits.begin();
196 for (; hHitCI != mInfo.
hcalRecHits.end(); ++hHitCI){
200 double cosTheta = 1./cosh(hHitPos.
eta());
202 double et = energy*cosTheta;
206 bool vetoHit =
false;
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;
218 for (
unsigned int iH = 0; iH< mInfo.
crossedHcalIds.size() && ! vetoHit; ++iH){
231 std::vector<const HORecHit*>::const_iterator hoHitCI = mInfo.
hoRecHits.begin();
232 for (; hoHitCI != mInfo.
hoRecHits.end(); ++hoHitCI){
233 const HORecHit* hoHitCPtr = *hoHitCI;
236 double cosTheta = 1./cosh(hoHitPos.
eta());
238 double et = energy*cosTheta;
242 bool vetoHit =
false;
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;
254 for (
unsigned int iH = 0; iH< mInfo.
crossedHOIds.size() && ! vetoHit; ++iH){
269 std::vector<const CaloTower*>::const_iterator calCI = mInfo.
towers.begin();
270 for (; calCI != mInfo.
towers.end(); ++calCI){
276 double etecal = calCPtr->
emEt();
279 double ethcal = calCPtr->
hadEt();
282 double ethocal = calCPtr->
outerEt();
285 if ((!doEcal) && (!doHcal) && (!doHcal))
continue;
287 bool vetoTowerEcal =
false;
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;
297 bool vetoTowerHcal =
false;
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;
307 bool vetoTowerHOCal =
false;
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;
319 if (! (vetoTowerHOCal && vetoTowerHcal && vetoTowerEcal )){
322 vetoTowerEcal =
true;
323 vetoTowerHcal =
true;
324 vetoTowerHOCal =
true;
333 if (vetoTowerEcal) depEcal.addCandEnergy(etecal);
334 else depEcal.addDeposit(towerDir, etecal);
347 std::vector<IsoDeposit> resultDeps;
348 resultDeps.push_back(depEcal);
349 resultDeps.push_back(depHcal);
350 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
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
double outerEnergy() const