]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/muondep/AliAnalysisTaskMuonRefit.h
New task to refit the tracks in the ESDs (to be used in a train before your task...
[u/mrichter/AliRoot.git] / PWG3 / muondep / AliAnalysisTaskMuonRefit.h
CommitLineData
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
6/// \ingroup muondep
7/// \class AliAnalysisTaskMuonRefit
8/// \brief intermediate task for refitting
9//Author: Philippe Pillot - SUBATECH Nantes
10
11#include <TString.h>
12#include "AliMUONConstants.h"
13#include "AliAnalysisTaskSE.h"
14
15class AliMUONVCluster;
16class AliMUONGeometryTransformer;
17class AliMUONESDInterface;
18class AliMUONRefitter;
19
20class AliAnalysisTaskMuonRefit : public AliAnalysisTaskSE {
21public:
22
23 AliAnalysisTaskMuonRefit();
24 AliAnalysisTaskMuonRefit(const char *name);
25 virtual ~AliAnalysisTaskMuonRefit();
26
27 /// Set location of the default OCDB storage (if not set use "raw://")
28 void SetDefaultStorage(const char* ocdbPath) { fDefaultStorage = ocdbPath; }
29
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]);
33
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;}
38
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;}
41
42 void ReAlign(const char* oldAlignStorage = 0x0, const char* newAlignStorage = "");
43
44 virtual void UserCreateOutputObjects();
45 virtual void UserExec(Option_t *);
46 virtual void NotifyRun();
47 virtual void Terminate(Option_t *);
48
49private:
50
51 /// Not implemented
52 AliAnalysisTaskMuonRefit(const AliAnalysisTaskMuonRefit& rhs);
53 /// Not implemented
54 AliAnalysisTaskMuonRefit& operator = (const AliAnalysisTaskMuonRefit& rhs);
55
56 void ModifyCluster(AliMUONVCluster& cl);
57
58private:
59
60 Double_t fClusterResNB[10]; ///< cluster resolution in non-bending direction
61 Double_t fClusterResB[10]; ///< cluster resolution in bending direction
62
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
72
73 AliMUONESDInterface* fESDInterface; //!< esd interface to recover muon objects
74 AliMUONRefitter* fRefitter; //!< refitter object
75
76 ClassDef(AliAnalysisTaskMuonRefit, 1); // track refitter
77};
78
79//________________________________________________________________________
80inline void AliAnalysisTaskMuonRefit::ResetClusterResolution(Int_t chId, Double_t valNB, Double_t valB)
81{
82 /// set chamber non-bending and bending resolutions
83 if (chId < 0 || chId >= AliMUONConstants::NTrackingCh()) return;
84 fClusterResNB[chId] = valNB;
85 fClusterResB[chId] = valB;
86}
87
88//________________________________________________________________________
89inline void AliAnalysisTaskMuonRefit::ResetClusterResolution(Double_t valNB[10], Double_t valB[10])
90{
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];
95 }
96}
97
98//________________________________________________________________________
99inline void AliAnalysisTaskMuonRefit::ReAlign(const char* oldAlignStorage, const char* newAlignStorage)
100{
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;
107 fReAlign = kTRUE;
108}
109
110#endif
111