#include <stdlib.h>
#include <Riostream.h>
#include <TObjArray.h>
+#include <TRandom.h>
+
#include "AliITSmodule.h"
#include "AliITSMapA2.h"
#include "AliITSpList.h"
#include "AliITShit.h"
#include "AliITSdigitSSD.h"
#include "AliRun.h"
+#include "AliITSgeom.h"
#include "AliITSsimulationSSD.h"
#include "AliITSTableSSD.h"
//#include "AliITSresponseSSD.h"
}
//______________________________________________________________________
AliITSsimulationSSD::AliITSsimulationSSD(const AliITSsimulationSSD &source):
- AliITSsimulation(source){
+ AliITSsimulation(source),
+fMapA2(source.fMapA2),
+fIonE(source.fIonE),
+fDifConst(),
+fDriftVel(){
// copy constructor
-
- *this = source;
+ fDifConst[0] = source.fDifConst[0];
+ fDifConst[1] = source.fDifConst[1];
+ fDriftVel[0] = source.fDriftVel[0];
+ fDriftVel[1] = source.fDriftVel[1];
}
//______________________________________________________________________
AliITSsimulationSSD::~AliITSsimulationSSD() {
if ( y > (seg->Dy()/2+10)*1.0E-4 ) {
// check if particle is within the detector
Warning("HitToDigit",
- "hit out of detector y0=%e,y=%e,dey=%e,j =%e module=%d",
- y0,y,dey,j,module);
+ "hit out of detector y0=%e,y=%e,dey=%e,j =%d module=%d, exceed=%e",
+ y0,y,dey,j,module, y-(seg->Dy()/2+10)*1.0E-4);
return;
} // end if
z = z0 + (j+0.5)*dez;
for(ix=0;ix<GetNStrips();ix++){ // loop over strips
// noise is gaussian
- noise = gRandom->Gaus(0,res->GetNoiseP().At(ix));
+ noise = (Double_t) gRandom->Gaus(0,res->GetNoiseP().At(ix));
// need to calibrate noise
// NOTE. noise from the calibration database comes uncalibrated,
// it needs to be calibrated in order to be added
// to the signal. It will be decalibrated later on together with the noise
- noise *= res->GetGainP(ix);
+ noise *= (Double_t) res->GetGainP(ix);
// noise comes in ADC channels from the calibration database
// It needs to be converted back to electronVolts
// Nside
for(ix=0;ix<GetNStrips();ix++){ // loop over strips
- noise = gRandom->Gaus(0,res->GetNoiseN().At(ix));// give noise to signal
- noise *= res->GetGainN(ix);
+ noise = (Double_t) gRandom->Gaus(0,res->GetNoiseN().At(ix));// give noise to signal
+ noise *= (Double_t) res->GetGainN(ix);
noise /= res->GetDEvToADC(1.);
signal = noise + fMapA2->GetSignal(1,ix);//get signal from map
fMapA2->SetHit(1,ix,signal); // give back signal to map
// if strip is dead -> gain=0
if( ((k==0)&&(res->GetGainP(ix)==0)) || ((k==1)&&(res->GetGainN(ix)==0))) continue;
+ signal = fMapA2->GetSignal(k,ix);
// signal has to be uncalibrated
// In real life, gains are supposed to be calculated from calibration runs,
// stored in the calibration DB and used in the reconstruction
else signal /= res->GetGainN(ix);
// signal is converted in unit of ADC
- signal = res->GetDEvToADC(fMapA2->GetSignal(k,ix));
+ signal = res->GetDEvToADC(signal);
if(signal>4096.) signal = 4096.;//if exceeding, accumulate last one
// threshold for zero suppression is set on the basis of the noise