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

#include <TRTParametersForBarrelHits.h>

Collaboration diagram for TRTParametersForBarrelHits:

Public Member Functions

 TRTParametersForBarrelHits (TRTProcessingOfBarrelHits *)
 
 ~TRTParametersForBarrelHits ()
 

Private Member Functions

void DefineParameters () const
 
void PrintParameters () const
 

Private Attributes

int m_printMessages
 
const TRTParameters * m_pParameters
 
TRTProcessingOfBarrelHitsm_pProcessingOfBarrelHits
 
int m_verboseLevel
 

Detailed Description

Definition at line 13 of file TRTParametersForBarrelHits.h.

Constructor & Destructor Documentation

◆ TRTParametersForBarrelHits()

TRTParametersForBarrelHits::TRTParametersForBarrelHits ( TRTProcessingOfBarrelHits pProcessing)

Definition at line 23 of file TRTParametersForBarrelHits.cxx.

24  : m_pProcessingOfBarrelHits(pProcessing),
25  m_verboseLevel(pProcessing->m_verboseLevel)
26 {
27  m_pParameters = TRTParameters::GetPointer();
28 
29  m_printMessages = m_pParameters->GetInteger("PrintMessages"); //FIXME not used
30 
31  if (m_verboseLevel>5) { G4cout << "##### Constructor TRTParametersForBarrelHits" << G4endl; }
32 
33  this->DefineParameters();
34 
35  if (m_pParameters->GetInteger("PrintParametersForBarrelHits"))
36  this->PrintParameters();
37 
38  if (m_verboseLevel>5) { G4cout << "##### Constructor TRTParametersForBarrelHits done" << G4endl; }
39 }

◆ ~TRTParametersForBarrelHits()

TRTParametersForBarrelHits::~TRTParametersForBarrelHits ( )

Definition at line 44 of file TRTParametersForBarrelHits.cxx.

45 {
46  if (m_verboseLevel>5) { G4cout << "##### Destructor TRTParametersForBarrelHits" << G4endl; }
47  if (m_verboseLevel>5) { G4cout << "##### Destructor TRTParametersForBarrelHits done" << G4endl; }
48 }

Member Function Documentation

◆ DefineParameters()

void TRTParametersForBarrelHits::DefineParameters ( ) const
private

Definition at line 53 of file TRTParametersForBarrelHits.cxx.

54 {
55  if (m_verboseLevel>5) { G4cout << "######### Method TRTParametersForBarrelHits::DefineParameters" << G4endl; }
56 
57  // Number of straw layers A, B, C:
58  int numberOfStrawLayersA =
59  m_pParameters->GetInteger("NumberOfStrawLayersA");
60  int numberOfStrawLayersB =
61  m_pParameters->GetInteger("NumberOfStrawLayersB");
62  int numberOfStrawLayersC =
63  m_pParameters->GetInteger("NumberOfStrawLayersC");
64 
65  // Integral distribution of straws A:
66  int* numberOfStrawsInLayersA = new int[numberOfStrawLayersA];
67  m_pParameters->GetIntegerArray("NumberOfStrawsInLayersA", numberOfStrawLayersA,
68  numberOfStrawsInLayersA);
69 
70  int* integralDistributionOfStrawsA = new int[numberOfStrawLayersA];
71  integralDistributionOfStrawsA[0] = numberOfStrawsInLayersA[0];
72  int i;
73  for (i = 1; i < numberOfStrawLayersA; ++i)
74  integralDistributionOfStrawsA[i] = integralDistributionOfStrawsA[i - 1] +
75  numberOfStrawsInLayersA[i];
76 
77  for (i = 0; i < numberOfStrawLayersA; ++i)
79  integralDistributionOfStrawsA[i];
80 
81  delete [] numberOfStrawsInLayersA;
82 
83  // Integral distribution of straws B:
84  int* numberOfStrawsInLayersB = new int[numberOfStrawLayersB];
85  m_pParameters->GetIntegerArray("NumberOfStrawsInLayersB", numberOfStrawLayersB,
86  numberOfStrawsInLayersB);
87 
88  int* integralDistributionOfStrawsB = new int[numberOfStrawLayersB];
89  integralDistributionOfStrawsB[0] = numberOfStrawsInLayersB[0];
90  for (i = 1; i < numberOfStrawLayersB; ++i)
91  integralDistributionOfStrawsB[i] = integralDistributionOfStrawsB[i - 1] +
92  numberOfStrawsInLayersB[i];
93 
94  for (i = 0; i < numberOfStrawLayersB; ++i)
96  integralDistributionOfStrawsB[i];
97 
98  delete [] numberOfStrawsInLayersB;
99 
100  // Integral distribution of straws C:
101  int* numberOfStrawsInLayersC = new int[numberOfStrawLayersC];
102  m_pParameters->GetIntegerArray("NumberOfStrawsInLayersC", numberOfStrawLayersC,
103  numberOfStrawsInLayersC);
104 
105  int* integralDistributionOfStrawsC = new int[numberOfStrawLayersC];
106  integralDistributionOfStrawsC[0] = numberOfStrawsInLayersC[0];
107  for (i = 1; i < numberOfStrawLayersC; ++i)
108  integralDistributionOfStrawsC[i] = integralDistributionOfStrawsC[i - 1] +
109  numberOfStrawsInLayersC[i];
110 
111  for (i = 0; i < numberOfStrawLayersC; ++i)
113  integralDistributionOfStrawsC[i];
114 
115  delete [] numberOfStrawsInLayersC;
116 
117  if (m_pParameters->GetInteger("BarrelIdentifier") == 2)
118  {
119  // Arrays strawIDToLayerID for modules A, B, C:
120  int layerID = 0;
122  {
123  if (i + 1 > integralDistributionOfStrawsA[layerID])
124  ++layerID;
126  }
127 
128  layerID = 0;
130  {
131  if (i + 1 > integralDistributionOfStrawsB[layerID])
132  ++layerID;
134  }
135 
136  layerID = 0;
138  {
139  if (i + 1 > integralDistributionOfStrawsC[layerID])
140  ++layerID;
142  }
143  }
144 
145  delete [] integralDistributionOfStrawsA;
146  delete [] integralDistributionOfStrawsB;
147  delete [] integralDistributionOfStrawsC;
148 
149 
150  if (m_verboseLevel>5) { G4cout << "######### Method TRTParametersForBarrelHits::DefineParameters done" << G4endl; }
151 
152 }

