ATLAS Offline Software
LArTBLeakHit.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //=================================================
6 // LArTBLeakHit class
7 //
8 // information stored
9 // - energy deposition in the leakege detector
10 // - hit position
11 // - store the particle types, kinetic and total energies
12 // - leakage direction
13 //=================================================
14 
15 #ifndef LArTBLeakHit_h
16 #define LArTBLeakHit_h 1
17 #include "CLHEP/Vector/ThreeVector.h"
18 #include <vector>
20 {
21  public:
23  LArTBLeakHit(int d){m_dir = d;};
24  LArTBLeakHit(int dir, int pcode, float ekin, float etot);
25  LArTBLeakHit(const LArTBLeakHit &right);
26 // ~LArTBLeakHit(){;};
27 
28  const LArTBLeakHit& operator=(const LArTBLeakHit &right);
29  int operator==(const LArTBLeakHit &right);
30 // inline void *operator new(size_t, void* aHit = 0);
31 // inline void operator delete(void *aHit);
32 
33  void Draw(){;};
34  void Print(){;};
35 
36 //Set- Get- methods
37  // energy deposit
38  inline void SetEkin(double ed) { m_ekin = ed; }
39  inline void AddEkin(double ed) { m_ekin += ed; }
40  inline double GetEkin() { return m_ekin; }
41  inline void SetEtot(double ed) { m_etot = ed; }
42  inline void AddEtot(double ed) { m_etot += ed; }
43  inline double GetEtot() { return m_etot; }
44 
45  // particle code
46  inline void SetCode(int cod) { m_pcode = cod; }
47  inline int GetCode() { return m_pcode; }
48 
49  // position
50  inline void SetPos(const CLHEP::Hep3Vector& p) { m_pos = p; }
51  inline CLHEP::Hep3Vector GetPos() { return m_pos; }
52 
53  // leakage direction
54  inline void SetDir(int d) { m_dir = d; }
55  inline int GetDir() { return m_dir; }
56 
57  private:
58  double m_ekin; // kinetic energy of stopped particle
59  double m_etot; // total energy -"-
60  int m_pcode; // particle code, special codes for: deuterium 9001
61  // tritium 9002
62  // alpha 9003
63  // He3 9004
64  CLHEP::Hep3Vector m_pos; // absolute position of hit
65  int m_dir; // leakage direction encoding
66  // 1,2 EMEC x<0, x>0
67  // 3 EMEC down
68  // 4,5 EMEC back -"-
69  // 6,7 HEC1 -"-
70  // 8 HEC1 down
71  // 9,10 HEC1 back -"-
72  // 11,12 HEC2 -"-
73  // 13 HEC2 down
74  // 14 HEC2 back
75 };
76 
77 typedef std::vector<LArTBLeakHit> LArTBLeakHitsCollection;
78 
79 // extern G4Allocator<LArTBLeakHit> LArTBLeakHitAllocator;
80 
81 /*
82 inline void* LArTBLeakHit::operator new(size_t, void* aHit)
83 {
84 // void *aHit;
85  aHit = (void*) LArTBLeakHitAllocator.MallocSingle();
86  return aHit;
87 }
88 
89 inline void LArTBLeakHit::operator delete(void *aHit)
90 {
91  LArTBLeakHitAllocator.FreeSingle( (LArTBLeakHit*) aHit);
92 }
93 */
94 #endif
LArTBLeakHit::AddEtot
void AddEtot(double ed)
Definition: LArTBLeakHit.h:42
LArTBLeakHit
Definition: LArTBLeakHit.h:20
LArTBLeakHit::GetPos
CLHEP::Hep3Vector GetPos()
Definition: LArTBLeakHit.h:51
LArTBLeakHit::SetPos
void SetPos(const CLHEP::Hep3Vector &p)
Definition: LArTBLeakHit.h:50
LArTBLeakHit::LArTBLeakHit
LArTBLeakHit()
Definition: LArTBLeakHit.h:22
LArTBLeakHit::SetEtot
void SetEtot(double ed)
Definition: LArTBLeakHit.h:41
LArTBLeakHit::Print
void Print()
Definition: LArTBLeakHit.h:34
hist_file_dump.d
d
Definition: hist_file_dump.py:137
LArTBLeakHit::SetEkin
void SetEkin(double ed)
Definition: LArTBLeakHit.h:38
LArTBLeakHit::LArTBLeakHit
LArTBLeakHit(int d)
Definition: LArTBLeakHit.h:23
LArTBLeakHit::operator=
const LArTBLeakHit & operator=(const LArTBLeakHit &right)
LArTBLeakHit::AddEkin
void AddEkin(double ed)
Definition: LArTBLeakHit.h:39
LArTBLeakHit::SetCode
void SetCode(int cod)
Definition: LArTBLeakHit.h:46
LArTBLeakHit::m_ekin
double m_ekin
Definition: LArTBLeakHit.h:58
LArTBLeakHit::operator==
int operator==(const LArTBLeakHit &right)
LArTBLeakHit::GetEkin
double GetEkin()
Definition: LArTBLeakHit.h:40
LArTBLeakHit::m_pcode
int m_pcode
Definition: LArTBLeakHit.h:60
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LArTBLeakHit::LArTBLeakHit
LArTBLeakHit(const LArTBLeakHit &right)
LArTBLeakHit::GetEtot
double GetEtot()
Definition: LArTBLeakHit.h:43
LArTBLeakHit::SetDir
void SetDir(int d)
Definition: LArTBLeakHit.h:54
LArTBLeakHit::GetCode
int GetCode()
Definition: LArTBLeakHit.h:47
beamspotman.dir
string dir
Definition: beamspotman.py:623
LArTBLeakHit::GetDir
int GetDir()
Definition: LArTBLeakHit.h:55
LArTBLeakHit::Draw
void Draw()
Definition: LArTBLeakHit.h:33
LArTBLeakHit::LArTBLeakHit
LArTBLeakHit(int dir, int pcode, float ekin, float etot)
LArTBLeakHit::m_dir
int m_dir
Definition: LArTBLeakHit.h:65
LArTBLeakHit::m_etot
double m_etot
Definition: LArTBLeakHit.h:59
LArTBLeakHit::m_pos
CLHEP::Hep3Vector m_pos
Definition: LArTBLeakHit.h:64
LArTBLeakHitsCollection
std::vector< LArTBLeakHit > LArTBLeakHitsCollection
Definition: LArTBLeakHit.h:77