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