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
TPCPedestalCalibration.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TPCPedestalCalibration.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef TPCPedestalCalibration_H
4
#define TPCPedestalCalibration_H
5
6
#include <
fun4all/SubsysReco.h
>
7
#include <
cdbobjects/CDBTTree.h
>
8
#include <
sphenixnpc/CDBUtils.h
>
9
10
#include <string>
11
#include <vector>
12
13
class
PHCompositeNode
;
14
class
TFile;
15
class
TTree;
16
17
class
TPCPedestalCalibration
:
public
SubsysReco
18
{
19
public
:
20
explicit
TPCPedestalCalibration
(
const
std::string
&
name
=
"TPCPedestalCalibration.root"
);
21
22
~TPCPedestalCalibration
()
override
{}
23
24
int
InitRun
(
PHCompositeNode
*topNode)
override
;
25
26
int
process_event
(
PHCompositeNode
*topNode)
override
;
27
28
int
EndRun
(
const
int
runnumber
)
override
;
29
30
void
CDBInsert
();
31
32
int
End
(
PHCompositeNode
*topNode)
override
;
33
34
void
AddPacket
(
int
packet)
35
{
36
m_packets
.push_back(packet);
37
}
38
39
void
SetSector
(
int
sectorNum)
40
{
41
m_sector
= sectorNum;
42
}
43
44
void
InsertCDBTTree
(
const
std::string
&
username
)
// username for CDB record of who uploaded the file
45
{
46
m_writeToCDB
=
true
;
47
m_username
=
username
;
48
}
49
50
void
NewCDBGlobalTag
(
std::string
username
)
51
{
52
CDBUtils
*
uti
=
new
CDBUtils
();
53
uti->
createGlobalTag
(username);
54
}
55
56
protected
:
58
std::vector<int>
m_packets
{1001};
59
60
private
:
61
std::string
m_fname
;
62
bool
m_writeToCDB
;
63
CDBTTree
*
m_cdbttree
=
nullptr
;
64
65
int
m_BCO
= 0;
66
int
m_packet
= 0;
67
int
m_nWaveormInFrame
= 0;
68
int
m_nSamples
= 0;
69
int
m_fee
= 0;
70
int
m_Channel
= 0;
71
std::vector<unsigned short>
m_adcSamples
;
72
73
float
m_aveADCFeeChannel
[26][256];
74
float
m_stdADCFeeChannel
[26][256];
75
float
m_countsADCFeeChannel
[26][256];
76
int
m_aliveArrayFeeChannel
[26][256];
77
78
std::string
m_username
=
"test"
;
79
bool
m_firstBCO
=
true
;
80
int
m_isAlive
= 1;
81
float
m_pedMean
= 0;
82
float
m_pedStd
= 0;
83
int
m_sector
= 0;
84
int
m_outFEE
= 99;
85
int
m_chan
= 999;
86
int
m_module
= 9;
87
int
m_slot
= 99;
88
89
int
mod_arr
[26] = {2,2,1,1,1,3,3,3,3,3,3,2,2,1,2,2,1,1,2,2,3,3,3,3,3,3};
90
int
slot_arr
[26] = {5,6,1,3,2,12,10,11,9,8,7,1,2,4,8,7,6,5,4,3,1,3,2,4,6,5};
91
};
92
93
#endif // TPCPedestalCalibration_H
coresoftware
blob
master
calibrations
tpc
TPCPedestalCalibration
TPCPedestalCalibration.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:59
using
1.8.2 with
sPHENIX GitHub integration