◆ PrintParameters()

void TRTParametersForBarrelHits::PrintParameters ( ) const
private

Definition at line 157 of file TRTParametersForBarrelHits.cxx.

158 {
159 
160  if (m_verboseLevel>5) { G4cout << "######### Method TRTParametersForBarrelHits::PrintParameters" << G4endl; }
161 
162  TRTOutputFile* pOutputFile = TRTOutputFile::GetPointer();
163 
164  std::ofstream& output = pOutputFile->GetReference();
165 
166  output << std::endl;
167  output << "***** TRTParametersForBarrelHits::PrintParameters *****"
168  << std::endl;
169 
170  output << "Parameters of barrel straws:" << std::endl;
171 
172  if (m_pParameters->GetInteger("BarrelIdentifier") == 2)
173  {
174  int numberOfStrawsA = m_pProcessingOfBarrelHits->m_numberOfStrawsA;
175  int numberOfStrawsB = m_pProcessingOfBarrelHits->m_numberOfStrawsB;
176  int numberOfStrawsC = m_pProcessingOfBarrelHits->m_numberOfStrawsC;
177 
178  output << " numberOfStrawsA=" << numberOfStrawsA << std::endl;
179  output << " numberOfStrawsB=" << numberOfStrawsB << std::endl;
180  output << " numberOfStrawsC=" << numberOfStrawsC << std::endl;
181  }
182 
183 
184  int numberOfStrawLayersA = m_pProcessingOfBarrelHits->m_numberOfStrawLayersA;
185  int numberOfStrawLayersB = m_pProcessingOfBarrelHits->m_numberOfStrawLayersB;
186  int numberOfStrawLayersC = m_pProcessingOfBarrelHits->m_numberOfStrawLayersC;
187 
188  output << " numberOfStrawLayersA=" << numberOfStrawLayersA << std::endl;
189  output << " numberOfStrawLayersB=" << numberOfStrawLayersB << std::endl;
190  output << " numberOfStrawLayersC=" << numberOfStrawLayersC << std::endl;
191 
192  output << std::endl << "Integral distributions of straws in layers:"
193  << std::endl;
194 
195  int i;
196  for (i = 0; i < numberOfStrawLayersA; ++i)
197  output << " integralDistributionOfStrawsA[" << i << "]="
199  << std::endl;
200  output << std::endl;
201 
202  for (i = 0; i < numberOfStrawLayersB; ++i)
203  output << " integralDistributionOfStrawsB[" << i << "]="
205  << std::endl;
206  output << std::endl;
207 
208  for (i = 0; i < numberOfStrawLayersC; ++i)
209  output << " integralDistributionOfStrawsC[" << i << "]="
211  << std::endl;
212 
213  if ((m_pParameters->GetInteger("BarrelIdentifier") == 2) &&
214  m_pParameters->GetInteger("PrintParametersForBarrelHits") == 2)
215  {
216  output << std::endl << "Arrays barrel straw ID to layer ID:" << std::endl;
217 
218  int numberOfStrawsA = m_pProcessingOfBarrelHits->m_numberOfStrawsA;
219  int numberOfStrawsB = m_pProcessingOfBarrelHits->m_numberOfStrawsB;
220  int numberOfStrawsC = m_pProcessingOfBarrelHits->m_numberOfStrawsC;
221 
222  int i;
223  for (i = 0; i < numberOfStrawsA; ++i)
224  output << " strawIDToLayerIDA[" << i << "]="
226  output << std::endl;
227 
228  for (i = 0; i < numberOfStrawsB; ++i)
229  output << " strawIDToLayerIDB[" << i << "]="
231  output << std::endl;
232 
233  for (i = 0; i < numberOfStrawsC; ++i)
234  output << " strawIDToLayerIDC[" << i << "]="
236  }
237 
238  output << std::endl;
239 
240  if (m_verboseLevel>5) { G4cout << "######### Method TRTParametersForBarrelHits::PrintParameters done" << G4endl; }
241 }

