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