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

#include <TFCSTruthState.h>

Inheritance diagram for TFCSTruthState:
Collaboration diagram for TFCSTruthState:

Public Member Functions

 TFCSTruthState ()
 
 TFCSTruthState (Double_t x, Double_t y, Double_t z, Double_t t, int pdgid)
 
void set_pdgid (int val)
 
void set_vertex (const TLorentzVector &val)
 
void set_vertex (Double_t x, Double_t y, Double_t z, Double_t t=0)
 
void set_Ekin_off (double val)
 
int pdgid () const
 
double Ekin () const
 
double Ekin_off () const
 
const TLorentzVector & vertex () const
 
void Print (Option_t *option="") const
 
bool msgLvl (const MSG::Level lvl) const
 Check whether the logging system is active at the provided verbosity level. More...
 
MsgStream & msg () const
 Return a stream for sending messages directly (no decoration) More...
 
MsgStream & msg (const MSG::Level lvl) const
 Return a decorated starting stream for sending messages. More...
 
MSG::Level level () const
 Retrieve output level. More...
 
virtual void setLevel (MSG::Level lvl)
 Update outputlevel. More...
 

Static Public Member Functions

static std::string startMsg (MSG::Level lvl, const std::string &file, int line)
 Make a message to decorate the start of logging. More...
 

Private Attributes

int m_pdgid
 
TLorentzVector m_vertex
 
double m_ekin_off = 0
 
std::string m_nm
 Message source name. More...
 

Static Private Attributes

static boost::thread_specific_ptr< MsgStream > m_msg_tls ATLAS_THREAD_SAFE
 Do not persistify! More...
 

Detailed Description

Definition at line 13 of file TFCSTruthState.h.

Constructor & Destructor Documentation

◆ TFCSTruthState() [1/2]

TFCSTruthState::TFCSTruthState ( )

Definition at line 12 of file TFCSTruthState.cxx.

13  : TLorentzVector(), m_pdgid(0), m_vertex(0, 0, 0, 0) {}

◆ TFCSTruthState() [2/2]

TFCSTruthState::TFCSTruthState ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  t,
int  pdgid 
)

Definition at line 15 of file TFCSTruthState.cxx.

17  : TLorentzVector(x, y, z, t), m_vertex(0, 0, 0, 0) {
18  m_pdgid = pdgid;
19 }

Member Function Documentation

◆ Ekin()

double TFCSTruthState::Ekin ( ) const
inline

Definition at line 26 of file TFCSTruthState.h.

26 { return E() - M() + m_ekin_off; };

◆ Ekin_off()

double TFCSTruthState::Ekin_off ( ) const
inline

Definition at line 27 of file TFCSTruthState.h.

27 { return m_ekin_off; };

◆ level()

MSG::Level ISF_FCS::MLogging::level ( ) const
inlineinherited

Retrieve output level.

Definition at line 201 of file MLogging.h.

201 { return msg().level(); }

◆ msg() [1/2]

MsgStream & ISF_FCS::MLogging::msg ( ) const
inlineinherited

Return a stream for sending messages directly (no decoration)

Definition at line 231 of file MLogging.h.

231  {
232  MsgStream *ms = m_msg_tls.get();
233  if (!ms) {
234  ms = new MsgStream(Athena::getMessageSvc(), m_nm);
235  m_msg_tls.reset(ms);
236  }
237  return *ms;
238 }

◆ msg() [2/2]

MsgStream & ISF_FCS::MLogging::msg ( const MSG::Level  lvl) const
inlineinherited

Return a decorated starting stream for sending messages.

Definition at line 240 of file MLogging.h.

240  {
241  return msg() << lvl;
242 }

◆ msgLvl()

bool ISF_FCS::MLogging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Check whether the logging system is active at the provided verbosity level.

Definition at line 222 of file MLogging.h.

222  {
223  if (msg().level() <= lvl) {
224  msg() << lvl;
225  return true;
226  } else {
227  return false;
228  }
229 }

◆ pdgid()

int TFCSTruthState::pdgid ( ) const
inline

Definition at line 25 of file TFCSTruthState.h.

25 { return m_pdgid; };

◆ Print()

void TFCSTruthState::Print ( Option_t *  option = "") const

Definition at line 21 of file TFCSTruthState.cxx.

21  {
22  ATH_MSG_INFO("PDGID=" << m_pdgid << " pT=" << Pt() << " eta=" << Eta()
23  << " phi=" << Phi() << " E=" << E()
24  << " Ekin_off=" << Ekin_off());
25 }

◆ set_Ekin_off()

void TFCSTruthState::set_Ekin_off ( double  val)
inline

Definition at line 23 of file TFCSTruthState.h.

23 { m_ekin_off = val; };

◆ set_pdgid()

void TFCSTruthState::set_pdgid ( int  val)
inline

Definition at line 18 of file TFCSTruthState.h.

18 { m_pdgid = val; };