Member Data Documentation

◆ m_pParameters

const TRTParameters* TRTParametersForBarrelHits::m_pParameters
private

Definition at line 25 of file TRTParametersForBarrelHits.h.

◆ m_pProcessingOfBarrelHits

TRTProcessingOfBarrelHits* TRTParametersForBarrelHits::m_pProcessingOfBarrelHits
private

Definition at line 26 of file TRTParametersForBarrelHits.h.

◆ m_printMessages

int TRTParametersForBarrelHits::m_printMessages
private

Definition at line 23 of file TRTParametersForBarrelHits.h.

◆ m_verboseLevel

int TRTParametersForBarrelHits::m_verboseLevel
private

Definition at line 28 of file TRTParametersForBarrelHits.h.


The documentation for this class was generated from the following files:
TRTProcessingOfBarrelHits::m_integralDistributionOfStrawsB
int * m_integralDistributionOfStrawsB
Definition: TRTProcessingOfBarrelHits.h:47
TRTProcessingOfBarrelHits::m_numberOfStrawsC
int m_numberOfStrawsC
Definition: TRTProcessingOfBarrelHits.h:44
TRTProcessingOfBarrelHits::m_numberOfStrawLayersA
int m_numberOfStrawLayersA
Definition: TRTProcessingOfBarrelHits.h:38
TRTProcessingOfBarrelHits::m_integralDistributionOfStrawsC
int * m_integralDistributionOfStrawsC
Definition: TRTProcessingOfBarrelHits.h:48
TRTProcessingOfBarrelHits::m_strawIDToLayerIDB
int * m_strawIDToLayerIDB
Definition: TRTProcessingOfBarrelHits.h:51
TRTParametersForBarrelHits::m_verboseLevel
int m_verboseLevel
Definition: TRTParametersForBarrelHits.h:28
TRTProcessingOfBarrelHits::m_numberOfStrawsA
int m_numberOfStrawsA
Definition: TRTProcessingOfBarrelHits.h:42
TRTParametersForBarrelHits::m_printMessages
int m_printMessages
Definition: TRTParametersForBarrelHits.h:23
TRTProcessingOfBarrelHits::m_numberOfStrawLayersC
int m_numberOfStrawLayersC
Definition: TRTProcessingOfBarrelHits.h:40
TRTParametersForBarrelHits::m_pProcessingOfBarrelHits
TRTProcessingOfBarrelHits * m_pProcessingOfBarrelHits
Definition: TRTParametersForBarrelHits.h:26
lumiFormat.i
int i
Definition: lumiFormat.py:85
TRTProcessingOfBarrelHits::m_strawIDToLayerIDA
int * m_strawIDToLayerIDA
Definition: TRTProcessingOfBarrelHits.h:50
TRTProcessingOfBarrelHits::m_numberOfStrawLayersB
int m_numberOfStrawLayersB
Definition: TRTProcessingOfBarrelHits.h:39
TRTProcessingOfBarrelHits::m_numberOfStrawsB
int m_numberOfStrawsB
Definition: TRTProcessingOfBarrelHits.h:43
merge.output
output
Definition: merge.py:17
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
TRTParametersForBarrelHits::DefineParameters
void DefineParameters() const
Definition: TRTParametersForBarrelHits.cxx:53
TRTParametersForBarrelHits::m_pParameters
const TRTParameters * m_pParameters
Definition: TRTParametersForBarrelHits.h:25
TRTProcessingOfBarrelHits::m_integralDistributionOfStrawsA
int * m_integralDistributionOfStrawsA
Definition: TRTProcessingOfBarrelHits.h:46
TRTProcessingOfBarrelHits::m_verboseLevel
int m_verboseLevel
Definition: TRTProcessingOfBarrelHits.h:57
TRTParametersForBarrelHits::PrintParameters
void PrintParameters() const
Definition: TRTParametersForBarrelHits.cxx:157
TRTProcessingOfBarrelHits::m_strawIDToLayerIDC
int * m_strawIDToLayerIDC
Definition: TRTProcessingOfBarrelHits.h:52