]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONAlignmentTask.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / MUON / AliMUONAlignmentTask.h
1 #ifndef ALIMUONALIGNMENTTASK_H
2 #define ALIMUONALIGNMENTTASK_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice                               */
5
6 // $Id$
7
8 /// \ingroup calign
9 /// \class AliMUONAlignmentTask
10 /// \brief Task to align the muon spectrometer
11 ///
12 //  Author Javier Castillo, CEA/Saclay - Irfu/SPhN
13
14 class TList;
15 class TString;
16 class TGraphErrors;
17 class TClonesArray;
18 class AliMUONAlignment;
19 class AliMUONGeometryTransformer;
20
21 #include "AliAnalysisTaskSE.h"
22
23 class AliMUONAlignmentTask : public AliAnalysisTaskSE
24 {
25
26   public:
27
28
29   /// constructor
30   AliMUONAlignmentTask(const char *name = "AliMUONAlignmentTask", const char *newalignocdb = "local://ReAlignOCDB", const char *oldalignocdb = "none", const char *defaultocdb = "raw://", const char *geofilename = "geometry.root");
31
32   /// copy constructor
33   AliMUONAlignmentTask(const AliMUONAlignmentTask& obj);
34
35   /// asignment operator
36   AliMUONAlignmentTask& operator=(const AliMUONAlignmentTask& other);
37
38   /// destructor
39   virtual ~AliMUONAlignmentTask();
40
41   virtual void   LocalInit();
42
43   ///@name flags
44   //@{
45
46   /// perform alignment from alignment records is true. Use ESD tracks otherwise
47   void SetReadRecords( Bool_t value = kTRUE )
48   { fReadRecords = value; }
49
50   /// write alignment records to AOD if true
51   void SetWriteRecords( Bool_t value = kTRUE )
52   { fWriteRecords = value; }
53
54   /// perform alignment (from either tracks or records depending on fReadRecords)
55   void SetDoAlignment( Bool_t value )
56   { fDoAlignment = value; }
57
58   //@}
59
60   /// output data
61   virtual void UserCreateOutputObjects();
62
63   /// per-event method
64   virtual void UserExec(Option_t *option);
65   virtual void NotifyRun();
66
67   /// termination cleanup
68   virtual void Terminate(const Option_t*);
69
70   /// end of task execution
71   virtual void FinishTaskOutput();
72
73   /// Set geoemetry file name
74   void SetGeoFilename(const char* geoFilename)
75   {fGeoFilename = geoFilename;}
76
77   /// Set default ocdb
78   void SetDefaultStorage(const char* defaultOCDB)
79   {fDefaultStorage = defaultOCDB;}
80
81   /// Set mis align ocdb
82   void SetOldAlignStorage(const char* oldalignOCDB)
83   {fOldAlignStorage = oldalignOCDB;}
84
85   /// Set mis align ocdb
86   void SetNewAlignStorage(const char* newalignOCDB)
87   {fNewAlignStorage = newalignOCDB;}
88
89   /// Flag to set OCDB once at first notify
90   void SetLoadOCDBOnce(Bool_t loadOCDBOnce = kTRUE)
91   {fLoadOCDBOnce = loadOCDBOnce;}
92
93   private:
94
95   ///@name flags
96   //@{
97
98   /// perform alignment from alignment records is true. Use ESD tracks otherwise
99   Bool_t fReadRecords;
100
101   /// write alignment records to AOD if true
102   Bool_t fWriteRecords;
103
104   /// perform alignment (from either tracks or records depending on fReadRecords)
105   Bool_t fDoAlignment;
106
107   //@}
108
109   /// The MUON alignment object
110   AliMUONAlignment *fAlign;
111
112   /// Geometry file name
113   TString fGeoFilename;
114
115   /// location of the default OCDB storage
116   TString fDefaultStorage;
117
118   /// location of the OCDB storage where to find old MUON/Align/Data (use the default one if empty)
119   TString fOldAlignStorage;
120
121   /// location of the OCDB storage where to put new MUON/Align/Data (use the default one if empty)
122   TString fNewAlignStorage;
123
124   /// geometry transformer used to recontruct the present data
125   AliMUONGeometryTransformer* fOldGeoTransformer;
126
127   /// new geometry transformer containing the new alignment to be applied
128   AliMUONGeometryTransformer* fNewGeoTransformer;
129
130   Bool_t fLoadOCDBOnce;
131   Bool_t fOCDBLoaded;
132
133   /// Total number of track read
134   Int_t fTrackTot;
135
136   /// Number of tracks used for alignment
137   Int_t fTrackOk;
138
139   /// Last run number
140   Int_t fLastRunNumber;
141
142   /// Array of alignment parameters
143   Double_t fParameters[4*156];
144
145   /// Array of alignment parameters errors
146   Double_t fErrors[4*156];
147
148   /// Array of alignment parameters pulls
149   Double_t fPulls[4*156];
150
151   /// Graph of translations along x
152   TGraphErrors *fMSDEx ;
153
154   /// Graph of translations along y
155   TGraphErrors *fMSDEy ;
156
157   /// Graph of translations along z
158   TGraphErrors *fMSDEz ;
159
160   /// Graph of rotation about z
161   TGraphErrors *fMSDEp;
162
163   /// list of graphs
164   TList *fList;
165
166   /// list of track records
167   TClonesArray *fRecords;
168
169   /// number of records
170   Int_t fRecordCount;
171
172   ClassDef(AliMUONAlignmentTask, 3)
173
174 };
175
176 #endif