]>
Commit | Line | Data |
---|---|---|
9e43eec2 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | //Authors: Mihaela Gheata, Andrei Gheata 09/10/00 | |
19 | //////////////////////////////////////////////////////////////////// | |
20 | // // | |
21 | // AliMUONRecoTrack // | |
22 | // // | |
23 | // This class represents a reconstructed muon track // | |
24 | // in the tree of reconstructed events. // | |
25 | // // | |
26 | //////////////////////////////////////////////////////////////////// | |
27 | ||
28 | #include <Riostream.h> | |
29 | #include <AliRun.h> | |
30 | #include <TClonesArray.h> | |
31 | #include <TClass.h> | |
32 | ||
33 | #include <TFile.h> | |
34 | #include <TMatrixD.h> | |
35 | #include <TParticle.h> | |
36 | ||
37 | #include "AliMUONRecoTrack.h" | |
38 | #include "AliMUONEventReconstructor.h" | |
39 | #include "AliMUONTrack.h" | |
40 | #include "AliMUONTrackK.h" | |
41 | #include "AliMUONTrackParam.h" | |
42 | #include "AliMUONHitForRec.h" | |
43 | #include "AliMUONTrackHit.h" | |
44 | #include "AliHeader.h" | |
45 | ||
46 | ClassImp(AliMUONRecoTrack) | |
47 | ||
48 | //------------------------------------------------------------------- | |
49 | AliMUONRecoTrack::AliMUONRecoTrack(Bool_t active) | |
50 | { | |
51 | //Constructor of AliMUONRecoTrack | |
52 | fSign = 0; | |
53 | fZvr = 0.0; | |
54 | fChi2r = 0.0; | |
55 | if (active) { | |
56 | for (Int_t axis=0; axis<3; axis++) { | |
57 | fPr[axis] = 0.0; | |
58 | } | |
59 | for (Int_t chamber=0; chamber<10; chamber++) { | |
60 | fPosX[chamber] = 0.0; | |
61 | fPosY[chamber] = 0.0; | |
62 | fPosZ[chamber] = 0.0; | |
63 | } | |
64 | } | |
65 | } | |
66 | ||
67 | //------------------------------------------------------------------- | |
68 | const Double_t AliMUONRecoTrack::Phi() | |
69 | { | |
70 | // Return trach phi angle | |
71 | return TMath::ATan2(fPr[2], fPr[1]); | |
72 | } | |
73 | ||
74 | //------------------------------------------------------------------- | |
75 | const Double_t AliMUONRecoTrack::Theta() | |
76 | { | |
77 | // Return trach theta angle | |
78 | return TMath::ACos(fPr[2] / P()); | |
79 | } | |
80 | ||
81 | //------------------------------------------------------------------- | |
82 | void AliMUONRecoTrack::SetMomReconstr(Double_t px, Double_t py, Double_t pz) | |
83 | { | |
84 | // Set the track reconstructed momentum | |
85 | fPr[0] = px; | |
86 | fPr[1] = py; | |
87 | fPr[2] = pz; | |
88 | } | |
89 | ||
90 | //------------------------------------------------------------------- | |
91 | void AliMUONRecoTrack::SetHitPosition(Int_t chamber, Double_t x, Double_t y, Double_t z) | |
92 | { | |
93 | // Set hit coordinates in chamber[0..9] | |
94 | fPosX[chamber] = x; | |
95 | fPosY[chamber] = y; | |
96 | fPosZ[chamber] = z; | |
97 | } | |
98 | //------------------------------------------------------------------- | |
99 | void AliMUONRecoTrack::TrackInfo() | |
100 | { | |
101 | // Prints momentum info for this track | |
102 | cout << "Px=" << GetMomReconstr(0) << " Py=" << GetMomReconstr(1) << | |
103 | " Pz=" << GetMomReconstr(2) << " P=" << P() << endl; | |
104 | } |