ATLAS Offline Software
TilePulseForTileMuonReceiver.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //****************************************************************************
6 // Filename : TilePulseForTileMuonReceiver.h
7 // Author : Joao Gentil Mendes Saraiva (jmendes@cern.ch)
8 // Created : October 2013
9 //
10 // DESCRIPTION
11 //
12 // Creates TileMuonReceiver digits and raw channel from TileHit
13 //
14 // Properties (JobOption Parameters):
15 //
16 // TileHitContainer "TileHitCnt"
17 // MuonReceiverDigitsContainer "MuRcvDigitsCnt"
18 // MuonReceiverRawChannelContainer "MuRcvRawChCnt"
19 // TileInfoName "TileInfo"
20 // IntegerDigits "Round digits (default=false)"
21 // MaskBadChannels "Remove channels tagged bad (default=false)"
22 // UseCoolPulseShapes "Pulse shapes from database (default=false)"
23 // UseCoolNoise "Noise from database (default=false)"
24 // UseCoolPedestal "Pedestal from database (default=false)"
25 // RndmSvc "Random Number Service used in TilePulseForTileMuonReceiver"
26 // TileRawChannelBuilderMF "The tool by default is the Matched Filter"
27 // UseRndmEvtOverlay "Pileup and/or noise added by overlaying rando events (default=false)"
28 //
29 // BUGS:
30 //
31 // History:
32 //
33 //
34 //****************************************************************************
35 
36 #ifndef TILESIMALGS_TILEPULSEFORTILEMUONRECEIVER_H
37 #define TILESIMALGS_TILEPULSEFORTILEMUONRECEIVER_H
38 
39 // Tile includes
50 
51 // pileup
53 
54 // Atlas includes
59 
60 // Gaudi includes
61 #include "GaudiKernel/ToolHandle.h"
62 #include "GaudiKernel/ServiceHandle.h"
63 
64 #include "CLHEP/Random/RandomEngine.h"
65 
66 class IAthRNGSvc;
67 class PileUpMergeSvc;
68 class HWIdentifier;
69 
70 class TileID;
71 class TileHWID;
72 class TileInfo;
73 class TileCablingService;
74 class TileEvent;
75 class TileDQstatus;
76 
77 #include <string>
78 #include <vector>
79 
81  public:
82  // constructor
83  TilePulseForTileMuonReceiver(const std::string& name, ISvcLocator* pSvcLocator);
84  // destructor
86 
87  //Gaudi Hooks
88  virtual StatusCode initialize() override;
89  virtual StatusCode execute() override;
90  virtual StatusCode finalize() override;
91  virtual bool isClonable() const override final { return true; }
92 
93  private:
94 
95  SG::ReadHandleKey<TileDigitsContainer> m_inputDigitContainerKey{this, "InputTileDigitContainer","",""};
96  std::string m_inputDigitContainerName{""};
97 
99  "TileHitContainer","TileHitCnt", "Input Tile hit container key"};
100 
102  "MuonReceiverDigitsContainer", "MuRcvDigitsCnt", "Output Tile muon receiver digits container key"};
103 
105  "MuonReceiverRawChannelContainer", "MuRcvRawChCnt", "Output Tile muon receiver raw channel container key"};
106 
111  "TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"};
112 
117  "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};
118 
119  ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};
120  Gaudi::Property<std::string> m_randomStreamName{this, "RandomStreamName", "Tile_PulseForTileMuonReceiver", ""};
122 
127  "TileSampleNoise", "TileSampleNoise", "Input Tile sample noise"};
128 
133  "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"};
134 
139  "TilePulseShape", "TileMuRcvPulseShape", "Input Tile Muon Receiver pulse shape"};
140 
145  "TileBadChannels", "TileBadChannels", "Input Tile bad channel status"};
146 
147  ToolHandle<TileRawChannelBuilderMF> m_MuRcvBuildTool{this,
148  "TileRawChannelBuilderMF", "TileRawChannelBuilderMF", "Reconstruction tool, default: the Matched Filter"};
149 
150  Gaudi::Property<std::string> m_infoName{this, "TileInfoName", "TileInfo", "TileInfo object name"};
151  Gaudi::Property<bool> m_integerDigits{this, "IntegerDigits", false, "Round digits (default=false)"};
152  Gaudi::Property<bool> m_maskBadChannels{this, "MaskBadChannels", false, "Remove channels tagged bad (default=false)"};
153  Gaudi::Property<bool> m_useCoolPulseShapes{this, "UseCoolPulseShapes", false, "Pulse shapes from database (default=false)"};
154  Gaudi::Property<bool> m_tileNoise{this, "UseCoolNoise", false, "Noise from database (default=false)"};
155  Gaudi::Property<bool> m_tilePedestal{this, "UseCoolPedestal", false, "Pedestal from database (default=false)"};
156  Gaudi::Property<bool> m_rndmEvtOverlay{this, "RndmEvtOverlay", false, "Pileup and/or noise added by overlaying random events (default=false)"};
157  Gaudi::Property<bool> m_onlyUseContainerName{this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."};
158 
159  const TileID* m_tileID;
163 
165  int m_iTrig;
166  int m_adcMax;
167  double m_tileThresh;
168 
169  // This is used when loading a pulse from db
170  //
171  int m_nShape;
174  double m_timeStep;
175 
176  ServiceHandle<PileUpMergeSvc> m_mergeSvc{this, "PileUpMergeSvc", "PileUpMergeSvc"};
177  // vector container for the pulse shape
178  //
179  std::vector<double> m_shapeMuonReceiver;
180 
182 };
183 
184 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TilePulseForTileMuonReceiver::m_badChannelsKey
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
Definition: TilePulseForTileMuonReceiver.h:144
TileCablingSvc.h
TilePulseForTileMuonReceiver::m_runPeriod
int m_runPeriod
Definition: TilePulseForTileMuonReceiver.h:181
TilePulseForTileMuonReceiver::m_cablingSvc
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
Definition: TilePulseForTileMuonReceiver.h:116
TilePulseForTileMuonReceiver::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Definition: TilePulseForTileMuonReceiver.h:176
TileEMScale.h
TilePulse.h
TilePulseForTileMuonReceiver::m_maskBadChannels
Gaudi::Property< bool > m_maskBadChannels
Definition: TilePulseForTileMuonReceiver.h:152
TilePulseForTileMuonReceiver::m_muRcvRawChannelContainerKey
SG::WriteHandleKey< TileRawChannelContainer > m_muRcvRawChannelContainerKey
Definition: TilePulseForTileMuonReceiver.h:104
TilePulseForTileMuonReceiver::m_adcMax
int m_adcMax
ADC saturation value.
Definition: TilePulseForTileMuonReceiver.h:166
TilePulseForTileMuonReceiver::m_muRcvDigitsContainerKey
SG::WriteHandleKey< TileDigitsContainer > m_muRcvDigitsContainerKey
Definition: TilePulseForTileMuonReceiver.h:101
TilePulseForTileMuonReceiver
Definition: TilePulseForTileMuonReceiver.h:80
TileInfo
Definition: TileInfo.h:49
TilePulseForTileMuonReceiver::m_binTime0
int m_binTime0
Index of time=0 bin for pulse shape.
Definition: TilePulseForTileMuonReceiver.h:173
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< TileDigitsContainer >
TilePulseForTileMuonReceiver::m_samplingFractionKey
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
Definition: TilePulseForTileMuonReceiver.h:110
HWIdentifier
Definition: HWIdentifier.h:13
TilePulseForTileMuonReceiver::m_iTrig
int m_iTrig
Index of the triggering time slice.
Definition: TilePulseForTileMuonReceiver.h:165
TilePulseForTileMuonReceiver::m_nSamples
int m_nSamples
Number of time slices for each channel.
Definition: TilePulseForTileMuonReceiver.h:164
PileUpMergeSvc
the preferred mechanism to access information from the different event stores in a pileup job.
Definition: PileUpMergeSvc.h:58
TilePulseForTileMuonReceiver::initialize
virtual StatusCode initialize() override
initialize method
Definition: TilePulseForTileMuonReceiver.cxx:95
TilePulseForTileMuonReceiver::m_inputDigitContainerName
std::string m_inputDigitContainerName
Definition: TilePulseForTileMuonReceiver.h:96
AthAlgorithm.h
TileRawChannelContainer.h
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileDQstatus
Class that holds Data Quality fragment information and provides functions to extract the data quality...
Definition: TileDQstatus.h:49
TilePulseForTileMuonReceiver::m_pulseShapeKey
SG::ReadCondHandleKey< TilePulse > m_pulseShapeKey
Name of TilePulseShape in condition store.
Definition: TilePulseForTileMuonReceiver.h:138
TilePulseForTileMuonReceiver::~TilePulseForTileMuonReceiver
virtual ~TilePulseForTileMuonReceiver()
Definition: TilePulseForTileMuonReceiver.cxx:90
TilePulseForTileMuonReceiver::m_sampleNoiseKey
SG::ReadCondHandleKey< TileSampleNoise > m_sampleNoiseKey
Name of TileSampleNoise in condition store.
Definition: TilePulseForTileMuonReceiver.h:126
TilePulseForTileMuonReceiver::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
Definition: TilePulseForTileMuonReceiver.h:121
TilePulseForTileMuonReceiver::m_hitContainerKey
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
Definition: TilePulseForTileMuonReceiver.h:98
SG::WriteHandleKey< TileDigitsContainer >
TilePulseForTileMuonReceiver::TilePulseForTileMuonReceiver
TilePulseForTileMuonReceiver(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TilePulseForTileMuonReceiver.cxx:70
TilePulseForTileMuonReceiver::m_tileID
const TileID * m_tileID
Definition: TilePulseForTileMuonReceiver.h:159
TileSamplingFraction.h
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
TileDigitsContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileCablingService
Definition: TileCablingService.h:23
AthAlgorithm
Definition: AthAlgorithm.h:47
TilePulseForTileMuonReceiver::m_MuRcvBuildTool
ToolHandle< TileRawChannelBuilderMF > m_MuRcvBuildTool
Definition: TilePulseForTileMuonReceiver.h:147
ReadCondHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
TilePulseForTileMuonReceiver::m_timeStep
double m_timeStep
Time step in pulse shape: 25.0 / nBinsPerX.
Definition: TilePulseForTileMuonReceiver.h:174
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TileRawChannelBuilderMF.h
TilePulseForTileMuonReceiver::execute
virtual StatusCode execute() override
execute method
Definition: TilePulseForTileMuonReceiver.cxx:191
TilePulseForTileMuonReceiver::finalize
virtual StatusCode finalize() override
finalize method
Definition: TilePulseForTileMuonReceiver.cxx:822
TilePulseForTileMuonReceiver::m_emScaleKey
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
Definition: TilePulseForTileMuonReceiver.h:132
TilePulseForTileMuonReceiver::m_nShape
int m_nShape
Number of bins in pulse shape.
Definition: TilePulseForTileMuonReceiver.h:171
TileHitContainer.h
TilePulseForTileMuonReceiver::m_inputDigitContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_inputDigitContainerKey
Definition: TilePulseForTileMuonReceiver.h:95
SG::ReadCondHandleKey< TileSamplingFraction >
TilePulseForTileMuonReceiver::isClonable
virtual bool isClonable() const override final
Definition: TilePulseForTileMuonReceiver.h:91
TilePulseForTileMuonReceiver::m_tileNoise
Gaudi::Property< bool > m_tileNoise
Definition: TilePulseForTileMuonReceiver.h:154
TileSampleNoise.h
TilePulseForTileMuonReceiver::m_tileInfo
const TileInfo * m_tileInfo
Definition: TilePulseForTileMuonReceiver.h:161
TilePulseForTileMuonReceiver::m_tilePedestal
Gaudi::Property< bool > m_tilePedestal
Definition: TilePulseForTileMuonReceiver.h:155
PileUpMergeSvc.h
the preferred mechanism to access information from the different event stores in a pileup job.
TilePulseForTileMuonReceiver::m_shapeMuonReceiver
std::vector< double > m_shapeMuonReceiver
Muon receiver pulse shape.
Definition: TilePulseForTileMuonReceiver.h:179
TilePulseForTileMuonReceiver::m_nBinsPerX
int m_nBinsPerX
Number of bins per bunch crossing in pulse shape.
Definition: TilePulseForTileMuonReceiver.h:172
IAthRNGSvc
manage multiple RandomEngines in thread-safe way.
Definition: IAthRNGSvc.h:28
TilePulseForTileMuonReceiver::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service to use.
Definition: TilePulseForTileMuonReceiver.h:119
TilePulseForTileMuonReceiver::m_onlyUseContainerName
Gaudi::Property< bool > m_onlyUseContainerName
Definition: TilePulseForTileMuonReceiver.h:157
TileBadChannels.h
TilePulseForTileMuonReceiver::m_tileHWID
const TileHWID * m_tileHWID
Definition: TilePulseForTileMuonReceiver.h:160
TilePulseForTileMuonReceiver::m_tileThresh
double m_tileThresh
Actual threshold value.
Definition: TilePulseForTileMuonReceiver.h:167
TilePulseForTileMuonReceiver::m_integerDigits
Gaudi::Property< bool > m_integerDigits
Definition: TilePulseForTileMuonReceiver.h:151
TilePulseForTileMuonReceiver::m_infoName
Gaudi::Property< std::string > m_infoName
Definition: TilePulseForTileMuonReceiver.h:150
TilePulseForTileMuonReceiver::m_rndmEvtOverlay
Gaudi::Property< bool > m_rndmEvtOverlay
Definition: TilePulseForTileMuonReceiver.h:156
TilePulseForTileMuonReceiver::m_useCoolPulseShapes
Gaudi::Property< bool > m_useCoolPulseShapes
Definition: TilePulseForTileMuonReceiver.h:153
TilePulseForTileMuonReceiver::m_cablingService
const TileCablingService * m_cablingService
TileCabling instance.
Definition: TilePulseForTileMuonReceiver.h:162
ServiceHandle< TileCablingSvc >