#include <LArStraightAbsorbers.h>
|
| double | XCentAbs (int stackid, int cellid) const |
| double | YCentAbs (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 LArStraightAbsorbers.h.
◆ LArStraightAbsorbers()
| LArStraightAbsorbers::LArStraightAbsorbers |
( |
const std::string & | strDetector = "" | ) |
|
|
private |
Definition at line 17 of file LArStraightAbsorbers.cxx.
18{
22
23 static const std::string
prefix = strDetector.empty() ?
"" : strDetector+
"::";
24 static const PhysicalVolumeAccessor pva(prefix+"LAr::EMB::STAC",
25 prefix+"LAr::EMB::ThinAbs::Straight");
26
27 for (int stackid=0; stackid<14; stackid++) {
28 for (int cellid=0; cellid<1024; cellid++) {
31 const double slant =
SlantAbs(pva, stackid,cellid);
32 sincos(slant, &
m_sinu[cellid][stackid], &
m_cosu[cellid][stackid]);
33 }
34 }
35}
LArGeo::VDetectorParameters LArVG4DetectorParameters
static const VDetectorParameters * GetInstance()
double SlantAbs(const PhysicalVolumeAccessor &theAbsorbers, int stackid, int cellid) const
void initXYCentAbs(const PhysicalVolumeAccessor &theAbsorbers, int stackid, int cellid)
void initHalfLength(const PhysicalVolumeAccessor &theAbsorbers, int stackid, int cellid)
◆ Cosu()
| double LArStraightAbsorbers::Cosu |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ GetInstance()
| const LArStraightAbsorbers * LArStraightAbsorbers::GetInstance |
( |
const std::string & | strDetector = "" | ) |
|
|
static |
◆ HalfLength()
| double LArStraightAbsorbers::HalfLength |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ initHalfLength()
| void LArStraightAbsorbers::initHalfLength |
( |
const PhysicalVolumeAccessor & | theAbsorbers, |
|
|
int | stackid, |
|
|
int | cellid ) |
|
private |
Definition at line 78 of file LArStraightAbsorbers.cxx.
79{
81 const int id=cellid+stackid*10000;
83 if (pv) {
84 const G4LogicalVolume* lv =
pv->GetLogicalVolume();
85 const G4Trap* trap = static_cast<G4Trap*> (lv->GetSolid());
87 if (!pv2)
l = trap->GetYHalfLength1();
88 else {
89 const G4LogicalVolume* lv2 = pv2->GetLogicalVolume();
90 const G4Trap* trap2 = static_cast<G4Trap*> (lv2->GetSolid());
91 l = trap->GetYHalfLength1()+trap2->GetYHalfLength1();
92 }
93 }
95}
const G4VPhysicalVolume * GetPhysicalVolume(int) const
l
Printing final latex table to .tex output file.
◆ initXYCentAbs()
| void LArStraightAbsorbers::initXYCentAbs |
( |
const PhysicalVolumeAccessor & | theAbsorbers, |
|
|
int | stackid, |
|
|
int | cellid ) |
|
private |
Definition at line 37 of file LArStraightAbsorbers.cxx.
38{
39 const int id=cellid+stackid*10000;
41 if (!pv) {
44 return;
45 }
46 const G4ThreeVector& tv=
pv->GetTranslation();
48 if (!pv2) {
49 m_xcent[cellid][stackid] = tv.x();
50 m_ycent[cellid][stackid] = tv.y();
51 }
52 else {
53 const G4ThreeVector& tv2=pv2->GetTranslation();
54 const G4LogicalVolume* lv =
pv->GetLogicalVolume();
55 const G4Trap* trap = static_cast<G4Trap*> (lv->GetSolid());
56 const G4LogicalVolume* lv2 = pv2->GetLogicalVolume();
57 const G4Trap* trap2 = static_cast<G4Trap*> (lv2->GetSolid());
58 const double xl1=trap->GetYHalfLength1();
59 const double xl2=trap2->GetYHalfLength1();
60 m_xcent[cellid][stackid] = (tv.x()*xl1+tv2.x()*xl2)/(xl1+xl2);
61 m_ycent[cellid][stackid] = (tv.y()*xl1+tv2.y()*xl2)/(xl1+xl2);
62 }
63}
◆ Sinu()
| double LArStraightAbsorbers::Sinu |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ SlantAbs()
| double LArStraightAbsorbers::SlantAbs |
( |
const PhysicalVolumeAccessor & | theAbsorbers, |
|
|
int | stackid, |
|
|
int | cellid ) const |
|
private |
Definition at line 65 of file LArStraightAbsorbers.cxx.
66{
67
68 const int id=cellid+stackid*10000;
70 if (!pv) return 0.;
71 const G4RotationMatrix *rm=
pv->GetRotation();
72 double Slant = (stackid%2 ==
m_parity) ? 180*CLHEP::deg-(rm->thetaY()):(rm->thetaY())-180*CLHEP::deg;
73 if((stackid%2 ==
m_parity) && (rm->phiY() > 0)) Slant = 360.*CLHEP::deg - Slant;
74 if((stackid%2 == (1-
m_parity)) && (rm->phiY() < 0)) Slant = - Slant;
75 return Slant;
76}
◆ XCentAbs()
| double LArStraightAbsorbers::XCentAbs |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ YCentAbs()
| double LArStraightAbsorbers::YCentAbs |
( |
int | stackid, |
|
|
int | cellid ) const |
|
inline |
◆ m_cosu
| double LArStraightAbsorbers::m_cosu[1024][14] {} |
|
private |
◆ m_halflength
| double LArStraightAbsorbers::m_halflength[1024][14] {} |
|
private |
◆ m_parity
| int LArStraightAbsorbers::m_parity |
|
private |
◆ m_sinu
| double LArStraightAbsorbers::m_sinu[1024][14] {} |
|
private |
◆ m_xcent
| double LArStraightAbsorbers::m_xcent[1024][14] {} |
|
private |
◆ m_ycent
| double LArStraightAbsorbers::m_ycent[1024][14] {} |
|
private |
The documentation for this class was generated from the following files: