CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemLUTWriter.h
Go to the documentation of this file.
1#ifndef CGEMLUTWRITER
2#define CGEMLUTWRITER
3
4#include "CgemGeomSvc.h"
7#include <vector>
8#include <string>
9#include "TFile.h"
10#include "TTree.h"
11#include "TString.h"
13#include "TGraph.h"
14#include "TCanvas.h"
15#include <iostream>
16#include <fstream>
17
18#define N_FEB 80
19#define N_CHIP 2
20#define N_CHANNEL 64
21
22class IDataProviderSvc;
23
24class CgemLUTWriter : public Algorithm{
25 public:
26 // Constructor
27 CgemLUTWriter(const std::string& name, ISvcLocator* pSvcLocator);
29 // Executable
30 StatusCode initialize();
31 StatusCode execute ();
32 StatusCode finalize ();
33
34 private:
35 //Variables Code
36 int FEB_i,chip_i, ch_i;
37 bool PrintCanvas;
38 TString DrawOption;
39 string OutputPdf;
40 string OutputRoot;
41 string InputFileData;
42 string InputFileMapping;
43 string InputFileTiger;
44 string InputFileHvSetting;
45 ifstream mapping_file, tiger_file, hv_file;
46 TCanvas *canvas;
47 bool DisableMeasures;
48 bool DisableLowEntries;
49 int MinEntries;
50 bool is_failing;
51 bool Debug;
52 //Variables LUT
53 struct LUT_digi{
54 int layer;
55 int gemroc;
56 int sw_feb;
57 int side;
58 int sheet;
59 int HW_FEB_ID;
60 float qdc_slope;
61 float qdc_constant;
62 float qdc_saturation;
63 int strip_x;
64 int strip_v;
65 float noise_rate;
66 float noise_charge;
67 float thr_effective;
68 float thr_width;
69 float signal_rate;
70 float signal_charge_mean;
71 float signal_charge_saturation;
72 float signal_saturation_ratio;
73 float baseline_e;
74 float baseline_t;
75 float vth1;
76 float vth2;
77 float delta_vth1_baseline;
78 float delta_vth2_baseline;
79 float thr_t_fC;
80 float thr_e_fC;
81 };
82 LUT_digi LUT_digi_coll[N_FEB][N_CHIP][N_CHANNEL];
83 TString ofile_name;
84 TTree *otree, *ootree;
85 TFile *ofile;
86 int t_roc,t_sw_feb,t_feb, t_chip, t_ch,t_layer,t_side,t_sheet,t_strip_x_boss, t_strip_v_boss,t_strip_x_graal,t_strip_v_graal;
87 int t_quality;
88 float t_noise_Hz, t_noise_Q, t_thr, t_thr_wid, t_sig_meanQ, t_sig_maxQ, t_sig_Hz;
89 float t_rate_sat_max;
90 float t_qdc_slope,t_qdc_constant,t_qdc_saturation;
91 float t_baseline_e,t_baseline_t,t_vth1,t_vth2,t_delta_vth1_baseline,t_delta_vth2_baseline,t_thr_t_fC,t_thr_e_fC;
92 float t_time_start,t_time_stop,t_time_sigma,t_time_startFEB,t_time_stopFEB,t_time_sigmaFEB;
93 int t_First_RUN,t_Last_RUN,t_Integration_time,t_Energy_mode,t_HV_L1_G3,t_HV_L1_G2,t_HV_L1_G1,t_HV_L2_G3,t_HV_L2_G2,t_HV_L2_G1,t_HV_L3_G3,t_HV_L3_G2,t_HV_L3_G1,t_HV_L1_Dr,t_HV_L2_Dr,t_HV_L3_Dr,t_HV_L1_T1,t_HV_L2_T1,t_HV_L3_T1,t_HV_L1_T2,t_HV_L2_T2,t_HV_L3_T2,t_HV_L1_In,t_HV_L2_In,t_HV_L3_In;
94 //Function
95 TString Get_Cut(int);
96 void Read_HV_Setting();
97 void Read_Mapping();
98 void Read_Tiger();
99 void Measure_Noise();
100 void Measure_Threshold();
101 void Measure_Signal();
102 void Define_TTree();
103 void Fill_TTree();
104};
105#endif
#define N_CHANNEL
#define N_FEB
#define N_CHIP
StatusCode finalize()
StatusCode initialize()
StatusCode execute()
CgemLUTWriter(const std::string &name, ISvcLocator *pSvcLocator)