ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
ElectronMuonTopoInfo Class Reference

ElectronMuonTopoInfo is a class for storing information about combuned electron-muon object. It stores angular distance, invariant mass, common vertex information, and opposite charge bit. More...

#include <ElectronMuonTopoInfo.h>

Collaboration diagram for ElectronMuonTopoInfo:

Public Types

enum  Vertex { Common, NotCommon, Unapplicable }
 other methods More...
 

Public Member Functions

 ElectronMuonTopoInfo ()
 
 ElectronMuonTopoInfo (int roiWord, float deltaPhi=-1., float deltaR=-1., float invMass=-1., bool el_valid=false, bool oppositeCharge=0, unsigned short vertexState=0)
 
 ~ElectronMuonTopoInfo ()
 
int RoiWord () const
 accessor methods More...
 
float DeltaPhi () const
 
float DeltaR () const
 
float InvMass () const
 
bool ElecValid () const
 
bool OppositeCharge () const
 
unsigned short VertexState () const
 
void SetRoiWord (int RoiWord)
 set methods More...
 
void SetDeltaPhi (float DeltaPhi)
 
void SetDeltaR (float DeltaR)
 
void SetInvMass (float InvMass)
 
void SetElecValid (bool ElecValid)
 
void SetOppositeCharge (bool OppositeCharge)
 
void SetVertexState (unsigned short vextexState)
 
Vertex commonVertex (const TrigElectron *electron1, const CombinedMuonFeature *muon1)
 checking Vertex compatibility @ L2 More...
 
bool opositeCharge (const TrigElectron *electron1, const CombinedMuonFeature *muon1)
 Opposite charge @ L2. More...
 
double invariantMass (const TrigElectron *electron1, const CombinedMuonFeature *muon1)
 Invariant mass calculation @ L2. More...
 
double deltaPhi (const TrigElectron *electron1, const CombinedMuonFeature *muon1)
 Delta phi @ L2. More...
 
double deltaR (const TrigElectron *electron1, const CombinedMuonFeature *muon1)
 Delta R @ L2. More...
 
double invariantMass (const TrigTau *tau1, const TrigTau *tau2)
 Invariant mass calculation @ L2. More...
 
double deltaPhi (const TrigTau *tau1, const TrigTau *tau2)
 Delta phi @ L2. More...
 
double deltaR (const TrigTau *tau1, const TrigTau *tau2)
 Delta R @ L2. More...
 
double invariantMass (const TrigTau *tau1, const TrigElectron *electron1)
 Invariant mass calculation @ L2. More...
 
double deltaPhi (const TrigTau *tau1, const TrigElectron *electron1)
 Delta phi @ L2. More...
 
double deltaR (const TrigTau *tau1, const TrigElectron *electron1)
 Delta R @ L2. More...
 
double invariantMass (const TrigTau *tau1, const CombinedMuonFeature *muon1)
 Invariant mass calculation @ L2. More...
 
double deltaPhi (const TrigTau *tau1, const CombinedMuonFeature *muon1)
 Delta phi @ L2. More...
 
double deltaR (const TrigTau *tau1, const CombinedMuonFeature *muon1)
 Delta R @ L2. More...
 
Vertex commonVertex (const Trk::Perigee *perigeeEL, const Trk::Perigee *perigeeMU, double &pull, bool debug=false)
 
bool opositeCharge (const egamma *electron1, const Trk::Perigee *muon1)
 
double invariantMass (const egamma *electron1, const Trk::Perigee *muon1)
 
double deltaR (const egamma *electron1, const Trk::Perigee *muon1)
 
double deltaPhi (const egamma *electron1, const Trk::Perigee *muon1)
 
double invariantMass (double Pt1, double eta1, double phi1, double m1, double Pt2, double eta2, double phi2, double m2) const
 
double deltaR (const Analysis::TauJet *tau1, const Analysis::TauJet *tau2)
 
double deltaPhi (const Analysis::TauJet *tau1, const Analysis::TauJet *tau2)
 
double invariantMass (const Analysis::TauJet *tau1, const Analysis::TauJet *tau2)
 
double deltaR (const Analysis::TauJet *tau1, const egamma *electron1)
 
double deltaPhi (const Analysis::TauJet *tau1, const egamma *electron1)
 
double invariantMass (const Analysis::TauJet *tau1, const egamma *electron1)
 
double deltaR (const Analysis::TauJet *tau1, const Trk::Perigee *muon1)
 
double deltaPhi (const Analysis::TauJet *tau1, const Trk::Perigee *muon1)
 
double invariantMass (const Analysis::TauJet *tau1, const Trk::Perigee *muon1)
 

Private Attributes

int m_roiWord
 Identifier of the RoI. More...
 
float m_DeltaPhi
 Delta Phi between electron and muon. More...
 
float m_DeltaR
 Delta R between electron and muon. More...
 
float m_InvMass
 Invariant mass of electron and muon. More...
 
bool m_electronValid
 boolean flag showing the validity of electron More...
 
bool m_oppositeCharge
 True if electron and muon have opposite charged. More...
 
unsigned short m_vertexState
 3 bit description of vertex: 0=common, 1=not common, 3= not applicable More...
 

Detailed Description

