]>
Commit | Line | Data |
---|---|---|
d0cf54cd | 1 | #ifndef ALIANALYSISTASKMUONREFIT_H |
2 | #define ALIANALYSISTASKMUONREFIT_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
27de2dfb | 6 | /* $Id$ */ |
7 | ||
d0cf54cd | 8 | /// \ingroup muondep |
9 | /// \class AliAnalysisTaskMuonRefit | |
10 | /// \brief intermediate task for refitting | |
11 | //Author: Philippe Pillot - SUBATECH Nantes | |
12 | ||
13 | #include <TString.h> | |
14 | #include "AliMUONConstants.h" | |
15 | #include "AliAnalysisTaskSE.h" | |
16 | ||
17 | class AliMUONVCluster; | |
18 | class AliMUONGeometryTransformer; | |
19 | class AliMUONESDInterface; | |
20 | class AliMUONRefitter; | |
21 | ||
22 | class AliAnalysisTaskMuonRefit : public AliAnalysisTaskSE { | |
23 | public: | |
24 | ||
25 | AliAnalysisTaskMuonRefit(); | |
26 | AliAnalysisTaskMuonRefit(const char *name); | |
27 | virtual ~AliAnalysisTaskMuonRefit(); | |
28 | ||
29 | /// Set location of the default OCDB storage (if not set use "raw://") | |
30 | void SetDefaultStorage(const char* ocdbPath) { fDefaultStorage = ocdbPath; } | |
31 | ||
32 | // reset the cluster resolution (by default use the one set in the recoParam) | |
33 | void ResetClusterResolution(Int_t chId, Double_t valNB, Double_t valB); | |
34 | void ResetClusterResolution(Double_t valNB[10], Double_t valB[10]); | |
35 | ||
36 | /// Enable track improvement (clusters/tracks that do not pass the sigma cut will be removed) | |
37 | /// If sigmaCut < 0: use the one set in the recoParam | |
38 | /// By default the "improveTrack" flag and the sigma cut are taken from the recoParam | |
39 | void ImproveTracks(Bool_t flag = kTRUE, Double_t sigmaCut = -1.) {fImproveTracks = flag; fSigmaCut = sigmaCut;} | |
40 | ||
41 | /// Set the sigma cut for tracker/trigger track matching (by default use the one set in the recoParam) | |
42 | void SetSigmaCutForTrigger(Double_t val) {fSigmaCutForTrigger = val;} | |
43 | ||
44 | void ReAlign(const char* oldAlignStorage = 0x0, const char* newAlignStorage = ""); | |
45 | ||
46 | virtual void UserCreateOutputObjects(); | |
47 | virtual void UserExec(Option_t *); | |
48 | virtual void NotifyRun(); | |
49 | virtual void Terminate(Option_t *); | |
50 | ||
51 | private: | |
52 | ||
53 | /// Not implemented | |
54 | AliAnalysisTaskMuonRefit(const AliAnalysisTaskMuonRefit& rhs); | |
55 | /// Not implemented | |
56 | AliAnalysisTaskMuonRefit& operator = (const AliAnalysisTaskMuonRefit& rhs); | |
57 | ||
58 | void ModifyCluster(AliMUONVCluster& cl); | |
59 | ||
60 | private: | |
61 | ||
62 | Double_t fClusterResNB[10]; ///< cluster resolution in non-bending direction | |
63 | Double_t fClusterResB[10]; ///< cluster resolution in bending direction | |
64 | ||
65 | TString fDefaultStorage; ///< location of the default OCDB storage | |
66 | Bool_t fImproveTracks; ///< enable track improvement | |
67 | Double_t fSigmaCut; ///< sigma cut for track improvement | |
68 | Double_t fSigmaCutForTrigger; ///< sigma cut for tracker/trigger track matching | |
69 | Bool_t fReAlign; ///< flag telling wether to re-align the spectrometer or not before computing resolution | |
70 | TString fOldAlignStorage; ///< location of the OCDB storage where to find old MUON/Align/Data (use the default one if empty) | |
71 | TString fNewAlignStorage; ///< location of the OCDB storage where to find new MUON/Align/Data (use the default one if empty) | |
72 | AliMUONGeometryTransformer* fOldGeoTransformer; //!< geometry transformer used to recontruct the present data | |
73 | AliMUONGeometryTransformer* fNewGeoTransformer; //!< new geometry transformer containing the new alignment to be applied | |
74 | ||
75 | AliMUONESDInterface* fESDInterface; //!< esd interface to recover muon objects | |
76 | AliMUONRefitter* fRefitter; //!< refitter object | |
77 | ||
78 | ClassDef(AliAnalysisTaskMuonRefit, 1); // track refitter | |
79 | }; | |
80 | ||
81 | //________________________________________________________________________ | |
82 | inline void AliAnalysisTaskMuonRefit::ResetClusterResolution(Int_t chId, Double_t valNB, Double_t valB) | |
83 | { | |
84 | /// set chamber non-bending and bending resolutions | |
85 | if (chId < 0 || chId >= AliMUONConstants::NTrackingCh()) return; | |
86 | fClusterResNB[chId] = valNB; | |
87 | fClusterResB[chId] = valB; | |
88 | } | |
89 | ||
90 | //________________________________________________________________________ | |
91 | inline void AliAnalysisTaskMuonRefit::ResetClusterResolution(Double_t valNB[10], Double_t valB[10]) | |
92 | { | |
93 | /// set chambers non-bending and bending resolutions | |
94 | for (Int_t i = 0; i < AliMUONConstants::NTrackingCh(); i++) { | |
95 | fClusterResNB[i] = valNB[i]; | |
96 | fClusterResB[i] = valB[i]; | |
97 | } | |
98 | } | |
99 | ||
100 | //________________________________________________________________________ | |
101 | inline void AliAnalysisTaskMuonRefit::ReAlign(const char* oldAlignStorage, const char* newAlignStorage) | |
102 | { | |
103 | /// Set the flag to activate the re-alignment and the specific storage where to find the old/new alignment data. | |
104 | /// If oldAlignStorage = 0x0 we assume the spectrometer was not aligned before (default geometry) | |
105 | /// If old(new)AlignStorage = "" we assume the old(new) alignment data are in the default storage | |
106 | if (oldAlignStorage) fOldAlignStorage = oldAlignStorage; | |
107 | else fOldAlignStorage = "none"; | |
108 | fNewAlignStorage = newAlignStorage; | |
109 | fReAlign = kTRUE; | |
110 | } | |
111 | ||
112 | #endif | |
113 |