|
ATLAS Offline Software
|
#include <SG_StepNtuple.h>
Definition at line 20 of file SG_StepNtuple.h.
◆ SG_StepNtuple()
G4UA::SG_StepNtuple::SG_StepNtuple |
( |
const std::vector< int > & |
pdgids | ) |
|
◆ BeginOfEventAction()
void G4UA::SG_StepNtuple::BeginOfEventAction |
( |
const G4Event * |
| ) |
|
|
overridevirtual |
◆ BeginOfRunAction()
void G4UA::SG_StepNtuple::BeginOfRunAction |
( |
const G4Run * |
| ) |
|
|
overridevirtual |
Definition at line 38 of file SG_StepNtuple.cxx.
40 NTupleFilePtr file1(
ntupleSvc(),
"/NTUPLES/FILE1");
42 SmartDataPtr<NTuple::Directory>
43 ntdir(
ntupleSvc(),
"/NTUPLES/FILE1/StepNtuple");
45 if ( !ntdir ) ntdir =
ntupleSvc()->createDirectory(file1,
"StepNtuple");
47 NTuplePtr
nt(
ntupleSvc(),
"/NTUPLES/FILE1/StepNtuple/10");
49 nt =
ntupleSvc()->book (ntdir.ptr(), 10,CLID_ColumnWiseTuple,
"GEANT4 Step NTuple");
54 if(
nt->addItem (
"nstep",
m_nsteps,0 ,50000)!=StatusCode::SUCCESS
79 ||
nt->addItem (
"evtid",
m_evtid)!=StatusCode::SUCCESS)
◆ EndOfEventAction()
void G4UA::SG_StepNtuple::EndOfEventAction |
( |
const G4Event * |
| ) |
|
|
overridevirtual |
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ UserSteppingAction()
void G4UA::SG_StepNtuple::UserSteppingAction |
( |
const G4Step * |
aStep | ) |
|
|
overridevirtual |
Definition at line 110 of file SG_StepNtuple.cxx.
113 const int pdg_id = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
123 ATH_MSG_DEBUG (
" TruthUtils classifies "<<pdg_id<<
" as an R-Hadron, gluino or LH Squark!");
131 G4Material *
mat = aStep->GetTrack()->GetMaterial();
132 double minA=1500000.;
133 for (
unsigned int i=0;
i<
mat->GetNumberOfElements();++
i){
134 if (
mat->GetElement(
i) && minA>
mat->GetElement(
i)->GetN()){
135 minA=
mat->GetElement(
i)->GetN();
145 if (firstslow || aStep->GetTrack()->GetCurrentStepNumber()<=1 || aStep->GetPostStepPoint()->GetKineticEnergy()==0.){
158 if (aStep->GetPreStepPoint()->GetGlobalTime()==0)
m_rhadronIndex++;
164 m_mass[
m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGMass();
166 m_t1[
m_nsteps]=aStep->GetPreStepPoint()->GetGlobalTime();
167 m_t2[
m_nsteps]=aStep->GetPostStepPoint()->GetGlobalTime();
168 G4ThreeVector pos1=aStep->GetPreStepPoint()->GetPosition();
172 G4ThreeVector pos2=aStep->GetPostStepPoint()->GetPosition();
176 m_ke1[
m_nsteps]=aStep->GetPreStepPoint()->GetKineticEnergy();
177 m_ke2[
m_nsteps]=aStep->GetPostStepPoint()->GetKineticEnergy();
178 m_pt1[
m_nsteps]=aStep->GetPreStepPoint()->GetMomentum().perp();
179 m_pt2[
m_nsteps]=aStep->GetPostStepPoint()->GetMomentum().perp();
183 m_v2[
m_nsteps]=aStep->GetPostStepPoint()->GetVelocity();
197 ATH_MSG_DEBUG (
"UserSteppingAction(): Killing uninteresting track with pdg_id "<<pdg_id);
199 aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries);
200 const G4TrackVector *tv = aStep->GetSecondary();
202 for (
unsigned int i=0;
i<tv->size();
i++){
203 G4Track *
t = (*tv)[
i];
204 t->SetTrackStatus(fKillTrackAndSecondaries);
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_baryon
NTuple::Array<int> G4UA::SG_StepNtuple::m_baryon |
|
private |
◆ m_charge
NTuple::Array<int> G4UA::SG_StepNtuple::m_charge |
|
private |
◆ m_dep
NTuple::Array<float> G4UA::SG_StepNtuple::m_dep |
|
private |
◆ m_evtid
NTuple::Item<long> G4UA::SG_StepNtuple::m_evtid |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_ke1
NTuple::Array<float> G4UA::SG_StepNtuple::m_ke1 |
|
private |
◆ m_ke2
NTuple::Array<float> G4UA::SG_StepNtuple::m_ke2 |
|
private |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_mass
NTuple::Array<float> G4UA::SG_StepNtuple::m_mass |
|
private |
◆ m_minA
NTuple::Array<float> G4UA::SG_StepNtuple::m_minA |
|
private |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nevents
long G4UA::SG_StepNtuple::m_nevents = 0 |
|
private |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_nsteps
NTuple::Item<long> G4UA::SG_StepNtuple::m_nsteps |
|
private |
◆ m_pdg
NTuple::Array<int> G4UA::SG_StepNtuple::m_pdg |
|
private |
◆ m_pt1
NTuple::Array<float> G4UA::SG_StepNtuple::m_pt1 |
|
private |
◆ m_pt2
NTuple::Array<float> G4UA::SG_StepNtuple::m_pt2 |
|
private |
◆ m_rh
NTuple::Array<int> G4UA::SG_StepNtuple::m_rh |
|
private |
◆ m_rhadronIndex
long G4UA::SG_StepNtuple::m_rhadronIndex = 0 |
|
private |
◆ m_rhid
NTuple::Array<int> G4UA::SG_StepNtuple::m_rhid |
|
private |
◆ m_rhs
std::set<int> G4UA::SG_StepNtuple::m_rhs |
|
private |
◆ m_step
NTuple::Array<int> G4UA::SG_StepNtuple::m_step |
|
private |
◆ m_t1
NTuple::Array<float> G4UA::SG_StepNtuple::m_t1 |
|
private |
◆ m_t2
NTuple::Array<float> G4UA::SG_StepNtuple::m_t2 |
|
private |
◆ m_v2
NTuple::Array<float> G4UA::SG_StepNtuple::m_v2 |
|
private |
◆ m_vbelowthresh
NTuple::Array<float> G4UA::SG_StepNtuple::m_vbelowthresh |
|
private |
◆ m_vthresh
NTuple::Array<float> G4UA::SG_StepNtuple::m_vthresh |
|
private |
◆ m_x1
NTuple::Array<float> G4UA::SG_StepNtuple::m_x1 |
|
private |
◆ m_x2
NTuple::Array<float> G4UA::SG_StepNtuple::m_x2 |
|
private |
◆ m_y1
NTuple::Array<float> G4UA::SG_StepNtuple::m_y1 |
|
private |
◆ m_y2
NTuple::Array<float> G4UA::SG_StepNtuple::m_y2 |
|
private |
◆ m_z1
NTuple::Array<float> G4UA::SG_StepNtuple::m_z1 |
|
private |
◆ m_z2
NTuple::Array<float> G4UA::SG_StepNtuple::m_z2 |
|
private |
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
NTuple::Array< float > m_y1
NTuple::Item< long > m_evtid
std::string find(const std::string &s)
return a remapped string
NTuple::Array< float > m_mass
NTuple::Array< float > m_x1
bool isBSM(const T &p)
APID: graviton and all Higgs extensions are BSM.
NTuple::Array< float > m_y2
NTuple::Array< float > m_v2
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
NTuple::Array< float > m_t2
AthMessaging()
Default constructor:
NTuple::Item< long > m_nsteps
NTuple::Array< int > m_rh
NTuple::Array< float > m_ke1
NTuple::Array< float > m_t1
NTuple::Array< float > m_z2
NTuple::Array< float > m_z1
NTuple::Array< int > m_baryon
NTuple::Array< int > m_step
MsgStream & msg() const
The standard message stream.
NTuple::Array< float > m_minA
NTuple::Array< int > m_rhid
NTuple::Array< int > m_charge
NTuple::Array< int > m_pdg
NTuple::Array< float > m_dep
NTuple::Array< float > m_vbelowthresh
std::string m_nm
Message source name.
bool isSquarkLH(const T &p)
bool isRHadron(const T &p)
NTuple::Array< float > m_ke2
void initMessaging() const
Initialize our message level and MessageSvc.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
constexpr int pow(int base, int exp) noexcept
NTuple::Array< float > m_x2
NTuple::Array< float > m_pt1
NTuple::Array< float > m_pt2
NTuple::Array< float > m_vthresh