ElectronMuonTopoInfo is a class for storing information about combuned electron-muon object. It stores angular distance, invariant mass, common vertex information, and opposite charge bit.

Definition at line 51 of file ElectronMuonTopoInfo.h.

Member Enumeration Documentation

◆ Vertex

other methods

Enumerator
Common 
NotCommon 
Unapplicable 

Definition at line 84 of file ElectronMuonTopoInfo.h.

Constructor & Destructor Documentation

◆ ElectronMuonTopoInfo() [1/2]

ElectronMuonTopoInfo::ElectronMuonTopoInfo ( )

Definition at line 28 of file ElectronMuonTopoInfo.cxx.

28  : m_roiWord(-1),
29  m_DeltaPhi(-1),
30  m_DeltaR(-1),
31  m_InvMass(-1),
32  m_electronValid(false),
33  m_oppositeCharge(false),
34  m_vertexState(0)
35 
36 {}

◆ ElectronMuonTopoInfo() [2/2]

ElectronMuonTopoInfo::ElectronMuonTopoInfo ( int  roiWord,
float  deltaPhi = -1.,
float  deltaR = -1.,
float  invMass = -1.,
bool  el_valid = false,
bool  oppositeCharge = 0,
unsigned short  vertexState = 0 
)

Definition at line 38 of file ElectronMuonTopoInfo.cxx.

39  : m_roiWord(roiWord),
43  m_electronValid(el_valid),
44  m_oppositeCharge(oppositeCharge),
45  m_vertexState(vertexState)
46 
47 {}

◆ ~ElectronMuonTopoInfo()

ElectronMuonTopoInfo::~ElectronMuonTopoInfo ( )

Definition at line 50 of file ElectronMuonTopoInfo.cxx.

50 {}

Member Function Documentation

◆ commonVertex() [1/2]

ElectronMuonTopoInfo::Vertex ElectronMuonTopoInfo::commonVertex ( const TrigElectron electron1,
const CombinedMuonFeature muon1 
)

checking Vertex compatibility @ L2

Definition at line 90 of file ElectronMuonTopoInfo.cxx.

91  {
92 
93 
94  double trk_e1_z0error = electron1->err_Zvtx();
95  double trk_e2_z0error = muon1->IDTrack()->param()->ez0();
96 
97 
98  if ( trk_e1_z0error > 0 && trk_e2_z0error > 0 ) {
99  double z0_distance = fabs(electron1->Zvtx()
100  - muon1->IDTrack()->param()->z0());
101 
102  double z0_error = sqrt(trk_e1_z0error * trk_e1_z0error
103  + trk_e2_z0error * trk_e2_z0error);
104 
105 
106  // reject combination if distance squared between perigee of
107  // tracks is greater than sqrt(6)*error = 2.45*error: this
108  // should accept 99% of good combinations (common vertex)
109  // Note: I changed 2.45 to 3 to be conservative => efficiency is
110  // now 99.7%
111  if (z0_distance > 3*z0_error) {
112  return NotCommon;
113 
114  } else {
115 
116  return Common;
117  }
118  }
119 
120  return Unapplicable;
121 }

◆ commonVertex() [2/2]

ElectronMuonTopoInfo::Vertex ElectronMuonTopoInfo::commonVertex ( const Trk::Perigee perigeeEL,
const Trk::Perigee perigeeMU,
double &  pull,
bool  debug = false 
)

Definition at line 125 of file ElectronMuonTopoInfo.cxx.

127  {
128 
129  if(debug) std::cout << "Now checking electron perigee at " << perigeeEL << " and muon perigee at " << perigeeMU << "." << std::endl;
130 
131 
132  double electron_z0=0.;
133  double electron_z0_error=0.;
134 
135  double muon_z0=0.;
136  double muon_z0_error=0.;
137 
138  if(perigeeEL!=0)
139  {
140  electron_z0 = perigeeEL->parameters()[Trk::z0];
141  electron_z0_error= Amg::error( *perigeeEL->covariance(), Trk::z0 );
142  //electron_z0_error= perigeeEL->localErrorMatrix().error(Trk::z0);
143  delete perigeeEL;
144  }
145 
146  if(perigeeMU!=0)
147  {
148 
149 
150 
151  muon_z0 = perigeeMU->parameters()[Trk::z0];
152  muon_z0_error= Amg::error( *perigeeMU->covariance(), Trk::z0 );
153 
154  //muon_z0_error= perigeeMU->localErrorMatrix().error(Trk::z0);
155  delete perigeeMU;
156  }
157 
158  if(debug) std::cout << "Electron z0 = " << electron_z0 << "+-" << electron_z0_error << "; muon_z0 = " << muon_z0 << "+-" << muon_z0_error << std::endl;
159 
160  pull = -999.;
161 
162  if ( electron_z0_error > 0 && muon_z0_error > 0 ) {
163  double z0_distance = fabs(electron_z0
164  - muon_z0);
165 
166  double z0_error = sqrt(electron_z0_error * electron_z0_error
167  + muon_z0_error * muon_z0_error);
168 
169  pull = z0_distance/z0_error;
170 
171  if(debug) std::cout << "z-distance is " << z0_distance << "+-" << z0_error << ". And the pull is " << pull << "." << std::endl;
172 
173  // reject combination if distance squared between perigee of
174  // tracks is greater than sqrt(6)*error = 2.45*error: this
175  // should accept 99% of good combinations (common vertex)
176  // Note: I changed 2.45 to 3 to be conservative => efficiency is
177  // now 99.7%
178  if (z0_distance > 3*z0_error) {
180 
181  } else {
182 
184  }
185  }
186 
188 }

