ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
AlfaLocalHit Class Reference

#include <AlfaLocalHits.h>

Inheritance diagram for AlfaLocalHit:
Collaboration diagram for AlfaLocalHit:

Public Member Functions

 AlfaLocalHit ()
 
 AlfaLocalHit (const ALFA_LocRecCorrEvent *LocRecCorrHit)
 
 AlfaLocalHit (const AlfaLocalHit *h)
 
void SetHit (const ALFA_LocRecCorrEvent *LocRecCorrHit)
 
void AssignZ ()
 
int GetPotNum () const
 
float GetX () const
 
float GetY () const
 
float GetZ () const
 
int IsHi () const
 
int GetMDindex (const char *name)
 
TString GetPotName () const
 
TString GetMDname (int i)
 
const ALFA_LocRecCorrEventGetLocRecCorr () const
 
void Print ()
 

Private Attributes

int m_pot = 0
 
TString m_potname
 
int m_ishit = 0
 
Float_t m_x = 0.0F
 
Float_t m_y = 0.0F
 
Float_t m_z = 0.0F
 
const ALFA_LocRecCorrEventm_LocRecCorr = nullptr
 

Detailed Description

Definition at line 32 of file AlfaLocalHits.h.

Constructor & Destructor Documentation

◆ AlfaLocalHit() [1/3]

AlfaLocalHit::AlfaLocalHit ( )

Definition at line 25 of file AlfaLocalHits.cxx.

25  :
26  m_pot (0),
27  m_potname (""),
28  m_ishit (0),
29  m_x (0.0),
30  m_y (0.0),
31  m_z (0.0),
32  m_LocRecCorr (nullptr)
33 {
34 }

◆ AlfaLocalHit() [2/3]

AlfaLocalHit::AlfaLocalHit ( const ALFA_LocRecCorrEvent LocRecCorrHit)

Definition at line 37 of file AlfaLocalHits.cxx.

37  {
38  // explicit constructor
39  SetHit(LocRecCorrHit);
40 }

◆ AlfaLocalHit() [3/3]

AlfaLocalHit::AlfaLocalHit ( const AlfaLocalHit h)

Definition at line 42 of file AlfaLocalHits.cxx.

42  {
43  m_pot = h->GetPotNum();
45  m_ishit = 1;
46  m_x = h->GetX();
47  m_y = h->GetY();
48  m_z = h->GetZ();
49  m_LocRecCorr = h->GetLocRecCorr();
50 }

Member Function Documentation

◆ AssignZ()

void AlfaLocalHit::AssignZ ( )

Definition at line 65 of file AlfaLocalHits.cxx.

65  {
66  if(m_pot < 0) {
67  throw std::runtime_error("AlfaLocalHit::AssignZ() m_pot not assigned");
68  }
69  m_z = 1.e10;
70  if(m_potname.Contains("B7L1U")) m_z = 241528.;
71  if(m_potname.Contains("A7L1U")) m_z = 237388.;
72  if(m_potname.Contains("B7L1L")) m_z = 241538.;
73  if(m_potname.Contains("A7L1L")) m_z = 237398.;
74  if(m_potname.Contains("B7R1U")) m_z = -241548.;
75  if(m_potname.Contains("A7R1U")) m_z = -237408.;
76  if(m_potname.Contains("B7R1L")) m_z = -241538.;
77  if(m_potname.Contains("A7R1L")) m_z = -237398.;
78  if(!(m_z < 1.e10)){
79  throw std::runtime_error("AlfaLocalHit::AssignZ: z coordinate was not assigned for the hit");
80  }
81 }

◆ GetLocRecCorr()

const ALFA_LocRecCorrEvent* AlfaLocalHit::GetLocRecCorr ( ) const
inline

Definition at line 53 of file AlfaLocalHits.h.

53 {return m_LocRecCorr;};

◆ GetMDindex()

int AlfaLocalHit::GetMDindex ( const char *  name)

Definition at line 91 of file AlfaLocalHits.cxx.

91  {
92  TString n(name);
93  if(n.Contains("B7L1U")) return 0;
94  if(n.Contains("B7L1L")) return 1;
95  if(n.Contains("A7L1U")) return 2;
96  if(n.Contains("A7L1L")) return 3;
97  if(n.Contains("A7R1U")) return 4;
98  if(n.Contains("A7R1L")) return 5;
99  if(n.Contains("B7R1U")) return 6;
100  if(n.Contains("B7R1L")) return 7;
101  throw std::runtime_error("AlfaLocalHit::GetMDindex ... Not recognised detector name: " + n);
102 }

◆ GetMDname()

TString AlfaLocalHit::GetMDname ( int  i)

Definition at line 103 of file AlfaLocalHits.cxx.

