]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONMCDataInterface.h
No more misaligned_geometry
[u/mrichter/AliRoot.git] / MUON / AliMUONMCDataInterface.h
1 #ifndef ALIMUONMCDATAINTERFACE_H
2 #define ALIMUONMCDATAINTERFACE_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
9 /// \ingroup sim
10 /// \class AliMUONMCDataInterface
11 /// \brief Easy to use data access to MC information
12 /// 
13 // Author Laurent Aphecetche
14
15 #ifndef ROOT_TObject
16 #  include "TObject.h"
17 #endif
18
19 class AliLoader;
20 class AliMUONVDigitStore;
21 class AliMUONVHitStore;
22 class AliMUONVStore;
23 class AliMUONVTriggerStore;
24 class AliStack;
25 class TClonesArray;
26
27 class AliMUONMCDataInterface : public TObject
28 {
29 public:
30   AliMUONMCDataInterface(const char* filename="galice.root");
31   virtual ~AliMUONMCDataInterface();
32
33   void Open(const char* filename);
34   
35   Bool_t IsValid() const;
36
37   Int_t NumberOfEvents() const;
38   Int_t NumberOfTracks(Int_t event);
39   Int_t NumberOfTrackRefs(Int_t event);
40   
41   AliMUONVHitStore* HitStore(Int_t event, Int_t track);
42   AliMUONVDigitStore* SDigitStore(Int_t event);
43   AliMUONVDigitStore* DigitStore(Int_t event);
44   AliStack* Stack(Int_t event);  
45   TClonesArray* TrackRefs(Int_t event, Int_t track);
46   AliMUONVTriggerStore* TriggerStore(Int_t event);
47   
48   void DumpDigits(Int_t event, Bool_t sorted=kTRUE);
49   void DumpSDigits(Int_t event, Bool_t sorted=kTRUE);
50   void DumpHits(Int_t event);
51   void DumpKine(Int_t event);
52   void DumpTrackRefs(Int_t event);
53   void DumpTrigger(Int_t event);
54   
55 private:
56   /// Not implemented
57   AliMUONMCDataInterface(const AliMUONMCDataInterface&);
58   /// Not implemented
59   AliMUONMCDataInterface& operator=(const AliMUONMCDataInterface&);
60
61   void DumpSorted(const AliMUONVStore& store) const;
62   Int_t LoadEvent(Int_t event);
63   
64 private:
65   
66   AliLoader* fLoader; //!< Tree accessor
67   AliMUONVHitStore* fHitStore; //!< current hit store (owner)
68   AliMUONVDigitStore* fSDigitStore; //!< current sdigit store (owner)
69   AliMUONVDigitStore* fDigitStore; //!< current digit store (owner)
70   AliMUONVTriggerStore* fTriggerStore; //!< current trigger store (owner)
71   TClonesArray* fTrackRefs; //!< current trackrefs (owner)
72   Int_t fCurrentEvent; //!< Current event we've read in
73   Bool_t fIsValid; //!< whether we were initialized properly or not
74   
75   static Int_t fgInstanceCounter; //!< To build unique folder name for each instance
76
77   ClassDef(AliMUONMCDataInterface,0) // Easy to use MC data accessor
78 };
79
80 #endif