Fix problem in simulated raw data + code cleanup (F.Prino)
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSDDInjectors.h
CommitLineData
348f80b7 1#ifndef ALIITSONLINESDDINJECTORS_H
2#define ALIITSONLINESDDINJECTORS_H
3
4
5///////////////////////////////////////////////////////////////////
6// //
7// Class used for SDD injector analysis //
8// Origin: F.Prino, Torino, prino@to.infn.it //
9// //
10///////////////////////////////////////////////////////////////////
0e5e647a 11#include "AliITSOnlineSDD.h"
348f80b7 12
13class TH2F;
14class TGraphErrors;
15class AliITSOnlineSDDInjectors : public AliITSOnlineSDD {
16
17 public:
18 AliITSOnlineSDDInjectors();
19 AliITSOnlineSDDInjectors(Int_t mod, Int_t sid);
20 virtual ~AliITSOnlineSDDInjectors();
21
22 void SetSide(Int_t sid){fSide=sid;}
23 void SetThreshold(Float_t thr=75.){fThreshold=thr;}
24 void SetRangeLine1(Int_t tbmin=40, Int_t tbmax=90){
25 fTbMin[0]=tbmin; fTbMax[0]=tbmax;
26 }
27 void SetRangeLine2(Int_t tbmin=90, Int_t tbmax=140){
28 fTbMin[1]=tbmin; fTbMax[1]=tbmax;
29 }
30 void SetRangeLine3(Int_t tbmin=170, Int_t tbmax=220){
31 fTbMin[2]=tbmin; fTbMax[2]=tbmax;
32 }
33 void SetPolOrder(Int_t n=3){fPolOrder=n;}
34 void SetMinDriftVel(Float_t vmin=4.){fMinDriftVel=vmin;}
35 void SetMaxDriftVel(Float_t vmax=9.){fMaxDriftVel=vmax;}
36
37 TGraphErrors* GetLineGraph(Int_t jlin);
beb262b4 38 TGraphErrors* GetDriftVelocityGraph() const;
348f80b7 39 Float_t* GetDriftVelFitParam()const{ return fParam;}
40 Float_t GetDriftVelocity(Int_t jlin) const{return fDriftVel[jlin];}
41 Float_t GetSigmaDriftVelocity(Int_t jlin) const{return fSigmaDriftVel[jlin];}
42 Float_t GetTimeBinZero() const{return fTbZero;}
43 Float_t GetDriftCoordinate(Float_t cAnode, Float_t cTimeBin);
beb262b4 44 Int_t GetAnodeNumber(Int_t iInjLine) const;
348f80b7 45
46 void PrintInjMap();
47 void PrintCentroids();
4c82df4c 48 void WriteToASCII(Int_t evNumb, UInt_t timeStamp, Int_t optAppend=0);
348f80b7 49
50 void Reset();
51 void AnalyzeEvent(TH2F* his);
52 void FindGoodInjectors();
53 void FindCentroids();
54 void CalcDriftVelocity(Int_t jlin);
55 void CalcTimeBinZero();
56 void FitDriftVelocityVsAnode();
57
58 protected:
59 void SetPositions();
60 private:
61
62 enum {
63 kNInjectors = 33
64 };
65
66 AliITSOnlineSDDInjectors(const AliITSOnlineSDDInjectors& source);
67 AliITSOnlineSDDInjectors& operator = (const AliITSOnlineSDDInjectors& source);
68 static const Float_t fgkSaturation;
69 static const Float_t fgkJitterTB;
70
beb262b4 71 TH2F* fHisto; // histogram of module channel counts
72 Float_t fTbZero; // Time zero for injector event
73 Float_t fPosition[3]; // Coordinates of injector lines
74 UShort_t fTbMin[3]; // Minimum time bin for each line
75 UShort_t fTbMax[3]; // Maximum time bin for each line
76 Bool_t fGoodInj[kNInjectors][3]; // array of good injectors
77 Float_t fCentroid[kNInjectors][3]; // array of time centroids of injectors
78 Float_t fRMSCentroid[kNInjectors][3]; // array of time rms of injectors
79 Float_t fDriftVel[kNInjectors]; // drift velocity
80 Float_t fSigmaDriftVel[kNInjectors]; // error on drift velocity
81 Float_t *fParam; // parameters of polinomial fit
82 // of drift vel. vs. anode number
83 Int_t fPolOrder; // order of polinomial fit
84 Float_t fMinDriftVel; // Cut value for minimum drift speed
85 Float_t fMaxDriftVel; // Cut value for maximum drift speed
86 Float_t fThreshold; // Threshold for injector signal
348f80b7 87
88 ClassDef(AliITSOnlineSDDInjectors,1)
89};
90#endif