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