◆ DeltaPhi()

float ElectronMuonTopoInfo::DeltaPhi ( ) const
inline

Definition at line 63 of file ElectronMuonTopoInfo.h.

63 { return m_DeltaPhi; }

◆ deltaPhi() [1/8]

double ElectronMuonTopoInfo::deltaPhi ( const Analysis::TauJet tau1,
const Analysis::TauJet tau2 
)

Definition at line 314 of file ElectronMuonTopoInfo.cxx.

315  {
316  double dPhi = tau1->phi()-tau2->phi();
317  if (dPhi < -M_PI) dPhi += 2*M_PI;
318  if (dPhi > M_PI) dPhi -= 2*M_PI;
319  double distEmu = fabs(dPhi);
320 
321  return distEmu;
322 }

◆ deltaPhi() [2/8]

double ElectronMuonTopoInfo::deltaPhi ( const Analysis::TauJet tau1,
const egamma electron1 
)

Definition at line 325 of file ElectronMuonTopoInfo.cxx.

326  {
327  double dPhi = tau1->phi()-electron1->trackParticle()->phi();
328  if (dPhi < -M_PI) dPhi += 2*M_PI;
329  if (dPhi > M_PI) dPhi -= 2*M_PI;
330  double distEmu = fabs(dPhi);
331 
332  return distEmu;
333 }

◆ deltaPhi() [3/8]

double ElectronMuonTopoInfo::deltaPhi ( const Analysis::TauJet tau1,
const Trk::Perigee muon1 
)

Definition at line 336 of file ElectronMuonTopoInfo.cxx.

337  {
338  float mu_phi = muon1->parameters()[Trk::phi];
339 
340  double dPhi = tau1->phi()-mu_phi;
341  if (dPhi < -M_PI) dPhi += 2*M_PI;
342  if (dPhi > M_PI) dPhi -= 2*M_PI;
343  double distEmu = fabs(dPhi);
344 
345  return distEmu;
346 }

◆ deltaPhi() [4/8]

double ElectronMuonTopoInfo::deltaPhi ( const egamma electron1,
const Trk::Perigee muon1 
)

Definition at line 302 of file ElectronMuonTopoInfo.cxx.

303  {
304  float mu_phi = muon1->parameters()[Trk::phi];
305 
306  double dPhi = electron1->trackParticle()->phi()-mu_phi;
307  if (dPhi < -M_PI) dPhi += 2*M_PI;
308  if (dPhi > M_PI) dPhi -= 2*M_PI;
309  double distEmu = fabs(dPhi);
310 
311  return distEmu;
312 }

◆ deltaPhi() [5/8]

double ElectronMuonTopoInfo::deltaPhi ( const TrigElectron electron1,
const CombinedMuonFeature muon1 
)

Delta phi @ L2.

Definition at line 207 of file ElectronMuonTopoInfo.cxx.

208  {
209  double dPhi = electron1->phi()-muon1->IDTrack()->param()->phi0();
210  if (dPhi < -M_PI) dPhi += 2*M_PI;
211  if (dPhi > M_PI) dPhi -= 2*M_PI;
212  double distEmu = fabs(dPhi);
213 
214  return distEmu;
215 }

◆ deltaPhi() [6/8]

double ElectronMuonTopoInfo::deltaPhi ( const TrigTau tau1,
const CombinedMuonFeature muon1 
)

Delta phi @ L2.

Definition at line 240 of file ElectronMuonTopoInfo.cxx.

241  {
242  double dPhi = tau1->phi()-muon1->IDTrack()->param()->phi0();
243  if (dPhi < -M_PI) dPhi += 2*M_PI;
244  if (dPhi > M_PI) dPhi -= 2*M_PI;
245  double distEmu = fabs(dPhi);
246 
247  return distEmu;
248 }

◆ deltaPhi() [7/8]

double ElectronMuonTopoInfo::deltaPhi ( const TrigTau tau1,
const TrigElectron electron1 
)

Delta phi @ L2.

Definition at line 229 of file ElectronMuonTopoInfo.cxx.

230  {
231  double dPhi = tau1->phi()-electron1->phi();
232  if (dPhi < -M_PI) dPhi += 2*M_PI;
233  if (dPhi > M_PI) dPhi -= 2*M_PI;
234  double distEmu = fabs(dPhi);
235 
236  return distEmu;
237 }

◆ deltaPhi() [8/8]

double ElectronMuonTopoInfo::deltaPhi ( const TrigTau tau1,
const TrigTau tau2 
)

Delta phi @ L2.

Definition at line 218 of file ElectronMuonTopoInfo.cxx.

