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 */
7 /// \class AliAnalysisTaskMuonRefit
8 /// \brief intermediate task for refitting
9 //Author: Philippe Pillot - SUBATECH Nantes
12 #include "AliMUONConstants.h"
13 #include "AliAnalysisTaskSE.h"
15 class AliMUONVCluster;
16 class AliMUONGeometryTransformer;
17 class AliMUONESDInterface;
18 class AliMUONRefitter;
20 class AliAnalysisTaskMuonRefit : public AliAnalysisTaskSE {
23 AliAnalysisTaskMuonRefit();
24 AliAnalysisTaskMuonRefit(const char *name);
25 virtual ~AliAnalysisTaskMuonRefit();
27 /// Set location of the default OCDB storage (if not set use "raw://")
28 void SetDefaultStorage(const char* ocdbPath) { fDefaultStorage = ocdbPath; }
30 // reset the cluster resolution (by default use the one set in the recoParam)
31 void ResetClusterResolution(Int_t chId, Double_t valNB, Double_t valB);
32 void ResetClusterResolution(Double_t valNB[10], Double_t valB[10]);
34 /// Enable track improvement (clusters/tracks that do not pass the sigma cut will be removed)
35 /// If sigmaCut < 0: use the one set in the recoParam
36 /// By default the "improveTrack" flag and the sigma cut are taken from the recoParam
37 void ImproveTracks(Bool_t flag = kTRUE, Double_t sigmaCut = -1.) {fImproveTracks = flag; fSigmaCut = sigmaCut;}
39 /// Set the sigma cut for tracker/trigger track matching (by default use the one set in the recoParam)
40 void SetSigmaCutForTrigger(Double_t val) {fSigmaCutForTrigger = val;}
42 void ReAlign(const char* oldAlignStorage = 0x0, const char* newAlignStorage = "");
44 virtual void UserCreateOutputObjects();
45 virtual void UserExec(Option_t *);
46 virtual void NotifyRun();
47 virtual void Terminate(Option_t *);
52 AliAnalysisTaskMuonRefit(const AliAnalysisTaskMuonRefit& rhs);
54 AliAnalysisTaskMuonRefit& operator = (const AliAnalysisTaskMuonRefit& rhs);
56 void ModifyCluster(AliMUONVCluster& cl);
60 Double_t fClusterResNB[10]; ///< cluster resolution in non-bending direction
61 Double_t fClusterResB[10]; ///< cluster resolution in bending direction
63 TString fDefaultStorage; ///< location of the default OCDB storage
64 Bool_t fImproveTracks; ///< enable track improvement
65 Double_t fSigmaCut; ///< sigma cut for track improvement
66 Double_t fSigmaCutForTrigger; ///< sigma cut for tracker/trigger track matching
67 Bool_t fReAlign; ///< flag telling wether to re-align the spectrometer or not before computing resolution
68 TString fOldAlignStorage; ///< location of the OCDB storage where to find old MUON/Align/Data (use the default one if empty)
69 TString fNewAlignStorage; ///< location of the OCDB storage where to find new MUON/Align/Data (use the default one if empty)
70 AliMUONGeometryTransformer* fOldGeoTransformer; //!< geometry transformer used to recontruct the present data
71 AliMUONGeometryTransformer* fNewGeoTransformer; //!< new geometry transformer containing the new alignment to be applied
73 AliMUONESDInterface* fESDInterface; //!< esd interface to recover muon objects
74 AliMUONRefitter* fRefitter; //!< refitter object
76 ClassDef(AliAnalysisTaskMuonRefit, 1); // track refitter
79 //________________________________________________________________________
80 inline void AliAnalysisTaskMuonRefit::ResetClusterResolution(Int_t chId, Double_t valNB, Double_t valB)
82 /// set chamber non-bending and bending resolutions
83 if (chId < 0 || chId >= AliMUONConstants::NTrackingCh()) return;
84 fClusterResNB[chId] = valNB;
85 fClusterResB[chId] = valB;
88 //________________________________________________________________________
89 inline void AliAnalysisTaskMuonRefit::ResetClusterResolution(Double_t valNB[10], Double_t valB[10])
91 /// set chambers non-bending and bending resolutions
92 for (Int_t i = 0; i < AliMUONConstants::NTrackingCh(); i++) {
93 fClusterResNB[i] = valNB[i];
94 fClusterResB[i] = valB[i];
98 //________________________________________________________________________
99 inline void AliAnalysisTaskMuonRefit::ReAlign(const char* oldAlignStorage, const char* newAlignStorage)
101 /// Set the flag to activate the re-alignment and the specific storage where to find the old/new alignment data.
102 /// If oldAlignStorage = 0x0 we assume the spectrometer was not aligned before (default geometry)
103 /// If old(new)AlignStorage = "" we assume the old(new) alignment data are in the default storage
104 if (oldAlignStorage) fOldAlignStorage = oldAlignStorage;
105 else fOldAlignStorage = "none";
106 fNewAlignStorage = newAlignStorage;