GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » Differences between Histo and Ntuple
Differences between Histo and Ntuple [message #16539] Wed, 07 May 2014 16:11 Go to previous message
Mamen is currently offline  Mamen
Messages: 55
Registered: January 2009
Location: Mainz
continuous participant
From: *
Dear all,

I'm trying to learn how to save data into a root file using both a histogram or an ntuple.
For the histogram I get reasonable plots, but for the ntuple I get strange events/particles plotted at -1000.
My code looks like follows:

TH1F *eppx = new TH1F ("eppx", "eppx (All)", 200, -2000, 5000.);
RhoTuple *ntp  = new RhoTuple("RecoTuple","Reco_analysis");
PndAnalysis* theAnalysis = new PndAnalysis();
if (nevts==0) nevts= theAnalysis->GetEntries();
// *** RhoCandLists for the analysis
RhoCandList eplus;
while (theAnalysis->GetEvent() && i++<nevts)
		if ((i%100)==0) cout<<"evt " << i << endl;
		// *** Select with no PID info ('All'); type and mass are set 		
		theAnalysis->FillList(chrg,    "Charged");
		theAnalysis->FillList(eplus,  "ElectronAllPlus");

	for (j=0;j<eplus.GetLength();++j) 
		 ntp->Column("eppx",           (Float_t) eplus[j]->Px(),                 -999.0f);


However, I get strange results when I open the output rootfile (see uploaded files).
Am I doing something wrong? Does somebody know where these events at -1000 in the ntuple saved data come from?
Thanks a lot in advance!

Best regards,

Read Message
Read Message
Read Message
Read Message
Previous Topic: Ideal PID in full simulation
Next Topic: hyperon fast simualtions
Goto Forum:

Current Time: Fri Jan 18 07:18:26 CET 2019

Total time taken to generate the page: 0.02953 seconds