]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDclusterErrors.h
Coding conventions violations removed
[u/mrichter/AliRoot.git] / TRD / AliTRDclusterErrors.h
1 #include "AliTrackReference.h"
2
3 class AliTRDExactPoint: public TObject {
4   public : 
5   AliTRDExactPoint();
6   Float_t fTX;    //x in rotated coordinate in the center of time bin
7   Float_t fTY;    //y 
8   Float_t fTZ;    //z
9   Float_t fTAY;   //angle y
10   Float_t fTAZ;   //angle z
11   Float_t fGx;
12   Float_t fGy;
13   Float_t fGz;
14   //
15   void SetReference(AliTrackReference *ref);
16   Float_t fTRefAngleY;
17   Float_t fRefPos[3];
18   Float_t fRefMom[3];
19   //
20   Int_t   fDetector;      // detector (chamber)
21   Int_t   fLocalTimeBin;  // local time bin
22   Int_t   fPlane;         // plane (layer)
23   Int_t   fSector;       // segment
24   Int_t   fPlaneMI;  
25   // 
26   Float_t fTQ;
27   Float_t fTPrim;
28   //  
29   ClassDef(AliTRDExactPoint,1)
30 };
31
32 AliTRDExactPoint::AliTRDExactPoint()
33 {
34   fTX=fTY=fTZ=fTAZ=fTAY=fGx=fGy=fGz=fTRefAngleY=0;
35   fRefPos[0]=fRefPos[1]=fRefPos[2]=fRefMom[0]=fRefMom[1]=fRefMom[2]=0;
36   fDetector=fLocalTimeBin=fPlane=fSector=fPlaneMI=0;
37   fTQ=fTPrim=0;
38 }
39
40 void AliTRDExactPoint::SetReference(AliTrackReference *ref){
41   fRefPos[0] = ref->X();
42   fRefPos[1] = ref->Y();
43   fRefPos[2] = ref->Z();
44   //
45   fRefMom[0] = ref->Px();
46   fRefMom[1] = ref->Py();
47   fRefMom[2] = ref->Pz();
48 }
49
50 class AliTRDCI: public TObject {
51   public :
52   AliTRDCI(){;}
53   virtual ~AliTRDCI(){;}
54   //
55   AliTRDclusterMI fCl;
56   AliTRDExactPoint fEp;
57   TParticle fP;
58   Char_t fStatus;
59   //
60   Float_t fDYtilt;
61   Float_t fTDistZ;  
62   //
63   Int_t   fNTracks;
64   Float_t fPt;
65   Float_t fCharge;
66   Bool_t  fIsPrim;
67   
68   void Update();
69   ClassDef(AliTRDCI,1)
70 };
71
72 void AliTRDCI::Update()
73 {
74   //
75   //thanks to root
76   fPt = fP.Pt();
77   fCharge = fP.GetPDG()->Charge();
78   fIsPrim = (fP.GetMother(0)>0)? kFALSE :kTRUE;
79 }
80
81
82 class AliTRDClusterErrAnal: public TObject{
83 public: 
84   AliTRDClusterErrAnal(Char_t *chloader  = "galice.root");
85   void SetIO(Int_t event);  
86   Int_t Analyze(Int_t trackmax);
87   void LoadClusters();
88   void MakeExactPoints(Int_t trackmax);
89   void SortReferences();
90   AliTrackReference * FindNearestReference(Int_t lab, Float_t pos[3], Float_t dmax=10.);
91 public:
92   AliRunLoader * fRunLoader;
93   AliLoader * fTRDLoader;
94   AliTRDparameter *fParam;
95   AliTRDgeometry *fGeometry;
96   TTree * fHitTree;
97   TTree * fClusterTree;
98   TTree * fReferenceTree;
99   AliTRDv1 * fTRD;
100   //
101   TTree * fTreeA;
102   TFile * fFileA;
103   AliTRDtracker *fTracker;
104   AliStack *fStack;
105   TObjArray fClusters[12][100][18];  //first plane, second time bin
106   TObjArray fExactPoints;
107   TObjArray *fReferences;
108
109   ClassDef(AliTRDClusterErrAnal,1)
110 };
111
112
113 class AliTRDClusterErrDraw: public TObject{
114 public:
115   static TH1F * ResDyVsAmp(TTree* tree, const char* selection, Float_t t0, Float_t ampmin=10, Float_t ampmax=300);
116   static TH1F * ResDyVsRelPos(TTree* tree, const char* selection, Float_t t0, Float_t min=-0.5, Float_t max=0.5);
117   static TH1F * ResDyVsAngleY(TTree* tree, const char* selection, Float_t t0, Float_t min=-1., Float_t max=1.);
118   static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle);
119   static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec);
120   static TH1F* CreateResHisto(TH2F* hRes2, Bool_t draw = kTRUE, Bool_t drawBinFits = kTRUE, 
121                      Bool_t overflowBinFits = kFALSE);
122
123   ClassDef(AliTRDClusterErrDraw,1)
124 };
125
126
127
128