ATLAS Offline Software
Loading...
Searching...
No Matches
TileInfoLoader.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TILECONDITIONS_TILEINFOLOADER_H
6#define TILECONDITIONS_TILEINFOLOADER_H
7//****************************************************************************
8// Filename : TileInfoLoader.h
9// Author : Ed Frank
10// Created : May 2002
11//
12// DESCRIPTION
13//
14// TileConditions/TileInfo.h is the Tile interface to the transient
15// detector store. Rather than having every item accessed separately from
16// the TDS, people will grab a TileInfo from the TDS and make calls on it.
17// Those calls will defer back to the TDS so that time validity is done
18// correctly. We think this may be simpler than getting everything
19// separately. We expect, in the future, to break the TileInfo into pieces,
20// but for now, it's all in one.
21//
22// Until a conditions database exists, we just make a TileInfo from parameters
23// in a fplain file. TileInfoLoader exists just to produce a tileInfo at
24// the start of the job until the conditions DB comes along.
25//
26// Properties (JobOption Parameters):
27//
28//
29// History:
30// 07Feb01 efrank Creation, based upon LArTowerBuilder.h
31//
32// BUGS:
33//
34//****************************************************************************
35
36// Gaudi includes
37#include "GaudiKernel/ServiceHandle.h"
38#include "Gaudi/Property.h"
39
40// Athena includes
42
43#include <string>
44#include <vector>
45
46class TilePulseShapes;
48class StoreGateSvc;
49class TileCablingSvc;
50template<class TYPE> class SvcFactory;
51class TileInfo;
52
53static const InterfaceID IID_TileInfoLoader("TileInfoLoader", 1, 0);
54
56
57 friend class SvcFactory<TileInfoLoader> ;
58
59 public:
60
61 TileInfoLoader(const std::string& name, ISvcLocator* pSvcLocator);
62 virtual ~TileInfoLoader();
63
64 virtual StatusCode initialize() override;
65 virtual StatusCode finalize() override;
66 static const InterfaceID& interfaceID() { return IID_TileInfoLoader; }
67
68private:
69 //** Loading stuff from files */
70 StatusCode buildDigitsShapesHiLo (TileInfo& info);
71 StatusCode buildTTL1Shapes(TileInfo& info,
72 const std::string& ShapeFile,
73 int &NBins, int &Time0Bin, int &BinsPerX
74 , std::vector<double> &FullShape, std::vector<double> &Shape);
75 void buildCovMatrix (TileInfo& info);
76
77 Gaudi::Property<std::string> m_tileInfoName{this,
78 "TileInfo", "TileInfo", "Name of TileInfo object in Detector Store"};
79
80 //=== services
82
85
87 //=== expected number of ADC samples in digitization
88 Gaudi::Property<int> m_nSamples{this, "NSamples", 7, "Number of 25ns time slices in TileDigits"};
89 Gaudi::Property<int> m_iTrigSample{this, "TrigSample", 3, "sample index of t=0 in TileDigits"};
90 //=== Noise and conversion factors used in digitization
91 Gaudi::Property<bool> m_tileNoise{this, "TileNoise", true, "true => add noise to TileDigits and TileRawChannels (used in MC generation)"};
92 Gaudi::Property<bool> m_tileCoherNoise{this, "TileCoherNoise", false, "true => add coherent noise to TileDigits and TileRawChannels (used in MC generation)"};
93 Gaudi::Property<bool> m_tileZeroSuppress{this, "TileZeroSuppress", false, "true => applies threshold cuts in HitToRC, HitToDigits, RCToCells"};
94 Gaudi::Property<int> m_noiseScaleIndex{this, "NoiseScaleIndex", 1, "allowed values 0-3 to choose proper ADC->OF noise scale factor for different OF methods"};
95 Gaudi::Property<double> m_thresholdRawChannel{this, "ThresholdRawChannel", -3.0, "threshold for TileRawChannel [adc] (high gain only, negative -> cut on abs value)"};
96 Gaudi::Property<double> m_thresholdDigits{this, "ThresholdDigits", -2.0, "threshold for TileDigits [adc] (high gain only, negative -> cut on abs value)"};
97 // values for TileCal Level1 Trigger Towers
98 Gaudi::Property<double> m_ttL1Calib{this, "TTL1Calib", 4.1, "converts pCb to mV for TTL1"};
99 Gaudi::Property<double> m_ttL1NoiseSigma{this, "TTL1NoiseSigma", 2.5, "sigma of noise in TTL1 (mV)"};
100 Gaudi::Property<double> m_ttL1Thresh{this, "TTL1Thresh", 5.0, "threshold cut for TTL1 signals (mV)"};
101 Gaudi::Property<double> m_ttL1Ped{this, "TTL1Ped", 0.0, "pedestal for TTL1 signals (mV)"};
102 Gaudi::Property<double> m_ttL1Max{this, "TTL1Max", 1850.0, "max value for TTL1 signals (mV)"};
103 // values for TileCal Muon Receiver Boards (!!! TO UPDATE !!! DUMMY Values) ~1mV = 1 ADC count
104 Gaudi::Property<double> m_MuRcvCalib{this, "MuRcvCalib", 14.20, "converts pCb to ADC counts for MuRcv"};
105 Gaudi::Property<double> m_MuRcvNoiseSigma{this, "MuRcvNoiseSigma", 2, "sigma of noise in MuRcv (ADC counts)"};
106 Gaudi::Property<double> m_MuRcvThresh{this, "MuRcvThresh", 5, "threshold cut for MuRcv signals (ADC count)"};
107 Gaudi::Property<double> m_MuRcvPed{this, "MuRcvPed", 11.73, "pedestal for MuRcv signals (ADC count)"};
108 Gaudi::Property<double> m_MuRcvMax{this, "MuRcvMax", 255, "max value for MuRcv signals (ADC count)"};
109 // values for Level1 Muon output (not used currently)
110 Gaudi::Property<double> m_muL1Calib{this, "MuL1Calib", 204.2, "converts pCb to mV for Mu"};
111 Gaudi::Property<double> m_muL1NoiseSigma{this, "MuL1NoiseSigma", 15.6, "sigma of noise in Mu (mV)"};
112 Gaudi::Property<double> m_muL1Thresh{this, "MuL1Thresh", 5.0, "threshold cut for Mu signals (mV)"};
113 Gaudi::Property<double> m_muL1Ped{this, "MuL1Ped", 0.0, "pedestal for Mu signals (mV)"};
114 Gaudi::Property<double> m_muL1Max{this, "MuL1Max", 1850.0, "max value for Mu signals (mV)"};
115 // new values for high gain MBTS output connected to normal trigger tower
116 Gaudi::Property<double> m_mbtsL1Calib{this, "MBTSL1Calib", 222.0, "converts pCb to mV for MBTS"};
117 Gaudi::Property<double> m_mbtsL1NoiseSigma{this, "MBTSL1NoiseSigma", 0.6, "sigma of noise in MBTS (mV)"};
118 Gaudi::Property<double> m_mbtsL1Thresh{this, "MBTSL1Thresh", 5.0, "threshold cut for MBTS signals (mV)"};
119 Gaudi::Property<double> m_mbtsL1Ped{this, "MBTSL1Ped", 0.0, "pedestal for MBTS signals (mV)"};
120 Gaudi::Property<double> m_mbtsL1Max{this, "MBTSL1Max", 1850.0, "max value for MBTS signals (mV)"};
121 // values for custom TileCal cosmic trigger boards
122 Gaudi::Property<double> m_ttL1CosmicsGain{this, "TTL1CosmicsGain", 5.0, "gain of the Cosmics board"};
123 Gaudi::Property<double> m_ttL1CosmicsThresh{this, "TTL1CosmicsThresh", 5.0, "threshold in the Cosmics board"};
124 //=== Digitization
125 Gaudi::Property<int> m_ADCmax{this, "ADCmax", 1023, "Maximum ADC value"};
126 Gaudi::Property<int> m_ADCmaskValue{this, "ADCmaskValue", 2047, "ADC mask value"};
127
130
132 //=== Digits pulse shapes
133 Gaudi::Property<std::string> m_digitsShapeFileHi{this, "DigitsShapeFileHi", "pulsehi_physics.dat", "Filename for high gain pulse shape"};
134 Gaudi::Property<std::string> m_digitsShapeFileLo{this, "DigitsShapeFileLo", "pulselo_physics.dat", "Filename for low gain pulse shape"};
135 //=== Trigger Tower Pulse shapes
136 Gaudi::Property<std::string> m_TTL1ShapeFile{this, "filename_TTL1ShapeFile", "pulse_adder_tower_physics.dat", "Filename for trigger tower pulse shape"};
137 Gaudi::Property<std::string> m_MuRcvShapeFile{this, "filename_MuRcvShapeFile", "pulse_adder_muonRcv_physics.dat", "Filename for Muon Receiver pulse shape"}; // using the sames as for TTL1ShapeFile !!! TO UPDATE !!!
138 Gaudi::Property<std::string> m_MuL1ShapeFile{this, "filename_MuL1ShapeFile", "pulse_adder_muon_physics.dat", "Filename for muon level1 trigger pulse shape"};
139 //=== Covariance matrices for noise simulation
140 Gaudi::Property<std::string> m_DecoCovaFilePrefix{this, "filename_DecoCovaFilePrefix", "DecoCovaMatrix", "Prefix of the files with decomposed covariance matrices for coherent noise simulation"};
141
143 //=== CIS Pulse shapes and derivatives
144 Gaudi::Property<std::string> m_filenameLoCIS{this, "filename_lo_cis", "pulselo_cis_100.dat", "Low gain CIS pulseshape 100pF"};
145 Gaudi::Property<std::string> m_filenameLoCISDer{this, "filename_lo_cis_der", "dpulselo_cis_100.dat", "Low gain CIS pulseshape derivative 100pF"};
146 Gaudi::Property<std::string> m_filenameSLoCIS{this, "filename_slo_cis", "pulselo.0230055.12.cap.5.2.dat", "Low gain CIS pulseshape 5pF"};
147 Gaudi::Property<std::string> m_filenameSLoCISDer{this, "filename_slo_cis_der", "dpulselo.0230055.12.cap.5.2.dat", "Low gain CIS pulseshape derivative pF"};
148 Gaudi::Property<std::string> m_filenameHiCIS{this, "filename_hi_cis", "pulsehi_cis_100.dat", "High gain CIS pulseshape 100pF"};
149 Gaudi::Property<std::string> m_filenameHiCISDer{this, "filename_hi_cis_der", "dpulsehi_cis_100.dat", "High gain CIS pulseshape derivative 100pF"};
150 Gaudi::Property<std::string> m_filenameSHiCIS{this, "filename_shi_cis", "pulsehi.0230055.12.cap.5.2.dat", "High gain CIS pulseshape 5pF"};
151 Gaudi::Property<std::string> m_filenameSHiCISDer{this, "filename_shi_cis_der", "dpulsehi.0230055.12.cap.5.2.dat", "High gain CIS pulseshape derivative 5pF"};
152 //=== Physics Pulse shapes and derivatives
153 Gaudi::Property<std::string> m_filenameLoPhys{this, "filename_lo_phys", "pulselo_physics.dat", "Low gain physics pulseshape"};
154 Gaudi::Property<std::string> m_filenameHiPhys{this, "filename_hi_phys", "pulsehi_physics.dat", "High gain physics pulseshape"};
155 Gaudi::Property<std::string> m_filenameLoPhysDer{this, "filename_lo_phys_der", "dpulselo_physics.dat", "Low gain physics pulseshape derivative"};
156 Gaudi::Property<std::string> m_filenameHiPhysDer{this, "filename_hi_phys_der", "dpulsehi_physics.dat", "High gain physics pulseshape derivative"};
157 //=== Laser Pulse shapes and derivatives
158 Gaudi::Property<std::string> m_filenameLoLas{this, "filename_lo_las", "pulselo_laser.dat", "Low gain laser pulseshape"};
159 Gaudi::Property<std::string> m_filenameHiLas{this, "filename_hi_las", "pulsehi_laser.dat", "High gain laser pulseshape"};
160 Gaudi::Property<std::string> m_filenameLoLasDer{this, "filename_lo_las_der", "dpulselo_laser.dat", "Low gain laser pulseshape derivative"};
161 Gaudi::Property<std::string> m_filenameHiLasDer{this, "filename_hi_las_der", "dpulsehi_laser.dat", "High gain laser pulseshape derivative"};
162 //=== CIS Leakage Pulse shapes and derivatives
163 Gaudi::Property<std::string> m_filenameSLeakLo{this, "filename_sleaklo", "leaklo.0230055.12.cap.5.2.dat", "Low gain CIS leakage pulse 5pF"};
164 Gaudi::Property<std::string> m_filenameLeakLo{this, "filename_leaklo", "leaklo_100.dat", "Low gain CIS leakage pulse 100pF"};
165 Gaudi::Property<std::string> m_filenameDSLeakLo{this, "filename_dsleaklo", "dsleaklo.0230055.12.cap.5.2.dat", "Derivative low gain CIS leakage pulse 5pF"};
166 Gaudi::Property<std::string> m_filenameDLeakLo{this, "filename_dleaklo", "dleaklo_100.dat", "Derivative low gain CIS leakage pulse 100pF"};
167 Gaudi::Property<std::string> m_filenameSLeakHi{this, "filename_sleakhi", "leakhi.0230055.12.cap.5.2.dat", "High gain CIS leakage pulse 5pF"};
168 Gaudi::Property<std::string> m_filenameLeakHi{this, "filename_leakhi", "leakhi_100.dat", "High gain CIS leakage pulse 100pF"};
169 Gaudi::Property<std::string> m_filenameDSLeakHi{this, "filename_dsleakhi", "dsleakhi.0230055.12.cap.5.2.dat", "Derivative high gain CIS leakage pulse 5pF"};
170 Gaudi::Property<std::string> m_filenameDLeakHi{this, "filename_dleakhi", "dleakhi_100.dat", "Derivative high gain CIS leakage pulse 100pF"};
171 //=== Digitizer noise RMS as a function of channel number
172 Gaudi::Property<std::string> m_filenameOrigNoise{this, "filename_orig_noise", "noise_digi_orig.dat", "file with noise rms per channel"};
173 Gaudi::Property<std::string> m_filenameNkNoise{this, "filename_nk_noise", "noise_digi_nk.dat", "file with noise rms per channel"};
174
175 //=== TileWienerFilterWeights configuration
176 Gaudi::Property<bool> m_loadWienerFilterWeights{this, "LoadWienerFilterWeights", false, "Load Wiener filter weights"};
178 Gaudi::Property<int> m_WFNSamplesPhys{this, "WienerFilterPhysicsNSamples", 7, "Number of samples for Wiener filter physics weights"};
179 Gaudi::Property<int> m_WFLuminosity{this, "WienerFilterLuminosity", 40, "Luminosity for Wiener filter weights"};
180
181 // name of TileCalibContainer in detector store
182 std::string m_calibCntName;
183
184 std::vector<std::string> m_connectedDrawers; // list of connected drawers
185 // we assume that list contains even number of elements - pairs of (begin,end) range,
186 // e.g. all drawers connected looks like this:
187 // [ "0x100", "0x13F", "0x200", "0x23F", "0x300", "0x33F", "0x400", "0x43F" ]
188 // and this is the list for few drawers in LBA connected:
189 // [ "0x10A", "0x10C", "0x121", "0x123" ]
190 // empty list is equivalent to list with all drawers connected
191
194};
195
196#endif // TILECONDITIONS_TILEINFOLOADER_H
static const InterfaceID IID_TileInfoLoader("TileInfoLoader", 1, 0)
The Athena Transient Store API.
Gaudi::Property< std::string > m_filenameHiLas
Gaudi::Property< double > m_ttL1Max
Gaudi::Property< double > m_ttL1CosmicsGain
Gaudi::Property< std::string > m_filenameLeakHi
Gaudi::Property< bool > m_tileCoherNoise
void buildCovMatrix(TileInfo &info)
Gaudi::Property< std::string > m_filenameSLeakHi
Gaudi::Property< double > m_mbtsL1Thresh
Gaudi::Property< std::string > m_filenameDSLeakHi
Gaudi::Property< double > m_ttL1Calib
Gaudi::Property< std::string > m_filenameHiLasDer
Gaudi::Property< double > m_thresholdRawChannel
Gaudi::Property< int > m_WFNSamplesPhys
Forwarded to TileWienerFilterWeights in initialize().
Gaudi::Property< std::string > m_filenameHiCISDer
Gaudi::Property< double > m_MuRcvCalib
Gaudi::Property< double > m_ttL1Ped
Gaudi::Property< double > m_ttL1CosmicsThresh
Gaudi::Property< std::string > m_filenameHiCIS
Gaudi::Property< int > m_noiseScaleIndex
Gaudi::Property< int > m_iTrigSample
Gaudi::Property< bool > m_tileNoise
Gaudi::Property< std::string > m_TTL1ShapeFile
Gaudi::Property< double > m_thresholdDigits
Gaudi::Property< std::string > m_filenameHiPhysDer
std::vector< std::string > m_connectedDrawers
Gaudi::Property< double > m_ttL1Thresh
Gaudi::Property< std::string > m_filenameLoLasDer
virtual StatusCode finalize() override
Gaudi::Property< double > m_muL1Max
Gaudi::Property< std::string > m_digitsShapeFileHi
Filenames of input files.
Gaudi::Property< int > m_WFLuminosity
Gaudi::Property< double > m_muL1Calib
TilePulseShapes * m_pulsevar
Pointer to TilePulseShapes object.
Gaudi::Property< std::string > m_MuL1ShapeFile
Gaudi::Property< bool > m_tileZeroSuppress
TileInfoLoader(const TileInfoLoader &)
Gaudi::Property< std::string > m_filenameDLeakLo
Gaudi::Property< double > m_mbtsL1Max
Gaudi::Property< std::string > m_filenameSHiCISDer
Gaudi::Property< std::string > m_filenameHiPhys
Gaudi::Property< int > m_ADCmax
Gaudi::Property< std::string > m_filenameSLeakLo
Gaudi::Property< std::string > m_filenameLeakLo
StatusCode buildDigitsShapesHiLo(TileInfo &info)
Gaudi::Property< double > m_mbtsL1Ped
Gaudi::Property< std::string > m_filenameDLeakHi
Gaudi::Property< std::string > m_filenameLoCISDer
Gaudi::Property< double > m_MuRcvNoiseSigma
Gaudi::Property< std::string > m_filenameLoCIS
Reference pulse shape filenames, forwarded to TilePulseShapes in initialize().
Gaudi::Property< std::string > m_filenameLoPhys
Gaudi::Property< std::string > m_filenameSLoCIS
Gaudi::Property< double > m_MuRcvMax
Gaudi::Property< std::string > m_filenameDSLeakLo
Gaudi::Property< double > m_MuRcvThresh
Gaudi::Property< std::string > m_DecoCovaFilePrefix
Gaudi::Property< bool > m_loadWienerFilterWeights
Gaudi::Property< std::string > m_filenameSHiCIS
Gaudi::Property< std::string > m_filenameLoLas
Gaudi::Property< int > m_nSamples
Properties to forward to TileInfo.
Gaudi::Property< double > m_MuRcvPed
Gaudi::Property< std::string > m_filenameNkNoise
Gaudi::Property< std::string > m_tileInfoName
virtual ~TileInfoLoader()
Gaudi::Property< int > m_ADCmaskValue
Gaudi::Property< std::string > m_filenameOrigNoise
Gaudi::Property< double > m_muL1Thresh
Gaudi::Property< std::string > m_filenameLoPhysDer
Gaudi::Property< double > m_mbtsL1Calib
Gaudi::Property< double > m_ttL1NoiseSigma
Gaudi::Property< double > m_muL1Ped
static const InterfaceID & interfaceID()
StatusCode buildTTL1Shapes(TileInfo &info, const std::string &ShapeFile, int &NBins, int &Time0Bin, int &BinsPerX, std::vector< double > &FullShape, std::vector< double > &Shape)
ServiceHandle< StoreGateSvc > m_detStore
TileInfoLoader(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_filenameSLoCISDer
std::string m_calibCntName
TileWienerFilterWeights * m_WFWeights
Pointer to Wiener Filtering weights.
TileInfoLoader & operator=(const TileInfoLoader &)
Gaudi::Property< double > m_mbtsL1NoiseSigma
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_digitsShapeFileLo
Gaudi::Property< double > m_muL1NoiseSigma
Gaudi::Property< std::string > m_MuRcvShapeFile