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

#include <MuonSimuTrack.h>

Inheritance diagram for MuonSimuTrack:
Collaboration diagram for MuonSimuTrack:

Public Member Functions

 MuonSimuTrack (int, const SimuTrackData &)
 
 MuonSimuTrack (const MuonSimuTrack &)
 
 ~MuonSimuTrack ()
 
MuonSimuTrack operator= (const MuonSimuTrack &)
 
int event_number (void) const
 
int vertex_number (void) const
 
int track_number (void) const
 
float Pt (void) const
 
float generation_theta (void) const
 
float generation_eta (void) const
 
float generation_phi (void) const
 
float Px (void) const
 
float Py (void) const
 
float Pz (void) const
 
float Energy (void) const
 
void Print (std::ostream &, bool) const
 
void set_number (int)
 
int number (void) const
 
void PrintElement (std::ostream &, std::string, bool) const
 
ObjectType tag () const
 
const std::string & name () const
 

Private Attributes

int m_event_number
 
int m_vertex_number
 
int m_track_number
 
float m_Px
 
float m_Py
 
float m_Pz
 
float m_Energy
 
int m_number
 
ObjectType m_tag
 
std::string m_name
 

Detailed Description

Definition at line 55 of file MuonSimuTrack.h.

Constructor & Destructor Documentation

◆ MuonSimuTrack() [1/2]

MuonSimuTrack::MuonSimuTrack ( int  number,
const SimuTrackData data 
)

Definition at line 14 of file MuonSimuTrack.cxx.

14  :
15 RPCtrigDataObject(number,"SimulatedMuonTrack")
16 {
17  this->m_event_number = data.event_number;
18  this->m_vertex_number = data.vertex_number;
19  this->m_track_number = data.track_number;
20 
21  this->m_Px = data.Px;
22  this->m_Py = data.Py;
23  this->m_Pz = data.Pz;
24  this->m_Energy = data.Energy;
25 }

◆ MuonSimuTrack() [2/2]

MuonSimuTrack::MuonSimuTrack ( const MuonSimuTrack muon)

Definition at line 27 of file MuonSimuTrack.cxx.

27  :
28 RPCtrigDataObject(muon.number(),muon.name())
29 {
30  this->m_event_number = muon.event_number();
31  this->m_vertex_number = muon.vertex_number();
32  this->m_track_number = muon.track_number();
33 
34  this->m_Px = muon.Px();
35  this->m_Py = muon.Py();
36  this->m_Pz = muon.Pz();
37  this->m_Energy = muon.Energy();
38 }

◆ ~MuonSimuTrack()

MuonSimuTrack::~MuonSimuTrack ( )
inline

Definition at line 70 of file MuonSimuTrack.h.

70 {}

Member Function Documentation

◆ Energy()

float MuonSimuTrack::Energy ( void  ) const
inline

Definition at line 87 of file MuonSimuTrack.h.

87 {return m_Energy;}

◆ event_number()

int MuonSimuTrack::event_number ( void  ) const
inline

Definition at line 75 of file MuonSimuTrack.h.

75 {return m_event_number;}

◆ generation_eta()

float MuonSimuTrack::generation_eta ( void  ) const

Definition at line 66 of file MuonSimuTrack.cxx.

67 {
68  float eta = -log(tan(this->generation_theta()/2.));
69  return (this->m_Pz > 0.)? eta : -eta;
70 }

◆ generation_phi()

float MuonSimuTrack::generation_phi ( void  ) const

Definition at line 72 of file MuonSimuTrack.cxx.

73 {
74  return atan2(this->m_Py,this->m_Px);
75 }

◆ generation_theta()

float MuonSimuTrack::generation_theta ( void  ) const

Definition at line 61 of file MuonSimuTrack.cxx.

62 {
63  return atan(this->Pt()/fabsf(this->m_Pz));
64 }

◆ name()

const std::string& BaseObject::name ( ) const
inlineinherited

