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 // Atlas includes
56 
57 // Gaudi includes
58 #include "GaudiKernel/ToolHandle.h"
59 #include "GaudiKernel/ServiceHandle.h"
60 
61 #include "CLHEP/Random/RandomEngine.h"
62 
63 class IAthRNGSvc;
64 class PileUpMergeSvc;
65 class HWIdentifier;
66 
67 class TileID;
68 class TileHWID;
69 class TileInfo;
70 class TileCablingService;
71 class TileEvent;
72 class TileDQstatus;
73 
74 #include <string>
75 #include <vector>
76 
78  public:
79  // constructor
80  TilePulseForTileMuonReceiver(const std::string& name, ISvcLocator* pSvcLocator);
81  // destructor
83 
84  //Gaudi Hooks
85  virtual StatusCode initialize() override;
86  virtual StatusCode execute() override;
87  virtual StatusCode finalize() override;
88  virtual bool isClonable() const override final { return true; }
89 
90  private:
91 
92  SG::ReadHandleKey<TileDigitsContainer> m_inputDigitContainerKey{this, "InputTileDigitContainer","",""};
93  std::string m_inputDigitContainerName{""};
94 
96  "TileHitContainer","TileHitCnt", "Input Tile hit container key"};
97 
99  "MuonReceiverDigitsContainer", "MuRcvDigitsCnt", "Output Tile muon receiver digits container key"};
100 
102  "MuonReceiverRawChannelContainer", "MuRcvRawChCnt", "Output Tile muon receiver raw channel container key"};
103 
108  "TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"};
109 
114  "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};
115 
116  ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};
117  Gaudi::Property<std::string> m_randomStreamName{this, "RandomStreamName", "Tile_PulseForTileMuonReceiver", ""};
119 
124  "TileSampleNoise", "TileSampleNoise", "Input Tile sample noise"};
125 
130  "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"};
131 
136  "TilePulseShape", "TileMuRcvPulseShape", "Input Tile Muon Receiver pulse shape"};
137 
142  "TileBadChannels", "TileBadChannels", "Input Tile bad channel status"};
143 
144  ToolHandle<TileRawChannelBuilderMF> m_MuRcvBuildTool{this,
145  "TileRawChannelBuilderMF", "TileRawChannelBuilderMF", "Reconstruction tool, default: the Matched Filter"};
146 
147  Gaudi::Property<std::string> m_infoName{this, "TileInfoName", "TileInfo", "TileInfo object name"};
148  Gaudi::Property<bool> m_integerDigits{this, "IntegerDigits", false, "Round digits (default=false)"};
149  Gaudi::Property<bool> m_maskBadChannels{this, "MaskBadChannels", false, "Remove channels tagged bad (default=false)"};
150  Gaudi::Property<bool> m_useCoolPulseShapes{this, "UseCoolPulseShapes", false, "Pulse shapes from database (default=false)"};
151  Gaudi::Property<bool> m_tileNoise{this, "UseCoolNoise", false, "Noise from database (default=false)"};
152  Gaudi::Property<bool> m_tilePedestal{this, "UseCoolPedestal", false, "Pedestal from database (default=false)"};
153  Gaudi::Property<bool> m_rndmEvtOverlay{this, "RndmEvtOverlay", false, "Pileup and/or noise added by overlaying random events (default=false)"};
154  Gaudi::Property<bool> m_onlyUseContainerName{this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."};
155 
156  const TileID* m_tileID;
160 
162  int m_iTrig;
163  int m_adcMax;
164  double m_tileThresh;
165 
166  // This is used when loading a pulse from db
167  //
168  int m_nShape;
171  double m_timeStep;
172 
174  // vector container for the pulse shape
175  //
176  std::vector<double> m_shapeMuonReceiver;
177 
179 };
180 
181 #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:141
TileCablingSvc.h
TilePulseForTileMuonReceiver::m_runPeriod
int m_runPeriod
Definition: TilePulseForTileMuonReceiver.h:178
TilePulseForTileMuonReceiver::m_cablingSvc
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
Definition: TilePulseForTileMuonReceiver.h:113
TileEMScale.h
TilePulse.h
TilePulseForTileMuonReceiver::m_maskBadChannels
Gaudi::Property< bool > m_maskBadChannels
Definition: TilePulseForTileMuonReceiver.h:149
TilePulseForTileMuonReceiver::m_muRcvRawChannelContainerKey
SG::WriteHandleKey< TileRawChannelContainer > m_muRcvRawChannelContainerKey
Definition: TilePulseForTileMuonReceiver.h:101
TilePulseForTileMuonReceiver::m_adcMax
int m_adcMax
ADC saturation value.
Definition: TilePulseForTileMuonReceiver.h:163
TilePulseForTileMuonReceiver::m_muRcvDigitsContainerKey
SG::WriteHandleKey< TileDigitsContainer > m_muRcvDigitsContainerKey
Definition: TilePulseForTileMuonReceiver.h:98
TilePulseForTileMuonReceiver
Definition: TilePulseForTileMuonReceiver.h:77
TileInfo
Definition: TileInfo.h:49
TilePulseForTileMuonReceiver::m_binTime0
int m_binTime0
Index of time=0 bin for pulse shape.
Definition: TilePulseForTileMuonReceiver.h:170
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
SG::ReadHandleKey< TileDigitsContainer >
TilePulseForTileMuonReceiver::m_samplingFractionKey
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
Definition: TilePulseForTileMuonReceiver.h:107
HWIdentifier
Definition: HWIdentifier.h:13
TilePulseForTileMuonReceiver::m_iTrig
int m_iTrig
Index of the triggering time slice.
Definition: TilePulseForTileMuonReceiver.h:162
TilePulseForTileMuonReceiver::m_nSamples
int m_nSamples
Number of time slices for each channel.
Definition: TilePulseForTileMuonReceiver.h:161
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:101
TilePulseForTileMuonReceiver::m_inputDigitContainerName
std::string m_inputDigitContainerName
Definition: TilePulseForTileMuonReceiver.h:93
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:135
TilePulseForTileMuonReceiver::~TilePulseForTileMuonReceiver
virtual ~TilePulseForTileMuonReceiver()
Definition: TilePulseForTileMuonReceiver.cxx:96
TilePulseForTileMuonReceiver::m_mergeSvc
PileUpMergeSvc * m_mergeSvc
Pointer to PileUpMergeService.
Definition: TilePulseForTileMuonReceiver.h:173
TilePulseForTileMuonReceiver::m_sampleNoiseKey
SG::ReadCondHandleKey< TileSampleNoise > m_sampleNoiseKey
Name of TileSampleNoise in condition store.
Definition: TilePulseForTileMuonReceiver.h:123
TilePulseForTileMuonReceiver::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
Definition: TilePulseForTileMuonReceiver.h:118
TilePulseForTileMuonReceiver::m_hitContainerKey
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
Definition: TilePulseForTileMuonReceiver.h:95
SG::WriteHandleKey< TileDigitsContainer >
TilePulseForTileMuonReceiver::TilePulseForTileMuonReceiver
TilePulseForTileMuonReceiver(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TilePulseForTileMuonReceiver.cxx:75
TilePulseForTileMuonReceiver::m_tileID
const TileID * m_tileID
Definition: TilePulseForTileMuonReceiver.h:156
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:144
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:171
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TileRawChannelBuilderMF.h
TilePulseForTileMuonReceiver::execute
virtual StatusCode execute() override
execute method
Definition: TilePulseForTileMuonReceiver.cxx:197
TilePulseForTileMuonReceiver::finalize
virtual StatusCode finalize() override
finalize method
Definition: TilePulseForTileMuonReceiver.cxx:828
TilePulseForTileMuonReceiver::m_emScaleKey
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
Definition: TilePulseForTileMuonReceiver.h:129
TilePulseForTileMuonReceiver::m_nShape
int m_nShape
Number of bins in pulse shape.
Definition: TilePulseForTileMuonReceiver.h:168
TileHitContainer.h
TilePulseForTileMuonReceiver::m_inputDigitContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_inputDigitContainerKey
Definition: TilePulseForTileMuonReceiver.h:92
SG::ReadCondHandleKey< TileSamplingFraction >
TilePulseForTileMuonReceiver::isClonable
virtual bool isClonable() const override final
Definition: TilePulseForTileMuonReceiver.h:88
TilePulseForTileMuonReceiver::m_tileNoise
Gaudi::Property< bool > m_tileNoise
Definition: TilePulseForTileMuonReceiver.h:151
TileSampleNoise.h
TilePulseForTileMuonReceiver::m_tileInfo
const TileInfo * m_tileInfo
Definition: TilePulseForTileMuonReceiver.h:158
TilePulseForTileMuonReceiver::m_tilePedestal
Gaudi::Property< bool > m_tilePedestal
Definition: TilePulseForTileMuonReceiver.h:152
TilePulseForTileMuonReceiver::m_shapeMuonReceiver
std::vector< double > m_shapeMuonReceiver
Muon receiver pulse shape.
Definition: TilePulseForTileMuonReceiver.h:176
TilePulseForTileMuonReceiver::m_nBinsPerX
int m_nBinsPerX
Number of bins per bunch crossing in pulse shape.
Definition: TilePulseForTileMuonReceiver.h:169
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:116
TilePulseForTileMuonReceiver::m_onlyUseContainerName
Gaudi::Property< bool > m_onlyUseContainerName
Definition: TilePulseForTileMuonReceiver.h:154
TileBadChannels.h
TilePulseForTileMuonReceiver::m_tileHWID
const TileHWID * m_tileHWID
Definition: TilePulseForTileMuonReceiver.h:157
TilePulseForTileMuonReceiver::m_tileThresh
double m_tileThresh
Actual threshold value.
Definition: TilePulseForTileMuonReceiver.h:164
TilePulseForTileMuonReceiver::m_integerDigits
Gaudi::Property< bool > m_integerDigits
Definition: TilePulseForTileMuonReceiver.h:148
TilePulseForTileMuonReceiver::m_infoName
Gaudi::Property< std::string > m_infoName
Definition: TilePulseForTileMuonReceiver.h:147
TilePulseForTileMuonReceiver::m_rndmEvtOverlay
Gaudi::Property< bool > m_rndmEvtOverlay
Definition: TilePulseForTileMuonReceiver.h:153
TilePulseForTileMuonReceiver::m_useCoolPulseShapes
Gaudi::Property< bool > m_useCoolPulseShapes
Definition: TilePulseForTileMuonReceiver.h:150
TilePulseForTileMuonReceiver::m_cablingService
const TileCablingService * m_cablingService
TileCabling instance.
Definition: TilePulseForTileMuonReceiver.h:159
ServiceHandle< TileCablingSvc >