GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Finding true vertex position of mother particles.
Re: Finding true vertex position of mother particles. [message #12275 is a reply to message #12101] Fri, 15 July 2011 12:23 Go to previous messageGo to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *pool.mediaWays.net
Hello Donghee,

I have a present for you Smile
  TFile* f = new TFile(inFile.Data()); // the sim file you want to analyse
  TTree* t=(TTree*)f->Get("cbmsim");
  
  FairMCEventHeader* evthead;
  t->SetBranchAddress("MCEventHeader.", &evthead);
  
  for (Int_t j=0; j<nEvents && j<t->GetEntriesFast(); j++)
  {
    t->GetEntry(j);
    if(verbosepoints) cout<<"Event No "<<j<<endl;
    else if (!(j%100)) cout <<"Event No "<<j<<endl;
    cout<<"GetRunID() "<<evthead->GetRunID()<<endl;
    cout<<"GetEventID() "<<evthead->GetEventID()<<endl;
    cout<<"GetX() "<<evthead->GetX()    <<endl;
    cout<<"GetY() "<<evthead->GetY()  <<endl;  
    cout<<"GetZ() "<<evthead->GetZ()   <<endl; 
    cout<<"GetT() "<<evthead->GetT()   <<endl; 
    cout<<"GetNPrim() "<<evthead->GetNPrim()  <<endl; 
  }// end for j (events)


Be reminded of the Branch name (thaks Tobias) and that the Event header is an object directliy inside the tree, like all the TClonesArrays.

Kind regards,
Ralf
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: cdash changes: update your nightly builds!
Next Topic: Lambda-Lambda_bar
Goto Forum:
  


Current Time: Mon Jun 24 15:42:08 CEST 2024

Total time taken to generate the page: 0.01027 seconds