219  {
220  double dPhi = tau1->phi()-tau2->phi();
221  if (dPhi < -M_PI) dPhi += 2*M_PI;
222  if (dPhi > M_PI) dPhi -= 2*M_PI;
223  double distEmu = fabs(dPhi);
224 
225  return distEmu;
226 }

◆ DeltaR()

float ElectronMuonTopoInfo::DeltaR ( ) const
inline

Definition at line 64 of file ElectronMuonTopoInfo.h.

64 { return m_DeltaR; }

◆ deltaR() [1/8]

double ElectronMuonTopoInfo::deltaR ( const Analysis::TauJet tau1,
const Analysis::TauJet tau2 
)

Definition at line 364 of file ElectronMuonTopoInfo.cxx.

365  {
366  double dPhi = tau1->phi()-tau2->phi();
367  if (dPhi < -M_PI) dPhi += 2*M_PI;
368  if (dPhi > M_PI) dPhi -= 2*M_PI;
369  double dEta = tau1->eta() - tau2->eta();
370  double distEmu = sqrt(dPhi*dPhi+dEta*dEta);
371 
372  return distEmu;
373 }

◆ deltaR() [2/8]

double ElectronMuonTopoInfo::deltaR ( const Analysis::TauJet tau1,
const egamma electron1 
)

Definition at line 376 of file ElectronMuonTopoInfo.cxx.

377  {
378  double dPhi = tau1->phi()-electron1->trackParticle()->phi();
379  if (dPhi < -M_PI) dPhi += 2*M_PI;
380  if (dPhi > M_PI) dPhi -= 2*M_PI;
381  double dEta = tau1->eta() - electron1->trackParticle()->eta();
382  double distEmu = sqrt(dPhi*dPhi+dEta*dEta);
383 
384  return distEmu;
385 }

◆ deltaR() [3/8]

double ElectronMuonTopoInfo::deltaR ( const Analysis::TauJet tau1,
const Trk::Perigee muon1 
)

Definition at line 388 of file ElectronMuonTopoInfo.cxx.

389  {
390  float mu_phi =muon1->parameters()[Trk::phi];
391 
392  double dPhi = tau1->phi()-mu_phi;
393  if (dPhi < -M_PI) dPhi += 2*M_PI;
394  if (dPhi > M_PI) dPhi -= 2*M_PI;
395  double dEta = tau1->eta() - muon1->eta();
396  double distEmu = sqrt(dPhi*dPhi+dEta*dEta);
397 
398  return distEmu;
399 }

◆ deltaR() [4/8]

double ElectronMuonTopoInfo::deltaR ( const egamma electron1,
const Trk::Perigee muon1 
)

Definition at line 350 of file ElectronMuonTopoInfo.cxx.

351  {
352  float mu_phi =muon1->parameters()[Trk::phi];
353 
354  double dPhi = electron1->trackParticle()->phi()-mu_phi;
355  if (dPhi < -M_PI) dPhi += 2*M_PI;
356  if (dPhi > M_PI) dPhi -= 2*M_PI;
357  double dEta = electron1->trackParticle()->eta() - muon1->eta();
358  double distEmu = sqrt(dPhi*dPhi+dEta*dEta);
359 
360  return distEmu;
361 }

◆ deltaR() [5/8]

double ElectronMuonTopoInfo::deltaR ( const TrigElectron electron1,
const CombinedMuonFeature muon1 
)

Delta R @ L2.

Definition at line 254 of file ElectronMuonTopoInfo.cxx.

255  {
256  double dPhi = electron1->phi()-muon1->IDTrack()->param()->phi0();
257  if (dPhi < -M_PI) dPhi += 2*M_PI;
258  if (dPhi > M_PI) dPhi -= 2*M_PI;
259  double dEta = electron1->eta() - muon1->IDTrack()->param()->eta();
260  double distEmu = sqrt(dPhi*dPhi+dEta*dEta);
261 
262  return distEmu;
263 }

◆ deltaR() [6/8]

double ElectronMuonTopoInfo::deltaR ( const TrigTau tau1,
const CombinedMuonFeature muon1 
)

Delta R @ L2.

Definition at line 290 of file ElectronMuonTopoInfo.cxx.

291  {
292  double dPhi = tau1->phi()-muon1->IDTrack()->param()->phi0();
293  if (dPhi < -M_PI) dPhi += 2*M_PI;
294  if (dPhi > M_PI) dPhi -= 2*M_PI;
295  double dEta = tau1->eta() - muon1->IDTrack()->param()->eta();
296  double distEmu = sqrt(dPhi*dPhi+dEta*dEta);
297 
298  return distEmu;
299 }

◆ deltaR() [7/8]

double ElectronMuonTopoInfo::deltaR ( const TrigTau tau1,
const TrigElectron electron1 
)

Delta R @ L2.

Definition at line 278 of file ElectronMuonTopoInfo.cxx.

279  {
280  double dPhi = tau1->phi()-electron1->phi();
281  if (dPhi < -M_PI) dPhi += 2*M_PI;
282  if (dPhi > M_PI) dPhi -= 2*M_PI;
283  double dEta = tau1->eta() - electron1->eta();
284  double distEmu = sqrt(dPhi*dPhi+dEta*dEta);
285 
286  return distEmu;
287 }

◆ deltaR() [8/8]

