|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/IDataProviderSvc.h"
8 #include "GaudiKernel/INTupleSvc.h"
9 #include "GaudiKernel/NTuple.h"
10 #include "GaudiKernel/SmartDataPtr.h"
15 #include "GaudiKernel/Bootstrap.h"
16 #include "GaudiKernel/ISvcLocator.h"
17 #include "GaudiKernel/IMessageSvc.h"
48 if(!
ntupleSvc()->writeRecord(
"/NTUPLES/FILE1/StepNtuple/10").isSuccess()){
59 theInfo.
dep=aStep->GetTotalEnergyDeposit();
60 theInfo.time=aStep->GetPreStepPoint()->GetGlobalTime();
61 theInfo.code=aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
62 G4ThreeVector
pos=aStep->GetPreStepPoint()->GetPosition();
74 NTupleFilePtr file1(
ntupleSvc(),
"/NTUPLES/FILE1");
76 SmartDataPtr<NTuple::Directory>
77 ntdir(
ntupleSvc(),
"/NTUPLES/FILE1/StepNtuple");
80 ntdir =
ntupleSvc()->createDirectory(file1,
"StepNtuple");
86 NTuplePtr
nt(
ntupleSvc(),
"/NTUPLES/FILE1/StepNtuple/10");
90 nt =
ntupleSvc()->book( ntdir.ptr(), 10, CLID_ColumnWiseTuple,
"G4 Step Ntuple" );
96 if(
nt->addItem (
"NSteps",
m_nsteps,0, 50000).isFailure() ||
simple struct to hold step information
virtual void UserSteppingAction(const G4Step *) override
virtual void BeginOfEventAction(const G4Event *) override
the hooks for G4 UA handling
virtual void BeginOfRunAction(const G4Run *) override
#define ATH_MSG_VERBOSE(x)
NTuple::Array< float > m_step_y
void setLevel(MSG::Level lvl)
Change the current logging level.
NTuple::Array< float > m_step_x
Class to provide easy MsgStream access and capabilities.
StepNtuple(const MSG::Level lvl=MSG::INFO)
Constructor with message level argument for AthMessaging.
virtual void EndOfEventAction(const G4Event *) override
NTuple::Array< float > m_dep
NTuple::Array< float > m_step_z
NTuple::Array< float > m_time
std::vector< stepdata > eventSteps
holds data extracted from steps
=============================================================================
NTuple::Item< long > m_nsteps
handles for ntuple writing
NTuple::Array< float > m_pdgcode