ATLAS Offline Software
TrigJpsi.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /********************************************************************
6  NAME: TrigJpsi.cxx
7  PACKAGE: TrigBphysEvent
8 ********************************************************************/
12 #include <math.h>
13 
15 {
16  m_jpsimuon[0] = nullptr;
17  m_jpsimuon[1] = nullptr;
18 }
19 
20 TrigJpsi::TrigJpsi(const CombinedMuonFeature* jpsimuon1, const CombinedMuonFeature* jpsimuon2)
21 {
22  setDaughters(jpsimuon1,jpsimuon2);
23 }
24 
26 {}
27 
29 {
30  if (i==0 || i==1)
31  return m_jpsimuon[i];
32  else
33  return 0;
34 }
35 
36 void TrigJpsi::setDaughters( const CombinedMuonFeature* jpsimuon1, const CombinedMuonFeature* jpsimuon2)
37 {
38  m_jpsimuon[0]=jpsimuon1;
39  m_jpsimuon[1]=jpsimuon2;
40  CLHEP::HepLorentzVector hlv[2];
41 
42  for ( int i=0 ; i<2 ; ++i )
43  {
44  double cot_teta=1/tan(2*atan(exp(-m_jpsimuon[i]->IDTrack()->param()->eta())));
45  double mass_muon = 105.658357;
46  double absPt = fabs(m_jpsimuon[i]->pt());
47  const double px = cos(m_jpsimuon[i]->IDTrack()->param()->phi0())*absPt;
48  const double py = sin(m_jpsimuon[i]->IDTrack()->param()->phi0())*absPt;
49  const double pz = cot_teta*absPt;
50  const double en = sqrt((px*px+py*py+pz*pz)+ mass_muon*mass_muon);
51 
52  hlv[i].set(px,py,pz,en);
53  }
54  m_hlvJ=hlv[0]+hlv[1];
55 
56 }
test_pyathena.px
px
Definition: test_pyathena.py:18
TrigJpsi::eta
double eta() const
Definition: TrigJpsi.h:27
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
test_pyathena.pt
pt
Definition: test_pyathena.py:11
TrigJpsi::~TrigJpsi
~TrigJpsi()
Definition: TrigJpsi.cxx:25
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
TrigJpsi::setDaughters
void setDaughters(const CombinedMuonFeature *jpsimuon1, const CombinedMuonFeature *jpsimuon2)
Definition: TrigJpsi.cxx:36
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
CombinedMuonFeature.h
TrigInDetTrack.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
TrigJpsi::m_jpsimuon
const CombinedMuonFeature * m_jpsimuon[2]
Definition: TrigJpsi.h:36
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
CombinedMuonFeature
Definition: CombinedMuonFeature.h:30
TrigJpsi.h
Amg::py
@ py
Definition: GeoPrimitives.h:39
TrigJpsi::m_hlvJ
CLHEP::HepLorentzVector m_hlvJ
Definition: TrigJpsi.h:35
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
TrigJpsi::getDaughter
const CombinedMuonFeature * getDaughter(const int i) const
Definition: TrigJpsi.cxx:28
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
TrigJpsi::TrigJpsi
TrigJpsi()
Definition: TrigJpsi.cxx:14