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),
45 // Default constructor
47 for(Int_t i=0; i<2; i++) fVolume[i] = 0;
50 //_____________________________________________________________________________
51 AliZDCHit::AliZDCHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits) :
60 fPDGCode((Int_t) hits[10]),
61 fMotherPDGCode((Int_t) hits[11]),
67 // Standard constructor
70 for(i=0; i<2; i++) fVolume[i] = vol[i];
76 //_____________________________________________________________________________
77 AliZDCHit::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())
95 for(Int_t i=0; i<2; i++) fVolume[i] = oldhit.GetVolume(i);
98 //_____________________________________________________________________________
99 AliZDCHit &AliZDCHit::operator= (const AliZDCHit &hit)
101 //assignemnt operator
102 if(&hit == this) return *this;
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();
119 for(Int_t i=0; i<2; i++) fVolume[i] = hit.GetVolume(i);
125 //_____________________________________________________________________________
126 void AliZDCHit::Print(Option_t *) const
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);