103  {
104  if(i == 0) return {"B7L1U"};
105  if(i == 1) return {"B7L1L"};
106  if(i == 2) return {"A7L1U"};
107  if(i == 3) return {"A7L1L"};
108  if(i == 4) return {"A7R1U"};
109  if(i == 5) return {"A7R1L"};
110  if(i == 6) return {"B7R1U"};
111  if(i == 7) return {"B7R1L"};
112  throw std::runtime_error("AlfaLocalHit::GetMDname ... Not recognised detector number: " + std::to_string(i));
113 }

◆ GetPotName()

TString AlfaLocalHit::GetPotName ( ) const
inline

Definition at line 51 of file AlfaLocalHits.h.

51 {return m_potname;};

◆ GetPotNum()

int AlfaLocalHit::GetPotNum ( ) const
inline

Definition at line 45 of file AlfaLocalHits.h.

45 {return m_pot;};

◆ GetX()

float AlfaLocalHit::GetX ( ) const
inline

Definition at line 46 of file AlfaLocalHits.h.

46 {return m_x;};

◆ GetY()

float AlfaLocalHit::GetY ( ) const
inline

Definition at line 47 of file AlfaLocalHits.h.

47 {return m_y;};

◆ GetZ()

float AlfaLocalHit::GetZ ( ) const
inline

Definition at line 48 of file AlfaLocalHits.h.

48 {return m_z;};

◆ IsHi()

int AlfaLocalHit::IsHi ( ) const
inline

Definition at line 49 of file AlfaLocalHits.h.

49 {return m_ishit;};

◆ Print()

void AlfaLocalHit::Print ( )

Definition at line 83 of file AlfaLocalHits.cxx.

83  {
84  cout << "pot = " << m_pot
85  << " i.e " << m_potname.Data()
86  << " x = " << m_x
87  << " m_y = " << m_y
88  ;
89 }

◆ SetHit()

void AlfaLocalHit::SetHit ( const ALFA_LocRecCorrEvent LocRecCorrHit)

Definition at line 53 of file AlfaLocalHits.cxx.

53  {
54  m_pot = LocRecCorrHit->getPotNum();
55  //cout << "AlfaLocalHit::SetHit... m_pot = " << m_pot << endl;
57  m_ishit = 1;
58  m_x = LocRecCorrHit->getXpositionLHC();
59  m_y = LocRecCorrHit->getYpositionLHC();
60  m_LocRecCorr = LocRecCorrHit;
61  AssignZ();
62 }

Member Data Documentation

◆ m_ishit

int AlfaLocalHit::m_ishit = 0
private

Definition at line 36 of file AlfaLocalHits.h.

◆ m_LocRecCorr

const ALFA_LocRecCorrEvent* AlfaLocalHit::m_LocRecCorr = nullptr
private

Definition at line 38 of file AlfaLocalHits.h.

◆ m_pot

int AlfaLocalHit::m_pot = 0
private

Definition at line 34 of file AlfaLocalHits.h.

◆ m_potname

TString AlfaLocalHit::m_potname
private

Definition at line 35 of file AlfaLocalHits.h.

◆ m_x

Float_t AlfaLocalHit::m_x = 0.0F
private

Definition at line 37 of file AlfaLocalHits.h.

◆ m_y

Float_t AlfaLocalHit::m_y = 0.0F
private

Definition at line 37 of file AlfaLocalHits.h.

◆ m_z

Float_t AlfaLocalHit::m_z = 0.0F
private

Definition at line 37 of file AlfaLocalHits.h.


The documentation for this class was generated from the following files:
AlfaLocalHit::m_z
Float_t m_z
Definition: AlfaLocalHits.h:37
AlfaLocalHit::m_x
Float_t m_x
Definition: AlfaLocalHits.h:37
ALFA_LocRecCorrEvent::getYpositionLHC
float getYpositionLHC() const
Definition: ALFA_LocRecCorrEvent.h:20
AlfaLocalHit::m_potname
TString m_potname
Definition: AlfaLocalHits.h:35
AlfaLocalHit::m_ishit
int m_ishit
Definition: AlfaLocalHits.h:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
AlfaLocalHit::m_LocRecCorr
const ALFA_LocRecCorrEvent * m_LocRecCorr
Definition: AlfaLocalHits.h:38
beamspotman.n
n
Definition: beamspotman.py:731
AlfaLocalHit::AssignZ
void AssignZ()
Definition: AlfaLocalHits.cxx:65
ALFA_LocRecCorrEvent::getXpositionLHC
float getXpositionLHC() const
Definition: ALFA_LocRecCorrEvent.h:19
AlfaLocalHit::GetMDname
TString GetMDname(int i)
Definition: AlfaLocalHits.cxx:103
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
ALFA_LocRecCorrEvent::getPotNum
int getPotNum() const
Definition: ALFA_LocRecCorrEvent.h:18
h
AlfaLocalHit::SetHit
void SetHit(const ALFA_LocRecCorrEvent *LocRecCorrHit)
Definition: AlfaLocalHits.cxx:53
AlfaLocalHit::m_pot
int m_pot
Definition: AlfaLocalHits.h:34
AlfaLocalHit::m_y
Float_t m_y
Definition: AlfaLocalHits.h:37