ATLAS Offline Software
Loading...
Searching...
No Matches
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}
double m_xcent[1024][15]
double m_ycent[1024][15]
double m_phirot[1024][15]
const G4VPhysicalVolume * GetPhysicalVolume(int) const

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}
std::map< std::string, double > instance
LArCoudeAbsorbers(const std::string &strDetector="")

◆ 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.

15{};

◆ m_xcent

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

Definition at line 13 of file LArCoudeAbsorbers.h.

13{};

◆ m_ycent

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

Definition at line 14 of file LArCoudeAbsorbers.h.

14{};

The documentation for this class was generated from the following files: