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 npmd = 0;
+ Int_t trackno = 0;
+ Int_t smnumber = 0;
+ Int_t trackpid = 0;
+ Int_t mtrackno = 0;
+ Int_t mtrackpid = 0;
+
+ Float_t xPos = 0., yPos = 0., zPos = 0.;
Int_t xpad = -1, ypad = -1;
- Float_t edep;
+ Float_t edep = 0.;
Float_t vx = -999.0, vy = -999.0, vz = -999.0;
//
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 npmd = 0;
+ Int_t trackno = 0;
+ Int_t smnumber = 0;
+ Int_t trackpid = 0;
+ Int_t mtrackno = 0;
+ Int_t mtrackpid = 0;
+
+ Float_t xPos = 0., yPos = 0., zPos = 0.;
Int_t xpad = -1, ypad = -1;
- Float_t edep;
+ Float_t edep = 0.;
Float_t vx = -999.0, vy = -999.0, vz = -999.0;
if (!fDigits) fDigits = new TClonesArray("AliPMDdigit", 1000);
ypad = vol2;
}
- AliDebug(2,Form("ZPosition = %f Edeposition = %d",zPos,edep));
+ AliDebug(2,Form("ZPosition = %f Edeposition = %f",zPos,edep));
if (vol7 < 24)
{
{
fDetNo = 1;
}
- /*
- if (zPos < fZPos)
- {
- // CPV
- fDetNo = 1;
- }
- else if (zPos > fZPos)
- {
- // PMD
- fDetNo = 0;
- }
- */
+
Int_t smn = smnumber;
Int_t ixx = xpad - 1;
Int_t iyy = ypad - 1;
TrackAssignment2Cell();
ResetCell();
- Float_t gain1;
- Float_t adc;
+ Float_t gain1 = 1.;
+ Float_t adc = 0. ;
Float_t deltaE = 0.;
- Int_t detno = 0;
- Int_t trno = 1;
- Int_t trpid = -99;
+ Int_t detno = 0;
+ Int_t trno = 1;
+ Int_t trpid = -99;
for (Int_t idet = 0; idet < 2; idet++)
{
if (!fDigits) fDigits = new TClonesArray("AliPMDdigit", 1000);
treeD->Branch("PMDDigit", &fDigits, bufsize);
- Int_t trno, trpid, det, smn;
- Int_t irow, icol;
- Float_t edep, adc;
+ Int_t trno = 1, trpid = 0, det = 0, smn = 0;
+ Int_t irow = 0, icol = 0;
+ Float_t edep = 0., adc = 0.;
Int_t nmodules = (Int_t) treeS->GetEntries();
AliDebug(1,Form("Number of modules = %d",nmodules));
if (!fDigits) fDigits = new TClonesArray("AliPMDdigit", 1000);
treeD->Branch("PMDDigit", &fDigits, bufsize);
- Float_t adc;
+ Float_t adc = 0.;
Float_t deltaE = 0.;
Int_t detno = 0;
Int_t trno = 1;
// This method added by Ajay
Bool_t jsort = false;
- Int_t i, j, k;
+ Int_t i = 0, j = 0, k = 0;
Int_t *status1;
Int_t *status2;
Int_t nentries = fCPVCell.GetEntries();
- Int_t mtrackno, ism, ixp, iyp;
- Float_t edep;
+ Int_t mtrackno = 0, ism = 0, ixp = 0, iyp = 0;
+ Float_t edep = 0.;
for (i = 0; i < nentries; i++)
{
AliPMDcell* cpvcell = (AliPMDcell*)fCPVCell.UncheckedAt(i);
fCPVCounter[ism][ixp][iyp]++;
}
- Int_t iz, il;
- Int_t im, ix, iy;
- Int_t nn;
+ Int_t iz = 0, il = 0;
+ Int_t im = 0, ix = 0, iy = 0;
+ Int_t nn = 0;
for (im=0; im<fgkTotUM; im++)
{
for (ix=0; ix<fgkRow; ix++)
// This block handles if a cell is fired
// many times by many tracks
status1 = new Int_t[nn];
- status2 = new Int_t[nn];
+ status2 = new Int_t[2*nn];
trnarray = new Int_t[nn];
for (iz = 0; iz < nn; iz++)
{
if (!fSDigits) fSDigits = new TClonesArray("AliPMDsdigit", 1000);
branch->SetAddress(&fSDigits);
- Int_t itrackno, itrackpid, idet, ism;
- Int_t ixp, iyp;
- Float_t edep;
+ Int_t itrackno = 1, itrackpid = 0, idet = 0, ism = 0;
+ Int_t ixp = 0, iyp = 0;
+ Float_t edep = 0.;
Int_t nmodules = (Int_t) treeS->GetEntries();
AliDebug(1,Form("Number of Modules in the treeS = %d",nmodules));
AliDebug(1,Form("Track Offset = %d",troffset));
//
Bool_t jsort = false;
- Int_t i, j, k;
+ Int_t i = 0, j = 0, k = 0;
Int_t *status1;
Int_t *status2;
fPRECounter[ism][ixp][iyp]++;
}
- Int_t iz, il;
- Int_t im, ix, iy;
- Int_t nn;
+ Int_t iz = 0, il = 0;
+ Int_t im = 0, ix = 0, iy = 0;
+ Int_t nn = 0;
for (im=0; im<fgkTotUM; im++)
{
// This block handles if a cell is fired
// many times by many tracks
status1 = new Int_t[nn];
- status2 = new Int_t[nn];
+ status2 = new Int_t[2*nn];
trnarray = new Int_t[nn];
for (iz = 0; iz < nn; iz++)
{
{
// This converts the simulated edep to ADC according to the
// Test Beam Data
- //PS Test in May 2009, Voltage @ 1350 V
+ // PS Test in June 2010, Voltage @ 1300 V
// KeV - ADC conversion for 12bit ADC
// MPV data used for the fit and taken here
- const Float_t kConstant = -0.1602;
- const Float_t kErConstant = 0.9914;
- const Float_t kSlope = 77.47;
- const Float_t kErSlope = 3.16;
+ // constants are from Test Beam 2010
- Float_t cons = gRandom->Gaus(kConstant,kErConstant);
- Float_t slop = gRandom->Gaus(kSlope,kErSlope);
-
- Float_t adc12bit = slop*mev*0.001 + cons;
+ const Float_t kConstant = 0.612796;
+ const Float_t kSlope = 130.158;
+ Float_t adc12bit = kSlope*mev*0.001 + kConstant;
if (adc12bit < 0.) adc12bit = 0.;
-
- if(adc12bit < 1600.0)
+
+ //Introducing Readout Resolution for ALICE-PMD
+
+ Float_t sigrr = 0.605016 - 0.000273*adc12bit + 6.54e-8*adc12bit*adc12bit;
+ Float_t adcwithrr = gRandom->Gaus(adc12bit,sigrr);
+
+ if(adcwithrr < 0.)
{
- adc = (Float_t) adc12bit;
+ adc = 0.;
}
- else if (adc12bit >= 1600.0)
+ else if(adcwithrr >= 0. && adcwithrr < 1600.0)
+ {
+ adc = adcwithrr;
+ }
+ else if (adcwithrr >= 1600.0)
{
adc = 1600.0;
}
+
}
//____________________________________________________________________________
void AliPMDDigitizer::AddSDigit(Int_t trnumber, Int_t trpid, Int_t det,