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 */
9 /// \class AliAnalysisTaskMuonRefit
10 /// \brief intermediate task for refitting
11 //Author: Philippe Pillot - SUBATECH Nantes
14 #include "AliMUONConstants.h"
15 #include "AliAnalysisTaskSE.h"
17 class AliMUONVCluster;
18 class AliMUONGeometryTransformer;
19 class AliMUONESDInterface;
20 class AliMUONRefitter;
22 class AliAnalysisTaskMuonRefit : public AliAnalysisTaskSE {
25 AliAnalysisTaskMuonRefit();
26 AliAnalysisTaskMuonRefit(const char *name);
27 virtual ~AliAnalysisTaskMuonRefit();
29 /// Set location of the default OCDB storage (if not set use "raw://")
30 void SetDefaultStorage(const char* ocdbPath) { fDefaultStorage = ocdbPath; }
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]);
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;}
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;}
44 void ReAlign(const char* oldAlignStorage = 0x0, const char* newAlignStorage = "");
46 virtual void UserCreateOutputObjects();
47 virtual void UserExec(Option_t *);
48 virtual void NotifyRun();
49 virtual void Terminate(Option_t *);
54 AliAnalysisTaskMuonRefit(const AliAnalysisTaskMuonRefit& rhs);
56 AliAnalysisTaskMuonRefit& operator = (const AliAnalysisTaskMuonRefit& rhs);
58 void ModifyCluster(AliMUONVCluster& cl);
62 Double_t fClusterResNB[10]; ///< cluster resolution in non-bending direction
63 Double_t fClusterResB[10]; ///< cluster resolution in bending direction
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
75 AliMUONESDInterface* fESDInterface; //!< esd interface to recover muon objects
76 AliMUONRefitter* fRefitter; //!< refitter object
78 ClassDef(AliAnalysisTaskMuonRefit, 1); // track refitter
81 //________________________________________________________________________
82 inline void AliAnalysisTaskMuonRefit::ResetClusterResolution(Int_t chId, Double_t valNB, Double_t valB)
84 /// set chamber non-bending and bending resolutions
85 if (chId < 0 || chId >= AliMUONConstants::NTrackingCh()) return;
86 fClusterResNB[chId] = valNB;
87 fClusterResB[chId] = valB;
90 //________________________________________________________________________
91 inline void AliAnalysisTaskMuonRefit::ResetClusterResolution(Double_t valNB[10], Double_t valB[10])
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];
100 //________________________________________________________________________
101 inline void AliAnalysisTaskMuonRefit::ReAlign(const char* oldAlignStorage, const char* newAlignStorage)
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;