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 */
9 /// \class AliMUONAlignmentTask
10 /// \brief Task to align the muon spectrometer
12 // Author Javier Castillo, CEA/Saclay - Irfu/SPhN
18 class AliMUONAlignment;
19 class AliMUONGeometryTransformer;
21 #include "AliAnalysisTaskSE.h"
23 class AliMUONAlignmentTask : public AliAnalysisTaskSE
30 AliMUONAlignmentTask(const char *name = "AliMUONAlignmentTask", const char *newalignocdb = "local://ReAlignOCDB", const char *oldalignocdb = "none", const char *defaultocdb = "raw://", const char *geofilename = "geometry.root");
33 AliMUONAlignmentTask(const AliMUONAlignmentTask& obj);
35 /// asignment operator
36 AliMUONAlignmentTask& operator=(const AliMUONAlignmentTask& other);
39 virtual ~AliMUONAlignmentTask();
41 virtual void LocalInit();
46 /// perform alignment from alignment records is true. Use ESD tracks otherwise
47 void SetReadRecords( Bool_t value = kTRUE )
48 { fReadRecords = value; }
50 /// write alignment records to AOD if true
51 void SetWriteRecords( Bool_t value = kTRUE )
52 { fWriteRecords = value; }
54 /// perform alignment (from either tracks or records depending on fReadRecords)
55 void SetDoAlignment( Bool_t value )
56 { fDoAlignment = value; }
61 virtual void UserCreateOutputObjects();
64 virtual void UserExec(Option_t *option);
65 virtual void NotifyRun();
67 /// termination cleanup
68 virtual void Terminate(const Option_t*);
70 /// end of task execution
71 virtual void FinishTaskOutput();
73 /// Set geoemetry file name
74 void SetGeoFilename(const char* geoFilename)
75 {fGeoFilename = geoFilename;}
78 void SetDefaultStorage(const char* defaultOCDB)
79 {fDefaultStorage = defaultOCDB;}
81 /// Set mis align ocdb
82 void SetOldAlignStorage(const char* oldalignOCDB)
83 {fOldAlignStorage = oldalignOCDB;}
85 /// Set mis align ocdb
86 void SetNewAlignStorage(const char* newalignOCDB)
87 {fNewAlignStorage = newalignOCDB;}
89 /// Flag to set OCDB once at first notify
90 void SetLoadOCDBOnce(Bool_t loadOCDBOnce = kTRUE)
91 {fLoadOCDBOnce = loadOCDBOnce;}
98 /// perform alignment from alignment records is true. Use ESD tracks otherwise
101 /// write alignment records to AOD if true
102 Bool_t fWriteRecords;
104 /// perform alignment (from either tracks or records depending on fReadRecords)
109 /// The MUON alignment object
110 AliMUONAlignment *fAlign;
112 /// Geometry file name
113 TString fGeoFilename;
115 /// location of the default OCDB storage
116 TString fDefaultStorage;
118 /// location of the OCDB storage where to find old MUON/Align/Data (use the default one if empty)
119 TString fOldAlignStorage;
121 /// location of the OCDB storage where to put new MUON/Align/Data (use the default one if empty)
122 TString fNewAlignStorage;
124 /// geometry transformer used to recontruct the present data
125 AliMUONGeometryTransformer* fOldGeoTransformer;
127 /// new geometry transformer containing the new alignment to be applied
128 AliMUONGeometryTransformer* fNewGeoTransformer;
130 Bool_t fLoadOCDBOnce;
133 /// Total number of track read
136 /// Number of tracks used for alignment
140 Int_t fLastRunNumber;
142 /// Array of alignment parameters
143 Double_t fParameters[4*156];
145 /// Array of alignment parameters errors
146 Double_t fErrors[4*156];
148 /// Array of alignment parameters pulls
149 Double_t fPulls[4*156];
151 /// Graph of translations along x
152 TGraphErrors *fMSDEx ;
154 /// Graph of translations along y
155 TGraphErrors *fMSDEy ;
157 /// Graph of translations along z
158 TGraphErrors *fMSDEz ;
160 /// Graph of rotation about z
161 TGraphErrors *fMSDEp;
166 /// list of track records
167 TClonesArray *fRecords;
169 /// number of records
172 ClassDef(AliMUONAlignmentTask, 3)