/* $Id$ */
+/*
+ Class for creating of the sumable digits and digits from MC data
+ //
+ The input : ideal signals (Hits->Diffusion->Attachment -Ideal signal)
+ The output: raw digits
+
+ Effect implemented:
+ 1. Pad by pad gain map
+ 2. Noise map
+ 3. The dead channels identified - zerro noise for corresponding pads
+ In this case the outpu equal zerro
+
+*/
+
+
+
+
#include <stdlib.h>
#include <TTree.h>
#include <TObjArray.h>
ClassImp(AliTPCDigitizer)
//___________________________________________
-AliTPCDigitizer::AliTPCDigitizer() :AliDigitizer()
+ AliTPCDigitizer::AliTPCDigitizer() :AliDigitizer(),fDebug(0)
{
+ //
// Default ctor - don't use it
- fDebug =0;
+//
+
}
//___________________________________________
AliTPCDigitizer::AliTPCDigitizer(AliRunDigitizer* manager)
- :AliDigitizer(manager)
+ :AliDigitizer(manager),fDebug(0)
{
+ //
// ctor which should be used
- fDebug =0;
+//
AliDebug(2,"(AliRunDigitizer* manager) was processed");
}
param->SetZeroSup(2);
Int_t zerosup = param->GetZeroSup();
- AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetPadGainFactor();
+ AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetDedxGainFactor();
+ AliTPCCalPad * noiseTPC = AliTPCcalibDB::Instance()->GetPadNoise();
//
//Loop over segments of the TPC
continue;
}
AliTPCCalROC * gainROC = gainTPC->GetCalROC(sec); // pad gains per given sector
+ AliTPCCalROC * noiseROC = noiseTPC->GetCalROC(sec); // noise per given sector
digrow->SetID(segmentID);
Int_t nrows = 0;
}
q/=16.; //conversion factor
Float_t gain = gainROC->GetValue(row,elem/nrows); // get gain for given - pad-row pad
- if (gain<0.5){
- printf("problem\n");
- }
+ //if (gain<0.5){
+ //printf("problem\n");
+ //}
q*= gain;
+ Float_t noisePad = noiseROC->GetValue(row,elem/nrows);
// Float_t noise = gRandom->Gaus(0,param->GetNoise()*param->GetNoiseNormFac());
Float_t noise = pTPC->GetNoise();
- q+=noise;
+ q+=noise*noisePad;
q=TMath::Nint(q);
if (q > zerosup)
{
Int_t zerosup = param->GetZeroSup();
//Loop over segments of the TPC
- AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetPadGainFactor();
+ AliTPCCalPad * gainTPC = AliTPCcalibDB::Instance()->GetDedxGainFactor();
+ AliTPCCalPad * noiseTPC = AliTPCcalibDB::Instance()->GetPadNoise();
for (Int_t n=0; n<nentries; n++) {
rl = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(0));
gime = rl->GetLoader("TPCLoader");
}
AliTPCCalROC * gainROC = gainTPC->GetCalROC(sec); // pad gains per given sector
+ AliTPCCalROC * noiseROC = noiseTPC->GetCalROC(sec); // noise per given sector
digrow->SetID(digarr[0]->GetID());
Int_t nrows = digarr[0]->GetNRows();
// Float_t noise = gRandom->Gaus(0,param->GetNoise()*param->GetNoiseNormFac());
Float_t gain = gainROC->GetValue(row,col);
q*= gain;
+ Float_t noisePad = noiseROC->GetValue(row, col);
+
Float_t noise = pTPC->GetNoise();
- q+=noise;
+ q+=noise*noisePad;
+
q=TMath::Nint(q);
if (q > zerosup){