ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigBphysicsEvent
src
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
********************************************************************/
9
#include "
TrigBphysicsEvent/TrigJpsi.h
"
10
#include "
TrigMuonEvent/CombinedMuonFeature.h
"
11
#include "
TrigInDetEvent/TrigInDetTrack.h
"
12
#include "
TruthUtils/ParticleConstants.h
"
13
#include <math.h>
14
15
TrigJpsi::TrigJpsi
()
16
{
17
m_jpsimuon
[0] =
nullptr
;
18
m_jpsimuon
[1] =
nullptr
;
19
}
20
21
TrigJpsi::TrigJpsi
(
const
CombinedMuonFeature
* jpsimuon1,
const
CombinedMuonFeature
* jpsimuon2)
22
{
23
setDaughters
(jpsimuon1,jpsimuon2);
24
}
25
26
TrigJpsi::~TrigJpsi
()
27
{}
28
29
const
CombinedMuonFeature
*
TrigJpsi::getDaughter
(
const
int
i)
const
30
{
31
if
(i==0 || i==1)
32
return
m_jpsimuon
[i];
33
else
34
return
0;
35
}
36
37
void
TrigJpsi::setDaughters
(
const
CombinedMuonFeature
* jpsimuon1,
const
CombinedMuonFeature
* jpsimuon2)
38
{
39
m_jpsimuon
[0]=jpsimuon1;
40
m_jpsimuon
[1]=jpsimuon2;
41
CLHEP::HepLorentzVector hlv[2];
42
43
for
(
int
i=0 ; i<2 ; ++i )
44
{
45
double
cot_teta=1/tan(2*atan(exp(-
m_jpsimuon
[i]->IDTrack()->param()->
eta
())));
46
double
mass_muon =
ParticleConstants::muonMassInMeV
;
47
double
absPt = fabs(
m_jpsimuon
[i]->pt());
48
const
double
px = cos(
m_jpsimuon
[i]->IDTrack()->param()->phi0())*absPt;
49
const
double
py = sin(
m_jpsimuon
[i]->IDTrack()->param()->phi0())*absPt;
50
const
double
pz = cot_teta*absPt;
51
const
double
en = sqrt((px*px+py*py+pz*pz)+ mass_muon*mass_muon);
52
53
hlv[i].set(px,py,pz,en);
54
}
55
m_hlvJ
=hlv[0]+hlv[1];
56
57
}
CombinedMuonFeature.h
ParticleConstants.h
A number of constexpr particle constants to avoid hardcoding them directly in various places.
TrigInDetTrack.h
TrigJpsi.h
CombinedMuonFeature
Definition
CombinedMuonFeature.h:31
TrigJpsi::setDaughters
void setDaughters(const CombinedMuonFeature *jpsimuon1, const CombinedMuonFeature *jpsimuon2)
Definition
TrigJpsi.cxx:37
TrigJpsi::~TrigJpsi
~TrigJpsi()
Definition
TrigJpsi.cxx:26
TrigJpsi::m_jpsimuon
const CombinedMuonFeature * m_jpsimuon[2]
Definition
TrigJpsi.h:36
TrigJpsi::TrigJpsi
TrigJpsi()
Definition
TrigJpsi.cxx:15
TrigJpsi::m_hlvJ
CLHEP::HepLorentzVector m_hlvJ
Definition
TrigJpsi.h:35
TrigJpsi::getDaughter
const CombinedMuonFeature * getDaughter(const int i) const
Definition
TrigJpsi.cxx:29
TrigJpsi::eta
double eta() const
Definition
TrigJpsi.h:27
ParticleConstants::PDG2011::muonMassInMeV
constexpr double muonMassInMeV
the mass of the muon (in MeV)
Definition
ParticleConstants.h:29
Generated on
for ATLAS Offline Software by
1.14.0