25 using namespace muonisolation;
29 theCaloTowerCollectionLabel(par.getParameter<edm::
InputTag>(
"CaloTowerCollectionLabel")),
30 theDepositLabel(par.getUntrackedParameter<string>(
"DepositLabel")),
31 theWeight_E(par.getParameter<double>(
"Weight_E")),
32 theWeight_H(par.getParameter<double>(
"Weight_H")),
33 theThreshold_E(par.getParameter<double>(
"Threshold_E")),
34 theThreshold_H(par.getParameter<double>(
"Threshold_H")),
35 theDR_Veto_E(par.getParameter<double>(
"DR_Veto_E")),
36 theDR_Veto_H(par.getParameter<double>(
"DR_Veto_H")),
37 theDR_Max(par.getParameter<double>(
"DR_Max")),
38 vertexConstraintFlag_XY(par.getParameter<bool>(
"Vertex_Constraint_XY")),
39 vertexConstraintFlag_Z(par.getParameter<bool>(
"Vertex_Constraint_Z"))
55 double bz = bField->inInverseGeV(
GlobalPoint(0.,0.,0.)).z();
57 TrackCollection::const_iterator mu;
58 TrackCollection::const_iterator muEnd(muons.end());
63 for ( mu = muons.begin(); mu != muEnd; ++mu ) {
64 for ( cal = towers->begin(); cal != calEnd; ++cal ) {
66 double dEta = fabs(mu->eta()-cal->eta());
72 double etecal = cal->emEt();
73 double eecal = cal->emEnergy();
75 double ethcal = cal->hadEt();
76 double ehcal = cal->hadEnergy();
78 if ((!doEcal) && (!doHcal))
continue;
80 DetId calId = cal->id();
98 LogDebug(
"Muon|RecoMuon|L2MuonIsolationProducer")
99 <<
" >>> Muon: pt " << muon.
pt()
100 <<
" eta " << muon.
eta()
101 <<
" phi " << muon.
phi();
111 double bz = bField->inInverseGeV(
GlobalPoint(0.,0.,0.)).z();
115 for ( cal = towers->begin(); cal != calEnd; ++cal ) {
117 double dEta = fabs(muon.
eta()-cal->eta());
123 double etecal = cal->emEt();
124 double eecal = cal->emEnergy();
126 double ethcal = cal->hadEt();
127 double ehcal = cal->hadEnergy();
129 if ((!doEcal) && (!doHcal))
continue;
131 DetId calId = cal->id();
144 dep.addCandEnergy(calodep);
145 LogDebug(
"Muon|RecoMuon|L2MuonIsolationProducer")
146 <<
" >>> Calo deposit inside veto (with ECAL): deltar " << deltar
147 <<
" calodep " << calodep
148 <<
" ecaldep " << etecal
149 <<
" hcaldep " << ethcal
150 <<
" eta " << cal->eta()
151 <<
" phi " << cal->phi();
157 LogDebug(
"Muon|RecoMuon|L2MuonIsolationProducer")
158 <<
" >>> Calo deposit inside veto (no ECAL): deltar " << deltar
160 <<
" eta " << cal->eta()
161 <<
" phi " << cal->phi();
168 LogDebug(
"Muon|RecoMuon|L2MuonIsolationProducer")
169 <<
" >>> Deposits belongs to other track: deltar, etecal, ethcal= "
170 << deltar <<
", " << etecal <<
", " << ethcal;
179 LogDebug(
"Muon|RecoMuon|L2MuonIsolationProducer")
180 <<
" >>> Calo deposit (with ECAL): deltar " << deltar
181 <<
" calodep " << calodep
182 <<
" ecaldep " << etecal
183 <<
" hcaldep " << ethcal
184 <<
" eta " << cal->eta()
185 <<
" phi " << cal->phi();
190 LogDebug(
"Muon|RecoMuon|L2MuonIsolationProducer")
191 <<
" >>> Calo deposit (no ECAL): deltar " << deltar
193 <<
" eta " << cal->eta()
194 <<
" phi " << cal->phi();
204 double qoverp= muon.
qoverp();
205 double cur = bz*muon.
charge()/muon.
pt();
206 double phi0 = muon.
phi();
207 double dca = muon.
dxy();
209 double dz = muon.
dz();
222 if (fixVxy && fixVz) {
226 if (
pow(muon.
dxy(),2)<4*errd02) {
230 /errd02 * (cur/qoverp);
234 if (
pow(muon.
dsz(),2)<4*errdsz2) {
241 if (
pow(muon.
dxy(),2)<4*errd02) {
245 /errd02 * (cur/qoverp);
249 /errd02 * muon.
p()/muon.
pt();
254 if (
pow(muon.
dsz(),2)<4*errdsz2) {
260 /errdsz2 * (cur/qoverp);
267 double sphi0 =
sin(phi0);
268 double cphi0 =
cos(phi0);
270 double xsin = endpos.
x()*sphi0 - endpos.
y()*cphi0;
271 double xcos = endpos.
x()*cphi0 + endpos.
y()*sphi0;
272 double fcdca = fabs(1-cur*dca);
273 double phif = atan2( fcdca*sphi0-cur*endpos.
x()
274 , fcdca*cphi0+cur*endpos.
y());
275 double tphif2 =
tan(0.5*(phif-phi0));
276 double dcaf = dca + xsin + xcos*tphif2;
278 double x = endpos.
x() - dcaf*
sin(phif);
279 double y = endpos.
y() + dcaf*
cos(phif);
281 double deltas = (x-muon.
vx())*cphi0 + (y-muon.
vy())*sphi0;
283 if (deltaphi!=0) deltas = deltas*deltaphi/
sin(deltaphi);
286 double tantheta =
tan(theta);
288 z += deltas/
tan(theta);
299 if (fabs(eta)>1.479) noise = 0.15;
double qoverp() const
q/p
double p() const
momentum vector magnitude
double theta() const
polar angle
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
std::vector< CaloTower >::const_iterator const_iterator
Geom::Theta< T > theta() const
double phi() const
azimuthal angle of momentum vector
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
virtual double eta() const
momentum pseudorapidity
CovarianceMatrix covariance() const
return track covariance matrix
double deltaR(double eta1, double phi1, double eta2, double phi2)
double eta() const
pseudorapidity of momentum vector
double pt() const
track transverse momentum
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
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 dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double vy() const
y coordinate of the reference point on track
int charge() const
track electric charge
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Power< A, B >::type pow(const A &a, const B &b)
double vx() const
x coordinate of the reference point on track
const double par[8 *NPar][4]