|
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 36 of file SG_StepNtuple.cxx.
38 NTupleFilePtr file1(
ntupleSvc(),
"/NTUPLES/FILE1");
40 SmartDataPtr<NTuple::Directory>
41 ntdir(
ntupleSvc(),
"/NTUPLES/FILE1/StepNtuple");
43 if ( !ntdir ) ntdir =
ntupleSvc()->createDirectory(file1,
"StepNtuple");
45 NTuplePtr
nt(
ntupleSvc(),
"/NTUPLES/FILE1/StepNtuple/10");
47 nt =
ntupleSvc()->book (ntdir.ptr(), 10,CLID_ColumnWiseTuple,
"GEANT4 Step NTuple");
52 if(
nt->addItem (
"nstep",
m_nsteps,0 ,50000)!=StatusCode::SUCCESS
77 ||
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.
◆ isSUSYParticle()
bool G4UA::SG_StepNtuple::isSUSYParticle |
( |
const int |
id | ) |
const |
|
private |
Definition at line 208 of file SG_StepNtuple.cxx.
210 if (
id==1000021 ||
id==1000005 ||
id==1000006 ||
id==1000512 ||
id==1000522 ||
id==1000991 ||
id==1000993 ||
211 id==1000612 ||
id==1000622 ||
id==1000632 ||
id==1000642 ||
id==1000652 ||
id==1005211 ||
212 id==1006113 ||
id==1006211 ||
id==1006213 ||
id==1006223 ||
id==1006311 ||
213 id==1006313 ||
id==1006321 ||
id==1006323 ||
id==1006333 ||
214 id==1009111 ||
id==1009113 ||
id==1009211 ||
id==1009213 ||
id==1009311 ||
215 id==1009313 ||
id==1009321 ||
id==1009323 ||
id==1009223 ||
id==1009333 ||
216 id==1092112 ||
id==1091114 ||
id==1092114 ||
id==1092212 ||
id==1092214 ||
id==1092224 ||
217 id==1093114 ||
id==1093122 ||
id==1093214 ||
id==1093224 ||
id==1093314 ||
id==1093324 ||
id==1093334)
◆ 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 108 of file SG_StepNtuple.cxx.
111 int pdg = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
119 std::cout<<
"ACH139: SG_StepNtuple: other code thinks "<<pdg<<
" is an Rhadron!"<<std::endl;
127 G4Material *
mat = aStep->GetTrack()->GetMaterial();
128 double minA=1500000.;
129 for (
unsigned int i=0;
i<
mat->GetNumberOfElements();++
i){
130 if (
mat->GetElement(
i) && minA>
mat->GetElement(
i)->GetN()){
131 minA=
mat->GetElement(
i)->GetN();
141 if (firstslow || aStep->GetTrack()->GetCurrentStepNumber()<=1 || aStep->GetPostStepPoint()->GetKineticEnergy()==0.){
145 int id = std::abs(aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding());
154 if (aStep->GetPreStepPoint()->GetGlobalTime()==0)
m_rhadronIndex++;
157 m_pdg[
m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
160 m_mass[
m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGMass();
162 m_t1[
m_nsteps]=aStep->GetPreStepPoint()->GetGlobalTime();
163 m_t2[
m_nsteps]=aStep->GetPostStepPoint()->GetGlobalTime();
164 G4ThreeVector pos1=aStep->GetPreStepPoint()->GetPosition();
168 G4ThreeVector pos2=aStep->GetPostStepPoint()->GetPosition();
172 m_ke1[
m_nsteps]=aStep->GetPreStepPoint()->GetKineticEnergy();
173 m_ke2[
m_nsteps]=aStep->GetPostStepPoint()->GetKineticEnergy();
174 m_pt1[
m_nsteps]=aStep->GetPreStepPoint()->GetMomentum().perp();
175 m_pt2[
m_nsteps]=aStep->GetPostStepPoint()->GetMomentum().perp();
179 m_v2[
m_nsteps]=aStep->GetPostStepPoint()->GetVelocity();
192 if (std::abs(pdg)>1000000 && std::abs(pdg)<10000000){
193 std::cout<<
"ACH129: SG_StepNtuple: Killing non-rh track with pdg "<<pdg<<std::endl;
195 aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries);
196 const G4TrackVector *tv = aStep->GetSecondary();
198 for (
unsigned int i=0;
i<tv->size();
i++){
199 G4Track *
t = (*tv)[
i];
200 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
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
bool isSUSYParticle(const int id) const
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.
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)
NTuple::Array< float > m_x2
NTuple::Array< float > m_pt1
NTuple::Array< float > m_pt2
NTuple::Array< float > m_vthresh