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

#include <PsMap.h>

Collaboration diagram for PsMap:

Public Member Functions

 ~PsMap ()=default
 
void Reset ()
 
const CurrMapGetMap (int module) const
 

Static Public Member Functions

static const PsMapGetPsMap ()
 

Private Member Functions

 PsMap ()
 

Private Attributes

curr_map m_theMap
 

Detailed Description

Definition at line 16 of file PsMap.h.

Constructor & Destructor Documentation

◆ ~PsMap()

PsMap::~PsMap ( )
default

◆ PsMap()

PsMap::PsMap ( )
private

Definition at line 12 of file PsMap.cxx.

13 {
14 #ifndef LARG4_STAND_ALONE
15  //std::string larLocation = PathResolver::find_directory("lar","DATAPATH");
16  std::string larLocation = PathResolver::find_directory("LArG4Barrel","ATLASCALDATA");
17 #endif
18 
19  const double xnorm=15.9; // nA/MeV normalisation for PS maps
20 
21  for (int imap=0;imap<5;imap++) {
22  // accordion folds
23  std::ostringstream fn;
24  fn << "presampler_"<<imap<<".map";
25  std::string filename = fn.str();
26  std::string fileLocation;
27 #ifdef LARG4_STAND_ALONE
28  fileLocation=m_directory+"/"+filename;
29 #else
30  //fileLocation=larLocation+"/calo_data/"+filename;
31  fileLocation=larLocation+"/"+filename;
32 #endif
33  CurrMap* cm = new CurrMap(fileLocation,xnorm);
34  int code=imap;
35  m_theMap[code]=cm;
36  }
37 
38 }

Member Function Documentation

◆ GetMap()

const CurrMap * PsMap::GetMap ( int  module) const

Definition at line 55 of file PsMap.cxx.

56 {
57  // module 0 and 1 have their own maps (code = 0 and 1)
58  // module 2 and 3 have the same map (same geometry) with code 2
59  // module 4 and 5 have the same map (same geometry) with code 3
60  // module 6 and 7 have the same map (same geometry) with code 4
61  int code = -1;
62  if (module==0 || module==1) code=module;
63  if (module > 1 && module < 8) code=(module-2)/2 + 2;
64  auto it = m_theMap.find(code);
65  if (it != m_theMap.end())
66  return it->second;
67  else {
68  std::cout << " Code " << module << " not found in map ..." << std::endl;
69  return nullptr;
70  }
71 }

◆ GetPsMap()

const PsMap * PsMap::GetPsMap ( )
static

Definition at line 40 of file PsMap.cxx.

41 {
42  static const PsMap instance;
43  return &instance;
44 }

◆ Reset()

void PsMap::Reset ( )

Definition at line 46 of file PsMap.cxx.

47 {
49  while (it != m_theMap.end()) {
50  delete (*it).second;
51  m_theMap.erase(it++);
52  }
53 }

Member Data Documentation

◆ m_theMap

curr_map PsMap::m_theMap
private

Definition at line 24 of file PsMap.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
skel.it
it
Definition: skel.GENtoEVGEN.py:423
PathResolver::find_directory
static std::string find_directory(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:307
PsMap::m_theMap
curr_map m_theMap
Definition: PsMap.h:24
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
python.PyAthena.module
module
Definition: PyAthena.py:131
python.getCurrentFolderTag.fn
fn
Definition: getCurrentFolderTag.py:65
CurrMap
Definition: CurrMap.h:10
pmontree.code
code
Definition: pmontree.py:443
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
PsMap
Definition: PsMap.h:16