HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hgeantwall.cc
Go to the documentation of this file.
1 #include "hgeantwall.h"
2 
3 //*-- Author : Filip Krizek, UJF Rez
4 //*-- Modified : 25/11/2004 by Romain Holzmann
5 //*-- Copyright : GSI, Darmstadt
6 //
7 //**************************************************************************
8 //
9 // HGeantWall
10 //
11 // GEANT Forward Wall hit data
12 //
13 // last modified on 25/11/2004 by R.Holzmann (GSI)
14 //**************************************************************************
15 // Inline functions:
16 //
17 // inline void setAddress (Char_t m, Int_t c)
18 // set hit location (module and cell)
19 // inline void setTrack(Int_t track) set GEANT track number
20 // inline Int_t getTrack() return GEANT track number
21 // inline Char_t getModule(void) return module number
22 // inline Char_t getCell(void) return cell number
23 //
24 
26 
27 HGeantWall::HGeantWall(void) {
28  // Default constructor.
29  trackNumber = 0;
30  trackLength = 0.0;
31  eHit = 0.0;
32  xHit = 0.0;
33  yHit = 0.0;
34  tofHit = 0.0;
35  momHit = 0.0;
36  module = -1;
37  cell = -1;
38 }
39 /*
40 HGeantWall::HGeantWall(HGeantWall &aWall) {
41  // Copy constructor.
42  trackNumber = aWall.trackNumber;
43  trackLength = aWall.trackLength;
44  eHit = aWall.eHit;
45  xHit = aWall.xHit;
46  yHit = aWall.yHit;
47  tofHit = aWall.tofHit;
48  momHit = aWall.momHit;
49  module = aWall.module;
50  cell = aWall.cell;
51 }
52 */
54  // Destructor.
55 }
56 
57 void HGeantWall::setHit(Float_t ae, Float_t ax, Float_t ay, Float_t atof,
58  Float_t amom, Float_t alen) {
59  // Fill in basic hit data:
60  // - energy in MeV
61  // - x,y of hit in module in mm
62  // - time of flight in ns
63  // - momentum of particle at hit in MeV/c
64  // - track length from creation vertex to hit in mm
65  eHit = ae;
66  xHit = ax;
67  yHit = ay;
68  tofHit = atof;
69  momHit = amom;
70  trackLength = alen;
71 }
72 
73 void HGeantWall::getHit(Float_t& ae, Float_t& ax, Float_t& ay, Float_t& atof,
74  Float_t& amom, Float_t& alen) {
75  // Retrieve basic hit data: energy, x,y, time fo flight, momentum and track length
76  ae = eHit;
77  ax = xHit;
78  ay = yHit;
79  atof = tofHit;
80  amom = momHit;
81  alen = trackLength;
82 }
83 
84 
85 
86 
87 
88 
~HGeantWall(void)
Definition: hgeantwall.cc:53
Float_t xHit
Definition: hgeantwall.h:20
Float_t yHit
Definition: hgeantwall.h:21
void setHit(Float_t ae, Float_t ax, Float_t ay, Float_t atof, Float_t amom, Float_t alen)
Definition: hgeantwall.cc:57
Float_t eHit
Definition: hgeantwall.h:19
ClassImp(HGeantWall) HGeantWall
Definition: hgeantwall.cc:25
Float_t momHit
Definition: hgeantwall.h:23
void getHit(Float_t &ae, Float_t &ax, Float_t &ay, Float_t &atof, Float_t &amom, Float_t &alen)
Definition: hgeantwall.cc:73
Float_t tofHit
Definition: hgeantwall.h:22
Float_t trackLength
Definition: hgeantwall.h:18