]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDC.h
z position of rails corrected
[u/mrichter/AliRoot.git] / ZDC / AliZDC.h
CommitLineData
68ca986e 1#ifndef ALIZDC_H
2#define ALIZDC_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
fe4da5cc 8////////////////////////////////////////////////
68ca986e 9// Manager and hits classes for set ZDC //
fe4da5cc 10////////////////////////////////////////////////
11
12#include "AliDetector.h"
13#include "AliHit.h"
14
15
16class AliZDC : public AliDetector {
17
18public:
19 AliZDC();
20 AliZDC(const char *name, const char *title);
21 virtual ~AliZDC() {}
68ca986e 22 virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
fe4da5cc 23 virtual void BuildGeometry();
24 virtual void CreateGeometry() {}
25 virtual void CreateMaterials() {}
68ca986e 26 Int_t DistancetoPrimitive(Int_t px, Int_t py);
fe4da5cc 27 virtual Int_t IsVersion() const =0;
fe4da5cc 28 virtual void StepManager();
29
68ca986e 30protected:
31 // Parameters for ZDCs geometry
32 Float_t fDimZN[3]; // Dimensions of neutron detector
33 Float_t fDimZP[3]; // Dimensions of proton detector
34 Float_t fPosZN[3]; // Position of neutron detector
35 Float_t fPosZP[3]; // Position of proton detector
36 Float_t fFibZN[3]; // Fibers for neutron detector
37 Float_t fFibZP[3]; // Fibers for proton detector
38 Float_t fGrvZN[3]; // Grooves for neutron detector
39 Float_t fGrvZP[3]; // Grooves for proton detector
40 Int_t fDivZN[3]; // Division for neutron detector
41 Int_t fDivZP[3]; // Division for proton detector
42 Int_t fTowZN[2]; // Tower for neutron detector
43 Int_t fTowZP[2]; // Tower for proton detector
44
fe4da5cc 45 ClassDef(AliZDC,1) // Zero Degree Calorimeter base class
46};
fe4da5cc 47
fe4da5cc 48//_____________________________________________________________________________
49class AliZDChit : public AliHit {
68ca986e 50
fe4da5cc 51public:
68ca986e 52 Int_t fVolume[2]; //Array of volumes
53 Float_t fX; //X-coord. in the hall RS
54 Float_t fY; //Y-coord. in the hall RS
55 Float_t fZ; //Z-coord. in the hall RS
56 Float_t fPrimKinEn; //Primary particle energy
57 Float_t fXImpact; //x-coord. of the impact point over the ZDC
58 Float_t fYImpact; //y-coord. of the impact point over the ZDC
59 Float_t fSFlag; //Secondary flag
60 Float_t fLightPMQ; //Cerenkov light produced in each quadrant
61 Float_t fLightPMC; //Cerenkov light seen by the common PM
62 Float_t fEnergy; //Total energy deposited in eV
fe4da5cc 63
64public:
65 AliZDChit() {}
66 AliZDChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
68ca986e 67 AliZDChit(AliZDChit* oldhit) {*this=*oldhit;}
fe4da5cc 68 virtual ~AliZDChit() {}
68ca986e 69 virtual Int_t GetVolume(Int_t i) {return fVolume[i];}
70 virtual Float_t GetLightPMQ() {return fLightPMQ;}
71 virtual Float_t GetLightPMC() {return fLightPMC;}
72 virtual Float_t GetEnergy() {return fEnergy;}
73 Int_t operator == (AliZDChit &quad) {
74 Int_t i;
75 if(fTrack!=quad.GetTrack()) return 0;
76 for(i=0; i<2; i++) if(fVolume[i]!=quad.GetVolume(i)) return 0;
77 return 1;
78 }
79 virtual AliZDChit& operator + (AliZDChit &quad) {
80 fLightPMQ+=quad.GetLightPMQ();
81 fLightPMC+=quad.GetLightPMC();
82 fEnergy+=quad.GetEnergy();
83 return *this;
84 }
85 virtual void Print(Option_t *) {
86 printf(" -> HIT: vol[0] = %d vol[1] = %d Track: %d \n"
87 " hit[3] = %f, hit[4] = %f, hit[5] = %f, SFlag = %f\n"
88 " PMQLight = %f, PMCLight = %f, Energy %f\n ",
89 fVolume[0],fVolume[1],fTrack,fPrimKinEn,fXImpact,fYImpact,
90 fSFlag,fLightPMQ,fLightPMC,fEnergy);
91 }
92
93 ClassDef(AliZDChit,1) // Hits for the Zero Degree Calorimeters
fe4da5cc 94};
95
96#endif