Make the Scan method public
[u/mrichter/AliRoot.git] / MUON / READMErec.txt
CommitLineData
91509ec6 1// $Id$
2
3/*!
4
5\page README_rec Reconstruction
6
b1fea02e 7The reconstruction is a multistage process, driven by the AliMUONTracker and AliMUONReconstructor classes
8via the AliReconstruction class, which is divided into three parts:
9- the digitization of the electronic response,
10- the clustering of the digits to locate the crossing point of the muon with the chamber,
11- the tracking to reconstruct the trajectory of the muon in the spectrometer from which we can extract the kinematics.
91509ec6 12
b1fea02e 13All the adjustable options and parameters used to tune the different part of the reconstruction are handled by the class AliMUONRecoParam.
91509ec6 14
91509ec6 15
b1fea02e 16\section rec_s1 Digitization
91509ec6 17
b1fea02e 18- We read the RAW data, convert them (convert them back for simulated data) to digit (object inheriting from AliMUONVDigit
19stored into containers inheriting from AliMUONVDigitStore). This conversion is performed by the class AliMUONDigitMaker.
20- We calibrate the digits, via AliMUONDigitCalibrator, by subtracting pedestals and multiplying by gains. All the calibration parameters
21(pedestals, gains, capacitances and HV) are read from the OCDB and stored into AliMUONCalibrationData objects.
22- We create the status of the digit (e.g. pedestal higher than maximum or HV switched off), using AliMUONPadStatusMaker.
23- We create the status map for each digit, i.e the global status (good/bad) of that digit and of its neighbords, using AliMUONPadStatusMapMaker.
24- Calibrated digits might be saved (back) to TreeD in MUON.Digits.root file.
fd3ef136 25
fd3ef136 26
b1fea02e 27\section rec_s2 Clustering
28
29- We convert the digits having a positive charge into pads (AliMUONPad objects), which also contain information about the digit geometrical
30position.
31- We loop over pads in the bending and non-bending planes of the DE to form groups of contiguous pads. We then merge the overlapping groups
32of pads from both cathodes to build the pre-clusters that are the objects to be clusterized.
33- We unfold each pre-cluster in order to extract the number and the position of individual clusters merged in it (complex pre-clusters are
a2d5f607 34made of a superimposition of signals from muon, from physical background (e.g. hadrons) and from electronic noise).
35- We finally determine the MC label: take the one of the simulated track that contribute the most to the total charge of the 2 (bending and the
36non bending) pads located below the cluster position. This is possible only if we perform the reconstruction from simulated digits (which contain
37the list of MC track contributions). We set it to -1 when reconstructing from raw data or in case of failure.
b1fea02e 38
39Several versions of pre-clustering are available, all inheriting from AliMUONVClusterFinder, with different ways to loop over pads to form
40pre-clusters:
41- AliMUONPreClusterFinder
42- AliMUONPreClusterFinderV2
43- AliMUONPreClusterFinderV3
44
45Several version of clustering are available, all inheriting from AliMUONVClusterFinder, with different degrees of complexity:
46- AliMUONClusterFinderCOG simply compute the Center Of Gravity of the charge distribution in the pre-cluster.
47- AliMUONClusterFinderSimpleFit simply fit the charge distribution with a single 2D Mathieson function.
48- AliMUONClusterFinderMLEM uses the Maximum Likelihood Expectation Minimization algorithm.
49This is a recursive procedure which determines the number and the approximate position of clusters into the pre-cluster that are needed
50to reproduce the whole charge distribution. It assumes that the charge distribution of each single cluster follow a 2D Mathieson function.
51If the estimated number of clusters is too high (>3), the pre-cluster is split into several groups of 1-2 or 3 clusters selected having
52the minimum total coupling to all the other clusters into the pre-cluster. Each group of clusters is then fitted with a sum of 2D Mathieson
53functions to extract their exact position.
54- AliMUONClusterFinderPeakCOG is a simplified version of the MLEM clusterizer, without splitting and computing the Center Of Gravity of the
55local charge distribution to extract the position of every clusters found in the pre-cluster.
56- AliMUONClusterFinderPeakFit is another simplified version of the MLEM clusterizer again without splitting. The pre-cluster is fitted with
57a sum of 2D Mathieson if it contains less than 3 clusters or we switch to the above COG method.
58
59The cluster recontruction is driven by the class AliMUONSimpleClusterServer, inheriting from AliMUONVClusterServer.
60It can be performed either before or during the tracking. In the first case, all the chambers are fully clusterized and the clusters (objects
61inheriting from AliMUONVCluster stored into containers inheriting from AliMUONVClusterStore) are saved to TreeR in Muon.RecPoints.root file.
62We use the class AliMUONLegacyClusterServer (also inheriting from AliMUONVClusterServer) read back the TreeR and provide clusters to the tracking.
63In the second case, we clusterize the chambers only in the region where we are looking for new clusters to be attached to the track candidates.
64This makes the clustering faster but the clusters cannot be saved to the TreeR.
65
66
67\section rec_s3 Tracking
68
69The MUON code provides two different algorithms to reconstruct the muon trajectory. In both cases the general tracking procedure is the same,
70the only difference being the way the track parameters are computed from the cluster positions. The "Original" algorithm perform a fit of the
71track parameters using the MINUIT package of Root, while the "Kalman" algorithm compute them using analytical formulae. The classes driving
72the tracking are AliMUONTrackReconstructor and AliMUONTrackReconstructorK for the "Original" and the "Kalman" algorithms respectively,
73both inheriting from AliMUONVTrackReconstructor. The reconstructed muon tracks are objects of the class AliMUONTrack.
74
75The general tracking procedure is as follow:
76- Build primary track candidates using clusters on station 4 and 5: Make all combination of clusters between the two chambers of station 5(4).
a2d5f607 77For each combination compute the local position and impact parameter of the tracklet at vertex and estimate its bending momentum given the averaged
78magnetic field inside the dipole and assuming that the track is coming from the vertex. Also compute the corresponding error and covariances of
79these parameters. Then select pairs for which the estimated bending momentum and the non-bending impact parameter at vertex are within given limits
80taking into account the errors. Extrapolate the primary track candidates to station 4(5), look for at least one compatible cluster to validate them
81and recompute the track parameters and covariances.
82- Remove the identical track candidates (i.e. the ones sharing exactly the same clusters), and the ones whose bending momentum and non-bending
83impact parameter at vertex are out of given limits taking into account the errors.
4c29c3c5 84- Propagate the track to stations 3, 2 then 1. At each station, ask the "ClusterServer" to provide clusters in the region of interest defined in
a2d5f607 85the reconstruction parameters. Select the one(s) compatible with the track and recompute the track parameters and covariances. Remove the track if
86no good cluster is found or if its re-computed bending momentum and non-bending impact parameter at vertex are out of given limits taking into
87account the errors.
4c29c3c5 88- Remove the connected tracks (i.e. the ones sharing one cluster or more in stations 3, 4 or 5) keeping the one with the largest number of cluster
a2d5f607 89or the one with the lowest chi2 in case of equality. Then recompute the track parameters and covariances at each attached cluster (using the
90so-called Smoother algorithm in the case of the "Kalman" tracking).
91- Find the MC label from the label of each attached cluster (if available): more than 50% of clusters must share the same label, including 1 before
92and 1 after the dipole. Set it to -1 when reconstructing real data or in case of failure.
b1fea02e 93- The reconstructed tracks are finally matched with the trigger tracks (reconstructed from the local response of the trigger) to identify the
94muon(s) that made the trigger.
95
96The new clusters to be attached to the track are selected according to their local chi2 (i.e. their transverse position relatively to the track,
a2d5f607 97normalized by the convolution of the cluster resolution with the resolution of the track extrapolated to the cluster location).
4c29c3c5 98If several compatible clusters are found on the same chamber, the track candidate is duplicated to consider all the possibilities.
b1fea02e 99
100The last part of the tracking is the extrapolation of the reconstructed tracks to the vertex of the collision. The vertex position is measured
101by the SPD (the Silicon Pixel layers of the ITS Detector). In order to be able to perform any kind of muon analysis, we need to compute the track
102parameters assuming the muon has been produced in the initial collision as well as the track parameters in the vertex plane. The first set of
103parameters is obtained by correcting for energy loss and multiple Coulomb scattering in the front absorber (we force the track to come from the
104exact vertex position (x,y,z) by using the Branson correction), while the second one is obtained by correcting for energy loss only.
105
106The final results of the reconstruction - from which we will perform the physical analyses, compute detector efficiencies and perform calibration
107checks - are stored in objects of the class AliESDMuonTrack and saved in AliESD.root file. Three kinds of track can be saved: a tracker track
108matched with a trigger track, a tracker track alone and a trigger track alone (unused data members are set to default in the last two cases).
109The complete list of MUON data saved into ESD is given in section @ref rec_s5.
110
111
112\section rec_s4 How to tune the muon reconstruction
113
4c29c3c5 114Several options and adjustable parameters allow to tune the entire reconstruction. They are stored in the OCDB in the directory MUON/Calib/RecoParam.
115However, it is possible to customize the parameters by adding the following lines in the reconstruction macro (runReconstruction.C):
b1fea02e 116\verbatim
117 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::Get...Param();
fd3ef136 118 muonRecoParam->Use...();
119 muonRecoParam->Set...();
120 ...
4c29c3c5 121 MuonRec->SetRecoParam("MUON",muonRecoParam);
b1fea02e 122\endverbatim
123
124Three sets of default parameters are available:
125- <code>GetLowFluxParam()</code>: parameters for p-p collisions
126- <code>GetHighFluxParam()</code>: parameters for Pb-Pb collisions
127- <code>GetCosmicParam()</code>: parameters for cosmic runs
ec73f5ef 128- <code>GetCalibrationParam()</code>: parameters for cosmic runs
129
130The latter is a dummy set which allows to avoid any reconstruction in case a software trigger event is taken.
131Software triggers are sent to trigger electronics during physics run in order to read the scalers: no action from the MUON tracker is required during such events whose reconstruction has to be skipped.
b1fea02e 132
4c29c3c5 133Every option/parameter can be set one by one. Here is the complete list of available setters:
b1fea02e 134- <code>SetCalibrationMode("mode")</code>: set the calibration mode: NOGAIN (only do pedestal subtraction),
135 GAIN (do pedestal subtraction and apply gain correction, but with a single capacitance value for all channels),
136 GAINCONSTANTCAPA (as GAIN, but with a channel-dependent capacitance value).
137- <code>SetClusteringMode("mode")</code>: set the clustering (pre-clustering) mode: NOCLUSTERING, PRECLUSTER, PRECLUSTERV2, PRECLUSTERV3, COG,
138 SIMPLEFIT, SIMPLEFITV3, MLEM:DRAW, MLEM, MLEMV2, MLEMV3.
139- <code>SetTrackingMode("mode")</code>: Set the tracking mode: ORIGINAL, KALMAN.
140- <code>CombineClusterTrackReco(flag)</code>: switch on/off the combined cluster/track reconstruction
141- <code>SaveFullClusterInESD(flag, % of event)</code>: save all cluster info (including pads) in ESD, for the given percentage of events
142 (100% by default)
a2d5f607 143- <code>SelectOnTrackSlope(flag)</code>: switch to select tracks on their slope instead of impact parameter at vertex and/or bending momentum.
b1fea02e 144- <code>SetMinBendingMomentum(value)</code>: set the minimum acceptable value (GeV/c) of track momentum in bending plane
145- <code>SetMaxBendingMomentum(value)</code>: set the maximum acceptable value (GeV/c) of track momentum in bending plane
a2d5f607 146- <code>SetMaxNonBendingSlope(value)</code>: set the maximum value of the track slope in non bending plane (used when selecting on track slope).
147- <code>SetMaxBendingSlope(value)</code>: set the maximum value of the track slope in non bending plane (used when selecting on track slope).
148- <code>SetNonBendingVertexDispersion(value)</code>: set the vertex dispersion (cm) in non bending plane (used for the original tracking and to
149 select track on their non-bending impact parameter at vertex).
150- <code>SetBendingVertexDispersion(value)</code>: set the vertex dispersion (cm) in bending plane (used for the original tracking, to compute the
151 error on the estimated bending momentum at the very begining and to select track on their bending impact parameter at vertex (used when B=0)).
b1fea02e 152- <code>SetMaxNonBendingDistanceToTrack(value)</code>: set the maximum distance to the track to search for compatible cluster(s) in non bending
a2d5f607 153 direction. This value is convoluted with both the track and the cluster resolutions to define the region of interest.
b1fea02e 154- <code>SetMaxBendingDistanceToTrack(value)</code>: set the maximum distance to the track to search for compatible cluster(s) in bending direction
a2d5f607 155 This value is convoluted with both the track and the cluster resolutions to define the region of interest.
b1fea02e 156- <code>SetSigmaCutForTracking(value)</code>: set the cut in sigma to apply on cluster (local chi2) and track (global chi2) during tracking
157- <code>ImproveTracks(flag, sigma cut)</code>: recompute the local chi2 of each cluster with the final track parameters and removed the ones that
a2d5f607 158 do not pass a new quality cut. The track is removed if we do not end with at least one good cluster per requested station and two clusters in
159 station 4 and 5 together whatever they are requested or not.
b1fea02e 160- <code>ImproveTracks(flag)</code>: same as above using the default quality cut
161- <code>SetSigmaCutForTrigger(value)</code>: set the cut in sigma to apply on track during trigger hit pattern search
162- <code>SetStripCutForTrigger(value)</code>: set the cut in strips to apply on trigger track during trigger chamber efficiency
163- <code>SetMaxStripAreaForTrigger(value)</code>: set the maximum search area in strips to apply on trigger track during trigger chamber efficiency
164- <code>SetMaxNormChi2MatchTrigger(value)</code>: set the maximum normalized chi2 for tracker/trigger track matching
165- <code>TrackAllTracks(flag)</code>: consider all the clusters passing the sigma cut (duplicate the track) or only the best one
a2d5f607 166- <code>RecoverTracks(flag)</code>: during the tracking procedure, if no cluster is found in station 1 or 2, we try it again after having removed
167 (if possible with respect to the condition to keep at least 1 cluster per requested station) the worst cluster attached in the previous station
168 (assuming it was a cluster from background).
b1fea02e 169- <code>MakeTrackCandidatesFast(flag)</code>: make the primary track candidates formed by cluster on stations 4 and 5 assuming there is no
170 magnetic field in that region to speed up the reconstruction.
171- <code>MakeMoreTrackCandidates(Bool_t flag)</code>: make the primary track candidate using 1 cluster on station 4 and 1 cluster on station 5
172 instead of starting from 2 clusters in the same station.
173- <code>ComplementTracks(Bool_t flag)</code>: look for potentially missing cluster to be attached to the track (a track may contain up to 2
174 clusters per chamber do to the superimposition of DE, while the tracking procedure is done in such a way that only 1 can be attached).
4c29c3c5 175- <code>RemoveConnectedTracksInSt12(Bool_t flag)</code>: extend the definition of connected tracks to be removed at the end of the tracking
a2d5f607 176 procedure to the ones sharing one cluster on more in any station, including stations 1 and 2.
b1fea02e 177- <code>UseSmoother(Bool_t flag)</code>: use or not the smoother to recompute the track parameters at each attached cluster
178 (used for Kalman tracking only)
179- <code>UseChamber(Int_t iCh, Bool_t flag)</code>: set the chambers to be used (disable the clustering if the chamber is not used).
180- <code>RequestStation(Int_t iSt, Bool_t flag)</code>: impose/release the condition "at least 1 cluster per station" for that station.
de487b6e 181- <code>BypassSt45(Bool_t st4, Bool_t st5)</code>: make the primary track candidate from the trigger track instead of using stations 4 and/or 5.
4c29c3c5 182- <code>SetHVSt12Limits(float low, float high)</code>: Set Low and High threshold for St12 HV
183- <code>SetHVSt345Limits(float low, float high)</code>: Set Low and High threshold for St345 HV
184- <code>SetPedMeanLimits(float low, float high)</code>: Set Low and High threshold for pedestal mean
185- <code>SetPedSigmaLimits(float low, float high)</code>: Set Low and High threshold for pedestal sigma
186- <code>SetGainA1Limits(float low, float high)</code>: Set Low and High threshold for gain a0 term
187- <code>SetGainA2Limits(float low, float high)</code>: Set Low and High threshold for gain a1 term
188- <code>SetGainThresLimits(float low, float high)</code>: Set Low and High threshold for gain threshold term
189- <code>SetPadGoodnessMask(UInt_t mask)</code>: Set the goodness mask (see AliMUONPadStatusMapMaker)
190- <code>ChargeSigmaCut(Double_t value)</code>: Number of sigma cut we must apply when cutting on adc-ped
191- <code>SetDefaultNonBendingReso(Int_t iCh, Double_t val)</code>: Set the default non bending resolution of chamber iCh
192- <code>SetDefaultBendingReso(Int_t iCh, Double_t val)</code>: Set the default bending resolution of chamber iCh
a2d5f607 193- <code>SetMaxTriggerTracks(Int_t val)</code>: Set the maximum number of trigger tracks above which the tracking is cancelled
194- <code>SetMaxTrackCandidates(Int_t val)</code>: Set the maximum number of track candidates above which the tracking abort
a99c3449 195- <code>SetManuOccupancyLimits(float low, float high)</code>: Set the limits for the acceptable manu occupancy
196- <code>SetBuspatchOccupancyLimits(float low, float high)</code>: Set the limits for the acceptable bp occupancy
197- <code>SetDEOccupancyLimits(float low, float high)</code>: Set the limits for the acceptable DE occupancy
b1fea02e 198
199We can use the method Print("FULL") to printout all the parameters and options set in the class AliMUONRecoParam.
200
e1fe98be 201RecoParams can be put into OCDB using the MakeMUONSingleRecoParam.C or MakeMUONRecoParamArray.C macros.
ec73f5ef 202The first stores only one (default) RecoParam.
203The latter allows to store either:
204 - LowFlux (default)
205 - Calibration
206
207for real data with bunch crossing or
208 - Cosmic (default)
209 - Calibration
210
211for cosmic runs.
b1fea02e 212
213\section rec_s5 ESD content
214
4c29c3c5 215Three kinds of track can be saved in ESD: a tracker track matched with a trigger track, a tracker track alone and a trigger track alone (unused
a2d5f607 216data members are set to default values in the last two cases). These tracks are stored in objects of the class AliESDMuonTrack. Two methods can be
217used to know the content of an ESD track:
218- <code>ContainTrackerData()</code>: Return kTRUE if the track contain tracker data
219- <code>ContainTriggerData()</code>: Return kTRUE if the track contain trigger data
220
221The AliESDMuonTrack objects contain:
b1fea02e 222- Tracker track parameters (x, theta_x, y, theta_y, 1/p_yz) at vertex (x=x_vtx; y=y_vtx)
223- Tracker track parameters in the vertex plane
224- Tracker track parameters at first cluster
225- Tracker track parameter covariances at first cluster
a2d5f607 226- Tracker track global informations (track ID, chi2, number of clusters, cluster map, MC label if any)
fe0324de 227- Array of Ids of associated clusters (clusters are stored in a separate TClonesArray in ESD)
a2d5f607 228- Trigger track informations (local trigger decision, strip pattern, hit pattern, ...)
b1fea02e 229- Chi2 of tracker/trigger track matching
230
a2d5f607 231The AliESDMuonCluster objects contain:
b1fea02e 232- Cluster ID providing information about the location of the cluster (chamber ID and DE ID)
233- Cluster position (x,y,z)
234- Cluster resolution (sigma_x,sigma_y)
b1fea02e 235- Charge
236- Chi2
a2d5f607 237- MC label if any
fe0324de 238- Array of IDs of associated pads for a given fraction of events (pads are stored in a separate TClonesArray in ESD)
b1fea02e 239
a2d5f607 240The AliESDMuonPad objects contain:
b1fea02e 241- Digit ID providing information about the location of the digit (DE ID, Manu ID, Manu channel and cathode)
242- Raw charge (ADC value)
243- Calibrated charge
a2d5f607 244- One saturation bit and one calibration bit to say whether it is saturated/calibrated or not
b1fea02e 245
246
247\section rec_s6 Conversion between MUON/ESD objects
248
a2d5f607 249Every conversion between MUON objects (AliMUONVDigit/AliMUONVCluster/AliMUONTrack) and ESD objects
a99c3449 250(AliESDMuonPad/AliESDMuonCluster/AliESDMuonTrack) is done by the class AliMUONESDInterface.
251
252WARNING: some of these conversions require input from outside, namely the magnetic field map, the geometry, the reconstruction parameters
253and/or the mapping segmentation. In particular:
254- The conversion of ESDPads to MUON digits requires the mapping segmentation.
255- The conversion of a MUON track to an ESD track requires the magnetic field and the geometry to extrapolate the track parameters at vertex
256and compute the correction of multiple scattering and energy loss in the front absorber.
257- While converting an ESD track to a MUON track, the track is refitted by using the cluster position stored in ESD in order to recover the
258track parameters at each cluster. This refitting needs both the magnetic field and the reconstruction parameters initially used to
259reconstruct the tracks to be correct. The reconstruction parameters can be passed to the interface by using the static method
260AliMUONESDTrack::ResetTracker(const AliMUONRecoParam* recoParam, Bool_t info). The refitting can however be disconnected by user (using flag
261in the fonction parameters). In that case, none of these external inputs is necessary anymore but only the track parameters at first cluster,
262which is then copied directly from the ESD, is meaningful.
263
264There are 2 ways of using this class:
b1fea02e 265
2661) Using the static methods to convert the objects one by one (and possibly put them into the provided store):
267- Get track parameters at vertex, at DCA, ...:
268\verbatim
269 ...
4c29c3c5 270 AliESDMuonTrack* esdTrack = esd->GetMuonTrack(iTrack);
b1fea02e 271 AliMUONTrackParam param;
272 AliMUONESDInterface::GetParamAtVertex(*esdTrack, param);
273\endverbatim
274
275- Convert an AliMUONVDigit to an AliESDMuonPad:
276\verbatim
277 ...
278 AliMUONVDigit *digit = ...;
279 AliESDMuonPad esdPad;
280 AliMUONESDInterface::MUONToESD(*digit, esdPad);
281\endverbatim
282
283- Convert an AliMUONLocalTrigger to a ghost AliESDMuonTrack (containing only trigger informations):
284\verbatim
285 ...
286 AliMUONLocalTrigger* locTrg = ...;
a2d5f607 287 AliMUONTriggerTrack* triggerTrack = ...;
b1fea02e 288 AliESDMuonTrack esdTrack;
a2d5f607 289 AliMUONESDInterface::MUONToESD(*locTrg, esdTrack, trackId, triggerTrack);
b1fea02e 290\endverbatim
291
a99c3449 292- Convert an AliESDMuonTrack to an AliMUONTrack (the parameters at each clusters are recomputed or not according to the flag "refit".
293if not, only the parameters at first cluster are relevant):
b1fea02e 294\verbatim
295 ...
4c29c3c5 296 AliESDMuonTrack* esdTrack = esd->GetMuonTrack(iTrack);
b1fea02e 297 AliMUONTrack track;
a99c3449 298 AliMUONESDInterface::ESDToMUON(*esdTrack, track, refit);
b1fea02e 299\endverbatim
300
a99c3449 301- Add an AliESDMuonTrack (converted into AliMUONTrack object) into an AliMUONVTrackStore (same remark as above about the flag "refit"):
b1fea02e 302\verbatim
303 ...
4c29c3c5 304 AliESDMuonTrack* esdTrack = esd->GetMuonTrack(iTrack);
b1fea02e 305 AliMUONVTrackStore *trackStore = AliMUONESDInteface::NewTrackStore();
a99c3449 306 AliMUONTrack* trackInStore = AliMUONESDInterface::Add(*esdTrack, *trackStore, refit);
b1fea02e 307\endverbatim
308
3092) Loading an entire ESDEvent and using the finders and/or the iterators to access the corresponding MUON objects:
310- First load the ESD event:
311\verbatim
312 AliMUONESDInterface esdInterface;
313 esdInterface.LoadEvent(*esd);
314\endverbatim
315
316- Get the track store:
317\verbatim
318 AliMUONVTrackStore* trackStore = esdInterface.GetTracks();
319\endverbatim
320
321- Access the number of digits in a particular cluster:
322\verbatim
323 Int_t nDigits = esdInterface.GetNDigitsInCluster(clusterId);
324\endverbatim
325
326- Find a particular digit using its ID:
327\verbatim
328 AliMUONVDigit *digit = esdInterface.FindDigit(digitId);
329\endverbatim
330
331- Find a particular cluster in a given track using their IDs:
332\verbatim
333 AliMUONVCluster* cluster = esdInterface.FindCluster(trackId, clusterId);
334\endverbatim
335
336- Iterate over all clusters of a particular track using an iterator:
337\verbatim
338 TIterator* nextCluster = esdInterface.CreateClusterIterator(trackId);
339 while ((cluster = static_cast<AliMUONVCluster*>(nextCluster()))) {...}
340\endverbatim
341
342Note: You can change (via static method) the type of the store this class is using:
343\verbatim
344 AliMUONESDInterface::UseTrackStore("name");
345 AliMUONESDInterface::UseClusterStore("name");
346 AliMUONESDInterface::UseDigitStore("name");
347 AliMUONESDInterface::UseTriggerStore("name");
348\endverbatim
349
350
351\section rec_s7 ESD cluster/track refitting
352
353We can re-clusterize and re-track the clusters/tracks stored into the ESD by using the class AliMUONRefitter. This class gets the MUON objects
a99c3449 354to be refitted from an instance of AliMUONESDInterface (see section @ref rec_s6), then uses the reconstruction framework to refit them. The new
355reconstruction parameters are still set via the class AliMUONRecoParam (see section @ref rec_s4) and passed to refitter through its constructor.
356The old reconstruction parameters, the mapping, the magnetic field and/or the geometry may also be needed to convert the ESD objects to MUON ones
357and/or to refit them. The initial data are not changed. Results are stored into new MUON objects. The aim of the refitting is to be able to
358study effects of changing the reconstruction parameter, the calibration parameters or the alignment without re-running the entire reconstruction.
fd3ef136 359
b1fea02e 360To use this class we first have to connect it to the ESD interface containing MUON objects:
361\verbatim
362 AliMUONRefitter refitter;
363 refitter.Connect(&esdInterface);
364\endverbatim
fd3ef136 365
b1fea02e 366We can then:
367- Re-clusterize the ESD clusters using the attached ESD pads (several new clusters can be reconstructed per ESD cluster):
368\verbatim
369 AliMUONVClusterStore* clusterStore = refitter.ReClusterize(iTrack, iCluster);
370 AliMUONVClusterStore* clusterStore = refitter.ReClusterize(clusterId);
371\endverbatim
372
373- Re-fit the ESD tracks using the attached ESD clusters:
374\verbatim
375 AliMUONTrack* track = refitter.RetrackFromClusters(iTrack);
376 AliMUONVTrackStore* trackStore = refitter.ReconstructFromClusters();
377\endverbatim
378
379- Reconstruct the ESD tracks from ESD pads (i.e. re-clusterize the attached clusters). Consider all the combination of clusters and return only
380 the best one:
381\verbatim
382 AliMUONTrack* track = refitter.RetrackFromDigits(iTrack);
383 AliMUONVTrackStore* trackStore = refitter.ReconstructFromDigits();
384\endverbatim
fd3ef136 385
b1fea02e 386The macro MUONRefit.C is an example of using this class. The results are stored in a new AliESDs.root file.
fd3ef136 387
91509ec6 388
aa36dc36 389This chapter is defined in the READMErec.txt file.
91509ec6 390
391*/