X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSresponseSDD.cxx;h=f7577582aea7f20b085274485558a962dd0790e9;hb=532dd8d883222c817a36f67e97617bb51ab98cd8;hp=bcc6e2b15ad5e860a55b1c0f6cf7a5b2dcd5eb4e;hpb=03898a572903e84d489de082f1784fc61512613d;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSresponseSDD.cxx b/ITS/AliITSresponseSDD.cxx index bcc6e2b15ad..f7577582aea 100644 --- a/ITS/AliITSresponseSDD.cxx +++ b/ITS/AliITSresponseSDD.cxx @@ -1,6 +1,6 @@ /************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * * + * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * @@ -13,95 +13,93 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -#include - -#include "AliITSresponseSDD.h" +/* $Id$ */ +////////////////////////////////////////////////////// +// Base response class forITS // +// It is used to set static data members // +// connected to parameters equal for all // +// the modules // +// // +// // +////////////////////////////////////////////////////// -//___________________________________________ -ClassImp(AliITSresponseSDD) - -AliITSresponseSDD::AliITSresponseSDD() -{ - // constructor - SetMaxAdc(); - SetDiffCoeff(); - SetDriftSpeed(); - SetNSigmaIntegration(); - SetNLookUp(); - // SetClock(); - SetNoiseParam(); - SetNoiseAfterElectronics(); - SetElectronics(); - SetDynamicRange(); - SetChargeLoss(); - SetMinVal(); - SetParamOptions(); - SetZeroSupp(); - SetDataType(); - SetFilenames(); - SetOutputOption(); - SetDo10to8(); -} -AliITSresponseSDD::~AliITSresponseSDD() { - - if(fGaus) delete fGaus; +#include +#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::fgkCarlosRXClockPeriod = 25.; +ClassImp(AliITSresponseSDD) + +//_________________________________________________________________________ +AliITSresponseSDD::AliITSresponseSDD(): +TObject(), + fTimeOffset(fgkTimeOffsetDefault), + fADC2keV(fgkADC2keVDefault), + fChargevsTime(fgkChargevsTimeDefault){ + // default constructor + 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; } -} -void AliITSresponseSDD::GiveCompressParam(Int_t cp[8]) -{ - // give compression param - - Int_t i; - for (i=0; i<8; i++) { - cp[i]=fCPar[i]; + }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); + } } - -void AliITSresponseSDD::Print() -{ - // Print SDD response Parameters - - cout << "**************************************************" << endl; - cout << " Silicon Drift Detector Response Parameters " << endl; - cout << "**************************************************" << endl; - cout << "Diffusion Coefficients: " << fDiffCoeff << ", " << fDiffCoeff1 << endl; - - cout << "Hardware compression parameters: " << endl; - for(Int_t i=0; i<8; i++) cout << "fCPar[" << i << "] = " << fCPar[i] << endl; - cout << "Noise before electronics (arbitrary units): " << fNoise << endl; - cout << "Baseline (ADC units): " << fBaseline << endl; - cout << "Noise after electronics (ADC units): " << fNoiseAfterEl << endl; - - cout << "Dynamic Range: " << fDynamicRange << endl; - cout << "Charge Loss: " << fChargeLoss << endl; - cout << "Temperature: " << fTemperature << endl; - cout << "Drift Speed: " << fDriftSpeed << endl; - cout << "Electronics (1=PASCAL, 2=OLA): " << fElectronics << endl; - - cout << "N. of Sigma for signal integration: " << fNsigmas << endl; - cout << "N. of bins in lookup table: " << fNcomps << endl; - - cout << "Max. ADC Value: " << fMaxAdc << endl; - cout << "Min. Value: " << fMinVal << endl; - - cout << "**************************************************" << endl; - - - +//_________________________________________________________________________ +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); + } } - - -