#include <TROOT.h>
#include "AliITS.h"
#include "AliITSMapA2.h"
-#include "AliITSRawData.h"
#include "AliITSdigitSPD.h"
#include "AliITSetfSDD.h"
#include "AliITSmodule.h"
#include "AliLog.h"
#include "AliRun.h"
+using std::endl;
+using std::cout;
ClassImp(AliITSsimulationSDD)
////////////////////////////////////////////////////////////////////////
// Version: 0 //
SetCrosstalkFlag();
SetDoFFT();
}
-//______________________________________________________________________
-AliITSsimulationSDD::AliITSsimulationSDD(const AliITSsimulationSDD &source) :
- AliITSsimulation(source),
-fITS(source.fITS),
-fHitMap2(source.fHitMap2),
-fHitSigMap2(source.fHitSigMap2),
-fHitNoiMap2(source.fHitNoiMap2),
-fElectronics(source.fElectronics),
-fInZR(source.fInZR),
-fInZI(source.fInZI),
-fOutZR(source.fOutZR),
-fOutZI(source.fOutZI),
-fAnodeFire(source.fAnodeFire),
-fHis(source.fHis),
-fFlag(source.fFlag),
-fCrosstalkFlag(source.fCrosstalkFlag),
-fDoFFT(source.fDoFFT),
-fNofMaps(source.fNofMaps),
-fMaxNofSamples(source.fMaxNofSamples),
-fScaleSize(source.fScaleSize){
- // Copy constructor to satify Coding roules only.
-
-}
-//______________________________________________________________________
-AliITSsimulationSDD& AliITSsimulationSDD::operator=(const AliITSsimulationSDD &src){
- // Assignment operator to satify Coding roules only.
-
- if(this==&src) return *this;
- Error("AliITSsimulationSDD","Not allowed to make a = with "
- "AliITSsimulationSDD Using default creater instead");
- return *this ;
-}
-/*
-//______________________________________________________________________
-AliITSsimulation& AliITSsimulationSDD::operator=(const AliITSsimulation &src){
- // Assignment operator to satify Coding roules only.
- if(this==&src) return *this;
- Error("AliITSsimulationSSD","Not allowed to make a = with "
- "AliITSsimulationSDD Using default creater instead");
- return *this ;
-}
-*/
//______________________________________________________________________
AliITSsimulationSDD::AliITSsimulationSDD(AliITSDetTypeSim* dettyp):
AliITSsimulation(dettyp),
Double_t nsigma = simpar->GetNSigmaIntegration(); //
Int_t nlookups = simpar->GetGausNLookUp(); //
Float_t jitter = simpar->GetSDDJitterError(); //
+ Float_t mapsmear = simpar->GetSDDCorrMapPrecision(); //
Float_t trigDelay = simpar->GetSDDTrigDelay(); // compensation for MC time zero
if(res->IsAMAt20MHz()) trigDelay+=12.5; // compensation for discretization step
+
Float_t timeZero=fDetType->GetResponseSDD()->GetTimeZero(fModule);
+ Float_t adcscale = fDetType->GetResponseSDD()->GetADCtokeV(fModule);
+ adcscale/=simpar->GetSDDkeVtoADC();
// Piergiorgio's part (apart for few variables which I made float
// when i thought that can be done
if(!mod->LineSegmentL(ii,xL[0],dxL[0],xL[1],dxL[1],xL[2],dxL[2],
depEnergy,itrack)) continue;
Float_t xloc=xL[0];
- if(xloc>0) iWing=0; // left side, carlos channel 0
- else iWing=1; // right side
-
Float_t zloc=xL[2]+0.5*dxL[2];
zAnode=seg->GetAnodeFromLocal(xloc,zloc); // anode number in the range 0.-511.
driftSpeed = res->GetDriftSpeedAtAnode(zAnode);
+ driftSpeed+= fDetType->GetResponseSDD()->GetDeltaVDrift(fModule,zAnode>255);
+
if(timeStep*fMaxNofSamples < sddLength/driftSpeed) {
AliWarning("Time Interval > Allowed Time Interval");
}
AliDebug(1,Form("TOF for hit %d on mod %d (particle %d)=%g",ii,fModule,h->Track(),tof));
}
+ Float_t corrx=0, corrz=0;
+ res->GetShiftsForSimulation(xL[2],xL[0],corrz,corrx,seg);
+ xL[2]-=corrz;
+ xL[0]-=corrx;
+ xL[0] += 0.0001*gRandom->Gaus( 0, mapsmear); //
xL[0] += 0.0001*gRandom->Gaus( 0, jitter ); //
+
pathInSDD = TMath::Sqrt(dxL[0]*dxL[0]+dxL[1]*dxL[1]+dxL[2]*dxL[2]);
if (fFlag && pathInSDD) { depEnergy *= (0.03/pathInSDD); }
drPath = TMath::Abs(10000.*(dxL[0]+2.*xL[0])*0.5);
drPath = sddLength-drPath;
if(drPath < 0) {
- AliDebug(1, // this should be fixed at geometry level
+ AliInfo( // this should be fixed at geometry level
Form("negative drift path drPath=%e sddLength=%e dxL[0]=%e xL[0]=%e",
drPath,sddLength,dxL[0],xL[0]));
continue;
theSteps+=1.;
theAverage+=avAnode;
zAnode = seg->GetAnodeFromLocal(avDrft,avAnode);
+ // if(avDrft*xloc<0) AliDebug(1,Form("Swap of side xloc_orig=%f xloc_now=%f",xloc,avDrft));
+ iWing = seg->GetSideFromLocalX(avDrft);
+
driftSpeed = res->GetDriftSpeedAtAnode(zAnode);
+ driftSpeed+= fDetType->GetResponseSDD()->GetDeltaVDrift(fModule,zAnode>255);
driftPath = TMath::Abs(10000.*avDrft);
driftPath = sddLength-driftPath;
if(driftPath < 0) {
(timeStep*eVpairs*2.*acos(-1.));
chargeloss = 1.-cHloss*driftPath/1000.;
amplitude *= chargeloss;
+ amplitude *= adcscale;
width = 2.*nsigma/(nlookups-1);
// Spread the charge
nsplitAn = 4;
cout << "Scale size factor: " << fScaleSize << endl;
cout << "**************************************************" << endl;
}
+