Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Fun4All_HCalCalib.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4All_HCalCalib.C
1
#ifndef FUN4ALL_HCALCALIB_C
2
#define FUN4ALL_HCALCALIB_C
3
4
#include <caloreco/CaloTowerBuilder.h>
5
#include <caloreco/CaloWaveformProcessing.h>
6
#include <caloreco/CaloGeomMapping.h>
7
8
#include <
ffamodules/FlagHandler.h
>
9
#include <
ffamodules/HeadReco.h
>
10
#include <
ffamodules/SyncReco.h
>
11
#include <
ffamodules/CDBInterface.h
>
12
13
#include <
fun4allraw/Fun4AllPrdfInputManager.h
>
14
15
#include <
fun4all/Fun4AllDstOutputManager.h
>
16
#include <
fun4all/Fun4AllInputManager.h
>
17
#include <
fun4all/Fun4AllServer.h
>
18
#include <
fun4all/SubsysReco.h
>
19
20
#include <
phool/recoConsts.h
>
21
22
#include <cosmictree/HCalCalibTree.h>
23
24
R__LOAD_LIBRARY(libfun4all.so)
25
R__LOAD_LIBRARY(libfun4allraw.so)
26
R__LOAD_LIBRARY(libcalo_reco.so)
27
R__LOAD_LIBRARY(libffamodules.so)
28
R__LOAD_LIBRARY(libHCalCalibTree.so)
29
30
void
Fun4All_HCalCalib
(
int
nevents
= 0, const std::
string
&
fname
= "/sphenix/user/hanpuj/HCalCosmicCalib/prdf_file/cosmics-00028508-0000.prdf") {
31
Fun4AllServer
*se =
Fun4AllServer::instance
();
32
se->
Verbosity
(0);
33
recoConsts
*rc =
recoConsts::instance
();
34
35
//===============
36
// conditions DB flags
37
//===============
38
rc->
set_StringFlag
(
"CDB_GLOBALTAG"
,
"MDC2"
);
39
rc->
set_uint64Flag
(
"TIMESTAMP"
, 6);
40
41
Fun4AllInputManager
*
in
=
new
Fun4AllPrdfInputManager
(
"in"
);
42
in->
fileopen
(
fname
);
43
se->
registerInputManager
(in);
44
45
CaloTowerBuilder
*ca2 =
new
CaloTowerBuilder
();
46
ca2->
set_detector_type
(
CaloTowerDefs::HCALIN
);
47
ca2->
set_nsamples
(12);
48
ca2->
set_processing_type
(
CaloWaveformProcessing::TEMPLATE
);
//TEMPLATE
49
ca2->
set_builder_type
(
CaloTowerDefs::kWaveformTowerv2
);
50
ca2->
set_outputNodePrefix
(
"TOWERSV2_"
);
51
ca2->
set_softwarezerosuppression
(
true
, 200);
52
se->
registerSubsystem
(ca2);
53
54
CaloTowerBuilder
*ca3 =
new
CaloTowerBuilder
();
55
ca3->
set_detector_type
(
CaloTowerDefs::HCALOUT
);
56
ca3->
set_nsamples
(12);
57
ca3->
set_processing_type
(
CaloWaveformProcessing::TEMPLATE
);
//TEMPLATE
58
ca3->
set_builder_type
(
CaloTowerDefs::kWaveformTowerv2
);
59
ca3->
set_outputNodePrefix
(
"TOWERSV2_"
);
60
ca3->
set_softwarezerosuppression
(
true
, 200);
61
se->
registerSubsystem
(ca3);
62
63
HCalCalibTree
*wt2 =
new
HCalCalibTree
(
"HCalCalib_TREE_2"
,
"ihcal_hist.root"
,
"TOWERSV2_"
);
64
wt2->
Detector
(
"HCALIN"
);
65
se->
registerSubsystem
(wt2);
66
67
HCalCalibTree
*wt3 =
new
HCalCalibTree
(
"HCalCalib_TREE_3"
,
"ohcal_hist.root"
,
"TOWERSV2_"
);
68
wt3->
Detector
(
"HCALOUT"
);
69
se->
registerSubsystem
(wt3);
70
71
se->
run
(nevents);
72
CDBInterface::instance
()->
Print
();
// print used DB files
73
se->
End
();
74
se->
PrintTimer
();
75
gSystem->Exit(0);
76
}
77
78
#endif
analysis
blob
master
HCalCosmicCalib
macro
Fun4All_HCalCalib.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:52
using
1.8.2 with
sPHENIX GitHub integration