GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Analysis for Material Radiation length
Re: Analysis for Material Radiation length [message #14220 is a reply to message #14219] Wed, 21 November 2012 15:40 Go to previous messageGo to previous message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hallo Ajay,

In your macro you have:

....
Quote:

TFile* f = new TFile(inFile.c_str()); // the sim file you want to analyse
TTree *t=(TTree *) f->Get("cbmsim") ;

TFile* file = new TFile("Simulation_par.root");
file->Get("FairBaseParSet");
TClonesArray* mc_array=new TClonesArray("PndMCTrack");
t->SetBranchAddress("MCTrack",&mc_array);//Branch names
TClonesArray* rad_array=new TClonesArray("FairRadLenPoint");
t->SetBranchAddress("RadLen",&rad_array);
// TGeoManager *geoMan = (TGeoManager*) gDirectory->Get("FAIRGeom");
TGeoManager *geoMan = (TGeoManager*) gDirectory->Get("FairBaseParSet");
// PndGeoHandling* fGeoH = new PndGeoHandling();
...




You do not need to call the line in RED it is even wrong, when you call

file->Get("FairBaseParSet");


the geometry is read in memory and the "gGeoManager" global pointer is valid, just use it and it should work! Simply remove the line in RED and use directly gGeoManager, i.e:

TGeoNode* node = gGeoManager->FindNode(point.x(),point.y(),point.z());

regards,

Mohammad


[Updated on: Wed, 21 November 2012 15:41]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: Retrieve parameters from all.par in simulation.
Next Topic: About PID macro
Goto Forum:
  


Current Time: Thu Dec 26 21:14:19 CET 2024

Total time taken to generate the page: 0.00694 seconds