Message: TestEm5 create ntupla Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None TestEm5 create ntupla 

Forum: Analysis
Date: 23 Jan, 2016
From: Alessia <Alessia>

Dear Expert, I'm new in geant4. Now I'm going to try to understand how TestEm5 works (I need to simulate the energy deposit in some different detectors). After my simulation I need to make some analysis, like find the number of electron-holes product in my semiconductor. Due to this I tried to create an ntupla; I started from example B4 and I modified my code in this way:

in Event action.cc
     void EventAction::EndOfEventAction(const G4Event*)
{
  Run* run = static_cast<Run*>(
             G4RunManager::GetRunManager()->GetNonConstCurrentRun());

 run->AddEnergy(fEnergyDeposit);
 run->AddTrakLenCharg(fTrakLenCharged);
 run->AddTrakLenNeutr(fTrakLenNeutral);

 run->CountStepsCharg(fNbStepsCharged);
 run->CountStepsNeutr(fNbStepsNeutral);

 run->CountTransmit (fTransmitFlag);
 run->CountReflect  (fReflectFlag);

 G4AnalysisManager::Instance()->FillH1(1,fEnergyDeposit);  

 G4AnalysisManager::Instance()->FillNtupleDColumn(0,fEnergyDeposit);   
  G4AnalysisManager::Instance()->AddNtupleRow();

}

in RunAction.cc

   RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin)
:G4UserRunAction(),fDetector(det), fPrimary(kin), fRun(0), fHistoManager(0)
{ 
  // Book predefined histograms
  fHistoManager = new HistoManager();

   G4AnalysisManager::Instance()->CreateNtuple("Edep", "Edep");
   G4AnalysisManager::Instance()->CreateNtupleDColumn("Eabs");
   G4AnalysisManager::Instance()->FinishNtuple();
}

My problem is that my ntupla is created but it is empty. I tried to read in the forum in the other questions but I couldn't find nothing useful for me.

Thanks in advance to everyone who will try to help me.

Cheers Chiara

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: TestEm5 create ntupla   (Ivana Hrivnacova - 26 Jan, 2016)
1 None: Re: TestEm5 create ntupla   (Alessia - 26 Jan, 2016)
(_ None: Re: TestEm5 create ntupla   (Ivana Hrivnacova - 27 Jan, 2016)
(_ None: Re: TestEm5 create ntupla   (Alessia - 27 Jan, 2016)
2 None: Re: TestEm5 create ntupla   (Ivana Hrivnacova - 27 Jan, 2016)
1 None: Re: TestEm5 create ntupla   (Alessia - 27 Jan, 2016)
(_ None: Re: TestEm5 create ntupla   (Ivana Hrivnacova - 27 Jan, 2016)
(_ None: Re: TestEm5 create ntupla   (Alessia - 27 Jan, 2016)
(_ None: Re: TestEm5 create ntupla   (Ivana Hrivnacova - 28 Jan, 2016)
(_ None: Re: TestEm5 create ntupla   (Alessia - 28 Jan, 2016)
 Add Message Add Message
to: "TestEm5 create ntupla"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]