double ElectronMuonTopoInfo::deltaR ( const TrigTau tau1,
const TrigTau tau2 
)

Delta R @ L2.

Definition at line 266 of file ElectronMuonTopoInfo.cxx.

267  {
268  double dPhi = tau1->phi()-tau2->phi();
269  if (dPhi < -M_PI) dPhi += 2*M_PI;
270  if (dPhi > M_PI) dPhi -= 2*M_PI;
271  double dEta = tau1->eta() - tau2->eta();
272  double distEmu = sqrt(dPhi*dPhi+dEta*dEta);
273 
274  return distEmu;
275 }

◆ ElecValid()

bool ElectronMuonTopoInfo::ElecValid ( ) const
inline

Definition at line 66 of file ElectronMuonTopoInfo.h.

66 { return m_electronValid; }

◆ invariantMass() [1/9]

double ElectronMuonTopoInfo::invariantMass ( const Analysis::TauJet tau1,
const Analysis::TauJet tau2 
)

Definition at line 471 of file ElectronMuonTopoInfo.cxx.

472  {
473  // get parameters: not electron pT no longer signed
474  double eta1 = tau1->eta();
475  double eta2 = tau2->eta();
476 
477 
478  double Pt1 = tau1->pt() ; // IMPORTANT: pt() is the 4-momentum base class method and
479  double Pt2 = tau2->pt(); // it returns the cluster pT; the track pT is given by Pt()
480 
481  double phi1 = tau1->phi();
482  double phi2 = tau2->phi();
483 
484  return invariantMass(Pt1, eta1, phi1, 1777., Pt2, eta2, phi2, 1777.);//tau mass used
485 }

◆ invariantMass() [2/9]

double ElectronMuonTopoInfo::invariantMass ( const Analysis::TauJet tau1,
const egamma electron1 
)

Definition at line 489 of file ElectronMuonTopoInfo.cxx.

490  {
491  // get parameters: not electron pT no longer signed
492  double eta1 = tau1->eta();
493  double eta2 = electron1->trackParticle()->eta();
494 
495 
496  double Pt1 = tau1->pt() ; // IMPORTANT: pt() is the 4-momentum base class method and
497  double Pt2 = electron1->cluster()->e()/cosh(electron1->trackParticle()->eta()) ; //
498 
499  double phi1 = tau1->phi();
500  double phi2 = electron1->trackParticle()->phi();
501 
502  return invariantMass(Pt1, eta1, phi1, 1777., Pt2, eta2, phi2, 0.511);//tau mass used
503 }

◆ invariantMass() [3/9]

double ElectronMuonTopoInfo::invariantMass ( const Analysis::TauJet tau1,
const Trk::Perigee muon1 
)

Definition at line 505 of file ElectronMuonTopoInfo.cxx.

506  {
507  // get parameters: not electron pT no longer signed
508  double eta1 = tau1->eta();
509  double eta2 = muon1->eta();
510 
511 
512  double Pt1 = tau1->pt() ; // IMPORTANT: pt() is the 4-momentum base class method and
513  double Pt2 = muon1->pT() ; //
514 
515  double phi1 = tau1->phi();
516  double phi2 = muon1->parameters()[Trk::phi];
517 
518  return invariantMass(Pt1, eta1, phi1, 1777., Pt2, eta2, phi2, 105.6);//tau mass used
519 }

◆ invariantMass() [4/9]

double ElectronMuonTopoInfo::invariantMass ( const egamma electron1,
const Trk::Perigee muon1 
)

Definition at line 574 of file ElectronMuonTopoInfo.cxx.

575  {
576 
577  // get parameters: not electron pT no longer signed
578  double eta1 = electron1->trackParticle()->eta();
579  double eta2 = muon1->eta();
580 
581 
582  double Pt1 = electron1->cluster()->e()/cosh(electron1->trackParticle()->eta()) ; // IMPORTANT: pt() is the 4-momentum base class method and
583  double Pt2 = muon1->pT(); // it returns the cluster pT; the track pT is given by Pt()
584 
585  double phi1 = electron1->trackParticle()->phi();
586  double phi2 = muon1->parameters()[Trk::phi];
587 
588  return invariantMass(Pt1, eta1, phi1, 0.511, Pt2, eta2, phi2, 105.6);
589 }

◆ invariantMass() [5/9]

double ElectronMuonTopoInfo::invariantMass ( const TrigElectron electron1,
const CombinedMuonFeature muon1 
)

Invariant mass calculation @ L2.

Definition at line 403 of file ElectronMuonTopoInfo.cxx.

404  {
405  // get parameters: not electron pT no longer signed
406  double eta1 = electron1->eta();
407  double eta2 = muon1->IDTrack()->param()->eta();
408 
409 
410  double Pt1 = electron1->pt() ; // IMPORTANT: pt() is the 4-momentum base class method and
411  double Pt2 = muon1->pt(); // it returns the cluster pT; the track pT is given by Pt()
412 
413  double phi1 = electron1->phi();
414  double phi2 = muon1->IDTrack()->param()->phi0();
415 
416  return invariantMass(Pt1, eta1, phi1, 0.511, Pt2, eta2, phi2, 105.6);
417 }

◆ invariantMass() [6/9]

