ATLAS Offline Software
CaloNeighbours.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //-----------------------------------------------------------------------
6 // File and Version Information:
7 // $Id: CaloNeighbours.cxx,v 1.2 2006-04-28 12:08:07 menke Exp $
8 //
9 // Description: see CaloNeighbours.h
10 //
11 // Environment:
12 // Software developed for the ATLAS Detector at CERN LHC
13 //
14 // Author List:
15 // Sven Menke
16 //
17 //-----------------------------------------------------------------------
18 
19 //-----------------------
20 // This Class's Header --
21 //-----------------------
23 //---------------
24 // C++ Headers --
25 //---------------
26 #include <fstream>
27 #include <iomanip>
28 #include <iostream>
29 #include <iterator>
30 #include <sstream>
31 
33 #include "Identifier/Identifier.h"
35 #include "Identifier/Range.h"
37 
38 #define MAX_BUFFER_LEN 1024
39 
40 //###############################################################################
41 
43  const CaloCell_Base_ID *theCaloId) :
44  m_name(name),
46  m_calo_id(theCaloId),
47  m_hasPhi(false),
48  m_iPhiSource(0),
49  m_iPhiTarget(0),
50  m_hasSide(false),
51  m_iSideSource(0),
52  m_iSideTarget(0),
53  m_isValidMinus(false),
54  m_isValidPlus(false)
55 {
56 }
57 
58 //###############################################################################
59 
61 = default;
62 
63 //###############################################################################
64 
66 {
67  m_type = type;
68 }
69 
70 //###############################################################################
71 
73 {
74  m_sourceRange = theRange;
75  for(unsigned int i=0;i<theRange[SIDE].get_indices();i++) {
76  if ( theRange[SIDE].get_value_at(i) < 0 )
77  m_isValidMinus = true;
78  else
79  m_isValidPlus = true;
80  }
81 }
82 
83 //###############################################################################
84 
86 {
87  m_targetRange = theRange;
88 }
89 
90 //###############################################################################
91 
92 void CaloNeighbourRegion::setSide(const int side1, const int side2)
93 {
94  m_hasSide = true;
95  m_iSideSource = side1;
96  m_iSideTarget = side2;
97 }
98 
99 //###############################################################################
100 
101 void CaloNeighbourRegion::setPhi(const int phi1, const int phi2)
102 {
103  m_hasPhi = true;
104  m_iPhiSource = phi1;
105  m_iPhiTarget = phi2;
106 
107 }
108 
109 //###############################################################################
110 
111 int CaloNeighbourRegion::getId(ExpandedIdentifier& id, Identifier &rID, const Range &theRange, const int side, const int dphi) const
112 {
113  // modify id for side and phi
114  // ExpandedIdentifier id(oid);
115  if ( m_hasSide && side != 1 )
116  id[SIDE] = side*id[SIDE];
117  if ( m_hasPhi && dphi != 0 ) {
118  if ( m_calo_id->is_lar_em(id) || m_calo_id->is_lar_hec(id) )
119  id[PHI] = id[PHI]+dphi;
120  else if ( m_calo_id->is_lar_fcal(id) )
121  id[FCALPHI] = id[FCALPHI]+dphi;
122  else
123  id[TILEPHI] = id[TILEPHI]+dphi;
124  }
125 
126  // first check if id is in the specified range
127  if ( !theRange.match(id) ) {
128  std::cout << "CaloNeighbours::set_neighbours ERROR: " << (std::string)id << " is not within the Range " << (std::string)theRange << std::endl;
129  return 1;
130  }
131 
132  CaloCell_ID::SUBCALO subCalo;
133  if ( m_calo_id->is_lar_em(id) ) {
134  subCalo = CaloCell_ID::LAREM;
135  rID = m_calo_id->cell_id(subCalo,
136  id[SIDE],
137  id[SAMPL],
138  id[REGION],
139  id[ETA],
140  id[PHI]);
141  }
142  else if ( m_calo_id->is_lar_hec(id) ) {
143  subCalo = CaloCell_ID::LARHEC;
144  rID = m_calo_id->cell_id(subCalo,
145  id[SIDE],
146  id[SAMPL],
147  id[REGION],
148  id[ETA],
149  id[PHI]);
150  }
151  else if ( m_calo_id->is_lar_fcal(id) ) {
152  subCalo = CaloCell_ID::LARFCAL;
153  rID = m_calo_id->cell_id(subCalo,
154  id[SIDE],
155  id[SAMPL],
156  0,
157  id[FCALETA],
158  id[FCALPHI]);
159  }
160  else if ( m_calo_id->is_tile(id) ) {
161  subCalo = CaloCell_ID::TILE;
163  if (id.fields() > TILESAMPL)
164  sampl = id[TILESAMPL];
165  rID = m_calo_id->cell_id(subCalo,
166  id[TILESECTION],
167  id[SIDE],
168  id[TILEPHI],
169  id[TILEETA],
170  sampl);
171  }
172  else {
173  std::cout << "CaloNeighbours::get_id ERROR: " << (std::string)id << " is not in the LAr or Tile calorimeters" << std::endl;
174  return 1;
175  }
176  return 0;
177 }
178 
179 //###############################################################################
180 
182  std::vector<ExpandedIdentifier>& id2,
183  std::map<IdentifierHash, std::vector<IdentifierHash>, ltIdHash>& neighbourMapPlus,
184  std::map<IdentifierHash, std::vector<IdentifierHash>, ltIdHash>& neighbourMapMinus)
185 {
186  int result = 0;
187 
188  // build an Identifier from the ExpandedIdentifier
189  int nMaxSides=1;
190  int nMaxPhi=1;
191  float rPhi=1;
192  if ( m_hasSide )
193  nMaxSides = 2;
194  if ( m_hasPhi ) {
195  nMaxPhi = m_sourceRange[m_iPhiSource].get_indices();
196  rPhi = ((float)m_targetRange[m_iPhiTarget].get_indices())/((float)nMaxPhi);
197  }
198 
199  for (int theSide = 0;theSide<nMaxSides;theSide++) {
200  for (int theDPhi = 0;theDPhi<nMaxPhi;theDPhi++) {
201  int side = +1;
202  int dphi2 = (int)(theDPhi*rPhi+0.05);
203  if ( theSide > 0 ) {
204  side = -1;
205  }
206  // only continous region mapping in phi is supported -
207  // therefore theDPhi = delta phi ...
208  Identifier myId;
209  ExpandedIdentifier myExpID(id1);
210  if ( getId(myExpID,myId,m_sourceRange,side,theDPhi) ) {
211  return 1;
212  }
213  // get hash ID's for the source
214  IdentifierHash myHash = m_calo_id->calo_cell_hash (myId);
215  // get ID's and hash ID's for the target
216  std::vector<IdentifierHash> theTargetHashIDs;
217  for (const ExpandedIdentifier& eid : id2) {
218  Identifier myTargetId;
219  ExpandedIdentifier myNExpID(eid);
220  if ( getId(myNExpID,myTargetId,m_targetRange,side,dphi2) ) {
221  return 1;
222  }
223  // get hash ID's for the target
224  IdentifierHash myTargetHash = m_calo_id->calo_cell_hash (myTargetId);
225  theTargetHashIDs.push_back(myTargetHash);
226  }
227  if ( id1[SIDE]*side > 0 ) {
228  neighbourMapPlus[myHash] = theTargetHashIDs;
229  }
230  else {
231  neighbourMapMinus[myHash] = theTargetHashIDs;
232  }
233  }
234  }
235  return result;
236 }
237 
238 //###############################################################################
239 
240 void CaloNeighbourRegion::initializeVectors(std::map<IdentifierHash, std::vector<IdentifierHash>, ltIdHash>& neighbourMapPlus, std::map<IdentifierHash, std::vector<IdentifierHash>, ltIdHash>& neighbourMapMinus)
241 {
242  if ( m_isValidMinus ) {
243  m_minHashMinus = neighbourMapMinus.begin()->first;
244  m_maxHashMinus = neighbourMapMinus.rbegin()->first;
245  m_neighbours_minus.resize((unsigned int)(m_maxHashMinus-m_minHashMinus+1));
246  for (const auto& p : neighbourMapMinus) {
247  m_neighbours_minus[(unsigned int)(p.first-m_minHashMinus)] = std::make_unique<std::vector<IdentifierHash> >(p.second);
248  }
249  }
250  if ( m_isValidPlus ) {
251  m_minHashPlus = neighbourMapPlus.begin()->first;
252  m_maxHashPlus = neighbourMapPlus.rbegin()->first;
253  m_neighbours_plus.resize((unsigned int)(m_maxHashPlus-m_minHashPlus+1));
254  for (const auto& p : neighbourMapPlus) {
255  m_neighbours_plus[(unsigned int)(p.first-m_minHashPlus)] = std::make_unique<std::vector<IdentifierHash> >(p.second);
256  }
257  }
258 
259 }
260 
261 //###############################################################################
262 
263 int CaloNeighbourRegion::getNeighbours(const IdentifierHash caloHash, std::vector<IdentifierHash>& neighbourList) const
264 {
265  int result = 0;
266 
267  if ( m_isValidMinus && caloHash >= m_minHashMinus && caloHash <= m_maxHashMinus && m_neighbours_minus[(unsigned int)(caloHash-m_minHashMinus)] ) {
268  neighbourList.insert(neighbourList.end(),
269  m_neighbours_minus[(unsigned int)(caloHash-m_minHashMinus)]->begin(),
270  m_neighbours_minus[(unsigned int)(caloHash-m_minHashMinus)]->end());
271  }
272  else if ( m_isValidPlus && caloHash >= m_minHashPlus && caloHash <= m_maxHashPlus && m_neighbours_plus[(unsigned int)(caloHash-m_minHashPlus)] ) {
273  neighbourList.insert(neighbourList.end(),
274  m_neighbours_plus[(unsigned int)(caloHash-m_minHashPlus)]->begin(),
275  m_neighbours_plus[(unsigned int)(caloHash-m_minHashPlus)]->end());
276  }
277 
278  return result;
279 }
280 
281 
282 //###############################################################################
283 
285  m_calo_id(nullptr)
286 { }
287 
288 //###############################################################################
289 
291 = default;
292 
293 //###############################################################################
294 
296  const std::string& filename)
297 {
298  int result =0;
299  // std::cout << " CaloNeighbours::initialize " << std::endl;
300  m_calo_id = caloID;
301  m_next_regions.resize(0);
302  m_prev_regions.resize(0);
303  // Find the full path to filename:
304  std::string file = PathResolver::find_file (filename, "DATAPATH");
305  // std::cout << "Reading file " << file << std::endl;
306  std::ifstream fin;
307  if (!file.empty()) {
308  fin.open(file.c_str());
309  }
310  else {
311  std::cout << "CaloNeighbours::initialize ERROR Could not find input file " << filename << std::endl;
312  return 1;
313  }
314  if (fin.bad()) {
315  std::cout << "CaloNeighbours::initialize ERROR Could not open file " << file << std::endl;
316  return 1;
317  }
318 
319  //
320  // Parse the input file
321  //
322 
323  char aLine[MAX_BUFFER_LEN],dummy;
324  std::string sLine;
325  std::string cPrevOrNext,cName,cSourceRange,cTargetRange;
326  std::string cExpId;
327  Range mySourceRange,myTargetRange;
328  std::string oArg;
329  bool isComment = true;
330  bool isNext = false;
331  bool isPrev = false;
332  const std::string cmdNext("nextSuperCalo");
333  const std::string cmdPrev("prevSuperCalo");
334  const std::string cmdPhi("calcPhi(");
335  const std::string cmdSide("calcSide(");
336 
337  while( isComment ) {
338  sLine.resize( 0 );
339  do {
340  fin.getline(aLine,sizeof(aLine)-1);
341  sLine = std::string(aLine);
342  } while (sLine.empty() && !fin.eof());
343  isComment = ( sLine.find('#') != std::string::npos );
344  }
345  do {
346  while ( sLine.empty() && !fin.eof()) {
347  fin.getline(aLine,sizeof(aLine)-1);
348  sLine = std::string(aLine);
349  }
350  std::istringstream header( sLine.c_str() );
351  bool hasPhi=false;
352  bool hasSide=false;
353  int iPhiSource,iPhiTarget;
354  int iSideSource,iSideTarget;
355  if ( header >> cPrevOrNext >> cName >> cSourceRange >> cTargetRange) {
356  mySourceRange.build(cSourceRange);
357  myTargetRange.build(cTargetRange);
358  while ( header >> oArg ) {
359  if (oArg.find(cmdSide) != std::string::npos ) {
360  hasSide = true;
361  oArg.erase(0,cmdSide.size());
362  std::istringstream iside( oArg.c_str() );
363  iside >> iSideSource >> dummy >> iSideTarget;
364  }
365  else if ( oArg.find(cmdPhi) != std::string::npos ) {
366  hasPhi = true;
367  oArg.erase(0,cmdPhi.size());
368  std::istringstream iphi( oArg.c_str() );
369  iphi >> iPhiSource >> dummy >> iPhiTarget;
370  }
371  }
372  sLine.resize(0);
373  bool endOfBlock = false;
374  isNext = (cPrevOrNext.find(cmdNext) != std::string::npos);
375  isPrev = (cPrevOrNext.find(cmdPrev) != std::string::npos);
376  if ( isNext^isPrev ) {
377 // std::cout << (isNext?cmdNext:cmdPrev) << " "
378 // << cName << " "
379 // << (std::string)mySourceRange << " "
380 // << (std::string)myTargetRange;
381 // if ( hasSide ) {
382 // std::cout << " hasSide(" << iSideSource << "," << iSideTarget << ")";
383 // }
384 // if ( hasPhi ) {
385 // std::cout << " hasPhi(" << iPhiSource << "," << iPhiTarget << ")";
386 // }
387 // std::cout << std::endl;
388  // create new CaloNeighbourRegion
389  auto myRegion = std::make_unique<CaloNeighbourRegion>(cName,m_calo_id);
390  if ( isNext )
391  myRegion->setType(nextInCalo);
392  else
393  myRegion->setType(prevInCalo);
394  if ( hasSide )
395  myRegion->setSide(iSideSource,iSideTarget);
396  if ( hasPhi )
397  myRegion->setPhi(iPhiSource,iPhiTarget);
398  myRegion->setSourceRange(mySourceRange);
399  myRegion->setTargetRange(myTargetRange);
400  // create temporary neighbour maps
401  std::map<IdentifierHash, std::vector<IdentifierHash>, ltIdHash> neighbourMapPlus,neighbourMapMinus;
402 
403  do {
404  while ( !endOfBlock && sLine.empty() && !fin.eof()) {
405  fin.getline(aLine,sizeof(aLine)-1);
406  sLine = std::string(aLine);
407  if ( sLine.empty() || fin.eof() )
408  endOfBlock = true;
409  }
410  if (!endOfBlock) {
411  std::istringstream neighbour( sLine.c_str() );
412  ExpandedIdentifier myCell,myNeighbourCell;
413  std::vector<ExpandedIdentifier> myNeighbourCells;
414  if ( neighbour >> cExpId ) {
415  myCell = ExpandedIdentifier(cExpId);
416  // std::cout << (std::string)myCell << ":";
417  while ( neighbour >> cExpId ) {
418  myNeighbourCell = ExpandedIdentifier(cExpId);
419  // std::cout << " " << (std::string)myNeighbourCell;
420  myNeighbourCells.push_back(myNeighbourCell);
421  }
422  // std::cout << std::endl;
423  sLine.resize(0);
424  result = myRegion->setNeighbours(myCell,myNeighbourCells,neighbourMapPlus,neighbourMapMinus);
425  if ( result != 0 )
426  return result;
427  }
428  }
429  } while (!fin.eof() && !endOfBlock);
430  myRegion->initializeVectors(neighbourMapPlus,neighbourMapMinus);
431  if (isNext)
432  m_next_regions.push_back(std::move(myRegion));
433  else
434  m_prev_regions.push_back(std::move(myRegion));
435  }
436  else {
437  std::cout << "CaloNeighbours::initialize ERROR Invalid neighbour dat file, exiting ... " << std::endl;
438  return 1;
439  }
440  }
441  }while (!fin.eof()) ;
442  fin.close();
443 
444  return 0;
445 }
446 
447 //###############################################################################
448 
449 int CaloNeighbours::get_nextInCalo(const IdentifierHash &id,std::vector<IdentifierHash>& neighbourList) const
450 {
451  return get_neighbours(id,m_next_regions,neighbourList);
452 }
453 
454 //###############################################################################
455 
456 int CaloNeighbours::get_prevInCalo(const IdentifierHash &id,std::vector<IdentifierHash>& neighbourList) const
457 {
458  return get_neighbours(id,m_prev_regions,neighbourList);
459 }
460 
461 //###############################################################################
462 
464  const std::vector<std::unique_ptr<CaloNeighbourRegion> > &regions,
465  std::vector<IdentifierHash>& neighbourList)
466 {
467  int result = 0;
468  for (const std::unique_ptr<CaloNeighbourRegion>& p : regions) {
469  result = p->getNeighbours(id,neighbourList);
470  if ( result != 0 )
471  return result;
472  }
473  return result;
474 }
475 
CaloNeighbourRegion::setSourceRange
void setSourceRange(const Range &theRange)
Definition: CaloNeighbours.cxx:72
CaloNeighbourRegion::m_iPhiSource
int m_iPhiSource
Definition: CaloNeighbours.h:81
CaloNeighbourRegion::setSide
void setSide(const int side1, const int side2)
Definition: CaloNeighbours.cxx:92
CaloCell_Base_ID::LARFCAL
@ LARFCAL
Definition: CaloCell_Base_ID.h:46
MAX_BUFFER_LEN
#define MAX_BUFFER_LEN
Definition: CaloNeighbours.cxx:38
CaloNeighbourRegion::TILESECTION
@ TILESECTION
Definition: CaloNeighbours.h:44
CaloCell_Base_ID::calo_cell_hash
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
get_generator_info.result
result
Definition: get_generator_info.py:21
header
Definition: hcg.cxx:526
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
CaloNeighbours::initialize
int initialize(const CaloCell_Base_ID *caloID, const std::string &filename)
Definition: CaloNeighbours.cxx:295
CaloNeighbourRegion::m_hasPhi
bool m_hasPhi
Definition: CaloNeighbours.h:80
CaloNeighbourRegion::m_isValidPlus
bool m_isValidPlus
Definition: CaloNeighbours.h:86
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
Range::match
int match(const ExpandedIdentifier &id) const
Match an identifier.
Definition: DetectorDescription/Identifier/src/Range.cxx:1333
AtlasDetectorID::is_lar_fcal
bool is_lar_fcal(Identifier id) const
Definition: AtlasDetectorID.h:839
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
CaloNeighbourRegion::initializeVectors
void initializeVectors(std::map< IdentifierHash, std::vector< IdentifierHash >, ltIdHash > &neighbourMapPlus, std::map< IdentifierHash, std::vector< IdentifierHash >, ltIdHash > &neighbourMapMinus)
Definition: CaloNeighbours.cxx:240
CaloNeighbours::m_calo_id
const CaloCell_Base_ID * m_calo_id
Definition: CaloNeighbours.h:114
CaloNeighbourRegion::TILEPHI
@ TILEPHI
Definition: CaloNeighbours.h:44
CaloNeighbourRegion::setNeighbours
int setNeighbours(ExpandedIdentifier &id1, std::vector< ExpandedIdentifier > &id2, std::map< IdentifierHash, std::vector< IdentifierHash >, ltIdHash > &neighbourMapPlus, std::map< IdentifierHash, std::vector< IdentifierHash >, ltIdHash > &neighbourMapMinus)
Definition: CaloNeighbours.cxx:181
CaloNeighbourRegion::REGION
@ REGION
Definition: CaloNeighbours.h:44
Range.h
CaloNeighbourRegion::m_isValidMinus
bool m_isValidMinus
Definition: CaloNeighbours.h:86
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:108
CaloNeighbourRegion::getId
int getId(ExpandedIdentifier &id, Identifier &rID, const Range &theRange, const int side=+1, const int dphi=0) const
Definition: CaloNeighbours.cxx:111
CaloCell_Base_ID::LARHEC
@ LARHEC
Definition: CaloCell_Base_ID.h:46
CaloNeighbours::get_nextInCalo
int get_nextInCalo(const IdentifierHash &id, std::vector< IdentifierHash > &neighbourList) const
Definition: CaloNeighbours.cxx:449
ExpandedIdentifier.h
CaloNeighbourRegion::m_maxHashPlus
IdentifierHash m_maxHashPlus
Definition: CaloNeighbours.h:88
CaloNeighbourRegion::m_minHashMinus
IdentifierHash m_minHashMinus
Definition: CaloNeighbours.h:88
CaloCell_Base_ID::is_tile
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
CaloNeighbourRegion::m_targetRange
Range m_targetRange
Definition: CaloNeighbours.h:78
CaloNeighbourRegion::m_hasSide
bool m_hasSide
Definition: CaloNeighbours.h:83
CaloNeighbourRegion::m_sourceRange
Range m_sourceRange
Definition: CaloNeighbours.h:78
CaloNeighbourRegion::FCALETA
@ FCALETA
Definition: CaloNeighbours.h:44
CaloNeighbourRegion::m_type
NEIGHBOURTYPE m_type
Definition: CaloNeighbours.h:75
TRT::Hit::side
@ side
Definition: HitInfo.h:83
m_type
TokenType m_type
the type
Definition: TProperty.cxx:44
CaloNeighbourRegion::m_minHashPlus
IdentifierHash m_minHashPlus
Definition: CaloNeighbours.h:88
id2
HWIdentifier id2
Definition: LArRodBlockPhysicsV0.cxx:564
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloNeighbourRegion::SIDE
@ SIDE
Definition: CaloNeighbours.h:44
NEIGHBOURTYPE
NEIGHBOURTYPE
Definition: CaloNeighbours.h:31
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
CaloNeighbours.h
nextInCalo
@ nextInCalo
Definition: CaloNeighbours.h:31
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
CaloNeighbourRegion::setTargetRange
void setTargetRange(const Range &theRange)
Definition: CaloNeighbours.cxx:85
file
TFile * file
Definition: tile_monitor.h:29
CaloNeighbourRegion::setPhi
void setPhi(const int phi1, const int phi2)
Definition: CaloNeighbours.cxx:101
CaloNeighbourRegion::~CaloNeighbourRegion
virtual ~CaloNeighbourRegion()
CaloNeighbourRegion::m_maxHashMinus
IdentifierHash m_maxHashMinus
Definition: CaloNeighbours.h:88
python.xAODType.dummy
dummy
Definition: xAODType.py:4
CaloNeighbourRegion::TILEETA
@ TILEETA
Definition: CaloNeighbours.h:44
AtlasDetectorID::is_lar_hec
bool is_lar_hec(Identifier id) const
Definition: AtlasDetectorID.h:829
CaloCell_Base_ID::TILE
@ TILE
Definition: CaloCell_Base_ID.h:46
CaloNeighbours::m_prev_regions
std::vector< std::unique_ptr< CaloNeighbourRegion > > m_prev_regions
Definition: CaloNeighbours.h:117
ltIdHash
Definition: CaloNeighbours.h:33
CaloNeighbourRegion::m_neighbours_minus
std::vector< std::unique_ptr< std::vector< IdentifierHash > > > m_neighbours_minus
Definition: CaloNeighbours.h:90
CaloNeighbourRegion::m_iSideSource
int m_iSideSource
Definition: CaloNeighbours.h:84
PathResolver.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IdentifierHash.h
CaloNeighbourRegion::m_neighbours_plus
std::vector< std::unique_ptr< std::vector< IdentifierHash > > > m_neighbours_plus
Definition: CaloNeighbours.h:89
CaloNeighbourRegion::m_iSideTarget
int m_iSideTarget
Definition: CaloNeighbours.h:84
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:27
CaloCell_Base_ID::cell_id
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
CaloNeighbours::get_neighbours
static int get_neighbours(const IdentifierHash &id, const std::vector< std::unique_ptr< CaloNeighbourRegion > > &regions, std::vector< IdentifierHash > &neighbourList)
Definition: CaloNeighbours.cxx:463
prevInCalo
@ prevInCalo
Definition: CaloNeighbours.h:31
CaloNeighbours::m_next_regions
std::vector< std::unique_ptr< CaloNeighbourRegion > > m_next_regions
Definition: CaloNeighbours.h:116
CaloNeighbourRegion::TILESAMPL
@ TILESAMPL
Definition: CaloNeighbours.h:44
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloNeighbourRegion::SAMPL
@ SAMPL
Definition: CaloNeighbours.h:44
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
CaloNeighbourRegion::m_calo_id
const CaloCell_Base_ID * m_calo_id
Definition: CaloNeighbours.h:76
compute_lumi.fin
fin
Definition: compute_lumi.py:19
CaloNeighbours::CaloNeighbours
CaloNeighbours()
Definition: CaloNeighbours.cxx:284
CaloNeighbourRegion::setType
void setType(const NEIGHBOURTYPE type)
Definition: CaloNeighbours.cxx:65
CaloNeighbourRegion::m_iPhiTarget
int m_iPhiTarget
Definition: CaloNeighbours.h:81
CaloNeighbourRegion::getNeighbours
int getNeighbours(const IdentifierHash caloHash, std::vector< IdentifierHash > &neighbourList) const
Definition: CaloNeighbours.cxx:263
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:116
SIDE
SIDE
Definition: CellClusterLinkTool.h:52
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:106
IdentifierHash
Definition: IdentifierHash.h:38
makeTOC.header
header
Definition: makeTOC.py:28
CaloCell_Base_ID::LAREM
@ LAREM
Definition: CaloCell_Base_ID.h:46
CaloCell_Base_ID
Helper base class for offline cell identifiers.
Definition: CaloCell_Base_ID.h:41
Range::build
void build(const std::string &text)
Build a range from a textual description.
Definition: DetectorDescription/Identifier/src/Range.cxx:1234
AtlasDetectorID::is_lar_em
bool is_lar_em(Identifier id) const
Definition: AtlasDetectorID.h:818
readCCLHist.float
float
Definition: readCCLHist.py:83
CaloNeighbourRegion::ETA
@ ETA
Definition: CaloNeighbours.h:44
CaloNeighbours::get_prevInCalo
int get_prevInCalo(const IdentifierHash &id, std::vector< IdentifierHash > &neighbourList) const
Definition: CaloNeighbours.cxx:456
CaloNeighbourRegion::FCALPHI
@ FCALPHI
Definition: CaloNeighbours.h:44
CaloNeighbourRegion::PHI
@ PHI
Definition: CaloNeighbours.h:44
CaloNeighbours::~CaloNeighbours
virtual ~CaloNeighbours()
CaloNeighbourRegion::CaloNeighbourRegion
CaloNeighbourRegion(const std::string &name, const CaloCell_Base_ID *theCaloId)
Definition: CaloNeighbours.cxx:42