// ctor
fSDigitizer = 0 ;
- fNinputs = 1 ;
- fPinNoise = 0.01 ;
- fEMCDigitThreshold = 0.01 ;
- fTimeResolution = 0.5e-9 ;
- fTimeSignalLength = 1.0e-9 ;
- fPreShowerDigitThreshold = fEMCDigitThreshold/100. ;
- fADCchannelTower = 0.0030; // width of one ADC channel in GeV
- fADCpedestalTower = 0.005 ; // pedestal of ADC
- fNADCTower = (Int_t) TMath::Power(2,16) ; // number of channels in Tower ADC
-
- fADCchannelPreSho = 0.0030 ; // width of one ADC channel in Pre Shower
- fADCpedestalPreSho = 0.005 ; // pedestal of ADC
- fNADCPreSho = (Int_t) TMath::Power(2,16); // number of channels in Pre Shower ADC
- fTimeThreshold = 0.001*10000000 ; //Means 1 MeV in terms of SDigits amplitude
+ fNinputs = 0 ;
+ fPinNoise = 0.0 ;
+ fTowerDigitThreshold = 0.0 ;
+ fTimeResolution = 0. ;
+ fTimeSignalLength = 0. ;
+ fPreShowerDigitThreshold = 0. ;
+ fADCchannelTower = 0.0; // width of one ADC channel in GeV
+ fADCpedestalTower = 0. ; // pedestal of ADC
+ fNADCTower = 0; // number of channels in Tower ADC
+
+ fADCchannelPreSho = 0.0; // width of one ADC channel in Pre Shower
+ fADCpedestalPreSho = 0.0 ; // pedestal of ADC
+ fNADCPreSho = 0; // number of channels in Pre Shower ADC
+ fTimeThreshold = 0.0; //Means 1 MeV in terms of SDigits amplitude
fManager = 0 ;
fSDigitizer = 0 ;
fNinputs = 1 ;
- fPinNoise = 0.01 ;
- fEMCDigitThreshold = 0.01 ;
+ fPinNoise = 0.00001 ;
+ fTowerDigitThreshold = 0.001 ;
fTimeResolution = 0.5e-9 ;
fTimeSignalLength = 1.0e-9 ;
- fPreShowerDigitThreshold = fEMCDigitThreshold/100. ;
+ fPreShowerDigitThreshold = fTowerDigitThreshold/25. ;
fInitialized = kFALSE ;
- fADCchannelTower = 0.0030; // width of one ADC channel in GeV
- fADCpedestalTower = 0.005 ; //
+ fADCchannelTower = 0.000220; // width of one ADC channel in GeV
+ fADCpedestalTower = 0.005 ; // GeV
fNADCTower = (Int_t) TMath::Power(2,16) ; // number of channels in Tower ADC
- fADCchannelPreSho = 0.0030 ; // width of one ADC channel in Pre Shower
+ fADCchannelPreSho = 0.0000300; // width of one ADC channel in Pre Shower
fADCpedestalPreSho = 0.005 ; //
- fNADCPreSho = (Int_t) TMath::Power(2,16); // number of channels in Pre ShowerADC
+ fNADCPreSho = (Int_t) TMath::Power(2,12); // number of channels in Pre ShowerADC
fTimeThreshold = 0.001*10000000 ; //Means 1 MeV in terms of SDigits amplitude
-if(fManager)
+ if(fManager)
SetTitle("aliroot") ;
else if (strcmp(GetTitle(),"")==0)
- SetTitle("galice.root") ;
-
+ SetTitle("galice.root") ;
+
if( strcmp(GetName(), "") == 0 )
SetName("Default") ;
//____________________________________________________________________________
AliEMCALDigitizer::AliEMCALDigitizer(const char *headerFile,const char *name)
{
- SetName(name) ;
+ SetName(name) ;
SetTitle(headerFile) ;
fManager = 0 ; // We work in the standalong mode
Init() ;
cerr << "ERROR: AliEMCALDigitizer::Digitize -> SDigitizer with name " << GetName() << " not found " << endl ;
abort() ;
}
-
// loop through the sdigits posted to the White Board and add them to the noise
TCollection * folderslist = gime->SDigitsFolder()->GetListOfFolders() ;
TIter next(folderslist) ;
TObjArray * sdigArray = new TObjArray(2) ;
while ( (folder = (TFolder*)next()) )
if ( (sdigits = (TClonesArray*)folder->FindObject(GetName()) ) ) {
+ TString fileName(folder->GetName()) ;
+ fileName.ReplaceAll("_","/") ;
cout << "INFO: AliEMCALDigitizer::Digitize -> Adding SDigits "
- << GetName() << " from " << folder->GetName() << endl ;
+ << GetName() << " from " << fileName << endl ;
sdigArray->AddAt(sdigits, input) ;
input++ ;
}
- //Find the first crystall with signal
+ //Find the first tower with signal
Int_t nextSig = 200000 ;
Int_t i;
for(i=0; i<input; i++){
//Put Noise contribution
for(absID = 1; absID <= nEMC; absID++){
- Float_t noise = gRandom->Gaus(0., fPinNoise) ;
+ Float_t noise = gRandom->Gaus(0., fPinNoise);
new((*digits)[absID-1]) AliEMCALDigit( -1, -1, absID,sDigitizer->Digitize(noise), TimeOfNoise() ) ;
//look if we have to add signal?
if(absID==nextSig){
//remove digits below thresholds
for(absID = 0; absID < nEMC/2 ; absID++){
- if(sDigitizer->Calibrate(((AliEMCALDigit*)digits->At(absID))->GetAmp()) < fEMCDigitThreshold)
+ if(sDigitizer->Calibrate(((AliEMCALDigit*)digits->At(absID))->GetAmp()) < fTowerDigitThreshold)
digits->RemoveAt(absID) ;
else
digit->SetTime(gRandom->Gaus(digit->GetTime(),fTimeResolution) ) ;
//Set indexes in list of digits
//Int_t i ;
- for (i = 0 ; i < ndigits ; i++) {
+ for (i = 0 ; i < ndigits ; i++) {
AliEMCALDigit * digit = (AliEMCALDigit *) digits->At(i) ;
digit->SetIndexInList(i) ;
Float_t energy = sDigitizer->Calibrate(digit->GetAmp()) ;
Int_t nphi = AliEMCALGetter::GetInstance()->EMCALGeometry()->GetNPhi() ;
Int_t nz = AliEMCALGetter::GetInstance()->EMCALGeometry()->GetNZ() ;
- if(absId <= nphi*nz) //digitize as tower
- channel = (Int_t) TMath::Ceil( (energy - fADCpedestalTower)/fADCchannelTower ) ;
- if(channel > fNADCTower ) channel = fNADCTower ;
- else
- channel = (Int_t) TMath::Ceil( (energy - fADCpedestalPreSho)/fADCchannelPreSho ) ;
- if(channel > fNADCPreSho ) channel = fNADCPreSho ;
+ if(absId <= nphi*nz){ //digitize as tower
+ channel = static_cast<Int_t> (TMath::Ceil( (energy + fADCpedestalTower)/fADCchannelTower )) ;
+ if(channel > fNADCTower )
+ channel = fNADCTower ;
+ } else {
+ channel = static_cast<Int_t>(TMath::Ceil( (energy + fADCpedestalPreSho)/fADCchannelPreSho )) ;
+ if(channel > fNADCPreSho )
+ channel = fNADCPreSho ;
+ }
return channel ;
}
gime->ReadTreeS(treeS,input) ;
}
}
- else
- gime->Event(ievent,"S") ;
+ else
+ gime->Event(ievent,"S") ;
Digitize(ievent) ; //Add prepared SDigits to digits and add the noise
cout << endl ;
cout << "With following parameters: " << endl ;
cout << " Electronics noise in EMC (fPinNoise) = " << fPinNoise << endl ;
- cout << " Threshold in EMC (fEMCDigitThreshold) = " << fEMCDigitThreshold << endl;
+ cout << " Threshold in EMC (fTowerDigitThreshold) = " << fTowerDigitThreshold << endl;
cout << " Threshold in PreShower (fPreShowerDigitThreshold) = " << fPreShowerDigitThreshold << endl ; ;
cout << "---------------------------------------------------" << endl ;
}
cwd->cd();
}
- digitsBranch->Fill() ;
- digitizerBranch->Fill() ;
-
+ treeD->Fill() ;
treeD->Write(0,kOverwrite) ;
}