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