edep = fPMDHit->GetEnergy();
Int_t vol1 = fPMDHit->GetVolume(1); // Column
Int_t vol2 = fPMDHit->GetVolume(2); // Row
- Int_t vol7 = fPMDHit->GetVolume(7); // UnitModule
- Int_t vol8 = fPMDHit->GetVolume(8); // SuperModule
+ Int_t vol7 = fPMDHit->GetVolume(4); // Serial Module No
// -----------------------------------------//
// nrow = 96, ncol = 48 //
// -----------------------------------------//
-
-
- smnumber = (vol8-1)*6 + vol7;
+ if (vol7 < 24)
+ {
+ smnumber = vol7;
+ }
+ else
+ {
+ smnumber = vol7 - 24;
+ }
+ Int_t vol8 = smnumber/6 + 1; // fake supermodule
if (vol8 == 1 || vol8 == 2)
{
// PMD
fDetNo = 0;
}
- Int_t smn = smnumber - 1;
+ //Int_t smn = smnumber - 1;
+ Int_t smn = smnumber;
Int_t ixx = xpad - 1;
Int_t iyy = ypad - 1;
if (fDetNo == 0)
edep = fPMDHit->GetEnergy();
Int_t vol1 = fPMDHit->GetVolume(1); // Column
Int_t vol2 = fPMDHit->GetVolume(2); // Row
- Int_t vol7 = fPMDHit->GetVolume(7); // UnitModule
- Int_t vol8 = fPMDHit->GetVolume(8); // SuperModule
-
+ Int_t vol7 = fPMDHit->GetVolume(4); // Serial Module No
// -----------------------------------------//
// In new geometry after adding electronics //
// nrow = 96, ncol = 48 //
// -----------------------------------------//
- smnumber = (vol8-1)*6 + vol7;
+ if (vol7 < 24)
+ {
+ smnumber = vol7;
+ }
+ else
+ {
+ smnumber = vol7 - 24;
+ }
+ Int_t vol8 = smnumber/6 + 1; // fake supermodule
if (vol8 == 1 || vol8 == 2)
{
fDetNo = 0;
}
- Int_t smn = smnumber - 1;
+ //Int_t smn = smnumber - 1;
+ Int_t smn = smnumber;
Int_t ixx = xpad - 1;
Int_t iyy = ypad - 1;
if (fDetNo == 0)
// Pedestal Decalibration
Int_t pedmeanrms =
fCalibPed->GetPedMeanRms(idet,ism,jrow,kcol);
- Int_t pedrms1 = (Int_t) pedmeanrms%1000;
+ Int_t pedrms1 = (Int_t) pedmeanrms%100;
Float_t pedrms = (Float_t)pedrms1/10.;
Float_t pedmean =
(Float_t) (pedmeanrms - pedrms1)/1000.0;
- //printf("%f %f\n",pedmean, pedrms);
if (adc > 0.)
{
adc += (pedmean + 3.0*pedrms);
MeV2ADC(edep,adc);
-
// To decalibrte the adc values
//
Float_t gain1 = Gain(det,smn,irow,icol);
if (gain1 != 0.)
{
- Int_t adcDecalib = (Int_t)(adc/gain1);
- adc = (Float_t) adcDecalib;
+ Int_t adcDecalib = (Int_t)(adc/gain1);
+ adc = (Float_t) adcDecalib;
}
else if(gain1 == 0.)
{
}
// Pedestal Decalibration
Int_t pedmeanrms = fCalibPed->GetPedMeanRms(det,smn,irow,icol);
- Int_t pedrms1 = (Int_t) pedmeanrms%1000;
+ Int_t pedrms1 = (Int_t) pedmeanrms%100;
Float_t pedrms = (Float_t)pedrms1/10.;
Float_t pedmean = (Float_t) (pedmeanrms - pedrms1)/1000.0;
- //printf("%f %f\n",pedmean, pedrms);
if(adc > 0.)
{
adc += (pedmean + 3.0*pedrms);
// Pedestal Decalibration
Int_t pedmeanrms =
fCalibPed->GetPedMeanRms(idet,ism,jrow,kcol);
- Int_t pedrms1 = (Int_t) pedmeanrms%1000;
+ Int_t pedrms1 = (Int_t) pedmeanrms%100;
Float_t pedrms = (Float_t)pedrms1/10.;
Float_t pedmean =
(Float_t) (pedmeanrms - pedrms1)/1000.0;
- //printf("%f %f\n",pedmean, pedrms);
if (adc > 0.)
{
adc += (pedmean + 3.0*pedrms);
//PS Test in September 2003 and 2006
// KeV - ADC conversion for 12bit ADC
// Modified by Ajay
- //const Float_t kConstant = 9.0809;
- //const Float_t kErConstant = 1.6763;
- //const Float_t kSlope = 128.348;
- //const Float_t kErSlope = 0.4703;
-
- const Float_t kConstant = -4.5;
- const Float_t kErConstant = 14.3;
- const Float_t kSlope = 68.2;
- const Float_t kErSlope = 5.21;
+
+ const Float_t kConstant = 0.07;
+ const Float_t kErConstant = 0.1;
+ const Float_t kSlope = 76.0;
+ const Float_t kErSlope = 5.0;
Float_t cons = gRandom->Gaus(kConstant,kErConstant);
Float_t slop = gRandom->Gaus(kSlope,kErSlope);
Float_t adc12bit = slop*mev*0.001 + cons;
+
if(adc12bit < 1600.0)
{
adc = (Float_t) adc12bit;