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

Standard tool to convert the GPU data representation back to CPU. More...

#include <BasicGPUToAthenaImporter.h>

Inheritance diagram for BasicGPUToAthenaImporter:
Collaboration diagram for BasicGPUToAthenaImporter:

Public Member Functions

 BasicGPUToAthenaImporter (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override
 
virtual StatusCode convert (const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, xAOD::CaloClusterContainer *cluster_collection) const override
 
virtual StatusCode finalize () override
 
virtual ~BasicGPUToAthenaImporter ()=default
 

Protected Member Functions

void record_times (const size_t event_num, const std::vector< size_t > &times) const
 
template<class ... Args>
void record_times (const size_t event_num, const size_t &value) const
 
template<class ... Args>
void record_times (const size_t event_num, const size_t &value, Args &&... args) const
 
void print_times (const std::string &header, const size_t time_size) const
 

Protected Attributes

std::shared_mutex m_timeMutex
 Mutex that is locked when recording times. More...
 
std::vector< size_t > m_times ATLAS_THREAD_SAFE
 Vector to hold execution times to be recorded if necessary. More...
 
std::vector< size_t > m_eventNumbers ATLAS_THREAD_SAFE
 Vector to hold the event numbers to be recorded if necessary. More...
 
Gaudi::Property< bool > m_measureTimes
 If true, times are recorded to the file given by m_timeFileName. More...
 
Gaudi::Property< std::string > m_timeFileName
 File to which times should be saved. More...
 

Private Member Functions

void record_times_helper (const size_t) const
 
template<class Arg >
void record_times_helper (const size_t index, Arg &&arg) const
 
template<class ... Args>
void record_times_helper (size_t index, Args &&... args) const
 

Private Attributes

Gaudi::Property< bool > m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"}
 If true, do not delete the GPU data representation. More...
 
Gaudi::Property< bool > m_useCPUPropertiesCalculation {this, "UseCPUClusterPropertiesCalculation", false, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"}
 if set to true, cluster properties are (re-)calculated using CaloClusterKineHelper::calculateKine. More...
 
SG::ReadHandleKey< CaloCellContainerm_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"}
 vector of names of the cell containers to use as input. More...
 
Gaudi::Property< std::string > m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"}
 Cluster size. Should be set accordingly to the threshold. More...
 
xAOD::CaloCluster::ClusterSize m_clusterSize
 
Gaudi::Property< std::vector< int > > m_missingCellsToFill {this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."}
 Cell indices to fill as disabled cells (useful if the cell vector is always missing the same cells). More...
 
const CaloCell_IDm_calo_id {nullptr}
 Pointer to Calo ID Helper. More...
 
Gaudi::Property< bool > m_saveUncalibrated {this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"}
 if set to true, the uncalibrated state is saved when importing the clusters. More...
 

Detailed Description

Standard tool to convert the GPU data representation back to CPU.

Author
Nuno Fernandes nuno..nosp@m.dos..nosp@m.santo.nosp@m.s.fe.nosp@m.rnand.nosp@m.es@c.nosp@m.ern.c.nosp@m.h
Date
30 May 2022

Definition at line 29 of file BasicGPUToAthenaImporter.h.

Constructor & Destructor Documentation

◆ BasicGPUToAthenaImporter()

BasicGPUToAthenaImporter::BasicGPUToAthenaImporter ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 25 of file BasicGPUToAthenaImporter.cxx.

25  :
26  base_class(type, name, parent),
27  CaloGPUTimed(this)
28 {
29 }

◆ ~BasicGPUToAthenaImporter()

virtual BasicGPUToAthenaImporter::~BasicGPUToAthenaImporter ( )
virtualdefault

Member Function Documentation

◆ convert()

StatusCode BasicGPUToAthenaImporter::convert ( const EventContext &  ctx,
const CaloRecGPU::ConstantDataHolder constant_data,
CaloRecGPU::EventDataHolder event_data,
xAOD::CaloClusterContainer cluster_collection 
) const
overridevirtual

Definition at line 90 of file BasicGPUToAthenaImporter.cxx.

94 {
95 
96 
97  using clock_type = boost::chrono::thread_clock;
98  auto time_cast = [](const auto & before, const auto & after)
99  {
100  return boost::chrono::duration_cast<boost::chrono::microseconds>(after - before).count();
101  };
102 
103  const auto start = clock_type::now();
104 
105  SG::ReadHandle<CaloCellContainer> cell_collection(m_cellsKey, ctx);
106  if ( !cell_collection.isValid() )
107  {
108  ATH_MSG_ERROR( " Cannot retrieve CaloCellContainer: " << cell_collection.name() );
109  return StatusCode::FAILURE;
110  }
111  const DataLink<CaloCellContainer> cell_collection_link (cell_collection.name(), ctx);
112 
113  ed.returnToCPU(!m_keepGPUData, true, true, false);
114 
115  const auto after_send = clock_type::now();
116 
117  std::vector<std::unique_ptr<CaloClusterCellLink>> cell_links;
118 
119  cell_links.reserve(ed.m_clusters->number);
120 
121  for (int i = 0; i < ed.m_clusters->number; ++i)
122  {
123  if (ed.m_clusters->seedCellID[i] >= 0)
124  {
125  cell_links.emplace_back(std::make_unique<CaloClusterCellLink>(cell_collection_link));
126  cell_links.back()->reserve(256);
127  //To be adjusted.
128  }
129  else
130  {
131  cell_links.emplace_back(nullptr);
132  //The excluded clusters don't have any cells.
133  }
134  }
135 
136  const auto after_creation = clock_type::now();
137 
138 
139  //cell_index is the actual cell index in the full set of cells (identifier hash)
140  //cell_count is the cell position in the cell collection (what we want for the weight)
141  const auto process_cell = [&](const int cell_index, const int cell_count)
142  {
143  const ClusterTag this_tag = ed.m_cell_state->clusterTag[cell_index];
144  if (this_tag.is_part_of_cluster())
145  {
146  const int this_index = this_tag.cluster_index();
147  const int32_t weight_pattern = this_tag.secondary_cluster_weight();
148 
149  float tempf = 1.0f;
150 
151  std::memcpy(&tempf, &weight_pattern, sizeof(float));
152  //C++20 would give us bit cast to do this more properly.
153  //Still, given how the bit pattern is created,
154  //it should be safe.
155 
156  const float reverse_weight = tempf;
157 
158  const float this_weight = 1.0f - reverse_weight;
159 
160  if (cell_links[this_index])
161  {
162  cell_links[this_index]->addCell(cell_count, this_weight);
163 
164  if (cell_index == ed.m_clusters->seedCellID[this_index] && cell_links[this_index]->size() > 1)
165  //Seed cells aren't shared,
166  //so no need to check this on the other case.
167  {
168  CaloClusterCellLink::iterator begin_it = cell_links[this_index]->begin();
169  CaloClusterCellLink::iterator back_it = std::prev(cell_links[this_index]->end());
170 
171  const unsigned int first_idx = begin_it.index();
172  const double first_wgt = begin_it.weight();
173 
174  begin_it.reindex(back_it.index());
175  begin_it.reweight(back_it.weight());
176 
177  back_it.reindex(first_idx);
178  back_it.reweight(first_wgt);
179 
180  //Of course, this is to ensure the first cell is the seed cell,
181  //in accordance to the way some cluster properties
182  //(mostly phi-related) are calculated.
183  }
184  }
185 
186  if (this_tag.is_shared_between_clusters())
187  {
188  const int other_index = this_tag.secondary_cluster_index();
189  if (cell_links[other_index])
190  {
191  cell_links[other_index]->addCell(cell_count, reverse_weight);
192  }
193  }
194  }
195  };
196 
197  if (cell_collection->isOrderedAndComplete())
198  //Fast path: cell indices within the collection and identifierHashes match!
199  {
200  for (int cell_index = 0; cell_index < NCaloCells; ++cell_index)
201  {
202  process_cell(cell_index, cell_index);
203  }
204  }
205  else if (cell_collection->isOrdered() && m_missingCellsToFill.size() > 0)
206  {
207  size_t missing_cell_count = 0;
208  for (int cell_index = 0; cell_index < NCaloCells; ++cell_index)
209  {
210  if (missing_cell_count < m_missingCellsToFill.size() && cell_index == m_missingCellsToFill[missing_cell_count])
211  {
212  ++missing_cell_count;
213  continue;
214  }
215  process_cell(cell_index, cell_index - missing_cell_count);
216  }
217  }
218  else
219  //Slow path: be careful.
220  {
221  CaloCellContainer::const_iterator iCells = cell_collection->begin();
222 
223  for (int cell_count = 0; iCells != cell_collection->end(); ++iCells, ++cell_count)
224  {
225  const CaloCell * cell = (*iCells);
226 
227  //const int cell_index = m_calo_id->calo_cell_hash(cell->ID());
228  const int cell_index = cell->caloDDE()->calo_hash();
229 
230  process_cell(cell_index, cell_count);
231  }
232  }
233  const auto after_cells = clock_type::now();
234 
235  std::vector<int> cluster_order(ed.m_clusters->number);
236 
237  std::iota(cluster_order.begin(), cluster_order.end(), 0);
238 
239  std::sort(cluster_order.begin(), cluster_order.end(), [&](const int a, const int b) -> bool
240  {
241  const bool a_valid = ed.m_clusters->seedCellID[a] >= 0;
242  const bool b_valid = ed.m_clusters->seedCellID[b] >= 0;
243  if (a_valid && b_valid)
244  {
245  return ed.m_clusters->clusterEt[a]
246  > ed.m_clusters->clusterEt[b];
247  }
248  else if (a_valid)
249  {
250  return true;
251  }
252  else if (b_valid)
253  {
254  return false;
255  }
256  else
257  {
258  return b > a;
259  }
260  } );
261 
262  //Ordered by Et as in the default algorithm...
263  //The fact that some invalid clusters
264  //(with possibly trash values for Et)
265  //can crop up is irrelevant since
266  //we don't add those anyway:
267  //the rest is still ordered like we want it to be.
268 
269  const auto after_sort = clock_type::now();
270 
271  cluster_container->clear();
272  cluster_container->reserve(cell_links.size());
273 
274  for (size_t i = 0; i < cluster_order.size(); ++i)
275  {
276  const int cluster_index = cluster_order[i];
277 
278  if (cell_links[cluster_index] != nullptr && cell_links[cluster_index]->size() > 0)
279  {
280  xAOD::CaloCluster * cluster = new xAOD::CaloCluster();
281  cluster_container->push_back(cluster);
282 
283  cluster->addCellLink(cell_links[cluster_index].release());
284  cluster->setClusterSize(m_clusterSize);
286  {
287  CaloClusterKineHelper::calculateKine(cluster, false, true, true);
288  }
289  else
290  {
291  cluster->setE(ed.m_clusters->clusterEnergy[cluster_index]);
292  cluster->setEta(ed.m_clusters->clusterEta[cluster_index]);
293  cluster->setPhi(ed.m_clusters->clusterPhi[cluster_index]);
294  }
295 
296  if (m_saveUncalibrated)
297  {
298  cluster->setRawE(cluster->calE());
299  cluster->setRawEta(cluster->calEta());
300  cluster->setRawPhi(cluster->calPhi());
301  cluster->setRawM(cluster->calM());
302  }
303 
304  }
305 
306  }
307 
308  const auto after_fill = clock_type::now();
309 
310  if (m_measureTimes)
311  {
312  record_times(ctx.evt(), time_cast(start, after_send),
313  time_cast(after_send, after_creation),
314  time_cast(after_creation, after_cells),
315  time_cast(after_cells, after_sort),
316  time_cast(after_sort, after_fill)
317  );
318  }
319 
320  return StatusCode::SUCCESS;
321 
322 }

◆ finalize()

StatusCode BasicGPUToAthenaImporter::finalize ( )
overridevirtual

Definition at line 325 of file BasicGPUToAthenaImporter.cxx.

326 {
327 
328  if (m_measureTimes)
329  {
330  print_times("Transfer_from_GPU Cluster_Creation Cell_Adding Sorting Collection_Filling", 5);
331  }
332  return StatusCode::SUCCESS;
333 }

◆ initialize()

StatusCode BasicGPUToAthenaImporter::initialize ( )
overridevirtual

Definition at line 33 of file BasicGPUToAthenaImporter.cxx.

34 {
36 
37  ATH_CHECK( detStore()->retrieve(m_calo_id, "CaloCell_ID") );
38 
39  auto get_option_from_string = [](const std::string & str, bool & failed)
40  {
41  failed = false;
44  SW_55ele,
45  SW_35ele,
46  SW_37ele,
47  SW_55gam,
48  SW_35gam,
49  SW_37gam,
50  SW_55Econv,
51  SW_35Econv,
52  SW_37Econv,
53  SW_softe,
54  Topo_420,
55  Topo_633,
56  SW_7_11,
57  SuperCluster,
58  Tower_01_01,
59  Tower_005_005,
60  Tower_fixed_area
61  )
62  )
63  //I know Topological Clustering only supports a subset of those,
64  //but this is supposed to be a general data exporting tool...
65  else
66  {
67  //failed = true;
69  }
70  };
71 
72  bool size_failed = false;
73  m_clusterSize = get_option_from_string(m_clusterSizeString, size_failed);
74 
76  {
77  ATH_MSG_ERROR("Invalid Cluster Size: " << m_clusterSizeString);
78  }
79 
80  if (size_failed)
81  {
82  return StatusCode::FAILURE;
83  }
84 
85  return StatusCode::SUCCESS;
86 }

◆ print_times()

void CaloGPUTimed::print_times ( const std::string &  header,
const size_t  time_size 
) const
inlineprotectedinherited

Definition at line 143 of file CaloGPUTimed.h.

144  {
145  std::shared_lock<std::shared_mutex> lock(m_timeMutex);
146 
147  if (m_timeFileName.size() == 0)
148  {
149  return;
150  }
151 
152  std::vector<size_t> indices(m_eventNumbers.size());
153 
154  std::iota(indices.begin(), indices.end(), 0);
155  std::sort(indices.begin(), indices.end(), [&](size_t a, size_t b)
156  {
157  return m_eventNumbers[a] < m_eventNumbers[b];
158  }
159  );
160  std::ofstream out(m_timeFileName);
161 
162  out << "Event_Number Total " << header << "\n";
163 
164  for (const size_t idx : indices)
165  {
166  out << m_eventNumbers[idx] << " ";
167 
168  size_t total = 0;
169 
170  for (size_t i = 0; i < time_size; ++i)
171  {
172  total += m_times[idx * time_size + i];
173  }
174 
175  out << total << " ";
176 
177  for (size_t i = 0; i < time_size; ++i)
178  {
179  out << m_times[idx * time_size + i] << " ";
180  }
181  out << "\n";
182  }
183 
184  out << std::endl;
185 
186  out.close();
187  }

◆ record_times() [1/3]

template<class ... Args>
void CaloGPUTimed::record_times ( const size_t  event_num,
const size_t &  value 
) const
inlineprotectedinherited

Definition at line 105 of file CaloGPUTimed.h.

106  {
107  const size_t time_size = 1;
108 
109  size_t old_size;
110 
111  {
112  std::unique_lock<std::shared_mutex> lock(m_timeMutex);
113  old_size = m_times.size();
114  m_times.resize(old_size + time_size);
115  m_eventNumbers.push_back(event_num);
116  }
117  {
118  std::shared_lock<std::shared_mutex> lock(m_timeMutex);
119  record_times_helper(old_size, value);
120  }
121  }

◆ record_times() [2/3]

template<class ... Args>
void CaloGPUTimed::record_times ( const size_t  event_num,
const size_t &  value,
Args &&...  args 
) const
inlineprotectedinherited

Definition at line 124 of file CaloGPUTimed.h.

125  {
126  const size_t time_size = sizeof...(args) + 1;
127 
128  size_t old_size;
129 
130  {
131  std::unique_lock<std::shared_mutex> lock(m_timeMutex);
132  old_size = m_times.size();
133  m_times.resize(old_size + time_size);
134  m_eventNumbers.push_back(event_num);
135  }
136  {
137  std::shared_lock<std::shared_mutex> lock(m_timeMutex);
138  record_times_helper(old_size, value, std::forward<Args>(args)...);
139  }
140 
141  }

◆ record_times() [3/3]

void CaloGPUTimed::record_times ( const size_t  event_num,
const std::vector< size_t > &  times 
) const
inlineprotectedinherited

Definition at line 86 of file CaloGPUTimed.h.

87  {
88  size_t old_size;
89  {
90  std::unique_lock<std::shared_mutex> lock(m_timeMutex);
91  old_size = m_times.size();
92  m_times.resize(old_size + times.size());
93  m_eventNumbers.push_back(event_num);
94  }
95  {
96  std::shared_lock<std::shared_mutex> lock(m_timeMutex);
97  for (size_t i = 0; i < times.size(); ++i)
98  {
99  m_times[old_size + i] = times[i];
100  }
101  }
102  }

◆ record_times_helper() [1/3]

template<class Arg >
void CaloGPUTimed::record_times_helper ( const size_t  index,
Arg &&  arg 
) const
inlineprivateinherited

Definition at line 70 of file CaloGPUTimed.h.

71  {
72  // coverity[missing_lock]
73  m_times[index] = std::forward<Arg>(arg);
74 
75  //This is called within a function that holds the lock itself.
76  }

◆ record_times_helper() [2/3]

void CaloGPUTimed::record_times_helper ( const  size_t) const
inlineprivateinherited

Definition at line 64 of file CaloGPUTimed.h.

65  {
66  //Do nothing
67  }

◆ record_times_helper() [3/3]

template<class ... Args>
void CaloGPUTimed::record_times_helper ( size_t  index,
Args &&...  args 
) const
inlineprivateinherited

Definition at line 79 of file CaloGPUTimed.h.

80  {
81  (record_times_helper(index++, std::forward<Args>(args)), ...);
82  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

std::vector<size_t> m_times CaloGPUTimed::ATLAS_THREAD_SAFE
mutableprotectedinherited

Vector to hold execution times to be recorded if necessary.

Definition at line 35 of file CaloGPUTimed.h.

◆ ATLAS_THREAD_SAFE [2/2]

std::vector<size_t> m_eventNumbers CaloGPUTimed::ATLAS_THREAD_SAFE
mutableprotectedinherited

Vector to hold the event numbers to be recorded if necessary.

Definition at line 40 of file CaloGPUTimed.h.

◆ m_calo_id

const CaloCell_ID* BasicGPUToAthenaImporter::m_calo_id {nullptr}
private

Pointer to Calo ID Helper.

Definition at line 76 of file BasicGPUToAthenaImporter.h.

◆ m_cellsKey

SG::ReadHandleKey<CaloCellContainer> BasicGPUToAthenaImporter::m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"}
private

vector of names of the cell containers to use as input.

Definition at line 62 of file BasicGPUToAthenaImporter.h.

◆ m_clusterSize

xAOD::CaloCluster::ClusterSize BasicGPUToAthenaImporter::m_clusterSize
private

Definition at line 67 of file BasicGPUToAthenaImporter.h.

◆ m_clusterSizeString

Gaudi::Property<std::string> BasicGPUToAthenaImporter::m_clusterSizeString {this, "ClusterSize", "Topo_420", "The size/type of the clusters"}
private

Cluster size. Should be set accordingly to the threshold.

Definition at line 65 of file BasicGPUToAthenaImporter.h.

◆ m_keepGPUData

Gaudi::Property<bool> BasicGPUToAthenaImporter::m_keepGPUData {this, "KeepGPUData", true, "Keep GPU allocated data"}
private

If true, do not delete the GPU data representation.

Defaults to true.

Definition at line 51 of file BasicGPUToAthenaImporter.h.

◆ m_measureTimes

Gaudi::Property<bool> CaloGPUTimed::m_measureTimes
protectedinherited

If true, times are recorded to the file given by m_timeFileName.

Defaults to false.

Definition at line 46 of file CaloGPUTimed.h.

◆ m_missingCellsToFill

Gaudi::Property<std::vector<int> > BasicGPUToAthenaImporter::m_missingCellsToFill {this, "MissingCellsToFill", {}, "Force fill these cells as disabled on empty containers."}
private

Cell indices to fill as disabled cells (useful if the cell vector is always missing the same cells).

Definition at line 71 of file BasicGPUToAthenaImporter.h.

◆ m_saveUncalibrated

Gaudi::Property<bool> BasicGPUToAthenaImporter::m_saveUncalibrated {this, "SaveUncalibratedSignalState", true, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"}
private

if set to true, the uncalibrated state is saved when importing the clusters.

Default is true.

Definition at line 81 of file BasicGPUToAthenaImporter.h.

◆ m_timeFileName

Gaudi::Property<std::string> CaloGPUTimed::m_timeFileName
protectedinherited

File to which times should be saved.

Definition at line 50 of file CaloGPUTimed.h.

◆ m_timeMutex

std::shared_mutex CaloGPUTimed::m_timeMutex
mutableprotectedinherited

Mutex that is locked when recording times.

Definition at line 32 of file CaloGPUTimed.h.

◆ m_useCPUPropertiesCalculation

Gaudi::Property<bool> BasicGPUToAthenaImporter::m_useCPUPropertiesCalculation {this, "UseCPUClusterPropertiesCalculation", false, "Use CaloClusterKineHelper::calculateKine instead of GPU-calculated cluster properties"}
private

if set to true, cluster properties are (re-)calculated using CaloClusterKineHelper::calculateKine.

Else, the GPU-calculated values are used. Default is false.

Definition at line 57 of file BasicGPUToAthenaImporter.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::CaloCluster_v1::CSize_Unknown
@ CSize_Unknown
Definition: CaloCluster_v1.h:115
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::CaloCluster_v1::setRawM
void setRawM(flt_t)
Set mass for singal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:299
header
Definition: hcg.cxx:526
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
CaloRecGPU::ClusterTag::secondary_cluster_index
constexpr int32_t secondary_cluster_index() const
Definition: TagDefinitions.h:253
python.CaloAddPedShiftConfig.args
args
Definition: CaloAddPedShiftConfig.py:47
CaloRecGPU::ClusterTag::is_shared_between_clusters
constexpr bool is_shared_between_clusters() const
Definition: TagDefinitions.h:273
CaloGPUTimed::m_timeMutex
std::shared_mutex m_timeMutex
Mutex that is locked when recording times.
Definition: CaloGPUTimed.h:32
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
xAOD::CaloCluster_v1::calE
flt_t calE() const
Geet Energy in signal state CALIBRATED.
Trk::indices
std::pair< long int, long int > indices
Definition: AlSymMatBase.h:24
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
xAOD::CaloCluster_v1::calEta
flt_t calEta() const
Get in signal state CALIBRATED.
BasicGPUToAthenaImporter::m_clusterSizeString
Gaudi::Property< std::string > m_clusterSizeString
Cluster size. Should be set accordingly to the threshold.
Definition: BasicGPUToAthenaImporter.h:65
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
CaloGPUTimed::m_timeFileName
Gaudi::Property< std::string > m_timeFileName
File to which times should be saved.
Definition: CaloGPUTimed.h:50
athena.value
value
Definition: athena.py:124
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
BasicGPUToAthenaImporter::m_keepGPUData
Gaudi::Property< bool > m_keepGPUData
If true, do not delete the GPU data representation.
Definition: BasicGPUToAthenaImporter.h:51
xAOD::CaloCluster_v1::calM
flt_t calM() const
Get mass in signal state CALIBRATED.
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
CaloRecGPU::ClusterTag
Definition: TagDefinitions.h:222
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
BasicGPUToAthenaImporter::m_clusterSize
xAOD::CaloCluster::ClusterSize m_clusterSize
Definition: BasicGPUToAthenaImporter.h:67
CRGPU_CHEAP_STRING_TO_ENUM
#define CRGPU_CHEAP_STRING_TO_ENUM(VAR, PREFIX, ONE,...)
Checks a string variable, VAR, for matching enum identifiers (ONE and the remaining variadic argument...
Definition: MacroHelpers.h:148
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
CaloRecGPU::ClusterTag::cluster_index
constexpr int32_t cluster_index() const
Definition: TagDefinitions.h:243
xAOD::CaloCluster_v1::setE
void setE(flt_t)
Definition: CaloCluster_v1.cxx:375
BasicGPUToAthenaImporter::m_cellsKey
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
Definition: BasicGPUToAthenaImporter.h:62
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
python.handimod.now
now
Definition: handimod.py:674
xAOD::CaloCluster_v1::setRawE
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:284
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
BasicGPUToAthenaImporter::m_missingCellsToFill
Gaudi::Property< std::vector< int > > m_missingCellsToFill
Cell indices to fill as disabled cells (useful if the cell vector is always missing the same cells).
Definition: BasicGPUToAthenaImporter.h:71
CRGPU_RECURSIVE_MACRO
#define CRGPU_RECURSIVE_MACRO(...)
Expands recursive macros.
Definition: MacroHelpers.h:70
python.CaloAddPedShiftConfig.str
str
Definition: CaloAddPedShiftConfig.py:42
CaloGPUTimed::print_times
void print_times(const std::string &header, const size_t time_size) const
Definition: CaloGPUTimed.h:143
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::CaloCluster_v1::setRawEta
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:289
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::CaloCluster_v1::calPhi
flt_t calPhi() const
Get in signal state CALIBRATED.
BasicGPUToAthenaImporter::m_useCPUPropertiesCalculation
Gaudi::Property< bool > m_useCPUPropertiesCalculation
if set to true, cluster properties are (re-)calculated using CaloClusterKineHelper::calculateKine.
Definition: BasicGPUToAthenaImporter.h:57
CaloRecGPU::NCaloCells
constexpr int NCaloCells
Definition: BaseDefinitions.h:12
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
create_dcsc_inputs_sqlite.arg
list arg
Definition: create_dcsc_inputs_sqlite.py:48
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
BasicGPUToAthenaImporter::m_calo_id
const CaloCell_ID * m_calo_id
Pointer to Calo ID Helper.
Definition: BasicGPUToAthenaImporter.h:76
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:76
CaloGPUTimed::CaloGPUTimed
CaloGPUTimed(T *ptr)
Definition: CaloGPUTimed.h:55
CaloRecGPU::ClusterTag::is_part_of_cluster
constexpr bool is_part_of_cluster() const
Definition: TagDefinitions.h:233
CaloGPUTimed::record_times_helper
void record_times_helper(const size_t) const
Definition: CaloGPUTimed.h:64
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
xAOD::CaloCluster_v1::addCellLink
void addCellLink(CaloClusterCellLink *CCCL)
Definition: CaloCluster_v1.h:724
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
xAOD::CaloCluster_v1::setClusterSize
void setClusterSize(const ClusterSize)
Get cluster size.
Definition: CaloCluster_v1.cxx:369
CaloGPUTimed::record_times
void record_times(const size_t event_num, const std::vector< size_t > &times) const
Definition: CaloGPUTimed.h:86
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
CaloGPUTimed::m_measureTimes
Gaudi::Property< bool > m_measureTimes
If true, times are recorded to the file given by m_timeFileName.
Definition: CaloGPUTimed.h:46
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
xAOD::CaloCluster_v1::setPhi
bool setPhi(const CaloSample sampling, const float phi)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
Definition: CaloCluster_v1.cxx:549
CaloClusterKineHelper::calculateKine
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
Definition: CaloClusterKineHelper.cxx:223
str
Definition: BTagTrackIpAccessor.cxx:11
xAOD::CaloCluster_v1::setEta
bool setEta(const CaloSample sampling, const float eta)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
Definition: CaloCluster_v1.cxx:534
CaloRecGPU::ClusterTag::secondary_cluster_weight
constexpr int32_t secondary_cluster_weight() const
Definition: TagDefinitions.h:263
plot_times.times
def times(fn)
Definition: plot_times.py:10
BasicGPUToAthenaImporter::m_saveUncalibrated
Gaudi::Property< bool > m_saveUncalibrated
if set to true, the uncalibrated state is saved when importing the clusters.
Definition: BasicGPUToAthenaImporter.h:81
xAOD::CaloCluster_v1::setRawPhi
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:294