// default constructor
for(int t=0; t<16; t++) {
- fMeanHV[t] = 100.0;
+ fMeanHV[t] = 1600.0;
fWidthHV[t] = 0.0;
fTimeOffset[t] = 0.0;
fTimeGain[t] = 1.0;
fDiscriThr[t] = 2.5;
}
for(int t=0; t<32; t++) {
- fPedestal[t] = 0.0;
- fSigma[t] = 100.0;
+ fPedestal[t] = 3.0;
+ fSigma[t] = 1.0;
fADCmean[t] = 0.0;
fADCsigma[t] = 0.0;
}
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. */
const Float_t kIntTimeRes = 0.39; // intrinsic time resolution of the scintillator
-const Float_t kV0CDelayCables = 8.1; // delay cables on the C side (in ns)
-const Float_t kV0Offset = -1338.6; // general V0 offset between the TDCs and the trigger
+const Float_t kADOffset = -1338.6; // general V0 offset between the TDCs and the trigger
const Int_t kNClocks = 21; // Number of ADC clocks that are read out
-const Float_t kChargePerADC = 1e-19; // Charge per ADC
+const Float_t kChargePerADC = 0.6e-12; // Charge per ADC
const Int_t kMinTDCWidth = 13; // minimum signal width measured by TDC
const Int_t kMaxTDCWidth = 128; // maximum signal width measured by TDC
const Float_t kPMRespTime = 6.0; // PM response time (corresponds to 1.9 ns rise time)
//
return new AliADDigitizer(digInput);
}
+//_____________________________________________________________________________
+void AliAD::Hits2Digits(){
+ //
+ // Converts hits to digits
+ //
+ // Creates the AD digitizer
+ AliADDigitizer* dig = new AliADDigitizer(this,AliADDigitizer::kHits2Digits);
+
+ // Creates the digits
+ dig->Digitize("");
+
+ // deletes the digitizer
+ delete dig;
+}
+
+//_____________________________________________________________________________
+void AliAD::Hits2SDigits(){
+ //
+ // Converts hits to summable digits
+ //
+ // Creates the AD digitizer
+ AliADDigitizer* dig = new AliADDigitizer(this,AliADDigitizer::kHits2SDigits);
+
+ // Creates the sdigits
+ dig->Digitize("");
+
+ // deletes the digitizer
+ delete dig;
+}
//_____________________________________________________________________________
AliDigitizer* CreateDigitizer(AliDigitizationInput* digInput) const;
virtual AliTriggerDetector* CreateTriggerDetector() const { return new AliADTrigger();}
- virtual void Digits2Raw();
+ virtual void Hits2Digits();
+ virtual void Hits2SDigits();
+ virtual void Digits2Raw();
virtual Bool_t Raw2SDigits(AliRawReader*);
virtual void SetADATwoInstalled(Bool_t b){fSetADATwoInstalled = b;} // ecv
virtual void SetADCTwoInstalled(Bool_t b){fSetADCTwoInstalled = b;} // ecv
l1Delay-
phase->GetMeanPhase()+
delays->GetBinContent(i+1)+
- kV0Offset);
+ kADOffset);
fClockOffset[i] = (((Float_t)fCalibData->GetRollOver(board)-
(Float_t)fCalibData->GetTriggerCountOffset(board))*25.0+
fCalibData->GetTimeOffset(i)-
l1Delay+
- kV0Offset);
+ kADOffset);
fTime[i] = new Float_t[fNBins[i]];
memset(fTime[i],0,fNBins[i]*sizeof(Float_t));
}
Float_t dt_scintillator = gRandom->Gaus(0,kIntTimeRes);
Float_t t = dt_scintillator + hit->GetTof();
- //if (pmt < 32) t += kV0CDelayCables;
- t += fHptdcOffset[pmt];
+ //t += fHptdcOffset[pmt];
Int_t nPhE;
Float_t prob = fCalibData->GetLightYields(pmt)*kPhotoCathodeEfficiency; // Optical losses included!
if (nPhot > 100)
nPhE = gRandom->Binomial(nPhot,prob);
Float_t charge = TMath::Qe()*fPmGain[pmt]*fBinSize[pmt]/integral;
-
for (Int_t iPhE = 0; iPhE < nPhE; ++iPhE) {
Float_t tPhE = t + fSignalShape->GetRandom(0,fBinSize[pmt]*Float_t(fNBins[pmt]));
Float_t gainVar = fSinglePhESpectrum->GetRandom(0,20)/meansPhE;
Int_t firstBin = TMath::Max(0,(Int_t)((tPhE-kPMRespTime)/fBinSize[pmt]));
Int_t lastBin = TMath::Min(fNBins[pmt]-1,(Int_t)((tPhE+2.*kPMRespTime)/fBinSize[pmt]));
+
for(Int_t iBin = firstBin; iBin <= lastBin; ++iBin) {
Float_t tempT = fBinSize[pmt]*(0.5+iBin)-tPhE;
fTime[pmt][iBin] += gainVar*charge*fPMResponse->Eval(tempT);
Float_t integral2 = fSignalShape->Integral(0,200); // function. Anyway the effect is small <10% on the 2.5 ADC thr
for (Int_t ipmt = 0; ipmt < 16; ++ipmt) {
Float_t thr = fCalibData->GetCalibDiscriThr(ipmt,kFALSE)*kChargePerADC*maximum*fBinSize[ipmt]/integral2;
- //Float_t thr = 1e-25;
Bool_t ltFound = kFALSE, ttFound = kFALSE;
for (Int_t iBin = 0; iBin < fNBins[ipmt]; ++iBin) {
Float_t t = fBinSize[ipmt]*Float_t(iBin);
-
if (fTime[ipmt][iBin] > thr) {
if (!ltFound && (iBin < fNBinsLT[ipmt])) {
ltFound = kTRUE;
}
}
}
- Float_t tadc = t - fClockOffset[ipmt];
+ //Float_t tadc = t - fClockOffset[ipmt];
+ Float_t tadc = t;
Int_t clock = kNClocks/2 - Int_t(tadc/25.0);
if (clock >= 0 && clock < kNClocks)
fAdc[ipmt][clock] += fTime[ipmt][iBin]/kChargePerADC;
fClockOffset[board] = (((Float_t)calibdata->GetRollOver(board)-
(Float_t)calibdata->GetTriggerCountOffset(board))*25.0-
l1Delay+
- kV0Offset);
+ kADOffset);
AliDebug(1,Form("Board %d Offset %f",board,fClockOffset[board]));
}
}
Ri += 0.63*tga;
Ro = Ri + d/ca;
shVSR0->DefineSection(5, 14.0 , Ri, Ro);
- printf(" Ro: %8.2f\n", Ro);
+ //printf(" Ro: %8.2f\n", Ro);
// Make holes
new TGeoBBox("shHoleBody" , 0.15, 0.60, 0.3);
new TGeoTube("shHoleEnd", 0. , 0.15, 0.3);
(new TGeoRotation(Form("rSec%d",i), 30. * i, 0. , 0.))->RegisterYourself();
strSh+=Form("+ shVSRsec:rSec%d",i);
}
- printf("%s\n", strSh.Data());
+ //printf("%s\n", strSh.Data());
TGeoCompositeShape * shVSR = new TGeoCompositeShape("shVSR", strSh.Data());
// Now assembly the sector to form VSR RF transition tube !
TGeoVolume * voVSR = new TGeoVolume("voVSR", shVSR, kMedAlu);
// Double_t Delta = TMath::Sqrt( L*L + 4.*(H-d)*H );
Double_t R = TMath::Sqrt((H-d)*(H-d) + L*L);
alpha = TMath::ASin(d/R) + TMath::ASin((H-d)/R);
- printf("alpha: %8.2f \n", alpha * TMath::RadToDeg());
+ //printf("alpha: %8.2f \n", alpha * TMath::RadToDeg());
sa = TMath::Sin(alpha);
ca = TMath::Cos(alpha);
x = d*sa;
Double_t aRi[nsec] = {5.0, 5.0 , 5.685, 5.685, 5.0 , 5.0};
for (Int_t i=0; i<nsec; i++) {
z=az[i]; Ri = aRi[i]; Ro = 5.7;
- printf(" i: %2d z: %8.2f Ri: %8.2f Ro: %8.2f\n", i, z, Ri, Ro );
+ //printf(" i: %2d z: %8.2f Ri: %8.2f Ro: %8.2f\n", i, z, Ri, Ro );
shVBUcent ->DefineSection( i, z, Ri, Ro);
}
TGeoPcon * shVBUrotFlg = new TGeoPcon("shVBUrotFlg" , 0., 360., nsec2);
for (Int_t i=0; i<nsec2; i++) {
z=az2[i]; Ri = aRi2[i]; Ro = 6.02;
- printf(" i: %2d z: %8.2f Ri: %8.2f Ro: %8.2f\n", i, z, Ri, Ro );
+ //printf(" i: %2d z: %8.2f Ri: %8.2f Ro: %8.2f\n", i, z, Ri, Ro );
shVBUrotFlg ->DefineSection( i, z, Ri, Ro);
}
TGeoVolume * voVBUrotFlg = new TGeoVolume("voVBUrotFlg", shVBUrotFlg, kMedAlu);
static Bool_t fOnlyOnce = kTRUE;
if (fOnlyOnce) {
- printf(" gMC->VolId(\"ADApad\" ) = %3d\n", idADA);
- printf(" gMC->VolId(\"ADCpad\" ) = %3d\n", idADC);
+ //printf(" gMC->VolId(\"ADApad\" ) = %3d\n", idADA);
+ //printf(" gMC->VolId(\"ADCpad\" ) = %3d\n", idADC);
// printf(" gMC->VolId(\"ADCpadH\") = %3d\n", idADCh);
fOnlyOnce = kFALSE;
}
// Set detector type: ADA or ADC
Int_t ADlayer = (current_volid == idADC ) ? 0 : 2;
- printf("CurVolID: %d | sect: %2d | detc: %2d\n", current_volid, sect, detc);
+ //printf("CurVolID: %d | sect: %2d | detc: %2d\n", current_volid, sect, detc);
sect--; // sector within layer [0-3]
detc--; // detector copy [0-1]
// ADC 1 = 4- 7
// ADA 2 = 8-11
// ADA 3 = 12-15
- printf("\n ADsector: %2d | ADlayer: %2d | sect: %2d | x: %8.2f | y: %8.2f | z: %8.2f\n", ADsector, ADlayer, sect, x[0], x[1], x[2]); // Debug ECV
+ //printf("\n ADsector: %2d | ADlayer: %2d | sect: %2d | x: %8.2f | y: %8.2f | z: %8.2f\n", ADsector, ADlayer, sect, x[0], x[1], x[2]); // Debug ECV
Double_t lightYield_ad;
Double_t photoCathodeEfficiency;