Bug fix. Removed delete statement
[u/mrichter/AliRoot.git] / ACORDE / AliACORDEhit.cxx
CommitLineData
b86e74f5 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
19f796ed 18// volume:
19// [0] = module number 1-60 (1==>(0-0), 60 (5-9)
20// [1] = Plastic number: 0 (down) to 1 (up)
21//
22// hit
23// [0] = PID
24// [1-3] = x, y, z
25// [4] = time
26// [5-7] = px, py, pz
27// [8] = energy
28// [9] = energy loss
29// [10] = trak length in plastic
30
b86e74f5 31#include "AliACORDEhit.h"
32
33#include <TMath.h>
34
35#include "AliConst.h"
36
37ClassImp(AliACORDEhit)
38
39//____________________________________________________________________________
40AliACORDEhit::AliACORDEhit()
41 : AliHit(),
19f796ed 42 fModule(0),
43 fPlastic(0),
44 fTrackId(0),
45 fTime(0),
b86e74f5 46 fPx(0),
47 fPy(0),
48 fPz(0),
49 fEloss(0),
19f796ed 50 fEnergy(0),
51 fTrkLength(0)
b86e74f5 52{
53 //
54 // default ctor for AliACORDEhit object
55 //
56}
57
58//_____________________________________________________________________________
59AliACORDEhit::AliACORDEhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits)
60 : AliHit(shunt, track),
19f796ed 61 fModule(vol[0]),
62 fPlastic(vol[1]),
63 fTrackId((Int_t) hits[0]),
64 fTime(hits[4]),
65 fPx(hits[5]),
66 fPy(hits[6]),
67 fPz(hits[7]),
68 fEloss(hits[9]),
69 fEnergy(hits[8]),
70 fTrkLength(hits[10])
b86e74f5 71{
72 //
73 // Constructor of hit object
74 //
75 fX = hits[1];
76 fY = hits[2];
77 fZ = hits[3];
78}
79
b86e74f5 80
81//_____________________________________________________________________________
82AliACORDEhit::~AliACORDEhit()
83{
84 //
85 // Default destructor.
86 //
87}
88
b86e74f5 89
90//_____________________________________________________________________________
91Float_t AliACORDEhit::PolarAngle() const
92{
93 //
94 //
95 //
19f796ed 96 // return kRaddeg*TMath::ACos(-fPy/this->Energy());
97 return kRaddeg*TMath::ACos(fPz/this->Energy());
b86e74f5 98}
99
100//_____________________________________________________________________________
101Float_t AliACORDEhit::AzimuthAngle() const
102{
103 //
104 //
105 //
19f796ed 106 // return kRaddeg*TMath::ATan2(-fPx, -fPz);
107 return kRaddeg*TMath::ATan2(fPx, fPz);
b86e74f5 108}