double ElectronMuonTopoInfo::invariantMass ( const TrigTau tau1,
const CombinedMuonFeature muon1 
)

Invariant mass calculation @ L2.

Definition at line 454 of file ElectronMuonTopoInfo.cxx.

455  {
456  // get parameters: not electron pT no longer signed
457  double eta1 = tau1->eta();
458  double eta2 = muon1->IDTrack()->param()->eta();
459 
460 
461  double Pt1 = tau1->pt() ; // IMPORTANT: pt() is the 4-momentum base class method and
462  double Pt2 = muon1->pt(); // it returns the cluster pT; the track pT is given by Pt()
463 
464  double phi1 = tau1->phi();
465  double phi2 = muon1->IDTrack()->param()->phi0();
466 
467  return invariantMass(Pt1, eta1, phi1, 1777., Pt2, eta2, phi2, 105.6);//tau mass used
468 }

◆ invariantMass() [7/9]

double ElectronMuonTopoInfo::invariantMass ( const TrigTau tau1,
const TrigElectron electron1 
)

Invariant mass calculation @ L2.

Definition at line 437 of file ElectronMuonTopoInfo.cxx.

438  {
439  // get parameters: not electron pT no longer signed
440  double eta1 = tau1->eta();
441  double eta2 = electron1->eta();
442 
443 
444  double Pt1 = tau1->pt() ; // IMPORTANT: pt() is the 4-momentum base class method and
445  double Pt2 = electron1->pt(); // it returns the cluster pT; the track pT is given by Pt()
446 
447  double phi1 = tau1->phi();
448  double phi2 = electron1->phi();
449 
450  return invariantMass(Pt1, eta1, phi1, 1777., Pt2, eta2, phi2, 0.511);//tau mass used
451 }

◆ invariantMass() [8/9]

double ElectronMuonTopoInfo::invariantMass ( const TrigTau tau1,
const TrigTau tau2 
)

Invariant mass calculation @ L2.

Definition at line 420 of file ElectronMuonTopoInfo.cxx.

421  {
422  // get parameters: not electron pT no longer signed
423  double eta1 = tau1->eta();
424  double eta2 = tau2->eta();
425 
426 
427  double Pt1 = tau1->pt() ; // IMPORTANT: pt() is the 4-momentum base class method and
428  double Pt2 = tau2->pt(); // it returns the cluster pT; the track pT is given by Pt()
429 
430  double phi1 = tau1->phi();
431  double phi2 = tau2->phi();
432 
433  return invariantMass(Pt1, eta1, phi1, 1777., Pt2, eta2, phi2, 1777.);//tau mass used
434 }

◆ invariantMass() [9/9]

double ElectronMuonTopoInfo::invariantMass ( double  Pt1,
double  eta1,
double  phi1,
double  m1,
double  Pt2,
double  eta2,
double  phi2,
double  m2 
) const

Definition at line 521 of file ElectronMuonTopoInfo.cxx.

522  {
523  // protection in case upstream algorithm suplies negative pt
524 
525  Pt1 = fabs(Pt1);
526  Pt2 = fabs(Pt2);
527 
528  double theta1 = 2*atan2((double)exp(-eta1),1.);
529  double theta2 = 2*atan2((double)exp(-eta2),1.);
530  double P1 = Pt1/sin(theta1);
531  double P2 = Pt2/sin(theta2);
532  double p1[3],p2[3];
533 
534  // Replace the following by sincos which calculates the sin and cos
535  // of the same angle 40% faster (fwinkl)
536  // p1[0] = Pt1*cos(phi1);
537  // p1[1] = Pt1*sin(phi1);
538 #ifndef __APPLE__
539  sincos(phi1,&p1[1],&p1[0]);
540  p1[0] *= Pt1;
541  p1[1] *= Pt1;
542 #else
543  CxxUtils::sincos scphi1(phi1);
544  p1[0] = Pt1*scphi1.cs;
545  p1[1] = Pt1*scphi1.sn;
546 #endif
547 
548  // dito
549  // p2[0] = Pt2*cos(phi2);
550  // p2[1] = Pt2*sin(phi2);
551 #ifndef __APPLE__
552  sincos(phi2,&p2[1],&p2[0]);
553  p2[0] *= Pt2;
554  p2[1] *= Pt2;
555 #else
556  CxxUtils::sincos scphi2(phi2);
557  p2[0] = Pt2*scphi2.cs;
558  p2[1] = Pt2*scphi2.sn;
559 #endif
560 
561  p1[2] = P1*cos(theta1);
562  p2[2] = P2*cos(theta2);
563 
564  // evaluate mass
565  double Ptot1 = sqrt(std::pow(p1[0],2)+std::pow(p1[1],2)+std::pow(p1[2],2));
566  double Ptot2 = sqrt(std::pow(p2[0],2)+std::pow(p2[1],2)+std::pow(p2[2],2));
567  double e1 = sqrt(Ptot1*Ptot1 + m1*m1);
568  double e2 = sqrt(Ptot2*Ptot2 + m2*m2);
569  double mass = sqrt(m1*m1+m2*m2+ 2*e1*e2 - 2*p1[0]*p2[0] - 2*p1[1]*p2[1] - 2*p1[2]*p2[2]);
570 
571  return mass;
572 }

