X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSresponseSDD.cxx;h=b56e192259748cee1f171ab51ff07f5bdf850800;hb=311ee5f3738a1911db7325221e218dd28b1ce64d;hp=43167b9d0f107ee778f8fe022eded7bb4e2a8273;hpb=fcf95fc7a1a40644de272f60ebe2a9059a8ba9a7;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSresponseSDD.cxx b/ITS/AliITSresponseSDD.cxx index 43167b9d0f1..b56e1922597 100644 --- a/ITS/AliITSresponseSDD.cxx +++ b/ITS/AliITSresponseSDD.cxx @@ -13,7 +13,8 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -#include "AliITSresponseSDD.h" +/* $Id$ */ + ////////////////////////////////////////////////////// // Base response class forITS // // It is used to set static data members // @@ -23,98 +24,145 @@ // // ////////////////////////////////////////////////////// +#include -const Int_t AliITSresponseSDD::fgkMaxAdcDefault = 1024; -const Double_t AliITSresponseSDD::fgkDynamicRangeDefault = 132.; -const Double_t AliITSresponseSDD::fgkfChargeLossDefault = 0; -const Float_t AliITSresponseSDD::fgkDiffCoeffDefault = 3.23; -const Float_t AliITSresponseSDD::fgkDiffCoeff1Default = 30.; -const TString AliITSresponseSDD::fgkParam1Default = "same"; -const TString AliITSresponseSDD::fgkParam2Default = "same"; -const TString AliITSresponseSDD::fgkOptionDefault = "1D"; -const Double_t AliITSresponseSDD::fgkDriftSpeedDefault = 7.3; -const Double_t AliITSresponseSDD::fgkNsigmasDefault = 3.; -const Int_t AliITSresponseSDD::fgkNcompsDefault = 121; +#include "AliITSresponseSDD.h" +#include +const Float_t AliITSresponseSDD::fgkTimeOffsetDefault = 54.30; +const Float_t AliITSresponseSDD::fgkADC2keVDefault = 3.34; +const Float_t AliITSresponseSDD::fgkChargevsTimeDefault = 0.00355; +const Float_t AliITSresponseSDD::fgkADCvsDrTimeDefault = 0.0101; +const Float_t AliITSresponseSDD::fgkCarlosRXClockPeriod = 25.; ClassImp(AliITSresponseSDD) //_________________________________________________________________________ -AliITSresponseSDD::AliITSresponseSDD():AliITSresponse(){ +AliITSresponseSDD::AliITSresponseSDD(): +TObject(), + fTimeOffset(fgkTimeOffsetDefault), + fADC2keV(fgkADC2keVDefault), + fChargevsTime(fgkChargevsTimeDefault) +{ // default constructor - fGaus = 0; - SetMaxAdc(fgkMaxAdcDefault); - SetDiffCoeff(fgkDiffCoeffDefault,fgkDiffCoeff1Default); - SetDriftSpeed(fgkDriftSpeedDefault); - SetNSigmaIntegration(fgkNsigmasDefault); - SetNLookUp(fgkNcompsDefault); - - SetJitterError(); - SetElectronics(); - SetDynamicRange(fgkDynamicRangeDefault); - SetChargeLoss(fgkfChargeLossDefault); - SetParamOptions(fgkParam1Default.Data(),fgkParam2Default.Data()); - SetZeroSupp(fgkOptionDefault); - SetDo10to8(); - SetOutputOption(); + for(Int_t i=0; i0) + Int_t minMod,maxMod; + if(lay==3){ + minMod=1; + maxMod=3; + if(lad>kNLaddersLay3){ + AliError(Form("Ladder number %d out of range",lad)); + return; + } + }else if(lay==4){ + minMod=1; + maxMod=4; + if(lad>kNLaddersLay4){ + AliError(Form("Ladder number %d out of range",lad)); + return; + } + }else{ + AliError(Form("Layer number %d out of range",lay)); + return; + } + for(Int_t iMod=minMod; iMod<=maxMod; iMod++){ + Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(lay,lad,iMod); + SetModuleTimeZero(modIndex,tzero); + } } - -//______________________________________________________________________ -AliITSresponseSDD::AliITSresponseSDD(const AliITSresponseSDD &ob) : AliITSresponse(ob) { - // Copy constructor - // Copies are not allowed. The method is protected to avoid misuse. - Error("AliITSresponseSDD","Copy constructor not allowed\n"); +//_________________________________________________________________________ +void AliITSresponseSDD::SetHalfLadderCTimeZero(Int_t lay, Int_t lad, Float_t tzero){ + // Sets time Zero for all modules of a ladder on side C (Z<0) + Int_t minMod,maxMod; + if(lay==3){ + minMod=4; + maxMod=6; + if(lad>kNLaddersLay3){ + AliError(Form("Ladder number %d out of range",lad)); + return; + } + }else if(lay==4){ + minMod=5; + maxMod=8; + if(lad>kNLaddersLay4){ + AliError(Form("Ladder number %d out of range",lad)); + return; + } + }else{ + AliError(Form("Layer number %d out of range",lay)); + return; + } + for(Int_t iMod=minMod; iMod<=maxMod; iMod++){ + Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(lay,lad,iMod); + SetModuleTimeZero(modIndex,tzero); + } } +//_________________________________________________________________________ +void AliITSresponseSDD::PrintChargeCalibrationParams() const{ + // Dump charge calibration parameters -//______________________________________________________________________ -AliITSresponseSDD& AliITSresponseSDD::operator=(const AliITSresponseSDD& /* ob */){ - // Assignment operator - // Assignment is not allowed. The method is protected to avoid misuse. - Error("= operator","Assignment operator not allowed\n"); - return *this; + printf("ADC vs. drift time corr=%f\n",GetChargevsTime()); + printf("-------------------------------------\n"); + printf("Layer 3\n"); + for(Int_t ilad=1; ilad<=14; ilad++){ + for(Int_t idet=1; idet<=6;idet++){ + Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(3,ilad,idet); + Float_t tz=GetADCtokeV(modIndex); + printf("%7.2f ",tz); + } + printf("\n"); + } + printf("\n"); + printf("Layer 4\n"); + for(Int_t ilad=1; ilad<=22; ilad++){ + for(Int_t idet=1; idet<=8;idet++){ + Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(4,ilad,idet); + Float_t tz=GetADCtokeV(modIndex); + printf("%7.2f ",tz); + } + printf("\n"); + } } +//_________________________________________________________________________ +void AliITSresponseSDD::PrintTimeZeroes() const{ + // Dump time zero values -//______________________________________________________________________ -Int_t AliITSresponseSDD::Convert8to10(Int_t signal) const { - // Undo the lossive 10 to 8 bit compression. - // code from Davide C. and Albert W. - - if(Do10to8()){ // kTRUE if the compression is active - if (signal < 0 || signal > 255) { - Warning("Convert8to10","out of range signal=%d",signal); - return 0; - } // end if signal <0 || signal >255 - - if (signal < 128) return signal; - if (signal < 192) { - if (TMath::Odd(signal)) return (128+((signal-128)<<1)); - else return (128+((signal-128)<<1)+1); - } // end if signal < 192 - if (signal < 224) { - if (TMath::Odd(signal)) return (256+((signal-192)<<3)+3); - else return (256+((signal-192)<<3)+4); - } // end if signal < 224 - if (TMath::Odd(signal)) return (512+((signal-224)<<4)+7); - return (512+((signal-224)<<4)+8); + printf("Layer 3\n"); + for(Int_t ilad=1; ilad<=14; ilad++){ + for(Int_t idet=1; idet<=6;idet++){ + Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(3,ilad,idet); + Float_t tz=GetTimeZero(modIndex); + printf("%7.2f ",tz); + } + printf("\n"); } - else { - return signal; + printf("\n"); + printf("Layer 4\n"); + for(Int_t ilad=1; ilad<=22; ilad++){ + for(Int_t idet=1; idet<=8;idet++){ + Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(4,ilad,idet); + Float_t tz=GetTimeZero(modIndex); + printf("%7.2f ",tz); + } + printf("\n"); } + } +//_________________________________________________________________________ +void AliITSresponseSDD::PrintVdriftCorerctions() const{ + // Dump corrections to vdrift -//________________________________________________________________________ -void AliITSresponseSDD::SetNLookUp(Int_t p1){ - // Set number of sigmas over which cluster disintegration is performed - fNcomps=p1; - fGaus = new TArrayF(fNcomps+1); - for(Int_t i=0; i<=fNcomps; i++) { - Double_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1); - (*fGaus)[i] = exp(-((x*x)/2)); + for(Int_t iMod=240; iMod<500; iMod++){ + printf("Module %d dVleft=%f dVright=%f\n",iMod,GetDeltaVDrift(iMod,0),GetDeltaVDrift(iMod,1)); } }