Float_t dx = xmax-xmin;
Float_t dy = ymax-ymin;
+
+
if (strlen(option) == 0) {
TPaveText *title = new TPaveText(xmin +0.01*dx, ymax-0.09*dy, xmin +0.5*dx, ymax-0.01*dy);
// title->SetTextSize(0.023932);
AliMUONChamber* iChamber;
TClonesArray *muonRawClusters = pMUON->GetMUONData()->RawClusters(chamber-1);
- if (muonRawClusters == 0) return;
-// pMUON->ResetRawClusters();
+ if (muonRawClusters == 0) return;
Int_t nent = 0;
- if (gAlice->TreeR()) {
- nent=(Int_t)gAlice->TreeR()->GetEntries();
- gAlice->TreeR()->GetEvent(0);
+ if (pMUON->GetMUONData()->TreeR()) {
+ nent=(Int_t) pMUON->GetMUONData()->TreeR()->GetEntries();
+ pMUON->GetMUONData()->TreeR()->GetEvent(0);
}
Int_t nrawcl = muonRawClusters->GetEntriesFast();
iChamber = &(pMUON->Chamber(chamber-1));
Float_t zpos=iChamber->Z();
- Int_t ntracks = (Int_t)pMUON->TreeH()->GetEntries(); //skowron
+ Int_t ntracks = (Int_t)pMUON->GetMUONData()->TreeH()->GetEntries(); //skowron
Int_t nthits = 0;
for (track = 0; track < ntracks; track++) {
- gAlice->ResetHits();
- pMUON->TreeH()->GetEvent(track);//skowron
- TClonesArray *muonHits = pMUON->Hits();
+ pMUON->GetMUONData()->ResetHits();
+ pMUON->GetMUONData()->GetTrack(track);//skowron
+ TClonesArray *muonHits = pMUON->GetMUONData()->Hits();
if (muonHits == 0) return;
nthits += muonHits->GetEntriesFast();
}
if (fPhits == 0) fPhits = new TObjArray(nthits);
Int_t nhold=0;
for (track=0; track<ntracks;track++) {
- gAlice->ResetHits();
- pMUON->TreeH()->GetEvent(track);//skowron
- TClonesArray *muonHits = pMUON->Hits();
+ pMUON->GetMUONData()->ResetHits();
+ pMUON->GetMUONData()->GetTrack(track);//skowron
+ TClonesArray *muonHits = pMUON->GetMUONData()->Hits();
if (muonHits == 0) return;
Int_t nhits = muonHits->GetEntriesFast();
if (nhits == 0) continue;
MUONdisplay (Int_t nevent=0, TString fileName="galice.root") {
-// Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- /*
- } else {
- delete gAlice;
- gAlice = 0;
- */
- }
+
+ // Getting runloader
+ AliRunLoader * RunLoader = AliRunLoader::Open(fileName,"MUONFolder","READ");
+ if (RunLoader == 0x0) {
+ Error("MUONdisplay","Inut file %s error!",fileName);
+ return;
+ }
+ RunLoader->LoadHeader();
+ RunLoader->LoadKinematics("READ");
-// Connect the Root Galice file containing Geometry, Kine and Hits
- TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(fileName);
- if (!file) file = new TFile(fileName);
+ // Getting MUONloader
+ AliLoader * MUONLoader = RunLoader->GetLoader("MUONLoader");
+ MUONLoader->LoadHits("READ");
+ MUONLoader->LoadDigits("READ");
+ MUONLoader->LoadRecPoints("READ");
+
+ if (RunLoader->GetAliRun() == 0x0) RunLoader->LoadgAlice();
+ gAlice = RunLoader->GetAliRun();
+
+ // Getting Module MUON
+ AliMUON * MUON = (AliMUON *) gAlice->GetDetector("MUON");
+ if (!MUON) {
+ Error("MUONdisplay","Module MUON not found in the input file");
+ return;
+ }
+ // Getting Muon data
+ AliMUONData * muondata = MUON->GetMUONData();
+ muondata->SetLoader(MUONLoader);
+ muondata->SetTreeAddress("H,D,RC,GLT");
-// Get AliRun object from file or create it if not on file
- if (!gAlice) {
- gAlice = (AliRun*)file->Get("gAlice");
- if (gAlice) printf("AliRun object found on file\n");
- if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
- }
-
// Create Event Display object
AliMUONDisplay *muondisplay = new AliMUONDisplay(750);
// Display first event
- gAlice->GetEvent(nevent);
+ RunLoader->GetEvent(nevent);
muondisplay->ShowNextEvent(0);
}
reconstruction and macro analysis
==========================================================
- How to run a MUON simulation
+ How to run a MUON generation
==========================================================
aliroot
root [0] gAlice->Run(10,"$ALICE_ROOT/MUON/Config_MUON_test.C");
G3GUI()
+============================================================
+ How to run MUONdisplay
+============================================================
+Frist you need to perfomr a full simulation:
+generation, digitalisation and clusterisation
+.L $ALICE_ROOT/MUON/MUONdisplay.C
+MUONdisplay(0,"galice.root")
+
============================================================
Tracking parameters, cuts, energy loss and physics processes
============================================================