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
towerslope_dst_runner.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file towerslope_dst_runner.C
1
#pragma once
2
#if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3
#include <
fun4all/SubsysReco.h
>
4
#include <
fun4all/Fun4AllServer.h
>
5
#include <
fun4all/Fun4AllInputManager.h
>
6
#include <
fun4allraw/Fun4AllPrdfInputManager.h
>
7
#include <
fun4all/Fun4AllDstInputManager.h
>
8
//#include <rawwaveformtowerbuilder/RawWaveformTowerBuilder.h>
9
#include <
fun4all/Fun4AllDstOutputManager.h
>
10
11
#include <litecaloeval/LiteCaloEval.h>
12
#include <caloreco/CaloTowerCalib.h>
13
#include <caloreco/RawClusterBuilderTemplate.h>
14
//#include <calib_emc_pi0/CaloCalibEmc_Pi0.h>
15
16
#include <
phool/recoConsts.h
>
17
18
19
R__LOAD_LIBRARY(libfun4all.so)
20
R__LOAD_LIBRARY(libfun4allraw.so)
21
R__LOAD_LIBRARY(libcalo_reco.so)
22
R__LOAD_LIBRARY(libLiteCaloEvalTowSlope.so)
23
//R__LOAD_LIBRARY(libcalibCaloEmc_pi0.so)
24
25
26
27
#endif
28
29
// to get files from my local area
30
void
towerslope_dst_runner
(
int
nevents
= 1e5,
const
char
*
fname
=
"/sphenix/user/sregmi/FINAL_VERSION/tower_slope_old_tower_method/3_RawWaveformTowerBuilder/macro/testoutput_400.root"
,
const
char
*
outfile
=
"defout.root"
)
31
//,const int runNumber)
32
{
33
34
Fun4AllServer
*se =
Fun4AllServer::instance
();
35
36
37
Fun4AllInputManager
*
in
=
new
Fun4AllDstInputManager
(
"in"
);
38
39
TString infiletstr(
fname
);
40
if
(infiletstr.Contains(
".list"
))
41
in->
AddListFile
(
fname
);
42
else
43
in->
fileopen
(
fname
);
44
45
46
se->
registerInputManager
(in);
47
48
//JF to Blair Nov 23 -- leaving these next blocks, similar code
49
// would be needed if we run a second iteration of towerslope
50
// which is fairly possible.
51
52
//CaloTowerBuilder *ca = new CaloTowerBuilder();
53
54
// // recoConsts *rc = recoConsts::instance();
55
// // rc->set_StringFlag("CDB_GLOBALTAG","ProdA_2023"); // this points to the global tag in the CDB
56
// // The calibrations have a validity range set by the beam clock which is not read out of the prdfs as of now
57
//rc->set_uint64Flag("TIMESTAMP",runNumber);
58
59
60
// CaloTowerCalib *calib = new CaloTowerCalib("CEMCCALIB");
61
// // calib->setCalibName("cemc_abscalib_cosmic");// these two lines are needed to choose your own calibration
62
// // calib->setFieldName("cemc_abscalib_cosmic");
63
// calib->set_detector_type(CaloTowerCalib::CEMC);
64
// se->registerSubsystem(calib);
65
66
std::cout <<
"in tow dst "
<< std::endl;
67
68
69
LiteCaloEval
*eval7e =
new
LiteCaloEval
(
"CEMCEVALUATOR2"
,
"CEMC"
,
outfile
);
70
// LiteCaloEval *eval = new LiteCaloEval("HOCEMCEVALUATOR2", "HCALOUT", outputfile.c_str());
71
// eval->Verbosity(verbosity);
72
eval7e->
CaloType
(
LiteCaloEval::CEMC
);
73
eval7e->
setInputTowerNodeName
(
"TOWERINFO_CALIB_CEMC"
);
74
//eval->CaloType(LiteCaloEval::HCALOUT);
75
se->
registerSubsystem
(eval7e);
76
77
78
se->
run
(
nevents
);
79
80
se->
End
();
81
se->
PrintTimer
();
82
gSystem->Exit(0);
83
}
macros
blob
master
calibrations
calo
calib_nov23
towerslope
towerslope_dst_runner.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration