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