#include <LArStraightElectrodes.h>
|
| double | XCentEle (int stackid, int cellid) const |
| double | YCentEle (int stackid, int cellid) const |
| double | HalfLength (int stackid, int cellid) const |
| double | Cosu (int stackid, int cellid) const |
| double | Sinu (int stackid, int cellid) const |
Definition at line 11 of file LArStraightElectrodes.h.
◆ LArStraightElectrodes()
| LArStraightElectrodes::LArStraightElectrodes |
( |
const std::string & | strDetector = "" | ) |
|
|
private |
Definition at line 19 of file LArStraightElectrodes.cxx.
20{
24
25 static const std::string
prefix = strDetector.empty() ?
"" : strDetector+
"::";
26 static const PhysicalVolumeAccessor pva(prefix+"LAr::EMB::STAC",
27 prefix+"LAr::EMB::Electrode::Straight");
28
29 for (int stackid=0; stackid<14; stackid++) {
30 for (int cellid=0; cellid<1024; cellid++) {
33 const double slant =
SlantEle(pva, stackid, cellid);
34 sincos(slant, &
m_sinu[cellid][stackid], &
m_cosu[cellid][stackid]);
35 }
36 }
37}
LArGeo::VDetectorParameters LArVG4DetectorParameters
static const VDetectorParameters * GetInstance()
double SlantEle(const PhysicalVolumeAccessor &theElectrodes, int stackid, int cellid) const
void initHalfLength(const PhysicalVolumeAccessor &theElectrodes, int stackid, int cellid)
void initXYCentEle(const PhysicalVolumeAccessor &theElectrodes, int stackid, int cellid)
◆ Cosu()
| double LArStraightElectrodes::Cosu |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ GetInstance()
◆ HalfLength()
| double LArStraightElectrodes::HalfLength |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ initHalfLength()
| void LArStraightElectrodes::initHalfLength |
( |
const PhysicalVolumeAccessor & | theElectrodes, |
|
|
int | stackid, |
|
|
int | cellid ) |
|
private |
Definition at line 83 of file LArStraightElectrodes.cxx.
84{
86 const int id=cellid+stackid*10000;
88 if (!pv){
90 } else {
91 const G4LogicalVolume* lv =
pv->GetLogicalVolume();
92 const G4Trap* trap = static_cast<G4Trap*> (lv->GetSolid());
94 if (!pv2){
95 l = trap->GetYHalfLength1();
96 } else {
97 const G4LogicalVolume* lv2 = pv2->GetLogicalVolume();
98 const G4Trap* trap2 = static_cast<G4Trap*> (lv2->GetSolid());
99 l = trap->GetYHalfLength1()+trap2->GetYHalfLength1();
100 }
101 }
103}
const G4VPhysicalVolume * GetPhysicalVolume(int) const
l
Printing final latex table to .tex output file.
◆ initXYCentEle()
| void LArStraightElectrodes::initXYCentEle |
( |
const PhysicalVolumeAccessor & | theElectrodes, |
|
|
int | stackid, |
|
|
int | cellid ) |
|
private |
Definition at line 40 of file LArStraightElectrodes.cxx.
41{
42 const int id=cellid+stackid*10000;
44 if (!pv) {
47 return;
48 }
49
50 const G4ThreeVector& tv=
pv->GetTranslation();
52 if (!pv2) {
53 m_xcent[cellid][stackid] = tv.x();
54 m_ycent[cellid][stackid] = tv.y();
55 }
56 else {
57 const G4ThreeVector& tv2=pv2->GetTranslation();
58 const G4LogicalVolume* lv =
pv->GetLogicalVolume();
59 const G4Trap* trap = static_cast<G4Trap*> (lv->GetSolid());
60 const G4LogicalVolume* lv2 = pv2->GetLogicalVolume();
61 const G4Trap* trap2 = static_cast<G4Trap*> (lv2->GetSolid());
62 double xl1=trap->GetYHalfLength1();
63 double xl2=trap2->GetYHalfLength1();
64 m_xcent[cellid][stackid] = (tv.x()*xl1+tv2.x()*xl2)/(xl1+xl2);
65 m_ycent[cellid][stackid] = (tv.y()*xl1+tv2.y()*xl2)/(xl1+xl2);
66 }
67}
◆ Sinu()
| double LArStraightElectrodes::Sinu |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ SlantEle()
| double LArStraightElectrodes::SlantEle |
( |
const PhysicalVolumeAccessor & | theElectrodes, |
|
|
int | stackid, |
|
|
int | cellid ) const |
|
private |
Definition at line 70 of file LArStraightElectrodes.cxx.
71{
72 const int id=cellid+stackid*10000;
74 if (!pv) return 0.;
75 const G4RotationMatrix *rm=
pv->GetRotation();
76 double Slant = (stackid%2 ==
m_parity) ? 180*CLHEP::deg-(rm->thetaY()):(rm->thetaY())-180*CLHEP::deg;
77 if((stackid%2 ==
m_parity) && (rm->phiY() > 0)) Slant = 360.*CLHEP::deg - Slant;
78 if((stackid%2 == (1-
m_parity)) && (rm->phiY() < 0)) Slant = - Slant;
79 return Slant;
80}
◆ XCentEle()
| double LArStraightElectrodes::XCentEle |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ YCentEle()
| double LArStraightElectrodes::YCentEle |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ m_cosu
| double LArStraightElectrodes::m_cosu[1024][14] {} |
|
private |
◆ m_halflength
| double LArStraightElectrodes::m_halflength[1024][14] {} |
|
private |
◆ m_parity
| int LArStraightElectrodes::m_parity |
|
private |
◆ m_sinu
| double LArStraightElectrodes::m_sinu[1024][14] {} |
|
private |
◆ m_xcent
| double LArStraightElectrodes::m_xcent[1024][14] {} |
|
private |
◆ m_ycent
| double LArStraightElectrodes::m_ycent[1024][14] {} |
|
private |
The documentation for this class was generated from the following files: