Hellow everyone,
I have a ntuple column to store the vectors containing energy deposited in different detectors for each event. (Quite similar to basic Example B5).
If I am not wrong, in Example B5, the vector filling (rather referencing) is done in the runactionclass,
analysisManager // column Id = 6
->CreateNtupleDColumn("ECEnergyVector", fEventAction->GetEmCalEdep());
is it possible to achieve this in the eventaction
class where the other nptuples are getting filled, like copying the above ln in EndofEvent()
?
runaction.cc
#include "runaction.hh"
runaction::runaction(eventaction *eventAction){}
runaction::~runaction(){}
void runaction::BeginOfRunAction(const G4Run* run){
G4AnalysisManager*man = G4AnalysisManager::Instance();
G4int RunID = run->GetRunID();
man->OpenFile("output.root");
man->CreateNtupleDColumn("DetEnergyVector");
man->FinishNtuple(0);
}
void runaction::EndOfRunAction(const G4Run*){
G4AnalysisManager*man = G4AnalysisManager::Instance();
man->Write();
man->CloseFile();
}
Thanks a lot !