6 #include "G4LogicalVolume.hh"
25 static const std::string
prefix = strDetector.empty() ?
"" : strDetector+
"::";
27 prefix+
"LAr::EMB::Electrode::Straight");
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]);
42 const int id=cellid+stackid*10000;
50 const G4ThreeVector& tv=
pv->GetTranslation();
53 m_xcent[cellid][stackid] = tv.x();
54 m_ycent[cellid][stackid] = tv.y();
57 const G4ThreeVector& tv2=pv2->GetTranslation();
58 const G4LogicalVolume* lv =
pv->GetLogicalVolume();
59 const G4Trap* trap = (G4Trap*) lv->GetSolid();
60 const G4LogicalVolume* lv2 = pv2->GetLogicalVolume();
61 const G4Trap* trap2 = (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);
72 const int id=cellid+stackid*10000;
75 const G4RotationMatrix *rm=
pv->GetRotation();
78 if((stackid%2 == (1-
m_parity)) && (rm->phiY() < 0)) Slant = - Slant;
86 const int id=cellid+stackid*10000;
91 const G4LogicalVolume* lv =
pv->GetLogicalVolume();
92 const G4Trap* trap = (G4Trap*) lv->GetSolid();
95 l = trap->GetYHalfLength1();
97 const G4LogicalVolume* lv2 = pv2->GetLogicalVolume();
98 const G4Trap* trap2 = (G4Trap*) lv2->GetSolid();
99 l = trap->GetYHalfLength1()+trap2->GetYHalfLength1();