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_EMCalBadTowerID.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4All_EMCalBadTowerID.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 <
fun4all/Fun4AllDstInputManager.h
>
7
8
#include <
fun4all/Fun4AllDstOutputManager.h
>
9
#include <
fun4all/Fun4AllOutputManager.h
>
10
#include <
fun4all/Fun4AllServer.h
>
11
#include <
fun4all/Fun4AllUtils.h
>
12
13
#include <
phool/PHRandomSeed.h
>
14
#include <
phool/recoConsts.h
>
15
#include <
cdbobjects/CDBTTree.h
>
16
17
18
#include <towerid/towerid.h>
19
20
R__LOAD_LIBRARY(libcdbobjects.so)
21
R__LOAD_LIBRARY(libfun4all.so)
22
R__LOAD_LIBRARY(libtowerid.so)
23
R__LOAD_LIBRARY(libmbd_io.so)
24
#endif
25
26
void
Fun4All_EMCalBadTowerID
(
const
int
nEvents
= 5000,
const
char
*inFile =
"DST_CALO_run1auau_ana391_2023p006-00021813-1388.root"
,
const
char
*inName =
"commissioning3.root"
,
const
std::string
cdbname =
"test.root"
,
float
adccut_sg = 150,
float
adccut_k = 150,
float
sigmas_lo = 4,
float
sigmas_hi = 4,
float
SG_f = 0.05,
float
Kur_f = 0.05,
float
region_f = 1.0,
int
pass = 0)
27
{
28
29
30
pair<int, int> runseg =
Fun4AllUtils::GetRunSegment
(inFile);
31
int
runnumber
= runseg.first;
32
int
segment
= runseg.second;
33
34
towerid
*calo =
new
towerid
(inName,cdbname,adccut_sg,adccut_k,sigmas_lo,sigmas_hi,SG_f,Kur_f,region_f);
35
Fun4AllServer
*se =
Fun4AllServer::instance
();
36
recoConsts
*rc =
recoConsts::instance
();
37
38
39
if
(pass == 0)
40
{
41
se->
registerSubsystem
(calo);
42
Fun4AllInputManager
*
in
=
new
Fun4AllDstInputManager
(
"DSTcalo"
);
43
in->
AddFile
(inFile);
44
se->
registerInputManager
(in);
45
se->
run
(
nEvents
);
46
calo -> FillHistograms(runnumber,segment);
47
se->
End
();
48
se->
PrintTimer
();
49
}
50
else
if
(pass == 1)
51
{
52
calo ->
Init
(NULL);
53
calo -> CalculateCutOffs(runnumber);
54
calo -> WriteCDBTree(runnumber);
55
}
56
57
58
59
std::cout <<
"All done!"
<< std::endl;
60
gSystem->Exit(0);
61
}
62
analysis
blob
master
EMCal-commissioning
emcalHotTowerFinder
macro
Fun4All_EMCalBadTowerID.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:51
using
1.8.2 with
sPHENIX GitHub integration