◆ set_vertex() [1/2]

void TFCSTruthState::set_vertex ( const TLorentzVector &  val)
inline

Definition at line 19 of file TFCSTruthState.h.

19 { m_vertex = val; };

◆ set_vertex() [2/2]

void TFCSTruthState::set_vertex ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  t = 0 
)
inline

Definition at line 20 of file TFCSTruthState.h.

20  {
21  m_vertex.SetXYZT(x, y, z, t);
22  };

◆ setLevel()

void ISF_FCS::MLogging::setLevel ( MSG::Level  lvl)
virtualinherited

Update outputlevel.

Definition at line 105 of file MLogging.cxx.

105  {
106  lvl = (lvl >= MSG::NUM_LEVELS) ? MSG::ALWAYS
107  : (lvl < MSG::NIL) ? MSG::NIL
108  : lvl;
109  msg().setLevel(lvl);
110 }

◆ startMsg()

std::string ISF_FCS::MLogging::startMsg ( MSG::Level  lvl,
const std::string &  file,
int  line 
)
staticinherited

Make a message to decorate the start of logging.

Print a message for the start of logging.

Definition at line 116 of file MLogging.cxx.

116  {
117  int col1_len = 20;
118  int col2_len = 5;
119  int col3_len = 10;
120  auto last_slash = file.find_last_of('/');
121  int path_len = last_slash == std::string::npos ? 0 : last_slash;
122  int trim_point = path_len;
123  int total_len = file.length();
124  if (total_len - path_len > col1_len)
125  trim_point = total_len - col1_len;
126  std::string trimmed_name = file.substr(trim_point);
127  const char *LevelNames[MSG::NUM_LEVELS] = {
128  "NIL", "VERBOSE", "DEBUG", "INFO", "WARNING", "ERROR", "FATAL", "ALWAYS"};
129  std::string level = LevelNames[lvl];
130  std::string level_string = std::string("(") + level + ") ";
131  std::stringstream output;
132  output << std::setw(col1_len) << std::right << trimmed_name << ":"
133  << std::setw(col2_len) << std::left << line << std::setw(col3_len)
134  << std::right << level_string;
135  return output.str();
136 }

◆ vertex()

const TLorentzVector& TFCSTruthState::vertex ( ) const
inline

Definition at line 28 of file TFCSTruthState.h.

28 { return m_vertex; };

Member Data Documentation

◆ ATLAS_THREAD_SAFE

boost::thread_specific_ptr<MsgStream> m_msg_tls ISF_FCS::MLogging::ATLAS_THREAD_SAFE
inlinestaticprivateinherited

Do not persistify!

MsgStream instance (a std::cout like with print-out levels)

Definition at line 215 of file MLogging.h.

◆ m_ekin_off

double TFCSTruthState::m_ekin_off = 0
private

Definition at line 35 of file TFCSTruthState.h.

◆ m_nm

std::string ISF_FCS::MLogging::m_nm
privateinherited

Message source name.

Definition at line 211 of file MLogging.h.

◆ m_pdgid

int TFCSTruthState::m_pdgid
private

Definition at line 33 of file TFCSTruthState.h.

◆ m_vertex

TLorentzVector TFCSTruthState::m_vertex
private

Definition at line 34 of file TFCSTruthState.h.


The documentation for this class was generated from the following files:
checkFileSG.line
line
Definition: checkFileSG.py:75
TFCSTruthState::m_vertex
TLorentzVector m_vertex
Definition: TFCSTruthState.h:34
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ISF_FCS::MLogging::level
MSG::Level level() const
Retrieve output level.
Definition: MLogging.h:201
Phi
@ Phi
Definition: RPCdef.h:8
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
x
#define x
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
TFCSTruthState::m_ekin_off
double m_ekin_off
Definition: TFCSTruthState.h:35
ISF_FCS::MLogging::msg
MsgStream & msg() const
Return a stream for sending messages directly (no decoration)
Definition: MLogging.h:231
TrigConf::MSGTC::ALWAYS
@ ALWAYS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:29
z
#define z
TFCSTruthState::m_pdgid
int m_pdgid
Definition: TFCSTruthState.h:33
ISF_FCS::MLogging::m_nm
std::string m_nm
Message source name.
Definition: MLogging.h:211
file
TFile * file
Definition: tile_monitor.h:29
merge.output
output
Definition: merge.py:17
TrigConf::MSGTC::NUM_LEVELS
@ NUM_LEVELS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:30
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
TFCSTruthState::pdgid
int pdgid() const
Definition: TFCSTruthState.h:25
TFCSTruthState::Ekin_off
double Ekin_off() const
Definition: TFCSTruthState.h:27
Prompt::Def::Pt
@ Pt
Definition: VarHolder.h:76
y
#define y
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
TrigConf::MSGTC::NIL
@ NIL
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:22
Eta
@ Eta
Definition: RPCdef.h:8