if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
}
+ AliRICH *RICH = (AliRICH*)gAlice->GetDetector("RICH");
+
+ RICH->DiagnosticsSE(diaglevel,evNumber1,evNumber2);
+
+ file->Write();
+
+
// Create some histograms
- AliRICH *RICH = (AliRICH*)gAlice->GetDetector("RICH");
+/* AliRICH *RICH = (AliRICH*)gAlice->GetDetector("RICH");
AliRICHSegmentationV0* segmentation;
AliRICHChamber* chamber;
Int_t NpadY = segmentation->Npy(); // number of pads on Y
Int_t Pad[144][160];
- /*for (Int_t i=0;i<NpadX;i++) {
- for (Int_t j=0;j<NpadY;j++) {
- Pad[i][j]=0;
- }
- } */
+ //for (Int_t i=0;i<NpadX;i++) {
+ //for (Int_t j=0;j<NpadY;j++) {
+ //Pad[i][j]=0;
+ //}
+ //}
Int_t xmin= -NpadX/2;
// Get pointers to RICH detector and Hits containers
- Int_t nent=(Int_t)gAlice->TreeR()->GetEntries();
- gAlice->TreeR()->GetEvent(nent-1);
- TClonesArray *Rawclusters = RICH->RawClustAddress(2); // Raw clusters branch
- //printf ("Rawclusters:%p",Rawclusters);
- Int_t nrawclusters = Rawclusters->GetEntriesFast();
- //printf (" nrawclusters:%d\n",nrawclusters);
- gAlice->TreeR()->GetEvent(nent-1);
- TClonesArray *RecHits1D = RICH->RecHitsAddress1D(2);
- Int_t nrechits1D = RecHits1D->GetEntriesFast();
- //printf (" nrechits:%d\n",nrechits);
- TClonesArray *RecHits3D = RICH->RecHitsAddress3D(2);
- Int_t nrechits3D = RecHits3D->GetEntriesFast();
- //printf (" nrechits:%d\n",nrechits);
+
+ if(gAlice->TreeR())
+ {
+ Int_t nent=(Int_t)gAlice->TreeR()->GetEntries();
+ gAlice->TreeR()->GetEvent(nent-1);
+ TClonesArray *Rawclusters = RICH->RawClustAddress(2); // Raw clusters branch
+ //printf ("Rawclusters:%p",Rawclusters);
+ Int_t nrawclusters = Rawclusters->GetEntriesFast();
+ //printf (" nrawclusters:%d\n",nrawclusters);
+ gAlice->TreeR()->GetEvent(nent-1);
+ TClonesArray *RecHits1D = RICH->RecHitsAddress1D(2);
+ Int_t nrechits1D = RecHits1D->GetEntriesFast();
+ //printf (" nrechits:%d\n",nrechits);
+ TClonesArray *RecHits3D = RICH->RecHitsAddress3D(2);
+ Int_t nrechits3D = RecHits3D->GetEntriesFast();
+ //printf (" nrechits:%d\n",nrechits);
+ }
+ else
+ printf("No TreeR found on file.\n");
TTree *TH = gAlice->TreeH();
Int_t ntracks = TH->GetEntries();
-
+
gAlice->ResetDigits();
Int_t nent=(Int_t)gAlice->TreeD()->GetEntries();
- gAlice->TreeD()->GetEvent(1);
+ gAlice->TreeD()->GetEvent(0);
Int_t nbytes += TH->GetEvent(track);
if (RICH) {
//RICH->ResetRawClusters();
- TClonesArray *PadHits = RICH->PadHits(); // Cluster branch
+ TClonesArray *SDigits = RICH->SDigits(); // Cluster branch
TClonesArray *Hits = RICH->Hits(); // Hits branch
TClonesArray *Cerenkovs = RICH->Cerenkovs(); // Cerenkovs branch
}
Float_t cy = cHit->Z(); // y-position
Int_t cmother = cHit->fCMother; // Index of mother particle
Int_t closs = cHit->fLoss; // How did the particle get lost?
- //printf ("Cerenkov hit, X:%d, Y:%d\n",cx,cy);
+ //printf ("Cerenkov hit number %d/%d, X:%d, Y:%d\n",hit,ncerenkovs,cx,cy);
- //printf("Particle:%9d\n",index);
+ //printf("Particle:%9d\n",current->GetPdgCode());
TParticle *current = (TParticle*)gAlice->Particle(index);
Float_t energyckov = current->Energy();
{
cerenkov->Fill(cx,cy,(float) 1);
-
+ printf ("Cerenkov hit number %d/%d, X:%d, Y:%d\n",hit,ncerenkovs,cx,cy);
+
TParticle *MIP = (TParticle*)gAlice->Particle(cmother);
mipHit = (AliRICHHit*) Hits->UncheckedAt(0);
mom[0] = current->Px();
c3_1->SetLogy();
Clcharge->SetFillColor(5);
Clcharge->SetXTitle("ADC counts");
- Clcharge->Fit("expo");
- expo->SetLineColor(2);
- expo->SetLineWidth(3);
+ if (evNumber2>10)
+ {
+ Clcharge->Fit("expo");
+ expo->SetLineColor(2);
+ expo->SetLineWidth(3);
+ }
Clcharge->Draw();
c3->cd(2);
c3->cd(3);
clusev->SetFillColor(5);
clusev->SetXTitle("(counts)");
- clusev->Fit("gaus");
- gaus->SetLineColor(2);
- gaus->SetLineWidth(3);
+ if (evNumber2>10)
+ {
+ clusev->Fit("gaus");
+ gaus->SetLineColor(2);
+ gaus->SetLineWidth(3);
+ }
clusev->Draw();
c3->cd(4);
c7->cd(1);
totalphotonsevent->SetFillColor(5);
totalphotonsevent->SetXTitle("Photons (counts)");
- totalphotonsevent->Fit("gaus");
- gaus->SetLineColor(2);
- gaus->SetLineWidth(3);
+ if (evNumber2>10)
+ {
+ totalphotonsevent->Fit("gaus");
+ gaus->SetLineColor(2);
+ gaus->SetLineWidth(3);
+ }
totalphotonsevent->Draw();
c7->cd(2);
photev->SetFillColor(5);
photev->SetXTitle("(counts)");
- photev->Fit("gaus");
- gaus->SetLineColor(2);
- gaus->SetLineWidth(3);
+ if (evNumber2>10)
+ {
+ photev->Fit("gaus");
+ gaus->SetLineColor(2);
+ gaus->SetLineWidth(3);
+ }
photev->Draw();
c7->cd(3);
feedev->SetFillColor(5);
feedev->SetXTitle("(counts)");
- feedev->Fit("gaus");
- gaus->SetLineColor(2);
- gaus->SetLineWidth(3);
+ if (evNumber2>10)
+ {
+ feedev->Fit("gaus");
+ gaus->SetLineColor(2);
+ gaus->SetLineWidth(3);
+ }
feedev->Draw();
c7->cd(4);
padsev->SetFillColor(5);
padsev->SetXTitle("(counts)");
- padsev->Fit("gaus");
- gaus->SetLineColor(2);
- gaus->SetLineWidth(3);
+ if (evNumber2>10)
+ {
+ padsev->Fit("gaus");
+ gaus->SetLineColor(2);
+ gaus->SetLineWidth(3);
+ }
padsev->Draw();
break;
Int_t Np=0;
- /*for (Int_t i=0;i< NpadX;i++) {
- for (Int_t j=0;j< NpadY;j++) {
- if (Pad[i][j]>=6){
- Np+=1;
- }
- }
- }*/
+ //for (Int_t i=0;i< NpadX;i++) {
+ //for (Int_t j=0;j< NpadY;j++) {
+ //if (Pad[i][j]>=6){
+ //Np+=1;
+ //}
+ //}
+ //}
//printf("The total number of pads which give a signal: %d %d\n",Nh,Nh1);
printf("\nEnd of macro\n");
- printf("**********************************\n");
+ printf("**********************************\n");*/
}