New package for reconstructed tracks (A. Gheata):
[u/mrichter/AliRoot.git] / MUON / AliMUONRecoEvent.h
1 // Authors : M.Gheata, A.Gheata 09/10/00
2 #ifndef MUON_RECEVENT
3 #define MUON_RECEVENT
4
5 ////////////////////////////////////////////////////////////////////
6 //                                                                //
7 // AliMUONRecoEvent and AliMUONRecoTrack                          //
8 //                                                                //
9 // This header contains all classes needed for storing MUON       //
10 // reconstructed events in a tree                                 //
11 //                                                                //
12 ////////////////////////////////////////////////////////////////////
13
14 #include <TObject.h>
15 #include <TFile.h>
16 #include <TParticle.h>
17 #include <AliDetector.h>
18 #include "AliMUONHit.h"
19
20 class AliMUONRecoTrack;
21
22
23 /////////////////////////////////////////////////////////////////////
24 //                                                                 //
25 // AliMUONRecoEvent                                                //
26 //                                                                 //
27 // This class handles an array of reconstructed tracks.            //
28 // It provides :                                                   //
29 //      - filling the tracks array according the information stored//
30 //      in AliMUONEventReconstructor class ;                       //
31 //      - printing event and track informations : event number,    //
32 //      number of tracks, hits positions, reconstr. momentum.      //
33 //                                                                 //
34 /////////////////////////////////////////////////////////////////////
35
36
37 class AliMUONRecoEvent:public TObject {
38
39 private:
40    Int_t             fNevr;               // event number
41    Int_t             fNtracks;            // number of tracks
42    TClonesArray      *fTracks;            // list of AliMUONRecoTracks
43    
44 public:
45                      AliMUONRecoEvent(Int_t eventNo = 0);
46    virtual           ~AliMUONRecoEvent();
47    AliMUONRecoTrack* AddEmptyTrack();
48    void              Clear(Option_t *option = "");
49    void              EventInfo();
50    Int_t             GetNoEvent()  const {return fNevr;}
51    Int_t             GetNoTracks() const {return fNtracks;}
52    Bool_t            MakeDumpTracks(TClonesArray *tracksPtr);
53    void              SetNoEvent(Int_t event)    {fNevr = event;}
54    void              SetNoTracks(Int_t ntracks) {fNtracks = ntracks;} 
55    TClonesArray*     TracksPtr() {return fTracks;}
56
57    ClassDef(AliMUONRecoEvent,1) // Reconstructed event for MUON module
58 };
59
60 ////////////////////////////////////////////////////////////////////
61 //                                                                //
62 // AliMUONRecoTrack                                               //
63 //                                                                //
64 // This class represents a reconstructed muon track.              //
65 //                                                                //
66 ////////////////////////////////////////////////////////////////////
67
68 class AliMUONRecoTrack:public TObject {
69
70 private:
71     Int_t       fSign;                  // charge sign
72     Double_t    fZvr;                   // z of track vertex point
73     Double_t    fChi2r;                 // chi squared for reco. track
74     Double_t    fPr[3];                 // reconstr. momentum (same as in vertex)
75     Double_t    fPosX[10];              // hit X position in all chambers
76     Double_t    fPosY[10];              // hit Y position in all chambers    
77     Double_t    fPosZ[10];              // hit Z position in all chambers
78
79 public:
80    AliMUONRecoTrack() { }
81     AliMUONRecoTrack(Bool_t active);
82     virtual        ~AliMUONRecoTrack() { }      //desctructor
83     const Double_t GetChi2r() const {return fChi2r;};
84     const Double_t GetMomReconstr(Int_t axis) const {return fPr[axis];};
85     const Int_t    GetSign() const {return fSign;};
86     const Double_t GetPosX(Int_t chamber) const {return fPosX[chamber];};
87     const Double_t GetPosY(Int_t chamber) const {return fPosY[chamber];};
88     const Double_t GetPosZ(Int_t chamber) const {return fPosZ[chamber];};
89     const Double_t GetVertexPos() { return fZvr;};
90     const Double_t P() {return TMath::Sqrt(fPr[0]*fPr[0] + fPr[1]*fPr[1] + fPr[2]*fPr[2]);};
91     const Double_t Phi();
92     void           SetChi2r(Double_t chi) { fChi2r = chi;};
93     void           SetHitPosition(Int_t chamber, Double_t x, Double_t y, Double_t z);
94     void           SetMomReconstr(Double_t px, Double_t py, Double_t pz);
95     void           SetSign(Int_t sign) {fSign = sign;};
96     void           SetVertexPos(Double_t zvr) {fZvr = zvr;};
97     const Double_t Theta();
98     void           TrackInfo();
99     ClassDef(AliMUONRecoTrack,1)        // A reconstructed muon track
100 };
101
102 #endif