◆ InvMass()

float ElectronMuonTopoInfo::InvMass ( ) const
inline

Definition at line 65 of file ElectronMuonTopoInfo.h.

65 { return m_InvMass; }

◆ opositeCharge() [1/2]

bool ElectronMuonTopoInfo::opositeCharge ( const egamma electron1,
const Trk::Perigee muon1 
)

Definition at line 200 of file ElectronMuonTopoInfo.cxx.

200  {
201  if( (electron1->charge() * muon1->charge()) > 0 )
202  return false;
203  return true;
204 }

◆ opositeCharge() [2/2]

bool ElectronMuonTopoInfo::opositeCharge ( const TrigElectron electron1,
const CombinedMuonFeature muon1 
)

Opposite charge @ L2.

Definition at line 192 of file ElectronMuonTopoInfo.cxx.

193  {
194  if ( electron1->charge() * muon1->ptq() > 0 )
195  return false;
196  return true;
197 }

◆ OppositeCharge()

bool ElectronMuonTopoInfo::OppositeCharge ( ) const
inline

Definition at line 67 of file ElectronMuonTopoInfo.h.

67 { return m_oppositeCharge; }

◆ RoiWord()

int ElectronMuonTopoInfo::RoiWord ( ) const
inline

accessor methods

Definition at line 62 of file ElectronMuonTopoInfo.h.

62 { return m_roiWord; }

◆ SetDeltaPhi()

void ElectronMuonTopoInfo::SetDeltaPhi ( float  DeltaPhi)

Definition at line 55 of file ElectronMuonTopoInfo.cxx.

◆ SetDeltaR()

void ElectronMuonTopoInfo::SetDeltaR ( float  DeltaR)

Definition at line 56 of file ElectronMuonTopoInfo.cxx.

56 {m_DeltaR= DeltaR;}

◆ SetElecValid()

void ElectronMuonTopoInfo::SetElecValid ( bool  ElecValid)

Definition at line 58 of file ElectronMuonTopoInfo.cxx.

◆ SetInvMass()

void ElectronMuonTopoInfo::SetInvMass ( float  InvMass)

Definition at line 57 of file ElectronMuonTopoInfo.cxx.

57 {m_InvMass = InvMass;}

◆ SetOppositeCharge()

void ElectronMuonTopoInfo::SetOppositeCharge ( bool  OppositeCharge)

Definition at line 59 of file ElectronMuonTopoInfo.cxx.

◆ SetRoiWord()

void ElectronMuonTopoInfo::SetRoiWord ( int  RoiWord)

set methods

Definition at line 54 of file ElectronMuonTopoInfo.cxx.

54 {m_roiWord = RoiWord;}

◆ SetVertexState()

void ElectronMuonTopoInfo::SetVertexState ( unsigned short  vextexState)

Definition at line 60 of file ElectronMuonTopoInfo.cxx.

60 {m_vertexState = vertexState;}

◆ VertexState()

unsigned short ElectronMuonTopoInfo::VertexState ( ) const
inline

Definition at line 68 of file ElectronMuonTopoInfo.h.

68 { return m_vertexState;}

Member Data Documentation

◆ m_DeltaPhi

float ElectronMuonTopoInfo::m_DeltaPhi
private

Delta Phi between electron and muon.

Definition at line 135 of file ElectronMuonTopoInfo.h.

◆ m_DeltaR

float ElectronMuonTopoInfo::m_DeltaR
private

Delta R between electron and muon.

Definition at line 137 of file ElectronMuonTopoInfo.h.

◆ m_electronValid

bool ElectronMuonTopoInfo::m_electronValid
private

boolean flag showing the validity of electron

Definition at line 141 of file ElectronMuonTopoInfo.h.

◆ m_InvMass

float ElectronMuonTopoInfo::m_InvMass
private

Invariant mass of electron and muon.

Definition at line 139 of file ElectronMuonTopoInfo.h.

◆ m_oppositeCharge

bool ElectronMuonTopoInfo::m_oppositeCharge
private

True if electron and muon have opposite charged.

Definition at line 143 of file ElectronMuonTopoInfo.h.

◆ m_roiWord

int ElectronMuonTopoInfo::m_roiWord
private

Identifier of the RoI.

Definition at line 133 of file ElectronMuonTopoInfo.h.

◆ m_vertexState

unsigned short ElectronMuonTopoInfo::m_vertexState
private

3 bit description of vertex: 0=common, 1=not common, 3= not applicable

Definition at line 145 of file ElectronMuonTopoInfo.h.


