ATLAS Offline Software
Loading...
Searching...
No Matches
AFP_PixelHistoFiller Class Reference

#include <AFP_PixelHistoFiller.h>

Inheritance diagram for AFP_PixelHistoFiller:
Collaboration diagram for AFP_PixelHistoFiller:

Public Member Functions

 AFP_PixelHistoFiller (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~AFP_PixelHistoFiller ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method with EventContext.
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual StatusCode execute ()
 Execute method without EventContext (deprecated).
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
const EventContext & getContext () const
 Deprecated methods (use the ones with EventContext).
bool filterPassed () const
void setFilterPassed (bool state) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

int m_nPixelsX =0
int m_nPixelsY =0
std::vector< TH2F > m_pixelHits [m_nStations][m_nLayers]
std::vector< TH2F > m_pixelCluster [m_nStations][m_nLayers]
TProfile m_lb_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile m_lb_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_xCluster_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_yCluster_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_zCluster_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_zCluster_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_yCluster_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_xCluster_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_sxTrack_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_syTrack_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_syTrack_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_sxTrack_yDistSiTrackCluster [m_nStations][m_nLayers]
Gaudi::Property< int > m_LBRangeLength {this, "LBRangeLength",5, "How many lumiblocks should be merged together to have reasonable statistics"}
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey { this, "EventInfoKey", "EventInfo", "name of EventInfo container" }
SG::ReadHandleKey< xAOD::AFPSiHitContainerm_afpHitContainerKey { this ,"AFPHitContainerKey", "AFPSiHitContainer", "name of AFPSiHitContainer" }
SG::ReadHandleKey< xAOD::AFPTrackContainerm_afpTrackContainerKey { this, "AFPTrackContainerKey", "AFPTrackContainer", "name of AFPTrackContainer" }
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static const int m_nStations =4
static const int m_nLayers =4

Detailed Description

Definition at line 28 of file AFP_PixelHistoFiller.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ AFP_PixelHistoFiller()

AFP_PixelHistoFiller::AFP_PixelHistoFiller ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 21 of file AFP_PixelHistoFiller.cxx.

21 :
22 AthAlgorithm(name, pSvcLocator)
23{
24}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:

◆ ~AFP_PixelHistoFiller()

virtual AFP_PixelHistoFiller::~AFP_PixelHistoFiller ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute() [1/2]

StatusCode AFP_PixelHistoFiller::execute ( const EventContext & )
overridevirtual

Execute method with EventContext.

Override this method if acccess to the EventContext is needed.

Reimplemented from AthAlgorithm.

Definition at line 87 of file AFP_PixelHistoFiller.cxx.

88{
89
90 // get event info
91 SG::ReadHandle<xAOD::EventInfo> eventInfo (m_eventInfoKey, ctx);
92 if (!eventInfo.isValid())
93 {
94 ATH_MSG_WARNING("cannot get eventInfo");
95 return StatusCode::SUCCESS;
96 }
97 else ATH_MSG_DEBUG("successfully got eventInfo");
98
99 // make sure all the histograms are defined
100 int current_lb=eventInfo->lumiBlock();
101
102 if(static_cast<int>(m_pixelHits[0][0].size())-1<current_lb/m_LBRangeLength)
103 {
104 for(int st=0;st<m_nStations;++st)
105 {
106 for(int la=0;la<m_nLayers;++la)
107 {
108 for(int add=static_cast<int>(m_pixelHits[st][la].size());add<=current_lb/m_LBRangeLength;++add)
109 {
110 TH2F p_hist(Form("pixel_hits_lb_%d_%d_station_%d_layer_%d", add*m_LBRangeLength,(add+1)*m_LBRangeLength-1,st,la),
111 Form("pixel hits, lb %d-%d, station %d, layer %d", add*m_LBRangeLength,(add+1)*m_LBRangeLength-1,st,la),
113
114 m_pixelHits[st][la].push_back(p_hist);
115
116 TH2F c_hist(Form("pixel_clusters_lb_%d_%d_station_%d_layer_%d", add*m_LBRangeLength,(add+1)*m_LBRangeLength-1,st,la),
117 Form("pixel_clusters, lb %d-%d, station %d, layer %d", add*m_LBRangeLength,(add+1)*m_LBRangeLength-1,st,la),
118 400,-20, 20, 400, -20, 20);
119
120 m_pixelCluster[st][la].push_back(c_hist);
121
122
123 }
124
125 }
126 }
127 }
128
129 int lb_index=current_lb/m_LBRangeLength;
130
131 // Get containers:
132
133 SG::ReadHandle<xAOD::AFPSiHitContainer> afpHitContainer (m_afpHitContainerKey, ctx);
134 if (!afpHitContainer.isValid())
135 {
136 ATH_MSG_WARNING("cannot get AFPSiHitContainer");
137 return StatusCode::SUCCESS;
138 }
139 else ATH_MSG_DEBUG("successfully got AFPSiHitContainer");
140
141 SG::ReadHandle<xAOD::AFPTrackContainer> afpTrackContainer (m_afpTrackContainerKey, ctx);
142 if(!afpTrackContainer.isValid()){
143 ATH_MSG_WARNING("cannot get AFPTrackContainer");
144 return StatusCode::SUCCESS;
145 }else{
146 ATH_MSG_DEBUG("successfully got AFPTrackContainer");
147 }
148
149
150// Fill histograms:
151// Pixel hit histograms:
152
153 for (const xAOD::AFPSiHit* hit : *afpHitContainer)
154 {
155 int st=hit->stationID();
156 int la=hit->pixelLayerID();
157
158 if(st<0 || m_nStations<=st)
159 {
160 ATH_MSG_INFO("stationID = " <<st<<", but expected values are from 0 to "<<m_nStations-1 );
161 continue;
162 }
163 if(la<0 || m_nLayers<=la)
164 {
165 ATH_MSG_INFO("pixelLayerID = " <<la<<", but expected values are from 0 to "<<m_nLayers-1 );
166 continue;
167 }
168
169 m_pixelHits[st][la].at(lb_index).Fill(hit->pixelRowIDChip(),hit->pixelColIDChip());
170 }
171
172// Histograms for local alignment:
173
174 // determining numbers for good track selection
175
176 int nTrks[m_nStations]={0};
177 int nClusterHits[m_nStations]={0};
178 int nClusterHistPerPlane[m_nStations][m_nLayers]={{0}};
179
180 for(const xAOD::AFPTrack* track: *afpTrackContainer){
181 nTrks[track->stationID()]++;
182 for(const auto& cluster : track->clusters()){
183 nClusterHits[(*cluster)->stationID()]++;
184 nClusterHistPerPlane[(*cluster)->stationID()][(*cluster)->pixelLayerID()]++;
185 }
186 }
187
188 // looping over tracks
189
190 for(const xAOD::AFPTrack* track: *afpTrackContainer){
191
192 if(nTrks[track->stationID()] != 1) continue; //exactly 1 track per station
193
194 for (const auto& cluster : track->clusters())
195 {
196 int st=(*cluster)->stationID();
197 int la=(*cluster)->pixelLayerID();
198
199
200
201 if(st<0 || m_nStations<=st)
202 {
203 ATH_MSG_INFO("stationID = " <<st<<", but expected values are from 0 to "<<m_nStations-1 );
204 continue;
205 }
206
207 if(la<0 || m_nLayers<=la)
208 {
209 ATH_MSG_INFO("pixelLayerID = " <<la<<", but expected values are from 0 to "<<m_nLayers-1 );
210 continue;
211 }
212
213 if(nClusterHits[st]<3 || nClusterHits[st]>4) continue; // 3 or 4 cluster hits per track
214 if(nClusterHistPerPlane[st][la]>1) continue; // 1 cluster hit per plane
215
216 m_pixelCluster[st][la].at(lb_index).Fill((*cluster)->xLocal(),(*cluster)->yLocal());
217
218 double dx = 1e3*(track->xLocal() + (*cluster)->zLocal()*track->xSlope() - (*cluster)->xLocal());
219 double dy = 1e3*(track->yLocal() + (*cluster)->zLocal()*track->ySlope() - (*cluster)->yLocal());
220
221 m_lb_yCluster_yDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->yLocal(), dy);
222 m_lb_xCluster_xDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->xLocal(), dx);
223 m_lb_sxTrack_xDistSiTrackCluster[st][la].Fill(current_lb, track->xSlope(), dx);
224 m_lb_syTrack_yDistSiTrackCluster[st][la].Fill(current_lb, track->ySlope(), dy);
225 m_lb_syTrack_xDistSiTrackCluster[st][la].Fill(current_lb, track->ySlope(), dx);
226 m_lb_sxTrack_yDistSiTrackCluster[st][la].Fill(current_lb, track->xSlope(), dy);
227
228 m_lb_xDistSiTrackCluster[st][la].Fill(current_lb, dx);
229 m_lb_yDistSiTrackCluster[st][la].Fill(current_lb, dy);
230
231 m_lb_xCluster_yDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->xLocal(), dy);
232 m_lb_yCluster_xDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->yLocal(), dx);
233 m_lb_zCluster_xDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->zLocal(), dx);
234 m_lb_zCluster_yDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->zLocal(), dy);
235
236 }
237
238 }
239
240 return StatusCode::SUCCESS;
241}
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
size_t size() const
Number of registered mappings.
Gaudi::Property< int > m_LBRangeLength
TProfile2D m_lb_zCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_sxTrack_xDistSiTrackCluster[m_nStations][m_nLayers]
SG::ReadHandleKey< xAOD::AFPTrackContainer > m_afpTrackContainerKey
std::vector< TH2F > m_pixelCluster[m_nStations][m_nLayers]
TProfile2D m_lb_yCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_xCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
static const int m_nStations
TProfile2D m_lb_yCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
SG::ReadHandleKey< xAOD::AFPSiHitContainer > m_afpHitContainerKey
TProfile m_lb_xDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_xCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_sxTrack_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_syTrack_xDistSiTrackCluster[m_nStations][m_nLayers]
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
TProfile2D m_lb_zCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_syTrack_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile m_lb_yDistSiTrackCluster[m_nStations][m_nLayers]
std::vector< TH2F > m_pixelHits[m_nStations][m_nLayers]
bool add(const std::string &hname, TKey *tobj)
Definition fastadd.cxx:55
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
AFPSiHit_v2 AFPSiHit
Definition AFPSiHit.h:12
AFPTrack_v2 AFPTrack
Definition AFPTrack.h:12

◆ execute() [2/2]

virtual StatusCode AthAlgorithm::execute ( )
inlinevirtualinherited

Execute method without EventContext (deprecated).

Override this method if the EventContext is not needed.

Reimplemented in AthenaMonManager, AthPrescaler, BuildVertexPointingAlg, CP::AsgClassificationDecorationAlg, CP::AsgEnergyDecoratorAlg, CP::AsgEventScaleFactorAlg, CP::AsgLeptonTrackDecorationAlg, CP::AsgObjectScaleFactorAlg, CP::AsgPriorityDecorationAlg, CP::AsgSelectionAlg, CP::AsgShallowCopyAlg, CP::AsgUnionPreselectionAlg, CP::AsgUnionSelectionAlg, CP::AsgViewFromSelectionAlg, CP::AsgxAODNTupleMakerAlg, CP::BJetCalibrationAlg, CP::BootstrapGeneratorAlg, CP::BTaggingEfficiencyAlg, CP::BTaggingInformationDecoratorAlg, CP::BTaggingTriggerEfficiencyAlg, CP::BTaggingTriggerMatchingAlg, CP::ChargeSelectorAlg, CP::CopyNominalSelectionAlg, CP::DileptonInvariantMassSelectorAlg, CP::DileptonInvariantMassWindowSelectorAlg, CP::DileptonOSSFInvariantMassWindowSelectorAlg, CP::DiTauEfficiencyCorrectionsAlg, CP::DiTauMassCalculatorAlg, CP::DiTauSmearingAlg, CP::DiTauTruthMatchingAlg, CP::EgammaCalibrationAndSmearingAlg, CP::EgammaFSRForMuonsCollectorAlg, CP::EgammaIsolationCorrectionAlg, CP::EgammaIsolationSelectionAlg, CP::ElectronEfficiencyCorrectionAlg, CP::ElectronSiHitDecAlg, CP::EventCutFlowHistAlg, CP::EventFlagSelectionAlg, CP::EventSelectionByObjectFlagAlg, CP::EventStatusSelectionAlg, CP::FakeBkgCalculatorAlg, CP::InDetTrackBiasingAlg, CP::InDetTrackExtraVarDecoratorAlg, CP::InDetTrackSelectionAlg, CP::InDetTrackSmearingAlg, CP::JetCalibAlg, CP::JetCalibrationAlg, CP::JetDecoratorAlg, CP::JetFFSmearingAlg, CP::JetGhostMuonAssociationAlg, CP::JetModifierAlg, CP::JetNGhostSelectorAlg, CP::JetReclusteringAlg, CP::JetSelectionAlg, CP::JetTriggerDecoratorAlg, CP::JetUncertaintiesAlg, CP::JvtEfficiencyAlg, CP::JvtUpdateAlg, CP::KinematicHistAlg, CP::LeptonSFCalculatorAlg, CP::MCTCDecorationAlg, CP::MetadataHistAlg, CP::MetBuilderAlg, CP::MetMakerAlg, CP::MetSignificanceAlg, CP::MissingETPlusTransverseMassSelectorAlg, CP::MissingETSelectorAlg, CP::MuonCalibrationAndSmearingAlg, CP::MuonEfficiencyScaleFactorAlg, CP::MuonIsolationAlg, CP::MuonSelectionAlgV2, CP::MuonTriggerEfficiencyScaleFactorAlg, CP::NJetDecoratorAlg, CP::NLargeRJetMassWindowSelectorAlg, CP::NObjectMassSelectorAlg, CP::NObjectPtSelectorAlg, CP::ObjectCutFlowHistAlg, CP::OverlapRemovalAlg, CP::PhotonEfficiencyCorrectionAlg, CP::PhotonExtraVariablesAlg, CP::PhotonShowerShapeFudgeAlg, CP::PileupReweightingAlg, CP::PileupReweightingProvider, CP::PMGTruthWeightAlg, CP::RNtupleTreeMakerAlg, CP::RunNumberSelectorAlg, CP::RunPartonHistoryAlg, CP::SaveFilterAlg, CP::SecVertexTruthMatchAlg, CP::SSVWeightsAlg, CP::SumNLeptonPtSelectorAlg, CP::SysListDumperAlg, CP::SysTruthWeightAlg, CP::TauCombineMuonRMTausAlg, CP::TauEfficiencyCorrectionsAlg, CP::TauSmearingAlg, CP::TauTruthMatchingAlg, CP::TransverseMassSelectorAlg, CP::TreeFillerAlg, CP::TreeMakerAlg, CP::TrigEventSelectionAlg, CP::TrigGlobalEfficiencyAlg, CP::TrigMatchingAlg, CP::TrigPrescalesAlg, CP::VGammaORAlg, CP::xAODWriterAlg, CP::XbbEfficiencyAlg, CP::XbbInformationDecoratorAlg, DecoratePhotonPointingAlg, DecorateVertexScoreAlg, DumpGeo, EL::AnaAlgorithm, EL::UnitTestAlg2, EL::UnitTestAlg3, EL::UnitTestAlg4, EL::UnitTestAlg5, EL::UnitTestAlg7, EventReco::KLFitterFinalizeOutputAlg, EventReco::RunKLFitterAlg, GRLSelectorAlg, IdDictCnvTest, InDetUpdateCaches, JetGlobalEventSetup, LArAutoCorrAlgToDB, LArAutoCorrFromStdNtuple, LArBadChannelHunter, LArBlockCorrections, LArCalibCopyAlg< CONDITIONSCONTAINER >, LArCalibCopyAlg< LArDAC2uAMC >, LArCalibCopyAlg< LArPhysWaveContainer >, LArCalibCopyAlg< LArTdriftComplete >, LArCalibPatchingAlg< CONDITIONSCONTAINER >, LArCalibPatchingAlg< LArAutoCorrComplete >, LArCalibPatchingAlg< LArCaliWaveContainer >, LArCalibPatchingAlg< LArMphysOverMcalComplete >, LArCalibPatchingAlg< LArRampComplete >, LArCalibValidationAlg< CONDITIONSCONTAINER, REFCONTAINER >, LArCalibValidationAlg< LArAutoCorrComplete, LArAutoCorrComplete >, LArCalibValidationAlg< LArCaliWaveContainer, LArCaliWaveContainer >, LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >, LArCalibValidationAlg< LArRampComplete, ILArRamp >, LArCaliWaveSelector, LArCompleteToFlat, LArDeltaRespPredictor, LArDSPThresholdFillInline, LArDuplicateConstants, LArFillDSPConfig, LArFlatFromFile, LArGeoWeightsFill, LArMasterWaveBuilder, LArMphysOverMcalFromTuple, LArOFCAlg, LArOFCBin_PhysCaliTdiffFromStdNtuple, LArOFCtoOFC, LArOFPhaseFill, LArParamsFromStdNtuple, LArPhysWaveFromAscii, LArPhysWaveFromStdNtuple, LArPhysWaveFromTuple, LArPhysWavePredictor, LArPhysWaveShifter, LArRampAdHocPatchingAlg, LArReadParamsFromFile< DATA >, LArReadParamsFromFile< LArCableAttenuationComplete >, LArReadParamsFromFile< LArCableLengthComplete >, LArReadParamsFromFile< LArCaliPulseParamsComplete >, LArReadParamsFromFile< LArDetCellParamsComplete >, LArReadParamsFromFile< LArEMEC_CphiComplete >, LArReadParamsFromFile< LArEMEC_HValphaComplete >, LArReadParamsFromFile< LArEMEC_HVbetaComplete >, LArReadParamsFromFile< LArMphysOverMcalComplete >, LArReadParamsFromFile< LArPhysCaliTdiffComplete >, LArReadParamsFromFile< LArRinjComplete >, LArReadParamsFromFile< LArTdriftComplete >, LArReadParamsFromFile< LArTshaperComplete >, LArRTMParamExtractor, LArShapeFromStdNtuple, LArTimePhysPrediction, LisNtuple, LVL1::eFEXDriver, LVL1::L1CaloTriggerTowerDecoratorAlg, LVL1::L1TopoSimulation, LVL1::TrigT1MBTS, OverlapRemovalGenUseAlg, PyAthena::Alg, SGInputLoader, SUSYToolsAlg, TBBPCRec, TBMWPCRec, TBScintillatorRec, TBTailCatcherRec, TBTrackInfoFromTag, Trig::TrigMatchTestAlg, TrkEDMTestAlg, ZdcLEDNtuple, and ZdcNtuple.

