9 #include "ERTelescopeGeoComponentSingleSi.h" 11 #include "TGeoManager.h" 12 #include "TGeoMatrix.h" 13 #include <TDOMParser.h> 18 #include "FairLogger.h" 23 ERTelescopeGeoComponentSingleSi::ERTelescopeGeoComponentSingleSi(
24 const TString& typeFromXML,
const TString&
id,
const TString& orientAroundZ)
27 TString volumeNameInd = (orientAroundZ ==
"X") ?
"_X" :
"_Y";
28 fOrientAroundZ = (orientAroundZ ==
"X") ? OrientationAroundZ::X : OrientationAroundZ::Y;
29 fVolumeName += volumeNameInd;
32 ERTelescopeGeoComponentSingleSi::ERTelescopeGeoComponentSingleSi(
33 const TString& typeFromXML,
const TString&
id,
const TVector3& position,
34 const TVector3& rotation,
const TString& orientAroundZ)
37 TString volumeNameInd = (orientAroundZ ==
"X") ?
"_X" :
"_Y";
38 fOrientAroundZ = (orientAroundZ ==
"X") ? OrientationAroundZ::X : OrientationAroundZ::Y;
39 fVolumeName += volumeNameInd;
42 TString ERTelescopeGeoComponentSingleSi::GetBranchName(
43 ERDataObjectType objectType, OrientationAroundZ ,
44 ChannelSide channelSide )
const {
45 return GetBranchNamePrefix(SensetiveType::Si, objectType)
46 + (channelSide != ChannelSide::None ? TString(
"_") + ChannelSideStr(channelSide) :
"");
49 std::list<OrientationAroundZ> ERTelescopeGeoComponentSingleSi::GetOrientationsAroundZ()
const {
50 return {fOrientAroundZ};
53 std::list<ChannelSide> ERTelescopeGeoComponentSingleSi::GetChannelSides()
const {
54 if (fHasTwoSidedChannel) {
55 return {ChannelSide::First, ChannelSide::Second};
57 return {ChannelSide::None};
60 Int_t ERTelescopeGeoComponentSingleSi::GetChannelFromSensetiveNodePath(
61 const TString& path, OrientationAroundZ )
const {
62 const TString channelStr(path(path.Last(
'_') + 1, path.Length()));
63 return channelStr.Atoi();