The documentation for this class was generated from the following files:
egamma::trackParticle
const Rec::TrackParticle * trackParticle(unsigned int index=0) const
pointer to TrackParticle
Definition: egamma.cxx:391
TrigInDetTrack::param
void param(const TrigInDetTrackFitPar *param)
Definition: TrigInDetTrack.h:126
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
ParticleImpl::pt
virtual double pt() const
transverse momentum
Definition: ParticleImpl.h:554
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
P4Helpers::invMass
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
Definition: P4Helpers.h:239
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
ElectronMuonTopoInfo::InvMass
float InvMass() const
Definition: ElectronMuonTopoInfo.h:65
M_PI
#define M_PI
Definition: ActiveFraction.h:11
Trk::z0
@ z0
Definition: ParamDefs.h:70
CombinedMuonFeature::pt
double pt(void) const
transverse momentum
Definition: CombinedMuonFeature.h:56
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
ElectronMuonTopoInfo::deltaR
double deltaR(const TrigElectron *electron1, const CombinedMuonFeature *muon1)
Delta R @ L2.
Definition: ElectronMuonTopoInfo.cxx:254
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ElectronMuonTopoInfo::invariantMass
double invariantMass(const TrigElectron *electron1, const CombinedMuonFeature *muon1)
Invariant mass calculation @ L2.
Definition: ElectronMuonTopoInfo.cxx:403
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
ElectronMuonTopoInfo::m_DeltaR
float m_DeltaR
Delta R between electron and muon.
Definition: ElectronMuonTopoInfo.h:137
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
ElectronMuonTopoInfo::deltaPhi
double deltaPhi(const TrigElectron *electron1, const CombinedMuonFeature *muon1)
Delta phi @ L2.
Definition: ElectronMuonTopoInfo.cxx:207
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
CombinedMuonFeature::ptq
double ptq(void) const
Definition: CombinedMuonFeature.h:58
ElectronMuonTopoInfo::m_InvMass
float m_InvMass
Invariant mass of electron and muon.
Definition: ElectronMuonTopoInfo.h:139
P4PtEtaPhiM::phi
virtual double phi() const
get phi data member
Definition: P4PtEtaPhiM.h:109
python.changerun.m1
m1
Definition: changerun.py:32
ParticleImpl::charge
virtual ChargeType charge() const
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...
Definition: ParticleImpl.h:718
TrigElectron::err_Zvtx
float err_Zvtx() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:143
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:530
ElectronMuonTopoInfo::m_electronValid
bool m_electronValid
boolean flag showing the validity of electron
Definition: ElectronMuonTopoInfo.h:141
ElectronMuonTopoInfo::Common
@ Common
Definition: ElectronMuonTopoInfo.h:84
ElectronMuonTopoInfo::Unapplicable
@ Unapplicable
Definition: ElectronMuonTopoInfo.h:84
egamma::cluster
const CaloCluster * cluster() const
pointer to CaloCluster
Definition: egamma.cxx:360
ElectronMuonTopoInfo::OppositeCharge
bool OppositeCharge() const
Definition: ElectronMuonTopoInfo.h:67
ElectronMuonTopoInfo::ElecValid
bool ElecValid() const
Definition: ElectronMuonTopoInfo.h:66
I4Momentum::eta
virtual double eta() const =0
pseudo rapidity
ParticleImpl::phi
virtual double phi() const
phi in [-pi,pi[
Definition: ParticleImpl.h:524
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:264
ElectronMuonTopoInfo::m_vertexState
unsigned short m_vertexState
3 bit description of vertex: 0=common, 1=not common, 3= not applicable
Definition: ElectronMuonTopoInfo.h:145
ParticleImpl::eta
virtual double eta() const
pseudo rapidity
Definition: ParticleImpl.h:514
P4PtEtaPhiM::pt
virtual double pt() const
get pt data member
Definition: P4PtEtaPhiM.h:103
TrigElectron::Zvtx
float Zvtx() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:122
I4Momentum::phi
virtual double phi() const =0
phi in [-pi,pi[
plotIsoValidation.mu_phi
mu_phi
Definition: plotIsoValidation.py:152
ElectronMuonTopoInfo::m_oppositeCharge
bool m_oppositeCharge
True if electron and muon have opposite charged.
Definition: ElectronMuonTopoInfo.h:143
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
P4PtEtaPhiM::eta
virtual double eta() const
get eta data member
Definition: P4PtEtaPhiM.h:106
ElectronMuonTopoInfo::m_roiWord
int m_roiWord
Identifier of the RoI.
Definition: ElectronMuonTopoInfo.h:133
CombinedMuonFeature::IDTrack
const TrigInDetTrack * IDTrack(void) const
Definition: CombinedMuonFeature.h:66
ElectronMuonTopoInfo::RoiWord
int RoiWord() const
accessor methods
Definition: ElectronMuonTopoInfo.h:62
egammaEnergyPositionAllSamples::e2
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
ElectronMuonTopoInfo::DeltaR
float DeltaR() const
Definition: ElectronMuonTopoInfo.h:64
CaloCluster::e
virtual double e() const
Retrieve energy independent of signal state.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:753
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:76
TrigElectron::charge
int charge() const
accessor to return the track charge (sign of TrigInDetTrack pT)
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:136
Trk::phi
@ phi
Definition: ParamDefs.h:81
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
ElectronMuonTopoInfo::NotCommon
@ NotCommon
Definition: ElectronMuonTopoInfo.h:84
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:525
ElectronMuonTopoInfo::m_DeltaPhi
float m_DeltaPhi
Delta Phi between electron and muon.
Definition: ElectronMuonTopoInfo.h:135
ElectronMuonTopoInfo::DeltaPhi
float DeltaPhi() const
Definition: ElectronMuonTopoInfo.h:63