]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONAlignmentTask.h
Updated documentation about alignment to remove obsolete classes
[u/mrichter/AliRoot.git] / MUON / AliMUONAlignmentTask.h
CommitLineData
4d610fd5 1#ifndef ALIMUONALIGNMENTTASK_H
2#define ALIMUONALIGNMENTTASK_H
81f1d3ae 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4* See cxx source for full Copyright notice */
4d610fd5 5
81f1d3ae 6// $Id$
7
8/// \ingroup calign
4d610fd5 9/// \class AliMUONAlignmentTask
10/// \brief Task to align the muon spectrometer
11///
12// Author Javier Castillo, CEA/Saclay - Irfu/SPhN
13
516043cd 14#include "AliAnalysisTaskSE.h"
15#include "AliMUONAlignment.h"
16
56218672 17class TString;
56218672 18class TClonesArray;
81f1d3ae 19class AliMUONGeometryTransformer;
4d610fd5 20
56218672 21class AliMUONAlignmentTask : public AliAnalysisTaskSE
22{
23
24 public:
25
56218672 26 /// constructor
516043cd 27 AliMUONAlignmentTask( const char *name = "AliMUONAlignmentTask" );
56218672 28
29 /// destructor
4d610fd5 30 virtual ~AliMUONAlignmentTask();
56218672 31
516043cd 32 /// get pointer to alignment class
33 AliMUONAlignment* alignment( void ) const
34 { return fAlign; }
35
36 virtual void LocalInit();
56218672 37
38 ///@name flags
39 //@{
40
41 /// perform alignment from alignment records is true. Use ESD tracks otherwise
42 void SetReadRecords( Bool_t value = kTRUE )
43 { fReadRecords = value; }
44
45 /// write alignment records to AOD if true
46 void SetWriteRecords( Bool_t value = kTRUE )
47 { fWriteRecords = value; }
48
49 /// perform alignment (from either tracks or records depending on fReadRecords)
50 void SetDoAlignment( Bool_t value )
51 { fDoAlignment = value; }
52
516043cd 53 /// merge old and new Align CDBs into the new one.
54 void SetMergeAlignmentCDBs( Bool_t value )
55 { fMergeAlignmentCDBs = value; }
56
57 /// field on alignment
58 void SetBFieldOn( Bool_t value )
59 {
60 fForceBField = kTRUE;
61 fBFieldOn = value;
62 }
63
64 /// run range
65 void SetRunRange( Int_t runNumberMin, Int_t runNumberMax )
66 {
67 fRunNumberMin = runNumberMin;
68 fRunNumberMax = runNumberMax;
69 }
70
71 /// use unbiased residuals
72 void SetUnbias(Bool_t value )
73 {
74 fUnbias = value;
75 if( fAlign ) fAlign->SetUnbias( value );
76 }
77
78 /// use unbiased residuals
79 Bool_t GetUnbias() const
80 { return fUnbias; }
81
56218672 82 //@}
83
84 /// output data
85 virtual void UserCreateOutputObjects();
86
87 /// per-event method
516043cd 88 virtual void UserExec( Option_t* );
56218672 89 virtual void NotifyRun();
90
91 /// termination cleanup
516043cd 92 virtual void Terminate( const Option_t* )
93 {}
56218672 94
95 /// end of task execution
96 virtual void FinishTaskOutput();
cd8521dd 97
cd8521dd 98 /// Set default ocdb
516043cd 99 void SetDefaultStorage( TString defaultOCDB )
100 { fDefaultStorage = defaultOCDB; }
56218672 101
516043cd 102 /// Set old (misaligned) alignment path for ocdb
103 void SetOldAlignStorage( TString oldalignOCDB )
104 { fOldAlignStorage = oldalignOCDB; }
56218672 105
516043cd 106 /// Set new (realigned) alignment path for ocdb
107 void SetNewAlignStorage( TString newalignOCDB )
108 { fNewAlignStorage = newalignOCDB; }
56218672 109
516043cd 110 /// Flag to set OCDB once at first run notify
111 void SetLoadOCDBOnce( Bool_t loadOCDBOnce = kTRUE )
112 { fLoadOCDBOnce = loadOCDBOnce; }
113
114 protected:
115
116 /// store misalignment matrices from OCDB into geometry transformer
117 void SaveMisAlignmentData( AliMUONGeometryTransformer* ) const;
56218672 118
119 private:
120
516043cd 121 /// copy constructor, not implemented
122 AliMUONAlignmentTask(const AliMUONAlignmentTask& obj);
123
124 /// asignment operator, not implemented
125 AliMUONAlignmentTask& operator=(const AliMUONAlignmentTask& other);
126
56218672 127 ///@name flags
128 //@{
129
130 /// perform alignment from alignment records is true. Use ESD tracks otherwise
131 Bool_t fReadRecords;
132
133 /// write alignment records to AOD if true
134 Bool_t fWriteRecords;
135
136 /// perform alignment (from either tracks or records depending on fReadRecords)
137 Bool_t fDoAlignment;
138
516043cd 139 /// merge old and new Align CDBs into the new one.
140 Bool_t fMergeAlignmentCDBs;
141
142 /// true if magnetic field was forced to value, instead of reading from GRP
143 Bool_t fForceBField;
144
145 /// Flag for Magnetic field On/Off
146 Bool_t fBFieldOn;
147
148 //! use unbiased residuals
149 Bool_t fUnbias;
150
56218672 151 //@}
152
153 /// The MUON alignment object
154 AliMUONAlignment *fAlign;
155
56218672 156 /// location of the default OCDB storage
157 TString fDefaultStorage;
158
159 /// location of the OCDB storage where to find old MUON/Align/Data (use the default one if empty)
160 TString fOldAlignStorage;
161
162 /// location of the OCDB storage where to put new MUON/Align/Data (use the default one if empty)
163 TString fNewAlignStorage;
164
165 /// geometry transformer used to recontruct the present data
166 AliMUONGeometryTransformer* fOldGeoTransformer;
167
168 /// new geometry transformer containing the new alignment to be applied
169 AliMUONGeometryTransformer* fNewGeoTransformer;
170
516043cd 171 /// set to true if not willing to re-initialize OCDB at every new run
56218672 172 Bool_t fLoadOCDBOnce;
516043cd 173
174 /// set to true when OCDB was loaded at least once
56218672 175 Bool_t fOCDBLoaded;
176
516043cd 177 //! event number (internal counter)
178 Int_t fEvent;
179
56218672 180 /// Total number of track read
181 Int_t fTrackTot;
182
183 /// Number of tracks used for alignment
184 Int_t fTrackOk;
185
516043cd 186 /// run range
187 Int_t fRunNumberMin;
188 Int_t fRunNumberMax;
56218672 189
190 /// Array of alignment parameters
516043cd 191 Double_t fParameters[AliMUONAlignment::fNGlobal];
56218672 192
193 /// Array of alignment parameters errors
516043cd 194 Double_t fErrors[AliMUONAlignment::fNGlobal];
56218672 195
196 /// Array of alignment parameters pulls
516043cd 197 Double_t fPulls[AliMUONAlignment::fNGlobal];
56218672 198
199 /// list of track records
200 TClonesArray *fRecords;
201
202 /// number of records
203 Int_t fRecordCount;
204
205 ClassDef(AliMUONAlignmentTask, 3)
206
4d610fd5 207};
208
209#endif