ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4_mRICH.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_mRICH.C
1
#pragma once
2
3
#include "
GlobalVariables.C
"
4
5
#include <
g4main/PHG4Reco.h
>
6
7
#include <
g4mrich/PHG4mRICHSubsystem.h
>
8
#include <
g4trackfastsim/PHG4TrackFastSim.h
>
9
#include <eccefastpidreco/ECCEFastPIDReco.h>
10
#include <eccefastpidreco/ECCEmRICHFastPIDMap.h>
18
R__LOAD_LIBRARY
(libECCEFastPIDReco.so)
19
20
namespace Enable
21
{
22
bool
mRICH
=
false
;
23
bool
mRICH_RECO
=
false
;
24
bool
mRICH_OVERLAPCHECK
=
false
;
25
int
mRICH_VERBOSITY
= 0;
26
}
// namespace Enable
27
28
void
mRICHInit
()
29
{
30
}
31
32
//-1: single module
33
// 0: build h-side sectors and e-side wall
34
// 1: build h-side sectors
35
// 2: build e-side wall
36
// 3: build h-side wall
37
// 4: build h-side wall and e-side wall
38
// 5: build b-side sectors
39
// 6: build projected e-side wall
40
41
void
mRICHSetup
(
PHG4Reco
*g4Reco,
const
int
detectorSetup = 1,
//1: full setup; 0:skeleton
42
const
int
mRICHsystemSetup = 6
//5//2//-1//
43
)
44
{
45
bool
OverlapCheck =
Enable::OVERLAPCHECK
||
Enable::mRICH_OVERLAPCHECK
;
46
47
PHG4mRICHSubsystem
*
mRICH
=
new
PHG4mRICHSubsystem
(
"mRICH"
, 1);
48
mRICH->
set_int_param
(
"detectorSetup"
, detectorSetup);
49
mRICH->
set_int_param
(
"subsystemSetup"
, mRICHsystemSetup);
50
mRICH->
UseCalibFiles
(
PHG4DetectorSubsystem::xml
);
51
mRICH->
SetCalibrationFileDir
(
string
(getenv(
"CALIBRATIONROOT"
)) +
string
(
"/mRICH/GeometryV2/"
));
52
mRICH->
OverlapCheck
(OverlapCheck);
53
// mRICH->Verbosity(5);
54
55
g4Reco->
registerSubsystem
(mRICH);
56
57
if
(
TRACKING::FastKalmanFilter
)
58
{
59
// project to an reference plane at z=170 cm
60
TRACKING::FastKalmanFilter
-> add_zplane_state(
"mRICH"
, -125);
61
TRACKING::ProjectionNames
.insert(
"mRICH"
);
62
}
63
}
64
65
66
void
mRICHReco
(
int
verbosity = 0)
67
{
68
verbosity =
std::max
(
Enable::VERBOSITY
, verbosity);
69
verbosity =
std::max
(
Enable::mRICH_VERBOSITY
, verbosity);
70
71
Fun4AllServer
*se =
Fun4AllServer::instance
();
72
73
ECCEmRICHFastPIDMap
* pidmap =
new
ECCEmRICHFastPIDMap
();
74
pidmap->
Verbosity
(verbosity);
75
76
ECCEFastPIDReco
* reco =
new
ECCEFastPIDReco
(pidmap,
EICPIDDefs::mRICH
,
"ECCEFastPIDReco-mRICH"
);
77
reco->
Verbosity
(verbosity);
78
79
se->
registerSubsystem
(reco);
80
}
81
82
void
mRICH_Eval
(std::string outputfile,
int
verbosity = 0)
83
{
84
gSystem->Load(
"libfun4all.so"
);
85
gSystem->Load(
"libg4eval.so"
);
86
Fun4AllServer
*se =
Fun4AllServer::instance
();
87
88
return
;
89
}
macros
blob
master
common
G4_mRICH.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration