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]),
65 // Standard constructor
68 for(i=0; i<2; i++) fVolume[i] = vol[i];
74 //_____________________________________________________________________________
75 AliZDCHit::AliZDCHit(const AliZDCHit &oldhit) :
76 AliHit(0,oldhit.GetTrack()),
77 fPrimKinEn(oldhit.GetPrimKinEn()),
78 fXImpact(oldhit.GetXImpact()),
79 fYImpact(oldhit.GetYImpact()),
80 fSFlag(oldhit.GetSFlag()),
81 fLightPMQ(oldhit.GetLightPMQ()),
82 fLightPMC(oldhit.GetLightPMC()),
83 fEnergy(oldhit.GetEnergy()),
84 fPDGCode(oldhit.GetPDGCode()),
85 fMotherPDGCode(oldhit.GetMotherPDGCode()),
86 fTrackTOF(oldhit.GetTrackTOF())
92 for(Int_t i=0; i<2; i++) fVolume[i] = oldhit.GetVolume(i);
95 //_____________________________________________________________________________
96 AliZDCHit &AliZDCHit::operator= (const AliZDCHit &hit)
99 if(&hit == this) return *this;
101 fPrimKinEn = hit.GetPrimKinEn();
102 fXImpact = hit.GetXImpact();
103 fYImpact = hit.GetYImpact();
104 fSFlag = hit.GetSFlag();
105 fLightPMQ = hit.GetLightPMQ();
106 fLightPMC = hit.GetLightPMC();
107 fEnergy = hit.GetEnergy();
108 fPDGCode = hit.GetPDGCode();
109 fMotherPDGCode = hit.GetMotherPDGCode();
110 fTrackTOF = hit.GetTrackTOF();
115 for(Int_t i=0; i<2; i++) fVolume[i] = hit.GetVolume(i);
121 //_____________________________________________________________________________
122 void AliZDCHit::Print(Option_t *) const
125 printf("\t AliZDCHit: track %d PDGcode %d TOF %1.1f ns E_prim = %1.2f GeV SFlag = %1.0f\n"
126 "\t DETECTOR (%d, %d) (X, Y)_impact (%f, %f) cm\n"
127 "\t PMQLight %1.0f, PMCLight %1.0f, E_dep %1.2f\n ",
128 fTrack,fPDGCode,fTrackTOF,fPrimKinEn,fSFlag,
129 fVolume[0],fVolume[1],fXImpact,fYImpact,
130 fLightPMQ,fLightPMC,fEnergy);