Definition at line 23 of file BaseObject.h.

23 { return m_name; }

◆ number()

int RPCtrigDataObject::number ( void  ) const
inlineinherited

Definition at line 29 of file RPCtrigDataObject.h.

29 {return m_number;}

◆ operator=()

MuonSimuTrack MuonSimuTrack::operator= ( const MuonSimuTrack muon)

Definition at line 40 of file MuonSimuTrack.cxx.

41 {
42  static_cast<RPCtrigDataObject&>(*this) =
43  static_cast<const RPCtrigDataObject&>(muon);
44  this->m_event_number = muon.event_number();
45  this->m_vertex_number = muon.vertex_number();
46  this->m_track_number = muon.track_number();
47 
48  this->m_Px = muon.Px();
49  this->m_Py = muon.Py();
50  this->m_Pz = muon.Pz();
51  this->m_Energy = muon.Energy();
52 
53  return *this;
54 }

◆ Print()

void MuonSimuTrack::Print ( std::ostream &  stream,
bool  detail 
) const
virtual

Reimplemented from BaseObject.

Definition at line 77 of file MuonSimuTrack.cxx.

78 {
79  unsigned int upper = 17;
80  unsigned int lower = 19;
81 
82  for(int i=0;i<61;++i) stream << (char) upper;
83  stream << std::endl;
84 
85  stream << " Muon track number " << track_number() <<
86  " from vertex n. " << vertex_number() <<
87  ", belonging to event " << event_number() <<
88  ":" << std::endl;
89  stream << " generation eta = " << std::setw(6) << generation_eta() <<
90  " generation phi = " << std::setw(6) << generation_phi() <<
91  std::endl;
92 
93  if (detail)
94  {
95  stream << " Px = " << std::setw(7) << Px() <<
96  ", Py = " << std::setw(7) << Py() <<
97  ", Pz = " << std::setw(7) << Pz() <<
98  ", Energy = " << std::setw(7) << Energy() << std::endl;
99  }
100 
101  for(int i=0;i<61;++i) stream << (char) lower;
102  stream << std::endl;
103 }

◆ PrintElement()

void RPCtrigDataObject::PrintElement ( std::ostream &  ,
std::string  ,
bool   
) const
inlineinherited

Definition at line 31 of file RPCtrigDataObject.h.

31 {}

◆ Pt()

float MuonSimuTrack::Pt ( void  ) const

Definition at line 56 of file MuonSimuTrack.cxx.

57 {
58  return sqrt(m_Px * m_Px + m_Py * m_Py);
59 }

◆ Px()

float MuonSimuTrack::Px ( void  ) const
inline

Definition at line 84 of file MuonSimuTrack.h.

84 {return m_Px;}

◆ Py()

float MuonSimuTrack::Py ( void  ) const
inline

Definition at line 85 of file MuonSimuTrack.h.

85 {return m_Py;}

◆ Pz()

float MuonSimuTrack::Pz ( void  ) const
inline

Definition at line 86 of file MuonSimuTrack.h.

86 {return m_Pz;}

◆ set_number()

void RPCtrigDataObject::set_number ( int  number)
inherited

Definition at line 42 of file RPCtrigDataObject.cxx.

43 {
44  m_number = number;
45 }

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22 { return m_tag; }

◆ track_number()

int MuonSimuTrack::track_number ( void  ) const
inline

Definition at line 77 of file MuonSimuTrack.h.

77 {return m_track_number;}

◆ vertex_number()

int MuonSimuTrack::vertex_number ( void  ) const
inline

Definition at line 76 of file MuonSimuTrack.h.

76 {return m_vertex_number;}

Member Data Documentation

◆ m_Energy

float MuonSimuTrack::m_Energy
private

Definition at line 65 of file MuonSimuTrack.h.

◆ m_event_number

int MuonSimuTrack::m_event_number
private

Definition at line 58 of file MuonSimuTrack.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_number

