]>
Commit | Line | Data |
---|---|---|
8e308087 | 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 | ||
803d1ab0 | 16 | /* $Id$ */ |
8e308087 | 17 | |
8a2624cc | 18 | // ************************************************************** |
3ff116f2 | 19 | // |
8a2624cc | 20 | // Hits classes for ZDC |
3ff116f2 | 21 | // |
8a2624cc | 22 | // ************************************************************** |
8e308087 | 23 | |
24 | #include "AliZDCHit.h" | |
25 | ||
26 | ClassImp(AliZDCHit) | |
27 | ||
28 | //_____________________________________________________________________________ | |
cc2abffd | 29 | AliZDCHit::AliZDCHit() : |
30 | // AliHit(shunt, track), | |
6c79713a | 31 | fPrimKinEn(0.), |
cc2abffd | 32 | fXImpact(0.), |
33 | fYImpact(0.), | |
34 | fSFlag(0), | |
35 | fLightPMQ(0.), | |
36 | fLightPMC(0.), | |
47709f57 | 37 | fEnergy(0.), |
f7f9e40c | 38 | fPDGCode(0), |
39 | fTrackTOF(0.) | |
cc2abffd | 40 | |
41 | { | |
42 | // | |
43 | // Default constructor | |
44 | // | |
6c79713a | 45 | for(Int_t i=0; i<2; i++) fVolume[i] = 0; |
cc2abffd | 46 | } |
47 | ||
48 | //_____________________________________________________________________________ | |
49 | AliZDCHit::AliZDCHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits) : | |
50 | AliHit(shunt, track), | |
51 | fPrimKinEn(hits[3]), | |
52 | fXImpact(hits[4]), | |
53 | fYImpact(hits[5]), | |
54 | fSFlag(hits[6]), | |
55 | fLightPMQ(hits[7]), | |
56 | fLightPMC(hits[8]), | |
47709f57 | 57 | fEnergy(hits[9]), |
f7f9e40c | 58 | fPDGCode((Int_t) hits[10]), |
59 | fTrackTOF(hits[11]) | |
cc2abffd | 60 | |
8e308087 | 61 | { |
62 | // | |
cc2abffd | 63 | // Standard constructor |
8e308087 | 64 | // |
65 | Int_t i; | |
cc2abffd | 66 | for(i=0; i<2; i++) fVolume[i] = vol[i]; |
5a881c97 | 67 | fX = hits[0]; |
68 | fY = hits[1]; | |
69 | fZ = hits[2]; | |
cc2abffd | 70 | } |
8e308087 | 71 | |
cc2abffd | 72 | //_____________________________________________________________________________ |
73 | AliZDCHit::AliZDCHit(const AliZDCHit &oldhit) : | |
a718c993 | 74 | AliHit(0,oldhit.GetTrack()), |
75 | fPrimKinEn(oldhit.GetPrimKinEn()), | |
76 | fXImpact(oldhit.GetXImpact()), | |
77 | fYImpact(oldhit.GetYImpact()), | |
78 | fSFlag(oldhit.GetSFlag()), | |
79 | fLightPMQ(oldhit.GetLightPMQ()), | |
80 | fLightPMC(oldhit.GetLightPMC()), | |
47709f57 | 81 | fEnergy(oldhit.GetEnergy()), |
f7f9e40c | 82 | fPDGCode(oldhit.GetPDGCode()), |
83 | fTrackTOF(oldhit.GetTrackTOF()) | |
cc2abffd | 84 | { |
85 | // Copy constructor | |
86 | fX = oldhit.X(); | |
87 | fY = oldhit.Y(); | |
88 | fZ = oldhit.Z(); | |
89 | for(Int_t i=0; i<2; i++) fVolume[i] = oldhit.GetVolume(i); | |
8e308087 | 90 | } |
8a2624cc | 91 | |
cc2abffd | 92 | |
8a2624cc | 93 | //_____________________________________________________________________________ |
94 | void AliZDCHit::Print(Option_t *) const | |
95 | { | |
96 | // Print method | |
e4d73825 | 97 | printf("\t AliZDCHit: track %d PDGcode %d TOF %1.1f ns E_prim = %1.2f GeV SFlag = %1.0f\n" |
98 | "\t DETECTOR (%d, %d) (X, Y)_impact (%f, %f) cm\n" | |
99 | "\t PMQLight %1.0f, PMCLight %1.0f, E_dep %1.2f\n ", | |
f7f9e40c | 100 | fTrack,fPDGCode,fTrackTOF,fPrimKinEn,fSFlag, |
101 | fVolume[0],fVolume[1],fXImpact,fYImpact, | |
102 | fLightPMQ,fLightPMC,fEnergy); | |
8a2624cc | 103 | } |