]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSimData.h
Updated list of MUON libraries
[u/mrichter/AliRoot.git] / MUON / AliMUONSimData.h
CommitLineData
990f8c6b 1#ifndef ALIMUONSIMDATA_H
2#define ALIMUONSIMDATA_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// Revision of includes 07/05/2004
9//
10/// \ingroup sim
11/// \class AliMUONSimData
12/// \brief Class containing MUON data from simulation: hits, digits, globaltrigger,
13/// localtrigger, etc ...
14///
15// Author: Gines Martinez, Subatech, September 2003
16
17#include "AliLoader.h"
18
19#include "AliMUONData.h"
20
21class AliRunLoader;
22
23class TClonesArray;
24class TObjArray;
25class TTree;
26
27
28//__________________________________________________________________
29/////////////////////////////////////////////////////////////////////
30// //
31// class AliMUONSimData //
32// //
33/////////////////////////////////////////////////////////////////////
34
35class AliMUONSimData : public AliMUONData
36{
37 public:
38
39 // enum EChamberIteration { kAllChambers, kTrackingChambers, kTriggerChambers };
40
41 AliMUONSimData();
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);
51
52 TClonesArray* Hits() {return fHits;} ///< Return hits
53 //TClonesArray* SDigits(Int_t DetectionPlane) const;
54
55 void GetTrack(Int_t it) const;
56 Int_t GetNtracks() const;
57 //void GetSDigits() const;
58
59
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=" ");
64
65 virtual void ResetHits();
66 //virtual void ResetSDigits();
67
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(); }
74
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");
79
80 protected:
81 /// Not implemented
82 AliMUONSimData(const AliMUONSimData& rhs);
83 /// Not implemented
84 AliMUONSimData& operator=(const AliMUONSimData& rhs);
85
86 TClonesArray* fHits; ///< One event in treeH per primary track
87 //TObjArray* fSDigits; ///< One event in treeS and one branch per detection plane
88
89 Int_t fNhits; //!< Number of Hits
90 //Int_t* fNSdigits;//!< Number of Digits
91
92 mutable Int_t fCurrentEvent; ///< Current event we're dealing with
93
94private:
95 void FillOwn(Option_t* opt=" ");
96 void MakeOwnBranch(Option_t *opt=" ");
97 void SetOwnDataContainer(Option_t *opt=" ");
98 void SetOwnTreeAddress(Option_t *opt=" ");
99
100 ClassDef(AliMUONSimData,3) // Data accessor for MUON module
101
102};
103// inline functions
104
105
106/// Load hits for \a i th entry in hits three
107inline void AliMUONSimData::GetTrack(Int_t it) const {
108 if (fLoader && fLoader->TreeH())
109 fLoader->TreeH()->GetEvent(it);
110}
111/*
112/// Load sdigits tree
113inline void AliMUONSimData::GetSDigits() const {
114 if (fLoader && fLoader->TreeS())
115 fLoader->TreeS()->GetEvent(0);
116}
117*/
118
119
120#endif
121