HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hgeantemc.h
Go to the documentation of this file.
1 //*************************************************************************
2 //
3 // HGeantEmc
4 //
5 // GEANT EMC hit data
6 //
7 //
8 //*************************************************************************
9 #ifndef HGEANTEMC_H
10 #define HGEANTEMC_H
11 
12 #include "hlinkeddataobject.h"
13 
14 class HGeantEmc : public HLinkedDataObject {
15 private:
16  Int_t trackNumber; // GEANT track number
17  Float_t trackLength; // track length (in mm)
18  Float_t peHit; // number of photo electrons
19  Float_t xHit; // x of hit along crystal (in mm)
20  Float_t yHit; // y of hit along crystal (in mm)
21  Float_t zHit; // z of hit along crystal (in mm)
22  Float_t tofHit; // time of flight of hit (in ns)
23  Float_t momHit; // total momentum of hitting particle (in MeV/c)
24  Char_t sector; // sector number (0...5)
25  UChar_t cell; // crystal index (0...248 for standard geometry)
26 public:
27  HGeantEmc(void);
28 // HGeantEmc(HGeantEmc &aEmc);
29  ~HGeantEmc(void) {}
30  void setTrack(Int_t aTrack) {trackNumber = aTrack;}
31  void setHit(Float_t ae, Float_t ax, Float_t ay, Float_t az, Float_t atof, Float_t amom, Float_t alen);
32  inline void setAddress (Int_t s, Int_t c);
33  Int_t getTrack(void) {return trackNumber;}
34  void getHit(Float_t& ae, Float_t& ax, Float_t& ay, Float_t& az, Float_t& atof, Float_t& amom, Float_t& alen);
35  Int_t getSector(void) {return sector;}
36  Int_t getCell(void) {return cell;}
37  Int_t getNLocationIndex(void) {return 2;}
38  inline Int_t getLocationIndex(Int_t i);
39 
40  ClassDef(HGeantEmc,1) // GEANT EMC hit data class
41 };
42 
43 inline void HGeantEmc::setAddress(Int_t s, Int_t c) {
44  sector = s;
45  cell = c;
46 }
47 
48 inline Int_t HGeantEmc::getLocationIndex(Int_t i) {
49  switch (i) {
50  case 0 : return sector;
51  case 1 : return cell;
52  }
53  return -1;
54 }
55 
56 
57 #endif /*! HGEANTEMC_H */
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
~HGeantEmc(void)
Definition: hgeantemc.h:29
Char_t sector
Definition: hgeantemc.h:24
HGeantEmc(void)
Float_t momHit
Definition: hgeantemc.h:23
Float_t yHit
Definition: hgeantemc.h:20
Int_t getSector(void)
Definition: hgeantemc.h:35
Float_t zHit
Definition: hgeantemc.h:21
Int_t trackNumber
Definition: hgeantemc.h:16
Float_t trackLength
Definition: hgeantemc.h:17
Int_t getLocationIndex(Int_t i)
Definition: hgeantemc.h:48
void setAddress(Int_t s, Int_t c)
Definition: hgeantemc.h:43
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
Int_t getNLocationIndex(void)
Definition: hgeantemc.h:37
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
void setTrack(Int_t aTrack)
Definition: hgeantemc.h:30
UChar_t cell
Definition: hgeantemc.h:25
Int_t getTrack(void)
Definition: hgeantemc.h:33
Int_t getCell(void)
Definition: hgeantemc.h:36
Float_t peHit
Definition: hgeantemc.h:18
Float_t xHit
Definition: hgeantemc.h:19