9 #include "ERTelescopeGeoComponentDoubleSi.h" 11 #include "TGeoManager.h" 12 #include "TGeoMatrix.h" 13 #include <TDOMParser.h> 18 #include "FairLogger.h" 21 ERTelescopeGeoComponentDoubleSi::ERTelescopeGeoComponentDoubleSi(
22 const TString& typeFromXML,
const TString&
id,
const TString& orientAroundZ)
25 TString volumeNameInd = (orientAroundZ ==
"X") ?
"_XY" :
"_YX";
26 fOrientAroundZ = volumeNameInd;
27 fVolumeName += volumeNameInd;
30 ERTelescopeGeoComponentDoubleSi::ERTelescopeGeoComponentDoubleSi(
31 const TString& typeFromXML,
const TString&
id,
const TVector3& position,
32 const TVector3& rotation,
const TString& orientAroundZ)
35 TString volumeNameInd = (orientAroundZ ==
"X") ?
"_XY" :
"_YX";
36 fOrientAroundZ = volumeNameInd;
37 fVolumeName += volumeNameInd;
40 TString ERTelescopeGeoComponentDoubleSi::GetBranchName(
41 ERDataObjectType objectType, OrientationAroundZ orientationAroundZ ,
42 ChannelSide channelSide )
const {
43 return GetBranchNamePrefix(SensetiveType::Si, objectType)
44 +
"_" + OrientationAroundZStr(orientationAroundZ)
45 + (channelSide != ChannelSide::None ? TString(
"_") + ChannelSideStr(channelSide) :
"");
48 std::list<OrientationAroundZ> ERTelescopeGeoComponentDoubleSi::GetOrientationsAroundZ()
const {
49 return {OrientationAroundZ::X, OrientationAroundZ::Y};
52 std::list<ChannelSide> ERTelescopeGeoComponentDoubleSi::GetChannelSides()
const {
53 if (fHasTwoSidedChannel) {
54 return {ChannelSide::First, ChannelSide::Second};
56 return {ChannelSide::None};
59 Int_t ERTelescopeGeoComponentDoubleSi::GetChannelFromSensetiveNodePath(
60 const TString& path, OrientationAroundZ orientation )
const {
61 TString pathWithChannelPostfix = path;
62 if (orientation == OrientationAroundZ::X)
63 pathWithChannelPostfix.Remove(pathWithChannelPostfix.Last(
'/'), pathWithChannelPostfix.Length());
64 const TString channelStr(pathWithChannelPostfix(pathWithChannelPostfix.Last(
'_') + 1,
65 pathWithChannelPostfix.Length()));
66 return channelStr.Atoi();