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

#include <LArCoudeAbsorbers.h>

Collaboration diagram for LArCoudeAbsorbers:

Public Member Functions

double XCentCoude (int stackid, int cellid) const
 
double YCentCoude (int stackid, int cellid) const
 
double PhiRot (int stackid, int cellid) const
 

Static Public Member Functions

static const LArCoudeAbsorbersGetInstance (const std::string &strDetector="")
 

Private Member Functions

 LArCoudeAbsorbers (const std::string &strDetector="")
 

Private Attributes

double m_xcent [1024][15] {}
 
double m_ycent [1024][15] {}
 
double m_phirot [1024][15] {}
 

Detailed Description

Definition at line 10 of file LArCoudeAbsorbers.h.

Constructor & Destructor Documentation

◆ LArCoudeAbsorbers()

LArCoudeAbsorbers::LArCoudeAbsorbers ( const std::string &  strDetector = "")
private

Definition at line 16 of file LArCoudeAbsorbers.cxx.

17 {
18 
19  static const PhysicalVolumeAccessor theCoudes = [&]() {
20  const std::string prefix = strDetector.empty() ? "" : strDetector+"::";
21  PhysicalVolumeAccessor pva(prefix+"LAr::EMB::STAC",
22  prefix+"LAr::EMB::ThinAbs::CornerDownFold");
23 
24  pva.SetPhysicalVolumeList(prefix+"LAr::EMB::ThinAbs::CornerUpFold");
25  return pva;
26  }();
27 
28  for (int stackid=0; stackid<15; stackid++) {
29  for (int cellid=0; cellid<1024; cellid++) {
30 
31  const int id=cellid+stackid*10000;
32  const G4VPhysicalVolume *pv=theCoudes.GetPhysicalVolume(id);
33  if (pv) {
34  // Calculate x/ycent
35  const G4ThreeVector& tv=pv->GetTranslation();
36  m_xcent[cellid][stackid] = tv.x();
37  m_ycent[cellid][stackid] = tv.y();
38 
39  // Calculate phirot
40  const G4RotationMatrix *rm=pv->GetRotation();
41  double alpha;
42  if (!rm) alpha=0.;
43  else alpha = rm->phiX();
44  if (pv->GetName().find("DownFold") != std::string::npos) alpha=alpha-3.14159;
45  // old way was assuming we start with a down fold if (stackid%2==0) alpha=alpha-3.14159;
46  m_phirot[cellid][stackid] = alpha;
47  }
48  }
49  }
50 }

Member Function Documentation

◆ GetInstance()

const LArCoudeAbsorbers * LArCoudeAbsorbers::GetInstance ( const std::string &  strDetector = "")
static

Definition at line 9 of file LArCoudeAbsorbers.cxx.

10 {
11  static const LArCoudeAbsorbers instance(strDetector);
12  return &instance;
13 }

◆ PhiRot()

double LArCoudeAbsorbers::PhiRot ( int  stackid,
int  cellid 
) const
inline

Definition at line 21 of file LArCoudeAbsorbers.h.

21 { return m_phirot[cellid][stackid]; }

◆ XCentCoude()

double LArCoudeAbsorbers::XCentCoude ( int  stackid,
int  cellid 
) const
inline

Definition at line 19 of file LArCoudeAbsorbers.h.

19 { return m_xcent[cellid][stackid]; }

◆ YCentCoude()

double LArCoudeAbsorbers::YCentCoude ( int  stackid,
int  cellid 
) const
inline

Definition at line 20 of file LArCoudeAbsorbers.h.

20 { return m_ycent[cellid][stackid]; }

Member Data Documentation

◆ m_phirot

double LArCoudeAbsorbers::m_phirot[1024][15] {}
private

Definition at line 15 of file LArCoudeAbsorbers.h.

◆ m_xcent

double LArCoudeAbsorbers::m_xcent[1024][15] {}
private

Definition at line 13 of file LArCoudeAbsorbers.h.

◆ m_ycent

double LArCoudeAbsorbers::m_ycent[1024][15] {}
private

Definition at line 14 of file LArCoudeAbsorbers.h.


The documentation for this class was generated from the following files:
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
LArCoudeAbsorbers::m_ycent
double m_ycent[1024][15]
Definition: LArCoudeAbsorbers.h:14
PhysicalVolumeAccessor
Definition: PhysicalVolumeAccessor.h:18
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
PhysicalVolumeAccessor::GetPhysicalVolume
const G4VPhysicalVolume * GetPhysicalVolume(int) const
Definition: PhysicalVolumeAccessor.cxx:42
LArCoudeAbsorbers
Definition: LArCoudeAbsorbers.h:10
LArCoudeAbsorbers::m_xcent
double m_xcent[1024][15]
Definition: LArCoudeAbsorbers.h:13
python.changerun.pv
pv
Definition: changerun.py:81
LArCoudeAbsorbers::m_phirot
double m_phirot[1024][15]
Definition: LArCoudeAbsorbers.h:15