/************************************************************************** * 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. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ #include #include #include "AliITSresponseSDD.h" //___________________________________________ ClassImp(AliITSresponseSDD) AliITSresponseSDD::AliITSresponseSDD() { // constructor // fModules = 520; // fChips = 4; // fChannels = 64; SetDeadChannels(); SetMaxAdc(); SetDiffCoeff(); SetDriftSpeed(); SetNSigmaIntegration(); SetNLookUp(); // SetClock(); SetNoiseParam(); SetNoiseAfterElectronics(); SetElectronics(); SetDynamicRange(); SetChargeLoss(); SetMinVal(); SetParamOptions(); SetZeroSupp(); SetDataType(); SetFilenames(); SetOutputOption(); SetDo10to8(); // set the default zero suppression parameters fCPar[0]=0; fCPar[1]=0; fCPar[2]=(Int_t)(fBaseline + 2.*fNoiseAfterEl + 0.2); fCPar[3]=(Int_t)(fBaseline + 2.*fNoiseAfterEl + 0.2); fCPar[4]=0; fCPar[5]=0; fCPar[6]=0; fCPar[7]=0; } AliITSresponseSDD::~AliITSresponseSDD() { if(fGaus) delete fGaus; } void AliITSresponseSDD::SetCompressParam(Int_t cp[8]) { // set compression param Int_t i; for (i=0; i<8; i++) { fCPar[i]=cp[i]; //printf("\n CompressPar %d %d \n",i,fCPar[i]); } } void AliITSresponseSDD::GiveCompressParam(Int_t cp[8]) { // give compression param Int_t i; for (i=0; i<8; i++) { cp[i]=fCPar[i]; } } void AliITSresponseSDD::SetDeadChannels(Int_t nmod, Int_t nchip, Int_t nchan) { for(Int_t m=0; m fModules) { cout << "Wrong number of dead modules: " << nmod << endl; return; } Int_t nmax = (fModules-nmod)*fChips; if(nchip < 0 || nchip > nmax) { cout << "Wrong number of dead chips: " << nchip << endl; return; } nmax = ((fModules - nmod)*fChips - nchip)*fChannels; if(nchan < 0 || nchan > nmax) { cout << "Wrong number of dead channels: " << nchan << endl; return; } TRandom *gran = new TRandom(); // cout << "modules" << endl; Int_t mod[nmod]; for(Int_t i=0;iUniform()); cout << i+1 << ": Dead module nr: " << mod[i] << endl; for(Int_t n=0; nUniform() + 1.); if(module <=0 || module > fModules) cout << "Wrong module: " << module << endl; Int_t flag_mod = 0; for(Int_t k=0;kUniform() + 1.); if(chi <=0 || chi > fChips) cout << "Wrong chip: " << chi << endl; i++; chip[i-1] = chi; chip_mod[i-1] = module; for(Int_t m=0; mUniform() + 1.); if(module <=0 || module > fModules) cout << "Wrong module: " << module << endl; Int_t flag_mod = 0; for(Int_t k=0;kUniform() + 1.); if(chipp <=0 || chipp > fChips) cout << "Wrong chip: " << chipp << endl; Int_t flag_chip = 0; for(Int_t k=0;kUniform() + 1.); if(channel[i-1] <=0 || channel[i-1] > fChannels) cout << "Wrong channel: " << channel[i-1] << endl; channel_chip[i-1] = chipp; channel_mod[i-1] = module; fGain[module-1][chipp-1][channel[i-1]-1] = 0.; cout << i << ": Dead channel nr. " << channel[i-1] << " in chip nr. " << channel_chip[i-1] << " in module nr: " << channel_mod[i-1] << endl; } /* delete [] mod; delete [] chip; delete [] chip_mod; delete [] channel; delete [] channel_mod; delete [] channel_chip; */ } void AliITSresponseSDD::PrintGains() { // Print SDD electronic gains for(Int_t t=0; t