]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSresponseSDD.cxx
moving class
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
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  **************************************************************************/
15
16 /* $Id$ */
17
18 //////////////////////////////////////////////////////
19 //  Base response class forITS                      //
20 //  It is used to set static data members           //
21 //  connected to parameters equal for all           //
22 //  the modules                                     //
23 //                                                  //
24 //                                                  //
25 //////////////////////////////////////////////////////
26
27 #include <TMath.h>
28
29 #include "AliITSresponseSDD.h"
30
31 const Int_t AliITSresponseSDD::fgkMaxAdcDefault = 1024;
32 const Float_t AliITSresponseSDD::fgkDynamicRangeDefault = 132.;
33 const Float_t AliITSresponseSDD::fgkfChargeLossDefault = 0;
34 const Float_t AliITSresponseSDD::fgkDiffCoeffDefault = 3.23;
35 const Float_t AliITSresponseSDD::fgkDiffCoeff1Default = 30.;
36 const TString AliITSresponseSDD::fgkOptionDefault = "ZS";
37 const Float_t AliITSresponseSDD::fgkDriftSpeedDefault = 7.3;
38 const Float_t AliITSresponseSDD::fgkTimeOffsetDefault = 54.30;
39 const Float_t AliITSresponseSDD::fgkADC2keVDefault = 5.243;
40 const Float_t AliITSresponseSDD::fgkNsigmasDefault = 3.;
41 const Int_t AliITSresponseSDD::fgkNcompsDefault = 121;
42
43 ClassImp(AliITSresponseSDD)
44
45 //_________________________________________________________________________
46 AliITSresponseSDD::AliITSresponseSDD():
47 AliITSresponse(),
48 fJitterError(0.),
49 fDynamicRange(0.),
50 fChargeLoss(0.),
51 fTimeOffset(fgkTimeOffsetDefault),
52 fADC2keV(fgkADC2keVDefault),
53 fElectronics(0),
54 fMaxAdc(fgkMaxAdcDefault),
55 fNsigmas(fgkNsigmasDefault),
56 fGaus(),
57 fNcomps(fgkNcompsDefault),
58 fOption(){
59   // default constructor
60   fGaus = 0;
61   SetDiffCoeff(fgkDiffCoeffDefault,fgkDiffCoeff1Default);
62   //  SetNLookUp(fgkNcompsDefault);
63
64   SetJitterError();
65   SetElectronics();
66   SetDynamicRange(fgkDynamicRangeDefault);
67   SetChargeLoss(fgkfChargeLossDefault);
68   SetZeroSupp(fgkOptionDefault);
69 }
70
71
72 //______________________________________________________________________
73 AliITSresponseSDD::~AliITSresponseSDD() { 
74
75   if(fGaus) delete fGaus;
76 }
77
78
79 //________________________________________________________________________
80 void AliITSresponseSDD::SetNLookUp(Int_t p1){
81   // Set number of sigmas over which cluster disintegration is performed
82   fNcomps=p1;
83   if (fGaus) delete fGaus;
84   fGaus = new TArrayF(fNcomps+1);
85   for(Int_t i=0; i<=fNcomps; i++) {
86     Float_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1);
87     (*fGaus)[i] = exp(-((x*x)/2));
88   }
89 }