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

#include <LArCoudeElectrodes.h>

Collaboration diagram for LArCoudeElectrodes:

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 LArCoudeElectrodesGetInstance (const std::string &strDetector="")
 

Private Member Functions

 LArCoudeElectrodes (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 LArCoudeElectrodes.h.

Constructor & Destructor Documentation

◆ LArCoudeElectrodes()

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

Definition at line 16 of file LArCoudeElectrodes.cxx.

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

Member Function Documentation

◆ GetInstance()

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

Definition at line 9 of file LArCoudeElectrodes.cxx.

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

◆ PhiRot()

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

Definition at line 21 of file LArCoudeElectrodes.h.

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

◆ XCentCoude()

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

Definition at line 19 of file LArCoudeElectrodes.h.

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

◆ YCentCoude()

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

Definition at line 20 of file LArCoudeElectrodes.h.

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

Member Data Documentation

◆ m_phirot

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

Definition at line 15 of file LArCoudeElectrodes.h.

◆ m_xcent

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

Definition at line 13 of file LArCoudeElectrodes.h.

◆ m_ycent

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

Definition at line 14 of file LArCoudeElectrodes.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
LArCoudeElectrodes::m_xcent
double m_xcent[1024][15]
Definition: LArCoudeElectrodes.h:13
PhysicalVolumeAccessor
Definition: PhysicalVolumeAccessor.h:18
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
LArCoudeElectrodes
Definition: LArCoudeElectrodes.h:10
PhysicalVolumeAccessor::GetPhysicalVolume
const G4VPhysicalVolume * GetPhysicalVolume(int) const
Definition: PhysicalVolumeAccessor.cxx:42
LArCoudeElectrodes::m_ycent
double m_ycent[1024][15]
Definition: LArCoudeElectrodes.h:14
python.changerun.pv
pv
Definition: changerun.py:81
LArCoudeElectrodes::m_phirot
double m_phirot[1024][15]
Definition: LArCoudeElectrodes.h:15