1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 // **************************************************************
20 // Hits classes for ZDC
22 // **************************************************************
24 #include "AliZDCHit.h"
28 //_____________________________________________________________________________
29 AliZDCHit::AliZDCHit() :
30 // AliHit(shunt, track),
44 // Default constructor
46 for(Int_t i=0; i<2; i++) fVolume[i] = 0;
49 //_____________________________________________________________________________
50 AliZDCHit::AliZDCHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits) :
59 fPDGCode((Int_t) hits[10]),
60 fMotherPDGCode((Int_t) hits[11]),
66 // Standard constructor
69 for(i=0; i<2; i++) fVolume[i] = vol[i];
75 //_____________________________________________________________________________
76 AliZDCHit::AliZDCHit(const AliZDCHit &oldhit) :
77 AliHit(0,oldhit.GetTrack()),
78 fPrimKinEn(oldhit.GetPrimKinEn()),
79 fXImpact(oldhit.GetXImpact()),
80 fYImpact(oldhit.GetYImpact()),
81 fSFlag(oldhit.GetSFlag()),
82 fLightPMQ(oldhit.GetLightPMQ()),
83 fLightPMC(oldhit.GetLightPMC()),
84 fEnergy(oldhit.GetEnergy()),
85 fPDGCode(oldhit.GetPDGCode()),
86 fMotherPDGCode(oldhit.GetMotherPDGCode()),
87 fTrackTOF(oldhit.GetTrackTOF()),
88 fTrackEta(oldhit.GetTrackEta())
94 for(Int_t i=0; i<2; i++) fVolume[i] = oldhit.GetVolume(i);
97 //_____________________________________________________________________________
98 AliZDCHit &AliZDCHit::operator= (const AliZDCHit &hit)
100 //assignemnt operator
101 if(&hit == this) return *this;
103 fPrimKinEn = hit.GetPrimKinEn();
104 fXImpact = hit.GetXImpact();
105 fYImpact = hit.GetYImpact();
106 fSFlag = hit.GetSFlag();
107 fLightPMQ = hit.GetLightPMQ();
108 fLightPMC = hit.GetLightPMC();
109 fEnergy = hit.GetEnergy();
110 fPDGCode = hit.GetPDGCode();
111 fMotherPDGCode = hit.GetMotherPDGCode();
112 fTrackTOF = hit.GetTrackTOF();
113 fTrackEta = hit.GetTrackEta();
118 for(Int_t i=0; i<2; i++) fVolume[i] = hit.GetVolume(i);
124 //_____________________________________________________________________________
125 void AliZDCHit::Print(Option_t *) const
128 printf("\t **** 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 fTrack,fTrackEta,fPDGCode,fTrackTOF,fPrimKinEn,
132 fVolume[0],fVolume[1],fXImpact,fYImpact,fSFlag,
133 fLightPMQ,fLightPMC,fEnergy);