HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hgeantemc.cc
Go to the documentation of this file.
1 //*-- Author : Manuel Sanchez, Santiago
2 //*-- Modified : 22/11/2000 by Romain Holzmann
3 //*-- Copyright : GSI, Darmstadt
4 //
5 //***************************************************************************
6 //
7 // HGeantEmc
8 //
9 // GEANT EMC hit data
10 //
11 // This class stores the GEANT hits in the EMC detector,
12 // per sector, cell. Cell is one crystal
13 //
14 //****************************************************************************
15 //
16 // Inline functions:
17 //
18 // inline void setAddress(Char_t s, Char_t m, Char_t c)
19 // set sector, module, and cell numbers
20 // inline void setTrack(Int_t track) set GEANT track number
21 // inline Int_t getTrack() return GEANT track number
22 // inline Char_t getSector(void) return sector number
23 // inline Char_t getCell(void) return crystal number
24 //
25 #include "hgeantemc.h"
26 
28 
29 HGeantEmc::HGeantEmc(void) {
30  // Default constructor.
31  trackNumber = 0;
32  trackLength = 0.F;
33  peHit = 0.F;
34  xHit = 0.F;
35  yHit = 0.F;
36  zHit = 0.F;
37  tofHit = 0.F;
38  momHit = 0.F;
39  sector = -1;
40  cell = 0;
41 }
42 /*
43 HGeantEmc::HGeantEmc(HGeantEmc &aEmc) {
44  // Copy constructor.
45  trackNumber = aEmc.trackNumber;
46  trackLength = aEmc.trackLength;
47  peHit = aEmc.peHit;
48  xHit = aEmc.xHit;
49  yHit = aEmc.yHit;
50  zHit = aEmc.zHit;
51  tofHit = aEmc.tofHit;
52  momHit = aEmc.momHit;
53  sector = aEmc.sector;
54  cell = aEmc.cell;
55 }
56 */
57 void HGeantEmc::setHit(Float_t ae, Float_t ax, Float_t ay, Float_t az,
58  Float_t atof, Float_t amom, Float_t alen) {
59  // Set hit data (energy loss, y,x in cell system, time of flight, momentum and track length).
60  peHit = ae;
61  xHit = ax;
62  yHit = ay;
63  zHit = az;
64  tofHit = atof;
65  momHit = amom;
66  trackLength = alen;
67 }
68 
69 void HGeantEmc::getHit(Float_t& ae, Float_t& ax, Float_t& ay, Float_t& az,
70  Float_t& atof, Float_t& amom, Float_t& alen) {
71  // Retrieve hit data (energy loss, y,x in cell system, time of flight, momentum and track length).
72  ae = peHit;
73  ax = xHit;
74  ay = yHit;
75  az = zHit;
76  atof = tofHit;
77  amom = momHit;
78  alen = trackLength;
79 }
Float_t momHit
Definition: hgeantemc.h:23
Float_t yHit
Definition: hgeantemc.h:20
Float_t zHit
Definition: hgeantemc.h:21
Float_t trackLength
Definition: hgeantemc.h:17
void getHit(Float_t &ae, Float_t &ax, Float_t &ay, Float_t &az, Float_t &atof, Float_t &amom, Float_t &alen)
Definition: hgeantemc.cc:69
Float_t tofHit
Definition: hgeantemc.h:22
void setHit(Float_t ae, Float_t ax, Float_t ay, Float_t az, Float_t atof, Float_t amom, Float_t alen)
Definition: hgeantemc.cc:57
ClassImp(HGeantEmc) HGeantEmc
Definition: hgeantemc.cc:27
Float_t peHit
Definition: hgeantemc.h:18
Float_t xHit
Definition: hgeantemc.h:19