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