]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - ZDC/AliZDCHit.cxx
TestBit for V0s
[u/mrichter/AliRoot.git] / ZDC / AliZDCHit.cxx
... / ...
CommitLineData
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// **************************************************************
19//
20// Hits classes for ZDC
21//
22// **************************************************************
23
24#include "AliZDCHit.h"
25
26ClassImp(AliZDCHit)
27
28//_____________________________________________________________________________
29AliZDCHit::AliZDCHit() :
30// AliHit(shunt, track),
31 fPrimKinEn(0.),
32 fXImpact(0.),
33 fYImpact(0.),
34 fSFlag(0),
35 fLightPMQ(0.),
36 fLightPMC(0.),
37 fEnergy(0.),
38 fPDGCode(0),
39 fMotherPDGCode(0),
40 fTrackTOF(0.),
41 fTrackEta(0.)
42
43{
44 //
45 // Default constructor
46 //
47 for(Int_t i=0; i<2; i++) fVolume[i] = 0;
48}
49
50//_____________________________________________________________________________
51AliZDCHit::AliZDCHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits) :
52 AliHit(shunt, track),
53 fPrimKinEn(hits[3]),
54 fXImpact(hits[4]),
55 fYImpact(hits[5]),
56 fSFlag(hits[6]),
57 fLightPMQ(hits[7]),
58 fLightPMC(hits[8]),
59 fEnergy(hits[9]),
60 fPDGCode((Int_t) hits[10]),
61 fMotherPDGCode((Int_t) hits[11]),
62 fTrackTOF(hits[12]),
63 fTrackEta(hits[13])
64
65{
66 //
67 // Standard constructor
68 //
69 Int_t i;
70 for(i=0; i<2; i++) fVolume[i] = vol[i];
71 fX = hits[0];
72 fY = hits[1];
73 fZ = hits[2];
74}
75
76//_____________________________________________________________________________
77AliZDCHit::AliZDCHit(const AliZDCHit &oldhit) :
78 AliHit(0,oldhit.GetTrack()),
79 fPrimKinEn(oldhit.GetPrimKinEn()),
80 fXImpact(oldhit.GetXImpact()),
81 fYImpact(oldhit.GetYImpact()),
82 fSFlag(oldhit.GetSFlag()),
83 fLightPMQ(oldhit.GetLightPMQ()),
84 fLightPMC(oldhit.GetLightPMC()),
85 fEnergy(oldhit.GetEnergy()),
86 fPDGCode(oldhit.GetPDGCode()),
87 fMotherPDGCode(oldhit.GetMotherPDGCode()),
88 fTrackTOF(oldhit.GetTrackTOF()),
89 fTrackEta(oldhit.GetTrackEta())
90{
91 // Copy constructor
92 fX = oldhit.X();
93 fY = oldhit.Y();
94 fZ = oldhit.Z();
95 for(Int_t i=0; i<2; i++) fVolume[i] = oldhit.GetVolume(i);
96}
97
98//_____________________________________________________________________________
99AliZDCHit &AliZDCHit::operator= (const AliZDCHit &hit)
100{
101 //assignemnt operator
102 if(&hit == this) return *this;
103
104 fPrimKinEn = hit.GetPrimKinEn();
105 fXImpact = hit.GetXImpact();
106 fYImpact = hit.GetYImpact();
107 fSFlag = hit.GetSFlag();
108 fLightPMQ = hit.GetLightPMQ();
109 fLightPMC = hit.GetLightPMC();
110 fEnergy = hit.GetEnergy();
111 fPDGCode = hit.GetPDGCode();
112 fMotherPDGCode = hit.GetMotherPDGCode();
113 fTrackTOF = hit.GetTrackTOF();
114 fTrackEta = hit.GetTrackEta();
115
116 fX = hit.X();
117 fY = hit.Y();
118 fZ = hit.Z();
119 for(Int_t i=0; i<2; i++) fVolume[i] = hit.GetVolume(i);
120
121 return *this;
122}
123
124
125//_____________________________________________________________________________
126void AliZDCHit::Print(Option_t *) const
127{
128 // Print method
129 printf("\t AliZDCHit: track %d eta %f PDGcode %d TOF %1.1f ns E_prim = %1.2f GeV \n"
130 "\t DETECTOR (%d, %d) (X, Y)_impact (%f, %f) cm\n"
131 "\t PMQLight %1.0f, PMCLight %1.0f, E_dep %1.2f\n ",
132 fTrack,fTrackEta,fPDGCode,fTrackTOF,fPrimKinEn,
133 fVolume[0],fVolume[1],fXImpact,fYImpact,
134 fLightPMQ,fLightPMC,fEnergy);
135}