plitting of drift speed (updated at every physics run) from other calibration paramet...
[u/mrichter/AliRoot.git] / ITS / AliITSDriftSpeedSDD.h
CommitLineData
18da6e54 1#ifndef ALIITSDRIFTSPEEDSDD_H
2#define ALIITSDRIFTSPEEDSDD_H
3/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////
9// //
10// Class for SDD drift speed extracted from injector triggers //
11// drift speed dependence on anode number is parametrized via //
12// a polynomial function (3rd degree by default, max. 5th degree)//
13// Origin: F.Prino, Torino, prino@to.infn.it //
14// //
15///////////////////////////////////////////////////////////////////
16
17#include<TObject.h>
18#include<TMath.h>
19
20class AliITSDriftSpeedSDD : public TObject {
21 public:
22 AliITSDriftSpeedSDD();
23 AliITSDriftSpeedSDD(Int_t ev, UInt_t timest, Int_t deg, Float_t *coeff);
24 AliITSDriftSpeedSDD(const AliITSDriftSpeedSDD& drSpeed);
25 virtual ~AliITSDriftSpeedSDD(){};
26
27 virtual Bool_t IsEqual(const TObject *obj) const
28 {return fEvNum == ((AliITSDriftSpeedSDD*)obj)->fEvNum;}
29 virtual Bool_t IsSortable() const { return kTRUE; }
30 virtual Int_t Compare(const TObject *obj) const
31 {if(fEvNum<((AliITSDriftSpeedSDD*)obj)->fEvNum) return -1;
32 else if(fEvNum>((AliITSDriftSpeedSDD*)obj)->fEvNum) return 1;
33 else return 0; }
34
35 void PrintDriftSpeedParameters() const;
36
37 Int_t GetEventNumber() const {return fEvNum;}
38 UInt_t GetEventTimestamp() const {return fTimestamp;}
39 Float_t GetDriftSpeedParameter(Int_t i) const {return fDriftSpeedParam[i];}
40 Float_t GetDriftSpeedAtAnode(Float_t nAnode) const{
41 Float_t drSpeed=0;
42 for(Int_t i=0; i<fgkMaxPolDeg+1; i++) drSpeed+=fDriftSpeedParam[i]*TMath::Power(nAnode,i);
43 return drSpeed;
44 }
45
46 protected:
47 static const Int_t fgkMaxPolDeg=5; // max. degree of the poly fit
48 Int_t fEvNum; // event number of injector event
49 UInt_t fTimestamp; // event timestamp
50 Int_t fPolDeg; // degree of the ploy fit to drift speed vs. anode
51 Float_t fDriftSpeedParam[fgkMaxPolDeg+1]; // coefficients of the poly fit
52 ClassDef(AliITSDriftSpeedSDD,1);
53};
54#endif