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