1 #ifndef ALIMUONSIMDATA_H
2 #define ALIMUONSIMDATA_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 // Revision of includes 07/05/2004
11 /// \class AliMUONSimData
12 /// \brief Class containing MUON data from simulation: hits, digits, globaltrigger,
13 /// localtrigger, etc ...
15 // Author: Gines Martinez, Subatech, September 2003
17 #include "AliLoader.h"
19 #include "AliMUONData.h"
28 //__________________________________________________________________
29 /////////////////////////////////////////////////////////////////////
31 // class AliMUONSimData //
33 /////////////////////////////////////////////////////////////////////
35 class AliMUONSimData : public AliMUONData
39 // enum EChamberIteration { kAllChambers, kTrackingChambers, kTriggerChambers };
42 AliMUONSimData(AliLoader * loader, const char* name, const char* title);
43 AliMUONSimData(const char* galiceFile);
44 virtual ~AliMUONSimData();
45 //virtual void AddSDigit(Int_t id, const AliMUONDigit& digit); // use copy constructor
46 virtual void AddHit(Int_t fIshunt, Int_t track, Int_t detElemId,
47 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
48 Float_t tof, Float_t momentum, Float_t theta,
49 Float_t phi, Float_t length, Float_t destep,
50 Float_t Xref,Float_t Yref,Float_t Zref);
52 TClonesArray* Hits() {return fHits;} ///< Return hits
53 //TClonesArray* SDigits(Int_t DetectionPlane) const;
55 void GetTrack(Int_t it) const;
56 Int_t GetNtracks() const;
57 //void GetSDigits() const;
60 virtual void Fill(Option_t* opt=" ");
61 virtual void MakeBranch(Option_t *opt=" ");
62 virtual void SetDataContainer(Option_t *opt=" ");
63 virtual void SetTreeAddress(Option_t *opt=" ");
65 virtual void ResetHits();
66 //virtual void ResetSDigits();
68 /// Return tree with hits
69 TTree* TreeH() {return fLoader->TreeH(); }
70 /// Return tree with summable digits
71 //TTree* TreeS() {return fLoader->TreeS(); }
72 /// Return tree with particles
73 TTree* TreeP() {return fLoader->TreeP(); }
75 // Methods to dump data
76 void DumpKine(Int_t event2Check=0);
77 void DumpHits(Int_t event2Check=0, Option_t* opt="full");
78 //void DumpSDigits(Int_t event2Check=0, Option_t* opt="tracks");
82 AliMUONSimData(const AliMUONSimData& rhs);
84 AliMUONSimData& operator=(const AliMUONSimData& rhs);
86 TClonesArray* fHits; ///< One event in treeH per primary track
87 //TObjArray* fSDigits; ///< One event in treeS and one branch per detection plane
89 Int_t fNhits; //!< Number of Hits
90 //Int_t* fNSdigits;//!< Number of Digits
92 mutable Int_t fCurrentEvent; ///< Current event we're dealing with
95 void FillOwn(Option_t* opt=" ");
96 void MakeOwnBranch(Option_t *opt=" ");
97 void SetOwnDataContainer(Option_t *opt=" ");
98 void SetOwnTreeAddress(Option_t *opt=" ");
100 ClassDef(AliMUONSimData,3) // Data accessor for MUON module
106 /// Load hits for \a i th entry in hits three
107 inline void AliMUONSimData::GetTrack(Int_t it) const {
108 if (fLoader && fLoader->TreeH())
109 fLoader->TreeH()->GetEvent(it);
112 /// Load sdigits tree
113 inline void AliMUONSimData::GetSDigits() const {
114 if (fLoader && fLoader->TreeS())
115 fLoader->TreeS()->GetEvent(0);