GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Looking at all the events simultaneously in Event display
Looking at all the events simultaneously in Event display [message #13963] Mon, 17 September 2012 18:17
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *physics.sunysb.edu
Hi All

I am trying to look through eve, all the events in the run simultaneously rather than look at them one by one which the current gui lets me to do.

Is there a way for me to do it for example in the rutherford example in fairroot.


FairEventManager *fMan = new FairEventManager ();
FairMCTracks *Track = new FairMCTracks ("Monte-Carlo Tracks");
FairMCPointDraw *RutherfordPoints = new FairMCPointDraw ("FairRutherfordPoint",kBlue , kFullSquare);

fMan->AddTask(Track);
fMan->AddTask(RutherfordPoints);

fMan->Init();

this is the section of eventDisplay.C which lets me to look at stuff. should i put FairEventManager in some sort of event loop.

something like this:

// ----- Reconstruction run -------------------------------------------
FairRunAna *fRun= new FairRunAna();

std::string inFile = "data/test.mc.root";
TFile* f = new TFile(inFile.c_str());
TTree *t = (TTree *) f->Get("cbmsim");
fRun->SetInputFile(inFile);

fRun->SetOutputFile("data/test.root");

// ----- Parameter database --------------------------------------------
FairRuntimeDb* rtdb = fRun->GetRuntimeDb();

FairParRootFileIo* parIo1 = new FairParRootFileIo();
parIo1->open("data/params.root");
rtdb->setFirstInput(parIo1);
// ------------------------------------------------------------------------

FairEventManager *fMan = new FairEventManager ();

for (int i = 0; i<t->GetEntriesFast(); i++) {
t->GetEntry(i);

FairMCTracks *Track = new FairMCTracks ("Monte-Carlo Tracks");
FairMCPointDraw *RutherfordPoints = new FairMCPointDraw ("FairRutherfordPoint",kBlue , kFullSquare);

fMan->AddTask(Track);
fMan->AddTask(RutherfordPoints);

}

fMan->Init();

Thanks a lot
Raghav

[Updated on: Mon, 17 September 2012 18:45]

Report message to a moderator

Previous Topic: Running Pythia input on Geant4 not working
Next Topic: Unable to run rutherford example with new update (9/19/12)
Goto Forum:
  


Current Time: Thu Nov 28 11:52:26 CET 2024

Total time taken to generate the page: 0.00385 seconds