]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSresponseSDD.cxx
Add regional trigger container (Christian)
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.cxx
CommitLineData
b0f5e3fc 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2aea926d 3 * *
b0f5e3fc 4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
b9d0a01d 15
b0f5e3fc 16#include "AliITSresponseSDD.h"
fcf95fc7 17//////////////////////////////////////////////////////
18// Base response class forITS //
19// It is used to set static data members //
20// connected to parameters equal for all //
21// the modules //
703a4e51 22// //
23// //
24//////////////////////////////////////////////////////
50d05d7b 25
fcf95fc7 26
703a4e51 27const Int_t AliITSresponseSDD::fgkMaxAdcDefault = 1024;
aacedc3e 28const Double_t AliITSresponseSDD::fgkDynamicRangeDefault = 132.;
29const Double_t AliITSresponseSDD::fgkfChargeLossDefault = 0;
fcf95fc7 30const Float_t AliITSresponseSDD::fgkDiffCoeffDefault = 3.23;
31const Float_t AliITSresponseSDD::fgkDiffCoeff1Default = 30.;
703a4e51 32const TString AliITSresponseSDD::fgkParam1Default = "same";
33const TString AliITSresponseSDD::fgkParam2Default = "same";
703a4e51 34const TString AliITSresponseSDD::fgkOptionDefault = "1D";
aacedc3e 35const Double_t AliITSresponseSDD::fgkDriftSpeedDefault = 7.3;
36const Double_t AliITSresponseSDD::fgkNsigmasDefault = 3.;
703a4e51 37const Int_t AliITSresponseSDD::fgkNcompsDefault = 121;
fcf95fc7 38
48058160 39ClassImp(AliITSresponseSDD)
50d05d7b 40
fcf95fc7 41//_________________________________________________________________________
42AliITSresponseSDD::AliITSresponseSDD():AliITSresponse(){
50d05d7b 43 // default constructor
3d2c9d72 44 fGaus = 0;
3d2c9d72 45 SetMaxAdc(fgkMaxAdcDefault);
46 SetDiffCoeff(fgkDiffCoeffDefault,fgkDiffCoeff1Default);
47 SetDriftSpeed(fgkDriftSpeedDefault);
48 SetNSigmaIntegration(fgkNsigmasDefault);
fdef5715 49 // SetNLookUp(fgkNcompsDefault);
fcf95fc7 50
3d2c9d72 51 SetJitterError();
52 SetElectronics();
53 SetDynamicRange(fgkDynamicRangeDefault);
54 SetChargeLoss(fgkfChargeLossDefault);
3d2c9d72 55 SetParamOptions(fgkParam1Default.Data(),fgkParam2Default.Data());
3d2c9d72 56 SetZeroSupp(fgkOptionDefault);
3d2c9d72 57 SetDo10to8();
fcf95fc7 58 SetOutputOption();
9de0700b 59}
fcf95fc7 60
61
48058160 62//______________________________________________________________________
fcf95fc7 63AliITSresponseSDD::~AliITSresponseSDD() {
64
65 if(fGaus) delete fGaus;
b0f5e3fc 66}
fcf95fc7 67
703a4e51 68//______________________________________________________________________
69AliITSresponseSDD::AliITSresponseSDD(const AliITSresponseSDD &ob) : AliITSresponse(ob) {
70 // Copy constructor
71 // Copies are not allowed. The method is protected to avoid misuse.
72 Error("AliITSresponseSDD","Copy constructor not allowed\n");
73}
74
75//______________________________________________________________________
76AliITSresponseSDD& AliITSresponseSDD::operator=(const AliITSresponseSDD& /* ob */){
77 // Assignment operator
78 // Assignment is not allowed. The method is protected to avoid misuse.
79 Error("= operator","Assignment operator not allowed\n");
80 return *this;
81}
82
7f1a504b 83//______________________________________________________________________
84Int_t AliITSresponseSDD::Convert8to10(Int_t signal) const {
85 // Undo the lossive 10 to 8 bit compression.
86 // code from Davide C. and Albert W.
fcf95fc7 87
7f1a504b 88 if(Do10to8()){ // kTRUE if the compression is active
89 if (signal < 0 || signal > 255) {
90 Warning("Convert8to10","out of range signal=%d",signal);
91 return 0;
92 } // end if signal <0 || signal >255
93
94 if (signal < 128) return signal;
95 if (signal < 192) {
96 if (TMath::Odd(signal)) return (128+((signal-128)<<1));
97 else return (128+((signal-128)<<1)+1);
98 } // end if signal < 192
99 if (signal < 224) {
100 if (TMath::Odd(signal)) return (256+((signal-192)<<3)+3);
101 else return (256+((signal-192)<<3)+4);
102 } // end if signal < 224
103 if (TMath::Odd(signal)) return (512+((signal-224)<<4)+7);
104 return (512+((signal-224)<<4)+8);
105 }
106 else {
107 return signal;
108 }
109}
110
fcf95fc7 111//________________________________________________________________________
703a4e51 112void AliITSresponseSDD::SetNLookUp(Int_t p1){
113 // Set number of sigmas over which cluster disintegration is performed
114 fNcomps=p1;
fdef5715 115 if (fGaus) delete fGaus;
703a4e51 116 fGaus = new TArrayF(fNcomps+1);
117 for(Int_t i=0; i<=fNcomps; i++) {
aacedc3e 118 Double_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1);
703a4e51 119 (*fGaus)[i] = exp(-((x*x)/2));
703a4e51 120 }
121}