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
CaloTemplateFit.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CaloTemplateFit.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef PROTOTYPE4_CALOTEMPLATEFIT_H
4
#define PROTOTYPE4_CALOTEMPLATEFIT_H
5
6
//* Unpacks raw HCAL PRDF files *//
7
// Abhisek Sen
8
9
#include <
fun4all/SubsysReco.h
>
10
11
#include <phparameter/PHParameters.h>
12
13
#include <string>
14
#include<TProfile.h>
15
#include<TH1.h>
16
#include <TThread.h>
17
#include <ROOT/TThreadExecutor.hxx>
18
#include <ROOT/TThreadedObject.hxx>
19
#include "TThread.h"
20
21
class
PHCompositeNode
;
22
class
RawTowerContainer
;
23
24
class
CaloTemplateFit
:
public
SubsysReco
25
{
26
public
:
27
CaloTemplateFit
(
const
std::string
&
name
);
28
29
int
InitRun
(
PHCompositeNode
*topNode);
30
31
int
process_event
(
PHCompositeNode
*topNode);
32
33
void
CreateNodeTree
(
PHCompositeNode
*topNode);
34
35
std::string
get_calib_tower_node_prefix
()
const
36
{
37
return
_calib_tower_node_prefix
;
38
}
39
40
void
set_calib_tower_node_prefix
(
const
std::string
&calibTowerNodePrefix)
41
{
42
_calib_tower_node_prefix
= calibTowerNodePrefix;
43
}
44
45
std::string
get_raw_tower_node_prefix
()
const
46
{
47
return
_raw_tower_node_prefix
;
48
}
49
50
void
set_raw_tower_node_prefix
(
const
std::string
&rawTowerNodePrefix)
51
{
52
_raw_tower_node_prefix
= rawTowerNodePrefix;
53
}
54
55
void
set_nthreads
(
int
nthreads)
56
{
57
_nthreads
= nthreads;
58
}
59
void
set_nsamples
(
int
nsamples
)
60
{
61
_nsamples
=
nsamples
;
62
}
63
void
set_templatefile
(
const
std::string
&templatename)
64
{
65
template_input_file
=templatename;
66
}
67
68
70
const
PHParameters
&
GetCalibrationParameters
()
const
{
return
_calib_params
; }
71
74
PHParameters
&
GetCalibrationParameters
() {
return
_calib_params
; }
75
78
void
SetCalibrationParameters
(
const
PHParameters
&calib_params)
79
{
80
_calib_params
= calib_params;
81
}
82
83
enum
FitMethodType
84
{
86
kPowerLawExp
,
87
89
kPowerLawDoubleExp
,
90
93
kPowerLawDoubleExpWithGlobalFitConstraint
,
94
96
kPeakSample
97
98
};
99
100
void
SetFitType
(
FitMethodType
t
) {
_fit_type
=
t
; }
101
102
private
:
103
RawTowerContainer
*
_calib_towers
;
104
RawTowerContainer
*
_raw_towers
;
105
106
std::string
detector
;
107
std::string
RawTowerNodeName
;
108
std::string
CaliTowerNodeName
;
109
110
std::string
_calib_tower_node_prefix
;
111
std::string
_raw_tower_node_prefix
;
112
113
114
int
_nthreads
;
115
116
int
_nsamples
;
117
118
119
static
TProfile*
h_template
;
120
static
double
template_function
(
double
*
x
,
double
*par);
121
std::vector<std::vector<float>>
calo_processing_perchnl
(std::vector<std::vector<float>> chnlvector);
122
std::vector<float>
calo_processing_singlethread
(std::vector<float> chnlvector);
123
/* ROOT::TThreadedObject<TF1> testfit; */
124
std::string
template_input_file
;
125
126
TH1F*
h_data
;
127
TF1*
f_fit
;
128
129
PHParameters
_calib_params
;
130
131
FitMethodType
_fit_type
;
132
134
void
SetDefaultParameters
(
PHParameters
¶m);
135
};
136
137
#endif
analysis
blob
master
EMCTemplateFitting
src
CaloTemplateFit.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:51
using
1.8.2 with
sPHENIX GitHub integration