ATLAS Offline Software
Loading...
Searching...
No Matches
TileLaserLinearityCalibTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TILECALIBALG_TILELASERLINEARITYCALIBTOOL_H
6#define TILECALIBALG_TILELASERLINEARITYCALIBTOOL_H
7
9
12
13#include <string>
14#include <map>
15
22
23#define NFILTERS 10
24#define NDIODES 10
25#define NDIODES_LASER1 4
26#define NMONITORS 4
27#define NPMTS 2
28
29#define NGAINS 2
30#define NPARTITIONS 4
31#define NDRAWERS 64
32#define NCOUPLES 22
33#define NCHANNELS 48
34#define NSLICES 100
35#define NFIBERS 2
36
38class TileLaserObject;
39class TileHWID;
40class TFile;
41
43{
44
45 public:
46 TileLaserLinearityCalibTool(const std::string& type, const std::string& name,const IInterface* pParent);
48
49 virtual StatusCode initialize() override;
50 virtual StatusCode initNtuple(int runNumber, int runType, TFile * rootfile) override;
51 virtual StatusCode execute() override;
52 virtual StatusCode finalizeCalculations() override;
53 virtual StatusCode writeNtuple(int runNumber, int runType, TFile * rootfile) override;
54 virtual StatusCode finalize() override;
55
56 private:
57
58 // Name of ntuple of the Tool
59 std::string m_toolNtuple;
60
64
66 "TileRawChannelContainer", "TileRawChannelOpt2", "Input Tile raw channel container"};
68 "TileLaserObject", "TileLaserObject", "Input Tile laser object"};
69
72 ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this,
73 "TileCondToolEmscale", "TileCondToolEmscale", "Tile em scale tool"};
74
75 // Parameter which will end up in the ROOTuple
76 //
77 // Details concerning this parameters could be found on the LASER webpage :
78 //
79 // http://atlas-tile-laser.web.cern.ch/
80 //
81 // Here we are working on linearity runs, it explains the [8] in the arrays
82 // we store one value per filter position
83
84 int m_toolRunNo; // The run number
85 int m_ADC_problem; // Expert tag for LastROD problem noticfication
86 int m_las_filter; // Filter wheel position
87 double m_las_requ_amp; // Requested amplitude
88 double m_hrate; // Humidity rate (in %)
89 double m_flow; // Gas flow in diodes box (in L/h)
90 double m_head_temp; // Temperature of the LASER head
91 double m_las_time; // Event time
92 double (*m_LG_PMT)[NPMTS]; // Mean value for box PMTs
93 double (*m_LG_PMT_S)[NPMTS]; // Corresponding RMS
94 double (*m_LG_diode)[NDIODES]; // Mean value for box Photodiodes
95 double (*m_LG_diode_S)[NDIODES]; // Corresponding RMS
96 double (*m_HG_PMT)[NPMTS]; // Mean value for box PMTs
97 double (*m_HG_PMT_S)[NPMTS]; // Corresponding RMS
98 double (*m_HG_diode)[NDIODES]; // Mean value for box Photodiodes
99 double (*m_HG_diode_S)[NDIODES]; // Corresponding RMS
100 double (*m_mean)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Mean signal computed for this run
101 double (*m_mean_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Corresponding RMS
102 double (*m_LG_ratio)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Calib coefficients computed for this run (for all diodes)
103 double (*m_LG_ratio_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Corresponding RMS
104 double (*m_LG_ratio2)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Calib coefficients computed for this run (for all diodes)
105 double (*m_LG_ratio2_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Corresponding RMS
106 double (*m_HG_ratio)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Calib coefficients computed for this run (for all diodes)
107 double (*m_HG_ratio_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Corresponding RMS
108 double (*m_HG_ratio2)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Calib coefficients computed for this run (for all diodes)
109 double (*m_HG_ratio2_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Corresponding RMS
110 int (*m_entries)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]; // Number of LASER events collected for one channel (and a particular gain)
111
112
113 // Local results - not sent to ROOTuple
114
117
118 int m_first_filter; // Value of the first filter position
119
120 int m_last_evt_filter; // Filter position of the previous event
121 int m_n_same_filt_evts; // How many events in a row with the same filter setting
122
124
125 RunningStat* (*m_HG_diode_signal)[NDIODES];
126 RunningStat* (*m_HG_PMT_signal)[NPMTS];
127 RunningStat* (*m_LG_diode_signal)[NDIODES];
128 RunningStat* (*m_LG_PMT_signal)[NPMTS];
134
135 // Functions
136 inline int chanIsConnected(int ros, int chan) {
137 if(m_cabling->channel2hole(ros,chan)<0) return 0; //negative means not connected
138 return 1;
139 }
140};
141
142
143
144#endif // #ifndef TILECALIBALG_TILELASERLINEARITYCALIBTOOL_H
Property holding a SG store/key/clid from which a ReadHandle is made.
Information produced by TileDQstatusAlg (used to be done by TileBeamInfoProvider).
#define NDIODES
#define NCHANNELS
#define NPARTITIONS
#define NDRAWERS
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Property holding a SG store/key/clid from which a ReadHandle is made.
Helper class for TileCal online (hardware) identifiers.
Definition TileHWID.h:49
SG::ReadHandleKey< TileLaserObject > m_laserContainerKey
double(* m_HG_ratio)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_LG_ratio2_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
int(* m_entries)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
virtual StatusCode initNtuple(int runNumber, int runType, TFile *rootfile) override
double(* m_LG_ratio2)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_LG_ratio)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_mean_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
virtual StatusCode finalize() override
const TileCablingService * m_cabling
virtual StatusCode initialize() override
virtual StatusCode finalizeCalculations() override
double(* m_HG_ratio2_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
virtual StatusCode writeNtuple(int runNumber, int runType, TFile *rootfile) override
virtual StatusCode execute() override
double(* m_LG_ratio_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_HG_ratio2)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
double(* m_mean)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
TileLaserLinearityCalibTool(const std::string &type, const std::string &name, const IInterface *pParent)
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
double(* m_HG_ratio_S)[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS]
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
static std::vector< std::string > rootfile
Definition iLumiCalc.h:30