AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONESDInterface.h
Go to the documentation of this file.
1 #ifndef ALIMUONESDINTERFACE_H
2 #define ALIMUONESDINTERFACE_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 
7 // $Id$
8 
13 // Author Philippe Pillot
14 
15 #include <AliMpExMap.h>
16 #include <TObject.h>
17 #include <TString.h>
18 #include "AliLog.h"
19 
20 class AliMUONTrack;
21 class AliMUONVTrackStore;
22 class AliMUONVCluster;
24 class AliMUONVDigit;
25 class AliMUONVDigitStore;
30 class AliMUONTrackParam;
32 class AliESDEvent;
33 class AliESDMuonTrack;
34 class AliESDMuonCluster;
35 class AliESDMuonPad;
36 class TIterator;
37 class AliMUONRecoParam;
38 
39 class AliMUONESDInterface : public TObject
40 {
41 public: // methods to play with internal objects
42 
44  virtual ~AliMUONESDInterface();
45 
46  virtual void Clear(Option_t* = "");
47 
48  void LoadEvent(AliESDEvent& esdEvent, Bool_t refit = kTRUE);
49 
56 
57  // Return numbers of tracks/clusters/digits
58  Int_t GetNTracks() const;
59  Int_t GetNClusters() const;
60  Int_t GetNClusters(UInt_t trackId) const;
61  Int_t GetNDigits() const;
62  Int_t GetNDigits(UInt_t trackId) const;
63  Int_t GetNDigits(UInt_t trackId, UInt_t clusterId) const;
64  Int_t GetNDigitsInCluster(UInt_t clusterId) const;
65  Int_t GetNTriggers() const;
66 
67  // Check that all digits have been stored for a given track
68  Bool_t DigitsStored(UInt_t trackId) const;
69 
70  // Find internal MUON objects
71  AliMUONTrack* FindTrack(UInt_t trackId) const;
72  AliMUONVCluster* FindCluster(UInt_t clusterId) const;
73  AliMUONVCluster* FindCluster(UInt_t trackId, UInt_t clusterId) const;
74  AliMUONVDigit* FindDigit(UInt_t digitId) const;
75  AliMUONLocalTrigger* FindLocalTrigger(Int_t boardNumber) const;
76 
77  // iterate over internal MUON objects
78  TIterator* CreateTrackIterator() const;
79  TIterator* CreateClusterIterator() const;
80  TIterator* CreateClusterIterator(UInt_t trackId) const;
81  TIterator* CreateDigitIterator() const;
82  TIterator* CreateDigitIterator(UInt_t trackId) const;
83  TIterator* CreateDigitIterator(UInt_t trackId, UInt_t clusterId) const;
84  TIterator* CreateDigitIteratorInCluster(UInt_t clusterId) const;
85  TIterator* CreateLocalTriggerIterator() const;
86 
87 
88 public: // static methods
89 
90  // Reset the MUON tracker (using "recoParam" if provided)
91  static void ResetTracker(const AliMUONRecoParam* recoParam = 0x0, Bool_t info = kTRUE);
94 
96  static void UseTrackStore(TString name) {fgTrackStoreName = name;}
98  static void UseClusterStore(TString name) {fgClusterStoreName = name;}
100  static void UseDigitStore(TString name) {fgDigitStoreName = name;}
102  static void UseTriggerStore(TString name) {fgTriggerStoreName = name;}
103 
104  // Create empty stores (use the version defined in this interface)
107  static AliMUONVCluster* NewCluster();
109  static AliMUONVDigit* NewDigit();
112 
113  // ESD track parameters --> MUON track parameters
114  static void GetParamAtVertex(const AliESDMuonTrack& esdTrack, AliMUONTrackParam& trackParam);
115  static void GetParamAtDCA(const AliESDMuonTrack& esdTrack, AliMUONTrackParam& trackParam);
116  static void GetParamAtFirstCluster(const AliESDMuonTrack& esdTrack, AliMUONTrackParam& trackParam);
117  static void GetParamCov(const AliESDMuonTrack& esdTrack, AliMUONTrackParam& trackParam);
118 
119  // MUON track parameters --> ESD track parameters
120  static void SetParamAtVertex(const AliMUONTrackParam& trackParam, AliESDMuonTrack& esdTrack);
121  static void SetParamAtDCA(const AliMUONTrackParam& trackParam, AliESDMuonTrack& esdTrack);
122  static void SetParamAtFirstCluster(const AliMUONTrackParam& trackParam, AliESDMuonTrack& esdTrack);
123  static void SetParamCov(const AliMUONTrackParam& trackParam, AliESDMuonTrack& esdTrack);
124 
125  // ESDMuon objects --> MUON objects conversion
126  static void ESDToMUON(const AliESDMuonTrack& esdTrack, AliMUONTrack& track, Bool_t refit = kTRUE);
127  static void ESDToMUON(const AliESDMuonTrack& esdTrack, AliMUONLocalTrigger& locTrg);
128  static void ESDToMUON(const AliESDMuonCluster& esdCluster, AliMUONVCluster& cluster);
129  static void ESDToMUON(const AliESDMuonPad& esdPad, AliMUONVDigit& digit);
130 
131  // MUON objects --> ESDMuon objects conversion
132  static void MUONToESD(const AliMUONTrack& track, AliESDEvent& esd, const Double_t vertex[3],
133  const AliMUONVDigitStore* digits = 0x0, const AliMUONLocalTrigger* locTrg = 0x0);
134  static void MUONToESD(const AliMUONTrack& track, AliESDMuonTrack& esdTrack, const Double_t vertex[3],
135  const AliMUONLocalTrigger* locTrg = 0x0);
136  static void MUONToESD(const AliMUONLocalTrigger& locTrg, AliESDEvent& esd, UInt_t trackId,
137  const AliMUONTriggerTrack* triggerTrack = 0x0);
138  static void MUONToESD(const AliMUONLocalTrigger& locTrg, AliESDMuonTrack& esdTrack, UInt_t trackId,
139  const AliMUONTriggerTrack* triggerTrack = 0x0);
140  static void MUONToESD(const AliMUONVCluster& cluster, AliESDEvent& esd, const AliMUONVDigitStore* digits = 0x0);
141  static void MUONToESD(const AliMUONVCluster& cluster, AliESDMuonCluster& esdCluster, Bool_t copyPadsId = kFALSE);
142  static void MUONToESD(const AliMUONVDigit& digit, AliESDEvent& esd);
143  static void MUONToESD(const AliMUONVDigit& digit, AliESDMuonPad& esdPad);
144 
145  // Add ESD object into the corresponding MUON store
146  // return a pointer to the corresponding MUON object into the store
147  static AliMUONTrack* Add(const AliESDMuonTrack& esdTrack, AliMUONVTrackStore& trackStore, Bool_t refit = kTRUE);
148  static void Add(const AliESDMuonTrack& esdTrack, AliMUONVTriggerStore& triggerStore);
149  static AliMUONVCluster* Add(const AliESDMuonCluster& esdCluster, AliMUONVClusterStore& clusterStore);
150  static AliMUONVDigit* Add(const AliESDMuonPad& esdPad, AliMUONVDigitStore& digitStore);
151 
152 
153 protected:
154 
157 
158 
159 private:
160 
161  void Reset();
162 
163 
164 private:
165 
168 
169  static TString fgTrackStoreName;
170  static TString fgClusterStoreName;
171  static TString fgDigitStoreName;
172  static TString fgTriggerStoreName;
173  static TString fgTriggerTrackStoreName;
174 
175  // data containers
179 
180  // maps (to speed up data retrieval)
183 
184 
185  ClassDef(AliMUONESDInterface,0)
186 };
187 
188 #endif
189 
AliMUONVDigitStore * fDigits
digit container
Base class of a track container.
static void ESDToMUON(const AliESDMuonTrack &esdTrack, AliMUONTrack &track, Bool_t refit=kTRUE)
Virtual class for the MUON track reconstruction.
static void MUONToESD(const AliMUONTrack &track, AliESDEvent &esd, const Double_t vertex[3], const AliMUONVDigitStore *digits=0x0, const AliMUONLocalTrigger *locTrg=0x0)
static AliMUONVCluster * NewCluster()
AliMUONVCluster * FindCluster(UInt_t clusterId) const
AliMUONVTriggerStore * fTriggers
trigger container
Interface for a digit container.
TIterator * CreateDigitIteratorInCluster(UInt_t clusterId) const
static void UseTrackStore(TString name)
Set the version of track store.
void LoadEvent(AliESDEvent &esdEvent, Bool_t refit=kTRUE)
static void ResetTracker(const AliMUONRecoParam *recoParam=0x0, Bool_t info=kTRUE)
static void SetParamAtVertex(const AliMUONTrackParam &trackParam, AliESDMuonTrack &esdTrack)
static void UseDigitStore(TString name)
Set the version of digit store.
TIterator * CreateTrackIterator() const
Track parameters in ALICE dimuon spectrometer.
Class with MUON reconstruction parameters.
AliTPCfastTrack * track
Reconstructed trigger track in ALICE dimuon spectrometer.
AliMUONVDigit * FindDigit(UInt_t digitId) const
Base class of a trigger information store.
static void SetParamAtFirstCluster(const AliMUONTrackParam &trackParam, AliESDMuonTrack &esdTrack)
static TString fgTriggerTrackStoreName
class name of the trigger track store to use
static TString fgClusterStoreName
class name of the cluster store to use
static TString fgTriggerStoreName
class name of the trigger store to use
static void GetParamAtFirstCluster(const AliESDMuonTrack &esdTrack, AliMUONTrackParam &trackParam)
AliMUONESDInterface & operator=(const AliMUONESDInterface &)
assignment operator
static AliMUONRecoParam * fgRecoParam
reconstruction parameters for refitting
abstract base class for clusters
static AliMUONVClusterStore * NewClusterStore()
Reconstructed Local Trigger object.
TIterator * CreateLocalTriggerIterator() const
static AliMUONTrack * Add(const AliESDMuonTrack &esdTrack, AliMUONVTrackStore &trackStore, Bool_t refit=kTRUE)
static AliMUONVTrackStore * NewTrackStore()
static AliMUONVTrackReconstructor * fgTracker
track reconstructor for refitting
TIterator * CreateDigitIterator() const
Converter between MUON track/cluster/digit and ESDMuon track/cluster/pad.
static AliMUONVTriggerStore * NewTriggerStore()
static void GetParamAtDCA(const AliESDMuonTrack &esdTrack, AliMUONTrackParam &trackParam)
AliMUONVTrackStore * fTracks
track container
Interface of a cluster container.
AliMUONVTriggerStore * GetTriggers() const
Return internal trigger store.
static void UseTriggerStore(TString name)
Set the version of trigger store.
Base class of a trigger track store.
static AliMUONVTrackReconstructor * GetTracker()
Return pointer to the MUON tracker if any (use first ResetTracker(...) to create it) ...
AliMpExMap * fClusterMap
map of clusters
Int_t GetNDigitsInCluster(UInt_t clusterId) const
AliMpExMap * fDigitMap
map of digits
static AliMUONVTriggerTrackStore * NewTriggerTrackStore()
static void GetParamAtVertex(const AliESDMuonTrack &esdTrack, AliMUONTrackParam &trackParam)
static void GetParamCov(const AliESDMuonTrack &esdTrack, AliMUONTrackParam &trackParam)
static void UseClusterStore(TString name)
Set the version of cluster store.
static AliMUONVDigitStore * NewDigitStore()
AliMUONTrack * FindTrack(UInt_t trackId) const
ABC of a MUON digit.
Definition: AliMUONVDigit.h:18
AliMUONLocalTrigger * FindLocalTrigger(Int_t boardNumber) const
AliMUONVDigitStore * GetDigits() const
Return internal track store.
Reconstructed track in ALICE dimuon spectrometer.
Definition: AliMUONTrack.h:24
Bool_t DigitsStored(UInt_t trackId) const
static AliMUONVDigit * NewDigit()
static void SetParamCov(const AliMUONTrackParam &trackParam, AliESDMuonTrack &esdTrack)
AliMUONVTrackStore * GetTracks() const
Return internal track store.
static TString fgDigitStoreName
class name of the digit store to use
TIterator * CreateClusterIterator() const
static TString fgTrackStoreName
class name of the track store to use
Helper class making Root persistent TExMap.
Definition: AliMpExMap.h:28
static void SetParamAtDCA(const AliMUONTrackParam &trackParam, AliESDMuonTrack &esdTrack)
virtual void Clear(Option_t *="")