]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRecoTrack.cxx
Introduced new DE names unique to each det element;
[u/mrichter/AliRoot.git] / MUON / AliMUONRecoTrack.cxx
CommitLineData
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
7945aae7 18// ----------------------
19// Class AliMUONRecoTrack
20// ----------------------
21// This class represents a reconstructed muon track
22// in the tree of reconstructed events.
23// Authors: Mihaela Gheata, Andrei Gheata 09/10/00
9e43eec2 24
25#include <Riostream.h>
9e43eec2 26
27#include "AliMUONRecoTrack.h"
9e43eec2 28
7945aae7 29/// \cond CLASSIMP
9e43eec2 30ClassImp(AliMUONRecoTrack)
7945aae7 31/// \endcond
9e43eec2 32
54d7ba50 33//-------------------------------------------------------------------
34AliMUONRecoTrack::AliMUONRecoTrack()
35 : TObject(),
36 fSign(0),
37 fFlag(0),
38 fZvr(0.),
39 fChi2r(0.)
40{
7945aae7 41/// Default constructor
54d7ba50 42}
43
9e43eec2 44//-------------------------------------------------------------------
45AliMUONRecoTrack::AliMUONRecoTrack(Bool_t active)
54d7ba50 46 : TObject(),
47 fSign(0),
48 fFlag(0),
49 fZvr(0.),
50 fChi2r(0.)
9e43eec2 51{
7945aae7 52/// Constructor of AliMUONRecoTrack
9e43eec2 53 if (active) {
54 for (Int_t axis=0; axis<3; axis++) {
55 fPr[axis] = 0.0;
56 }
57 for (Int_t chamber=0; chamber<10; chamber++) {
58 fPosX[chamber] = 0.0;
59 fPosY[chamber] = 0.0;
60 fPosZ[chamber] = 0.0;
61 }
62 }
63}
64
65//-------------------------------------------------------------------
17323043 66Double_t AliMUONRecoTrack::Phi() const
9e43eec2 67{
7945aae7 68/// Return trach phi angle
9e43eec2 69 return TMath::ATan2(fPr[2], fPr[1]);
70}
71
72//-------------------------------------------------------------------
17323043 73Double_t AliMUONRecoTrack::Theta() const
9e43eec2 74{
7945aae7 75/// Return trach theta angle
9e43eec2 76 return TMath::ACos(fPr[2] / P());
77}
78
79//-------------------------------------------------------------------
80void AliMUONRecoTrack::SetMomReconstr(Double_t px, Double_t py, Double_t pz)
81{
7945aae7 82/// Set the track reconstructed momentum
9e43eec2 83 fPr[0] = px;
84 fPr[1] = py;
85 fPr[2] = pz;
86}
87
88//-------------------------------------------------------------------
89void AliMUONRecoTrack::SetHitPosition(Int_t chamber, Double_t x, Double_t y, Double_t z)
90{
7945aae7 91/// Set hit coordinates in chamber[0..9]
9e43eec2 92 fPosX[chamber] = x;
93 fPosY[chamber] = y;
94 fPosZ[chamber] = z;
95}
8c343c7c 96
9e43eec2 97//-------------------------------------------------------------------
85fec35d 98void AliMUONRecoTrack::TrackInfo() const
9e43eec2 99{
7945aae7 100/// Prints momentum info for this track
9e43eec2 101 cout << "Px=" << GetMomReconstr(0) << " Py=" << GetMomReconstr(1) <<
102 " Pz=" << GetMomReconstr(2) << " P=" << P() << endl;
103}