Definition at line 76 of file AthAlgorithm.h.

76 {
77 throw GaudiException( "execute() or execute(const EventContext&) needs to be implemented", name(),
78 StatusCode::FAILURE );
79 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ filterPassed()

bool AthAlgorithm::filterPassed ( ) const
inherited

Definition at line 94 of file AthAlgorithm.cxx.

94 {
95 return execState( Gaudi::Hive::currentContext() ).filterPassed();
96}

◆ finalize()

StatusCode AFP_PixelHistoFiller::finalize ( )
overridevirtual

Definition at line 244 of file AFP_PixelHistoFiller.cxx.

245{
246 std::unique_ptr<TFile> output_file(new TFile("AFP_PixelHistoFiller.root","recreate"));
247
248 TH1I lb("LBRangeLength","LBRangeLength",2,0,2);
249 lb.Fill(0.5);
250 lb.Fill(1.5,m_LBRangeLength);
251 lb.Write();
252
253 for(int st=0;st<m_nStations;++st)
254 {
255 for(int la=0;la<m_nLayers;++la)
256 {
257 m_lb_xDistSiTrackCluster[st][la].Write();
258 m_lb_yDistSiTrackCluster[st][la].Write();
269
270 for(TH2F& p_hist: m_pixelHits[st][la])
271 {
272 p_hist.Write();
273 }
274 for(TH2F& c_hist: m_pixelCluster[st][la]){
275 c_hist.Write();
276 }
277
278 }
279 }
280
281 output_file->Close();
282
283 return StatusCode::SUCCESS;
284}
int lb
Definition globals.cxx:23

◆ getContext()

const EventContext & AthAlgorithm::getContext ( ) const
inherited

Deprecated methods (use the ones with EventContext).

Definition at line 90 of file AthAlgorithm.cxx.

90 {
91 return Gaudi::Hive::currentContext();
92}

◆ initialize()

StatusCode AFP_PixelHistoFiller::initialize ( )
overridevirtual

Definition at line 27 of file AFP_PixelHistoFiller.cxx.

28{
29 ATH_CHECK( m_eventInfoKey.initialize() );
30 ATH_CHECK( m_afpHitContainerKey.initialize() );
31 ATH_CHECK( m_afpTrackContainerKey.initialize() );
32
35
36 for(int st=0;st<m_nStations;++st)
37 {
38 for(int la=0;la<m_nLayers;++la)
39 {
40 m_pixelHits[st][la].clear();
41 m_pixelCluster[st][la].clear();
42
43
44 TProfile lb_dx(Form("lb_dx_station_%d_layer_%d", st,la), Form("lb_dx, station %d, layer %d", st,la), 100, 0, 1000);
45 m_lb_xDistSiTrackCluster[st][la] = lb_dx;
46
47 TProfile lb_dy(Form("lb_dy_station_%d_layer_%d", st,la), Form("lb_dy, station %d, layer %d", st,la), 100, 0, 1000);
48 m_lb_yDistSiTrackCluster[st][la] = lb_dy;
49
50 TProfile2D lb_yc_dy(Form("lb_yCluster_dy_station_%d_layer_%d", st,la), Form("lb_yCluster_dy, station %d, layer %d", st,la), 100, 0, 1000, 40, -20., 20.);
52
53 TProfile2D lb_xc_dx(Form("lb_xCluster_dx_station_%d_layer_%d", st,la), Form("lb_xCluster_dx, station %d, layer %d", st,la), 100, 0, 1000, 40, -20., 20.);
55
56 TProfile2D lb_xC_dy(Form("lb_xCluster_dy_station_%d_layer_%d", st, la), Form("lb_xCluster_dy, station %d, layer %d", st, la), 100, 0, 1000, 40, -20, 20);
58
59 TProfile2D lb_yC_dx(Form("lb_yCluster_dx_station_%d_layer_%d", st, la), Form("lb_yCluster_dx, station %d, layer %d", st, la), 100, 0, 1000, 40, -20, 20);
61
62 TProfile2D lb_zC_dx(Form("lb_zCluster_dx_station_%d_layer_%d", st, la), Form("lb_zCluster_dx, station %d, layer %d", st, la), 100, 0, 1000, 100, 9*la - 3, 9*(la+1));
64
65 TProfile2D lb_zC_dy(Form("lb_zCluster_dy_station_%d_layer_%d", st, la), Form("lb_zCluster_dy, station %d, layer %d", st, la), 100, 0, 1000, 100, 9*la - 3, 9*(la+1));
67
68 TProfile2D lb_sx_dx(Form("lb_xSlopeTrack_dx_station_%d_layer_%d",st,la), Form("xSlopeTrack_dx, station %d, layer %d", st,la), 100, 0, 1000, 100, -1., 1.);
70
71 TProfile2D lb_sy_dy(Form("lb_ySlopeTrack_dy_station_%d_layer_%d", st,la), Form("lb_ySlopeTrack_dy, station %d, layer %d", st,la), 100, 0, 1000, 100, -1., 1.);
73
74 TProfile2D lb_sy_dx(Form("lb_ySlopeTrack_dx_station_%d_layer_%d", st,la), Form("lb_ySlopeTrack_dx, station %d, layer %d", st,la), 100, 0, 1000, 100, -1., 1.);
76
77 TProfile2D lb_sx_dy(Form("lb_xSlopeTrack_dy_station_%d_layer_%d", st,la), Form("lb_xSlopeTrack_dy, station %d, layer %d", st,la), 100, 0, 1000, 100, -1., 1.);
78 m_lb_sxTrack_yDistSiTrackCluster[st][la] = lb_sx_dy;
79
80 }
81 }
82
83 return StatusCode::SUCCESS;
84}
#define ATH_CHECK
Evaluate an expression and check for errors.
static constexpr double SiT_Pixel_amount_y
static constexpr double SiT_Pixel_amount_x

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 118 of file AthAlgorithm.h.

118{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

void AthAlgorithm::setFilterPassed ( bool state) const
inherited

Definition at line 98 of file AthAlgorithm.cxx.

98 {
99 execState( Gaudi::Hive::currentContext() ).setFilterPassed(state);
100}

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc.

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_afpHitContainerKey

SG::ReadHandleKey<xAOD::AFPSiHitContainer> AFP_PixelHistoFiller::m_afpHitContainerKey { this ,"AFPHitContainerKey", "AFPSiHitContainer", "name of AFPSiHitContainer" }
private

Definition at line 63 of file AFP_PixelHistoFiller.h.

63{ this ,"AFPHitContainerKey", "AFPSiHitContainer", "name of AFPSiHitContainer" };

◆ m_afpTrackContainerKey

SG::ReadHandleKey<xAOD::AFPTrackContainer> AFP_PixelHistoFiller::m_afpTrackContainerKey { this, "AFPTrackContainerKey", "AFPTrackContainer", "name of AFPTrackContainer" }
private

Definition at line 64 of file AFP_PixelHistoFiller.h.

64{ this, "AFPTrackContainerKey", "AFPTrackContainer", "name of AFPTrackContainer" };

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> AFP_PixelHistoFiller::m_eventInfoKey { this, "EventInfoKey", "EventInfo", "name of EventInfo container" }
private

Definition at line 62 of file AFP_PixelHistoFiller.h.

62{ this, "EventInfoKey", "EventInfo", "name of EventInfo container" };

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 121 of file AthAlgorithm.h.

◆ m_lb_sxTrack_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_sxTrack_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 55 of file AFP_PixelHistoFiller.h.

◆ m_lb_sxTrack_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_sxTrack_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 58 of file AFP_PixelHistoFiller.h.

◆ m_lb_syTrack_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_syTrack_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 57 of file AFP_PixelHistoFiller.h.

◆ m_lb_syTrack_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_syTrack_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 56 of file AFP_PixelHistoFiller.h.

◆ m_lb_xCluster_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_xCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 54 of file AFP_PixelHistoFiller.h.

◆ m_lb_xCluster_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_xCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 48 of file AFP_PixelHistoFiller.h.

◆ m_lb_xDistSiTrackCluster

TProfile AFP_PixelHistoFiller::m_lb_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 46 of file AFP_PixelHistoFiller.h.

◆ m_lb_yCluster_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_yCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 49 of file AFP_PixelHistoFiller.h.

◆ m_lb_yCluster_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_yCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 53 of file AFP_PixelHistoFiller.h.

◆ m_lb_yDistSiTrackCluster

TProfile AFP_PixelHistoFiller::m_lb_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 47 of file AFP_PixelHistoFiller.h.

◆ m_lb_zCluster_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_zCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 50 of file AFP_PixelHistoFiller.h.

◆ m_lb_zCluster_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_zCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 51 of file AFP_PixelHistoFiller.h.

◆ m_LBRangeLength

Gaudi::Property<int> AFP_PixelHistoFiller::m_LBRangeLength {this, "LBRangeLength",5, "How many lumiblocks should be merged together to have reasonable statistics"}
private

Definition at line 60 of file AFP_PixelHistoFiller.h.

60{this, "LBRangeLength",5, "How many lumiblocks should be merged together to have reasonable statistics"};

◆ m_nLayers

const int AFP_PixelHistoFiller::m_nLayers =4
staticprivate

Definition at line 39 of file AFP_PixelHistoFiller.h.

◆ m_nPixelsX

int AFP_PixelHistoFiller::m_nPixelsX =0
private

Definition at line 40 of file AFP_PixelHistoFiller.h.

◆ m_nPixelsY

int AFP_PixelHistoFiller::m_nPixelsY =0
private

Definition at line 41 of file AFP_PixelHistoFiller.h.

◆ m_nStations

const int AFP_PixelHistoFiller::m_nStations =4
staticprivate

Definition at line 38 of file AFP_PixelHistoFiller.h.

◆ m_pixelCluster

std::vector<TH2F> AFP_PixelHistoFiller::m_pixelCluster[m_nStations][m_nLayers]
private

Definition at line 44 of file AFP_PixelHistoFiller.h.

◆ m_pixelHits

std::vector<TH2F> AFP_PixelHistoFiller::m_pixelHits[m_nStations][m_nLayers]
private

Definition at line 43 of file AFP_PixelHistoFiller.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: