1 //_____________________________________________________//
3 // This macro reads ACORDE Raw-Rootfied files //
4 // and draws Histograms of Acorde's Bitpattern //
8 // Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> //
10 // Also comments to: //
12 // Mario Sitta <sitta@to.infn.it> //
13 // Arturo Fernandez <afernan@mail.cern.ch> //
14 // Luciano Diaz <luciano.diaz@nucleares.unam.mx> //
15 // Eleazar Cuautle <ecuautle@nucleares.unam.mx> //
16 //____________________________________________________ //
19 #include <TClonesArray.h>
22 //void AcoReco(char* fileName="08000020614001.20.root")
23 void AcoReco(char* fileName)
27 AliRawReader* rawReader = new AliRawReaderRoot(fileName);
28 AliRawReader* rCount = new AliRawReaderRoot(fileName);
29 AliACORDERawStream* rawStream = new AliACORDERawStream(rawReader);
30 TH1D *h1 = new TH1D("h1","ACORDE - Single Muon Hits",60,1,60);
31 TH1D *h2 = new TH1D("h2","ACORDE - Hit Multiplicity",60,1,60);
35 bool kroSingle[60],kroMulti[60];
37 Int_t dyma[60],DyM,nEvents=0;
38 for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;dyma[m]=0;}
41 Int_t nEvents = rawStream->GetNEvents(fileName);
43 printf("Numero de eventos: %d \n",nEvents);
45 for (Int_t i=1; i<=nEvents; i++)
48 // printf("No Event %d",i);
49 if (!rawReader->NextEvent()) break;
51 // printf("No Event %d",i);
53 if (!rawStream->Next()) continue;
54 dy[0]=rawStream->GetWord(0);
55 dy[1]=rawStream->GetWord(1);
56 dy[2]=rawStream->GetWord(2);
57 dy[3]=rawStream->GetWord(3);
59 for(Int_t r=0;r<30;++r)
61 kroSingle[r] = tmpDy & 1;
65 for(Int_t r=30;r<60;++r)
67 kroSingle[r] = tmpDy & 1;
71 for(Int_t r=0;r<30;++r)
73 kroMulti[r] = tmpDy & 1;
77 for(Int_t r=30;r<60;++r)
79 kroMulti[r] = tmpDy & 1;
83 for(Int_t r=0;r<60;++r)
89 contSingle=contSingle+1;
92 }h2->Fill(contSingle);
95 TCanvas *acorde = new TCanvas("ACORDE","ACORDE-Hist-Real Data",1);
98 h1->GetXaxis()->SetTitle("No. of Channel");
99 h1->GetYaxis()->SetTitle("No. of Hits");
100 h1->SetFillColor(kRed);
104 h2->GetXaxis()->SetTitle("No. of Modules");
105 h2->GetYaxis()->SetTitle("Multiplicity");
106 h2->SetFillColor(kBlue);