]>
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), | |
31 | fPrimKinEn(00), | |
32 | fXImpact(0.), | |
33 | fYImpact(0.), | |
34 | fSFlag(0), | |
35 | fLightPMQ(0.), | |
36 | fLightPMC(0.), | |
37 | fEnergy(0.) | |
38 | ||
39 | { | |
40 | // | |
41 | // Default constructor | |
42 | // | |
43 | } | |
44 | ||
45 | //_____________________________________________________________________________ | |
46 | AliZDCHit::AliZDCHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits) : | |
47 | AliHit(shunt, track), | |
48 | fPrimKinEn(hits[3]), | |
49 | fXImpact(hits[4]), | |
50 | fYImpact(hits[5]), | |
51 | fSFlag(hits[6]), | |
52 | fLightPMQ(hits[7]), | |
53 | fLightPMC(hits[8]), | |
54 | fEnergy(hits[9]) | |
55 | ||
8e308087 | 56 | { |
57 | // | |
cc2abffd | 58 | // Standard constructor |
8e308087 | 59 | // |
60 | Int_t i; | |
cc2abffd | 61 | for(i=0; i<2; i++) fVolume[i] = vol[i]; |
5a881c97 | 62 | fX = hits[0]; |
63 | fY = hits[1]; | |
64 | fZ = hits[2]; | |
cc2abffd | 65 | } |
8e308087 | 66 | |
cc2abffd | 67 | //_____________________________________________________________________________ |
68 | AliZDCHit::AliZDCHit(const AliZDCHit &oldhit) : | |
69 | AliHit(0,oldhit.GetTrack()) | |
70 | { | |
71 | // Copy constructor | |
72 | fX = oldhit.X(); | |
73 | fY = oldhit.Y(); | |
74 | fZ = oldhit.Z(); | |
75 | for(Int_t i=0; i<2; i++) fVolume[i] = oldhit.GetVolume(i); | |
76 | fPrimKinEn = oldhit.GetPrimKinEn(); | |
77 | fXImpact = oldhit.GetXImpact(); | |
78 | fYImpact = oldhit.GetYImpact(); | |
79 | fSFlag = oldhit.GetSFlag(); | |
80 | fLightPMQ = oldhit.GetLightPMQ(); | |
81 | fLightPMC = oldhit.GetLightPMC(); | |
82 | fEnergy = oldhit.GetEnergy(); | |
8e308087 | 83 | } |
8a2624cc | 84 | |
cc2abffd | 85 | |
8a2624cc | 86 | //_____________________________________________________________________________ |
87 | void AliZDCHit::Print(Option_t *) const | |
88 | { | |
89 | // Print method | |
90 | printf(" -> HIT: vol[0] = %d vol[1] = %d Track: %d \n" | |
91 | " Primary E = %f, Ximpact = %f, Yimpact = %f, SFlag = %f\n" | |
92 | " PMQLight = %f, PMCLight = %f, Deposited E = %f\n ", | |
93 | fVolume[0],fVolume[1],fTrack,fPrimKinEn,fXImpact,fYImpact, | |
94 | fSFlag,fLightPMQ,fLightPMC,fEnergy); | |
95 | } |