int RPCtrigDataObject::m_number
privateinherited

Definition at line 17 of file RPCtrigDataObject.h.

◆ m_Px

float MuonSimuTrack::m_Px
private

Definition at line 62 of file MuonSimuTrack.h.

◆ m_Py

float MuonSimuTrack::m_Py
private

Definition at line 63 of file MuonSimuTrack.h.

◆ m_Pz

float MuonSimuTrack::m_Pz
private

Definition at line 64 of file MuonSimuTrack.h.

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.

◆ m_track_number

int MuonSimuTrack::m_track_number
private

Definition at line 60 of file MuonSimuTrack.h.

◆ m_vertex_number

int MuonSimuTrack::m_vertex_number
private

Definition at line 59 of file MuonSimuTrack.h.


The documentation for this class was generated from the following files:
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
RPCtrigDataObject::m_number
int m_number
Definition: RPCtrigDataObject.h:17
RPCtrigDataObject::RPCtrigDataObject
RPCtrigDataObject(int, const std::string &)
Definition: RPCtrigDataObject.cxx:10
MuonSimuTrack::Pz
float Pz(void) const
Definition: MuonSimuTrack.h:86
MuonSimuTrack::m_Px
float m_Px
Definition: MuonSimuTrack.h:62
MuonSimuTrack::m_event_number
int m_event_number
Definition: MuonSimuTrack.h:58
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
MuonSimuTrack::m_Energy
float m_Energy
Definition: MuonSimuTrack.h:65
SimuTrackData::track_number
int track_number
Definition: MuonSimuTrack.h:46
detail
Definition: extract_histogram_tag.cxx:14
upper
int upper(int c)
Definition: LArBadChannelParser.cxx:49
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
MuonSimuTrack::Py
float Py(void) const
Definition: MuonSimuTrack.h:85
MuonSimuTrack::generation_eta
float generation_eta(void) const
Definition: MuonSimuTrack.cxx:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
SimuTrackData::event_number
int event_number
Definition: MuonSimuTrack.h:44
MuonSimuTrack::m_track_number
int m_track_number
Definition: MuonSimuTrack.h:60
MuonSimuTrack::m_Py
float m_Py
Definition: MuonSimuTrack.h:63
MuonSimuTrack::track_number
int track_number(void) const
Definition: MuonSimuTrack.h:77
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
MuonSimuTrack::Energy
float Energy(void) const
Definition: MuonSimuTrack.h:87
SimuTrackData::Pz
float Pz
Definition: MuonSimuTrack.h:50
MuonSimuTrack::Pt
float Pt(void) const
Definition: MuonSimuTrack.cxx:56
MuonSimuTrack::generation_phi
float generation_phi(void) const
Definition: MuonSimuTrack.cxx:72
RPCtrigDataObject
Definition: RPCtrigDataObject.h:15
MuonSimuTrack::generation_theta
float generation_theta(void) const
Definition: MuonSimuTrack.cxx:61
MuonSimuTrack::Px
float Px(void) const
Definition: MuonSimuTrack.h:84
SimuTrackData::vertex_number
int vertex_number
Definition: MuonSimuTrack.h:45
MuonSimuTrack::m_Pz
float m_Pz
Definition: MuonSimuTrack.h:64
RPCtrigDataObject::number
int number(void) const
Definition: RPCtrigDataObject.h:29
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15
SimuTrackData::Energy
float Energy
Definition: MuonSimuTrack.h:51
MuonSimuTrack::m_vertex_number
int m_vertex_number
Definition: MuonSimuTrack.h:59
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SimuTrackData::Px
float Px
Definition: MuonSimuTrack.h:48
MuonSimuTrack::event_number
int event_number(void) const
Definition: MuonSimuTrack.h:75
SimuTrackData::Py
float Py
Definition: MuonSimuTrack.h:49
MuonSimuTrack::vertex_number
int vertex_number(void) const
Definition: MuonSimuTrack.h:76