// //
// ----------------------------------------------------//
-#include "Riostream.h"
-#include "TROOT.h"
-#include "TFile.h"
-#include "TNetFile.h"
-#include "TRandom.h"
-#include "TTree.h"
-#include "TBranch.h"
-#include "TClonesArray.h"
-#include "TStopwatch.h"
-#include <stdlib.h>
-
void AliPMDDigitsRead(Int_t nevt = 1)
{
TStopwatch timer;
timer.Start();
- // FILE *fp = fopen("junk.dat","w");
-
AliRunLoader *fRunLoader = AliRunLoader::Open("galice.root");
if (!fRunLoader)
fPMDLoader->LoadDigits("READ");
TClonesArray *fDigits;
+ AliPMDUtility cc;
+
+ TH2F *h2 = new TH2F("h2","Y vs. X",200,-100.,100.,200,-100.,100.);
// -------------------------------------------------------------- //
Int_t det = 0,smn = 0;
- Int_t xpos,ypos;
+ Int_t xpos, ypos, xpad, ypad;
Float_t adc;
- Int_t isup;
- Int_t idet;
- Float_t clusdata[7];
-
+ Float_t xx,yy;
+
for (Int_t ievt = 2; ievt <nevt; ievt++)
{
fRunLoader->GetEvent(ievt);
ypos = pmddigit->GetColumn();
adc = pmddigit->GetADC();
Int_t trno = pmddigit->GetTrackNumber();
+ if(smn <12)
+ {
+ xpad = ypos;
+ ypad = xpos;
+ }
+ else if(smn >=12 && smn < 24)
+ {
+ xpad = xpos;
+ ypad = ypos;
+ }
- //fprintf(fp,"%d %d %d %d %f \n ",ievt,smn,xpos,ypos,adc);
-
+ if(det==1)
+ {
+ cc.RectGeomCellPos(smn,xpad,ypad,xx,yy);
+ h2->Fill(xx,yy);
+ }
}
} // modules
}
+ h2->Draw();
timer.Stop();
timer.Print();
}
TStopwatch timer;
timer.Start();
-
+ TH2F *h2 = new TH2F("h2"," Y vs. X",200,-100.,100.,200,-100.,100.);
// FILE *fpw = fopen("alipmdhits.dat","w");
AliRunLoader *fRunLoader = AliRunLoader::Open("galice.root");
const Int_t kPi0 = 111;
const Int_t kGamma = 22;
- Int_t npmd;
- Int_t trackno;
- Int_t smnumber;
- Int_t trackpid;
- Int_t mtrackno;
- Int_t mtrackpid;
-
- Float_t xPos, yPos, zPos;
- Int_t xpad = -1, ypad = -1;
+ Int_t npmd;
+ Int_t trackno;
+ Int_t smnumber;
+ Int_t trackpid;
+ Int_t mtrackno;
+ Int_t mtrackpid;
+ Int_t xpad = -1, ypad = -1;
Float_t edep;
Float_t vx = -999.0, vy = -999.0, vz = -999.0;
+ Float_t xPos, yPos, zPos;
+ Float_t xx, yy;
+
+ AliPMDUtility cc;
for (Int_t ievt = 0; ievt < nevt; ievt++)
{
edep = fPMDHit->GetEnergy();
Int_t vol1 = fPMDHit->GetVolume(1); // Column
Int_t vol2 = fPMDHit->GetVolume(2); // Row
- Int_t vol3 = fPMDHit->GetVolume(3); // UnitModule
- Int_t vol6 = fPMDHit->GetVolume(6); // SuperModule
+ Int_t vol3 = fPMDHit->GetVolume(7); // UnitModule
+ Int_t vol6 = fPMDHit->GetVolume(8); // SuperModule
// -----------------------------------------//
// For Super Module 1 & 2 //
// nrow = 48, ncol = 96 //
// -----------------------------------------//
- smnumber = (vol6-1)*6 + vol3;
+ smnumber = (vol6-1)*6 + (vol3-1);
- if (vol6 == 1 || vol6 == 2)
- {
- xpad = vol2;
- ypad = vol1;
- }
- else if (vol6 == 3 || vol6 == 4)
+ xpad = vol1 - 1;
+ ypad = vol2 - 1;
+
+ if(zPos > 361.5)
{
- xpad = vol1;
- ypad = vol2;
+ cc.RectGeomCellPos(smnumber,xpad,ypad,xx,yy);
+ h2->Fill(xx,yy);
}
- //printf("Zposition = %f Edeposition = %f",zPos,edep);
- Float_t zposition = TMath::Abs(zPos);
-
}
}
} // Track Loop ended
}
+
+ h2->Draw();
+
fRunLoader->UnloadgAlice();
fRunLoader->UnloadHeader();
fRunLoader->UnloadKinematics();
-
fPMDLoader->UnloadHits();
timer.Stop();