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_EventEvaluator.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_EventEvaluator.C
1
#ifndef MACRO_EventEvaluator_C
2
#define MACRO_EventEvaluator_C
3
4
#include <
fun4all/Fun4AllServer.h
>
5
#include <eiceval/EventEvaluatorEIC.h>
6
7
R__LOAD_LIBRARY
(libfun4all.so)
8
R__LOAD_LIBRARY
(libeiceval.so)
9
10
namespace Enable
11
{
12
// use Enable::EVENT_EVAL = true; in your macro
13
bool
EVENT_EVAL
=
false
;
14
bool
EVENT_EVAL_DO_HEPMC
=
false
;
15
bool
EVENT_EVAL_DO_EVT_LVL
=
false
;
16
bool
EVENT_EVAL_DO_HITS
=
false
;
17
bool
EVENT_EVAL_DO_HITS_ABSORBER
=
false
;
18
bool
EVENT_EVAL_DO_HITS_CALO
=
false
;
19
bool
EVENT_EVAL_DO_HITS_BLACKHOLE
=
false
;
20
}
// namespace Enable
21
22
namespace
EVENT_EVALUATOR
23
{
24
int
Verbosity
= 0;
25
float
EnergyThreshold
= 0.05;
26
}
// namespace EVENT_EVALUATOR
27
28
void
Event_Eval
(
const
std::string &
filename
)
29
{
30
Fun4AllServer
*se =
Fun4AllServer::instance
();
31
32
EventEvaluatorEIC
*eval =
new
EventEvaluatorEIC
(
"EVENTEVALUATOR"
, filename);
33
eval->
set_reco_tracing_energy_thresholdMC
(
EVENT_EVALUATOR::EnergyThreshold
);
34
eval->
Verbosity
(
EVENT_EVALUATOR::Verbosity
);
35
36
if
(
Enable::TRACKING
)
37
{
38
eval->
set_do_TRACKS
(
true
);
39
if
(
Enable::EVENT_EVAL_DO_HITS
) {
40
std::cout <<
"Enabled hits in event eval.\n"
;
41
eval->
set_do_HITS
(
true
);
42
if
(
Enable::EVENT_EVAL_DO_HITS_ABSORBER
) {
43
std::cout <<
"Enabled absorber hits in event eval.\n"
;
44
eval->
set_do_HITS_ABSORBER
(
true
);
45
}
46
if
(
Enable::EVENT_EVAL_DO_HITS_CALO
) {
47
std::cout <<
"Enabled calorimeter hits in event eval.\n"
;
48
eval->
set_do_HITS_CALO
(
true
);
49
}
50
if
(
Enable::BLACKHOLE_SAVEHITS
&&
Enable::EVENT_EVAL_DO_HITS_BLACKHOLE
) eval->
set_do_BLACKHOLE
(
true
);
51
}
52
53
eval->
set_do_PROJECTIONS
(
true
);
54
if
(
G4TRACKING::DISPLACED_VERTEX
)
55
eval->
set_do_VERTEX
(
true
);
56
if
(
Enable::DIRC_RECO
or
Enable::mRICH_RECO
or
Enable::RICH_RECO
)
57
eval->
set_do_PID_LogLikelihood
(
true
);
58
}
59
// set calorimeter Infos
60
if
(
Enable::CEMC
) eval->
set_do_CEMC
(
true
);
61
if
(
Enable::EEMC
||
Enable::EEMCH
) eval->
set_do_EEMC
(
true
);
62
if
(
Enable::EEMCH
&&
G4EEMCH::SETTING::USEHYBRID
) eval->
set_do_EEMCG
(
true
);
63
if
(
Enable::FEMC
) eval->
set_do_FEMC
(
true
);
64
if
(
Enable::EHCAL
) eval->
set_do_EHCAL
(
true
);
65
if
(
Enable::HCALIN
) eval->
set_do_HCALIN
(
true
);
66
if
(
Enable::HCALOUT
) eval->
set_do_HCALOUT
(
true
);
67
if
(
Enable::FHCAL
) eval->
set_do_FHCAL
(
true
);
68
if
(
Enable::FHCAL_CLUSTER
||
Enable::FEMC_CLUSTER
||
Enable::EEMC_CLUSTER
) eval->
set_do_CLUSTERS
(
true
);
69
if
(
Enable::DRCALO
) eval->
set_do_DRCALO
(
true
);
70
if
(
Enable::LFHCAL
) eval->
set_do_LFHCAL
(
true
);
71
if
(
Enable::BECAL
) eval->
set_do_BECAL
(
true
);
72
73
// storing MC event info
74
eval->
set_do_MCPARTICLES
(
true
);
75
eval->
set_do_HEPMC
(
Enable::EVENT_EVAL_DO_HEPMC
);
76
eval->
set_do_store_event_level_info
(
Enable::EVENT_EVAL_DO_EVT_LVL
);
77
78
// storing geometry
79
eval->
set_do_GEOMETRY
(
true
);
80
81
se->
registerSubsystem
(eval);
82
83
return
;
84
}
85
86
#endif
macros
blob
master
common
G4_EventEvaluator.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration