Hellow,
I want to visualize the tracks. Duo to this I add the following portion to my sim.C file to generate GeoTracks
[color=#FF0000]"…
…
fRun->SetStoreTraj(kTRUE);
fRun->Init();
CbmTrajFilter *trajFilter = CbmTrajFilter::Instance();
trajFilter->SetStepSizeCut(1.); // 1 cm
trajFilter->SetEnergyCut(1.); // Etot > 1 GeV
fRun->Run(1);
} [/color]
"
My sim.C runs successfully and generate GeoTracks
The I write the following macro to have the visualization
[color=#FF0000]"gSystem->Load(“libGeom.so”);
TFile* f = new TFile(“auaumbias.root”);
TTree *t=f->Get(“cbmsim”) ;
TClonesArray fT=new TClonesArray(“TGeoTrack”);
t->SetBranchAddress(“GeoTracks”,&fT) ;
TGeoManager geoMan = (TGeoManager) f->Get(“CBMGeom”);
TCanvas c1 = new TCanvas(“c1”, “”, 100, 100, 800, 800);
geoMan->GetVolume(“magnet”)->Draw(“same”);
TGeoTrack *tr;
for (Int_t j=0; j< t->GetEntriesFast(); j++) {
t->GetEntry(j);
for (Int_t i=0; iGetEntriesFast(); i++) {
tr=(TGeoTrack *)fT->At(i);
tr->Draw(“same”);
}
}[/color]
"
But on running this, the following error comes-----
[color=#0000FF]====================Error massage====================
Error:illegal pointer to class object geoMan 0x0 1145
much_vis3.C:44:
*** Interpreter error recovered ***
Can anyone help me…[/color]
Regards
Kalyan