forked from ECCE-EIC/macros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
G4_TopoClusterReco.C
72 lines (60 loc) · 2.46 KB
/
G4_TopoClusterReco.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef MACRO_G4TOPOCLUSTERRECO_C
#define MACRO_G4TOPOCLUSTERRECO_C
#include <GlobalVariables.C>
#include <caloreco/RawClusterBuilderTopo.h>
#include <fun4all/Fun4AllServer.h>
R__LOAD_LIBRARY(libcalo_reco.so)
namespace Enable
{
bool TOPOCLUSTER = false;
int TOPOCLUSTER_VERBOSITY = 0;
} // namespace Enable
void TopoClusterReco()
{
int verbosity = max(Enable::VERBOSITY, Enable::TOPOCLUSTER_VERBOSITY);
//---------------
// Fun4All server
//---------------
Fun4AllServer* se = Fun4AllServer::instance();
// topoClustering in all three layers
RawClusterBuilderTopo* ClusterBuilder = new RawClusterBuilderTopo("HcalRawClusterBuilderTopo");
ClusterBuilder->Verbosity(verbosity);
ClusterBuilder->set_nodename("TOPOCLUSTER_ALLCALO");
ClusterBuilder->set_enable_HCal(true);
ClusterBuilder->set_enable_EMCal(true);
ClusterBuilder->set_noise(0.0025, 0.006, 0.03);
ClusterBuilder->set_significance(4.0, 2.0, 0.0);
ClusterBuilder->allow_corner_neighbor(true);
ClusterBuilder->set_do_split(true);
ClusterBuilder->set_minE_local_max(1.0, 2.0, 0.5);
ClusterBuilder->set_R_shower(0.025);
se->registerSubsystem(ClusterBuilder);
// topoClustering only in EMCal (needed for particle flow)
RawClusterBuilderTopo* ClusterBuilder1 = new RawClusterBuilderTopo("HcalRawClusterBuilderTopo1");
ClusterBuilder1->Verbosity(verbosity);
ClusterBuilder1->set_nodename("TOPOCLUSTER_EMCAL");
ClusterBuilder1->set_enable_HCal(false);
ClusterBuilder1->set_enable_EMCal(true);
ClusterBuilder1->set_noise(0.0025, 0.006, 0.03);
ClusterBuilder1->set_significance(4.0, 2.0, 0.0);
ClusterBuilder1->allow_corner_neighbor(true);
ClusterBuilder1->set_do_split(true);
ClusterBuilder1->set_minE_local_max(1.0, 2.0, 0.5);
ClusterBuilder1->set_R_shower(0.025);
se->registerSubsystem(ClusterBuilder1);
// topoClustering only in I+OHCal (needed for particle flow)
RawClusterBuilderTopo* ClusterBuilder2 = new RawClusterBuilderTopo("HcalRawClusterBuilderTopo2");
ClusterBuilder2->Verbosity(verbosity);
ClusterBuilder2->set_nodename("TOPOCLUSTER_HCAL");
ClusterBuilder2->set_enable_HCal(true);
ClusterBuilder2->set_enable_EMCal(false);
ClusterBuilder2->set_noise(0.0025, 0.006, 0.03);
ClusterBuilder2->set_significance(4.0, 2.0, 0.0);
ClusterBuilder2->allow_corner_neighbor(true);
ClusterBuilder2->set_do_split(true);
ClusterBuilder2->set_minE_local_max(1.0, 2.0, 0.5);
ClusterBuilder2->set_R_shower(0.025);
se->registerSubsystem(ClusterBuilder2);
return;
}
#endif