]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSDriftSpeedSDD.cxx
New task to check TPC-ITS track prolongation eff with cosmics
[u/mrichter/AliRoot.git] / ITS / AliITSDriftSpeedSDD.cxx
CommitLineData
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"
18da6e54 26#include "AliLog.h"
27
253e68a0 28const Float_t AliITSDriftSpeedSDD::fgkDriftSpeedDefault = 7.3;
29
18da6e54 30ClassImp(AliITSDriftSpeedSDD)
31//______________________________________________________________________
32AliITSDriftSpeedSDD::AliITSDriftSpeedSDD():
33TObject(),
34fEvNum(0),
35fTimestamp(0),
36fPolDeg(0){
37 // default constructor
253e68a0 38 fDriftSpeedParam[0]=fgkDriftSpeedDefault;
18da6e54 39 for(Int_t i=1; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=0;
40}
41//______________________________________________________________________
4c1bcb5e 42AliITSDriftSpeedSDD::AliITSDriftSpeedSDD(Int_t ev, UInt_t timest, Int_t deg, Double_t *coeff):
18da6e54 43TObject(),
44fEvNum(ev),
45fTimestamp(timest),
46fPolDeg(deg){
47 // standard constructor
48 if(deg>fgkMaxPolDeg){
49 fPolDeg=fgkMaxPolDeg;
50 AliWarning(Form("Polynomial degree must be <%d. Drift speed parametrization limited to %dth degree poly.\n",fgkMaxPolDeg,fgkMaxPolDeg));
51 }
52 for(Int_t i=0; i<fPolDeg+1; i++) fDriftSpeedParam[i]=coeff[i];
53 for(Int_t i=fPolDeg+1; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=0;
54}
55//______________________________________________________________________
56AliITSDriftSpeedSDD::AliITSDriftSpeedSDD(const AliITSDriftSpeedSDD& drSpeed):
57TObject(),
58fEvNum(drSpeed.fEvNum),
59fTimestamp(drSpeed.fTimestamp),
60fPolDeg(drSpeed.fPolDeg)
61{
62 // copy constructor
63 for(Int_t i=0; i<fgkMaxPolDeg+1; i++) fDriftSpeedParam[i]=drSpeed.GetDriftSpeedParameter(i);
64
65}
66//______________________________________________________________________
67void AliITSDriftSpeedSDD::PrintDriftSpeedParameters() const {
68 // printout drift speed parametrization
69 printf("Injector event #%d at time %d\n",fEvNum,fTimestamp);
70 printf("Coefficients of %d degree poly fit:\n",fPolDeg);
ab516493 71 for(Int_t i=0; i<fgkMaxPolDeg+1; i++) printf("par[%d]=%G\n",i,fDriftSpeedParam[i]);
18da6e54 72}