]>
Commit | Line | Data |
---|---|---|
18da6e54 | 1 | /************************************************************************** |
2 | * Copyright(c) 2007-2009, 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 | // // | |
20 | // Implementation of the class for SDD drift speed // | |
21 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
22 | // // | |
23 | /////////////////////////////////////////////////////////////////// | |
24 | ||
25 | #include "AliITSDriftSpeedSDD.h" | |
26 | #include "AliITSresponseSDD.h" | |
27 | #include "AliLog.h" | |
28 | ||
29 | ClassImp(AliITSDriftSpeedSDD) | |
30 | //______________________________________________________________________ | |
31 | AliITSDriftSpeedSDD::AliITSDriftSpeedSDD(): | |
32 | TObject(), | |
33 | fEvNum(0), | |
34 | fTimestamp(0), | |
35 | fPolDeg(0){ | |
36 | // default constructor | |
37 | fDriftSpeedParam[0]=AliITSresponseSDD::DefaultDriftSpeed(); | |
38 | for(Int_t i=1; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=0; | |
39 | } | |
40 | //______________________________________________________________________ | |
4c1bcb5e | 41 | AliITSDriftSpeedSDD::AliITSDriftSpeedSDD(Int_t ev, UInt_t timest, Int_t deg, Double_t *coeff): |
18da6e54 | 42 | TObject(), |
43 | fEvNum(ev), | |
44 | fTimestamp(timest), | |
45 | fPolDeg(deg){ | |
46 | // standard constructor | |
47 | if(deg>fgkMaxPolDeg){ | |
48 | fPolDeg=fgkMaxPolDeg; | |
49 | AliWarning(Form("Polynomial degree must be <%d. Drift speed parametrization limited to %dth degree poly.\n",fgkMaxPolDeg,fgkMaxPolDeg)); | |
50 | } | |
51 | for(Int_t i=0; i<fPolDeg+1; i++) fDriftSpeedParam[i]=coeff[i]; | |
52 | for(Int_t i=fPolDeg+1; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=0; | |
53 | } | |
54 | //______________________________________________________________________ | |
55 | AliITSDriftSpeedSDD::AliITSDriftSpeedSDD(const AliITSDriftSpeedSDD& drSpeed): | |
56 | TObject(), | |
57 | fEvNum(drSpeed.fEvNum), | |
58 | fTimestamp(drSpeed.fTimestamp), | |
59 | fPolDeg(drSpeed.fPolDeg) | |
60 | { | |
61 | // copy constructor | |
62 | for(Int_t i=0; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=drSpeed.GetDriftSpeedParameter(i); | |
63 | ||
64 | } | |
65 | //______________________________________________________________________ | |
66 | void AliITSDriftSpeedSDD::PrintDriftSpeedParameters() const { | |
67 | // printout drift speed parametrization | |
68 | printf("Injector event #%d at time %d\n",fEvNum,fTimestamp); | |
69 | printf("Coefficients of %d degree poly fit:\n",fPolDeg); | |
70 | for(Int_t i=0; i<fgkMaxPolDeg+1; i++) printf("par[%d]=%f\n",i,fDriftSpeedParam[i]); | |
71 | } |