Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pierre-Alain Loizeau
cbmroot
Commits
e262c966
Commit
e262c966
authored
Nov 04, 2021
by
Alexandru Bercuci
Browse files
add radiator identification based on geo file
parent
a4a08463
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
core/detectors/trd/CbmTrdGeoHandler.cxx
core/detectors/trd/CbmTrdGeoHandler.cxx
+14
-0
core/detectors/trd/CbmTrdGeoHandler.h
core/detectors/trd/CbmTrdGeoHandler.h
+6
-1
No files found.
core/detectors/trd/CbmTrdGeoHandler.cxx
View file @
e262c966
...
...
@@ -39,6 +39,7 @@ CbmTrdGeoHandler::CbmTrdGeoHandler()
,
fLayerId
(
0
)
,
fModuleId
(
0
)
,
fModuleType
(
0
)
,
fRadiatorType
(
-
1
)
,
fRotation
(
0
)
,
fStation
(
0
)
,
fLayer
(
0
)
...
...
@@ -159,6 +160,12 @@ Int_t CbmTrdGeoHandler::GetModuleType(const TString& path)
return
fModuleType
;
}
Int_t
CbmTrdGeoHandler
::
GetRadiatorType
(
const
TString
&
path
)
{
if
(
fGeoPathHash
!=
path
.
Hash
())
{
NavigateTo
(
path
);
}
return
fRadiatorType
;
}
Int_t
CbmTrdGeoHandler
::
GetStation
(
const
TString
&
path
)
{
if
(
fGeoPathHash
!=
path
.
Hash
())
{
NavigateTo
(
path
);
}
...
...
@@ -221,6 +228,13 @@ void CbmTrdGeoHandler::NavigateTo(const TString& path)
// In TGeoManager numbering starts with 1, so we have to subtract 1.
fModuleCopy
=
((
modulecopyNr
/
1000000
)
%
100
);
// from module copy number
fRotation
=
((
modulecopyNr
/
100000
)
%
10
);
// from module copy number
fRadiatorType
=
-
1
;
for
(
int
i
=
0
;
i
<
modulenode
->
GetNdaughters
();
i
++
)
{
TString
nDaughter
(
modulenode
->
GetDaughter
(
i
)
->
GetName
());
if
(
!
nDaughter
.
BeginsWith
(
"radiator"
)
&&
!
nDaughter
.
BeginsWith
(
"Radiator"
))
continue
;
fRadiatorType
=
0
;
// TODO define radiator (+ entrance window) types according to the naming convention
}
}
else
// 2013 and earlier
{
...
...
core/detectors/trd/CbmTrdGeoHandler.h
View file @
e262c966
...
...
@@ -82,6 +82,10 @@ public:
Double_t
GetY
(
const
TString
&
path
);
Double_t
GetZ
(
const
TString
&
path
);
Int_t
GetModuleType
(
const
TString
&
path
);
/** \brief Navigate to node and return the radiator type build in the geometry based on the naming convention.
* @return radiator type ID or -1 if the radiator is not installed
*/
Int_t
GetRadiatorType
(
const
TString
&
path
);
// for backward compatibility
Int_t
GetStation
(
const
TString
&
path
);
...
...
@@ -101,6 +105,7 @@ private:
Int_t
fLayerId
;
//!
Int_t
fModuleId
;
//!
Int_t
fModuleType
;
//!
Int_t
fRadiatorType
;
//! radiator + chamber entrance window type
Int_t
fRotation
;
//! rotation angle 0,1,2,3
// for backward compatibility
...
...
@@ -111,7 +116,7 @@ private:
CbmTrdGeoHandler
(
const
CbmTrdGeoHandler
&
);
CbmTrdGeoHandler
operator
=
(
const
CbmTrdGeoHandler
&
);
ClassDef
(
CbmTrdGeoHandler
,
4
)
ClassDef
(
CbmTrdGeoHandler
,
5
)
};
#endif //CBMTRDGEOHANDLER_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment