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