BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnScWallGeo.h
Go to the documentation of this file.
1
#ifndef BMNSCWALLGEO_H
2
#define BMNSCWALLGEO_H
3
4
#include "BmnGeoTemplate.h"
5
#include "
BmnScWallAddress.h
"
6
#include "
BmnScWallGeoPar.h
"
7
8
#include <regex>
9
10
static
const
std::regex
kScWallRegex
{
BmnScWallGeoPar::fElementPattern
};
11
12
class
BmnScWallGeo
13
:
public
FairGeoSet
14
,
public
BmnGeoTemplate
<BmnScWallGeo>
15
{
16
public
:
17
BmnScWallGeo
()
18
:
FairGeoSet
()
19
{
20
SetName(
"BmnScWallGeo"
);
21
}
22
23
static
bool
CheckIfSensitive
(
const
std::string& vol) {
return
BmnScWallGeoPar::CheckIfSensitive
(vol); }
24
static
const
char
*
PathBeforeLocalSystem
() {
return
BmnScWallGeoPar::fPathBeforeLocalSystem
; }
25
static
const
char
*
DetectorVolumeName
() {
return
BmnScWallGeoPar::fDetectorVolumeName
; }
26
static
const
char
*
TopVolumeName
() {
return
BmnScWallGeoPar::fTopVolumeName
; }
27
28
uint32_t
GetAddressFromPath
(
const
std::string& spath)
const
29
{
30
std::smatch
m
;
31
if
(std::regex_search(spath,
m
,
kScWallRegex
) &&
m
.size() == 2) {
32
return
BmnScWallAddress::GetAddress
(std::stoi(
m
[1]));
33
}
34
LOG(error) << GetName() <<
": no address for "
<< spath;
35
return
0;
36
}
37
38
int
GetMaxCellId
()
const
39
{
40
uint32_t mx = 0;
41
for
(
auto
& kv :
fPositionMap
) {
42
mx = std::max(mx,
BmnScWallAddress::GetCellId
(kv.first));
43
}
44
return
mx;
45
}
46
47
ClassDef
(
BmnScWallGeo
, 2)
48
};
49
50
#endif
// BMNSCWALLGEO_H
m
__m128 m
Definition
P4_F32vec4.h:27
ClassDef
#define ClassDef(name, id)
BmnGeoTemplate< BmnScWallGeo >::BmnGeoTemplate
BmnGeoTemplate()=default
BmnGeoTemplate< BmnScWallGeo >::fPositionMap
std::map< uint32_t, std::pair< TVector3, TVector3 > > fPositionMap
Definition
BmnGeoTemplate.h:157
BmnScWallAddress::GetCellId
static uint32_t GetCellId(uint32_t address)
Return Cell id from address.
Definition
BmnScWallAddress.h:52
BmnScWallAddress::GetAddress
static uint32_t GetAddress(uint32_t CellId)
Return address from system ID, Cell ID.
Definition
BmnScWallAddress.h:30
BmnScWallGeoPar::CheckIfSensitive
static bool CheckIfSensitive(std::string name)
Definition
BmnScWallGeoPar.cxx:56
BmnScWallGeoPar::fDetectorVolumeName
static const TString fDetectorVolumeName
Definition
BmnScWallGeoPar.h:37
BmnScWallGeoPar::fTopVolumeName
static const TString fTopVolumeName
Definition
BmnScWallGeoPar.h:35
BmnScWallGeoPar::fPathBeforeLocalSystem
static const TString fPathBeforeLocalSystem
Definition
BmnScWallGeoPar.h:61
BmnScWallGeoPar::fElementPattern
static const std::regex fElementPattern
Definition
BmnScWallGeoPar.h:63
BmnScWallGeo
Definition
BmnScWallGeo.h:15
BmnScWallGeo::GetMaxCellId
int GetMaxCellId() const
Definition
BmnScWallGeo.h:38
BmnScWallGeo::CheckIfSensitive
static bool CheckIfSensitive(const std::string &vol)
Definition
BmnScWallGeo.h:23
BmnScWallGeo::TopVolumeName
static const char * TopVolumeName()
Definition
BmnScWallGeo.h:26
BmnScWallGeo::GetAddressFromPath
uint32_t GetAddressFromPath(const std::string &spath) const
Definition
BmnScWallGeo.h:28
BmnScWallGeo::BmnScWallGeo
BmnScWallGeo()
Definition
BmnScWallGeo.h:17
BmnScWallGeo::DetectorVolumeName
static const char * DetectorVolumeName()
Definition
BmnScWallGeo.h:25
BmnScWallGeo::PathBeforeLocalSystem
static const char * PathBeforeLocalSystem()
Definition
BmnScWallGeo.h:24
FairGeoSet
BmnScWallAddress.h
BmnScWallGeoPar.h
kScWallRegex
static const std::regex kScWallRegex
Definition
BmnScWallGeo.h:10
kScWallRegex
static const std::regex kScWallRegex
Definition
BmnScWallGeo.h:10
detectors
scwall
BmnScWallGeo.h
Generated on
for BmnRoot by
1.17.0