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

#include <LArMinBiasAlg.h>

Inheritance diagram for LArMinBiasAlg:

Classes

struct  CellInfo

Public Member Functions

 LArMinBiasAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Algorithm Constructor.
 ~LArMinBiasAlg ()
 Default Destructor.
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode stop () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

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

void fillNtuple ()
void addCell (int index, double e1, double e2, double wt=1.)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< int > m_datasetID_lowPt {this, "datasetID_lowPt", 119995}
Gaudi::Property< int > m_datasetID_highPt {this, "datasetID_highPt", 119996}
Gaudi::Property< double > m_weight_lowPt {this, "weight_highPt", 39.8606}
Gaudi::Property< double > m_weight_highPt {this, "weight_lowPt", 0.138128}
SG::ReadCondHandleKey< LArMCSymm_mcSymKey { this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object" }
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManagerm_caloSCMgrKey
const CaloCell_Base_IDm_calo_id = nullptr
std::vector< double > m_eCell
ServiceHandle< ITHistSvc > m_thistSvc {this,"THistSvc","THistSvc"}
TTree * m_tree = nullptr
int m_nevt_total = 0
int m_n1 = 0
int m_n2 = 0
int m_nsymcell = 0
double m_nevt [MAX_SYM_CELLS] {}
int m_layer [MAX_SYM_CELLS] {}
int m_region [MAX_SYM_CELLS] {}
int m_identifier [MAX_SYM_CELLS] {}
int m_ieta [MAX_SYM_CELLS] {}
float m_eta [MAX_SYM_CELLS] {}
float m_phi [MAX_SYM_CELLS] {}
double m_average [MAX_SYM_CELLS] {}
double m_rms [MAX_SYM_CELLS] {}
double m_offset [MAX_SYM_CELLS] {}
std::vector< CellInfom_CellList
std::vector< int > m_symCellIndex
float m_first {true}
int m_ncell = 0
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this,"EvtInfo", "EventInfo", "EventInfo name"}
StringArrayProperty m_inputKeys
SG::ReadHandleKeyArray< LArHitContainerm_larHitKeys
BooleanProperty m_isSC {this, "SuperCell", false, "Creating for SC ?"}
ToolHandle< ICaloSuperCellIDToolm_scidtool {this, "CaloSuperCellIDTool", "CaloSuperCellIDTool", "Offline / SuperCell ID mapping tool"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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

Detailed Description

Definition at line 38 of file LArMinBiasAlg.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

◆ LArMinBiasAlg()

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

Standard Athena-Algorithm Constructor.

Definition at line 19 of file LArMinBiasAlg.cxx.

19 :
20 AthAlgorithm(name,pSvcLocator)
21 {
22 }
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

◆ ~LArMinBiasAlg()

LArMinBiasAlg::~LArMinBiasAlg ( )
default

Default Destructor.

Member Function Documentation

◆ addCell()

void LArMinBiasAlg::addCell ( int index,
double e1,
double e2,
double wt = 1. )
private

Definition at line 255 of file LArMinBiasAlg.cxx.

256 {
257 if (index < m_ncell && index>=0) {
259 if (index2<0) return;
260 if (index2 >= ((int)(m_CellList.size())) ) {
261 ATH_MSG_INFO(" LArMinBiasAlg::addCell: for " << index << ", " << index2 << " is out-of bounds for list of size " << m_CellList.size());
262 return;
263 }
264 double oldN = m_CellList[index2].nevt;
265 double oldAverage = m_CellList[index2].average;
266 double oldRMS = m_CellList[index2].rms;
267 double oldAverage2 = m_CellList[index2].offset;
268
269 double frac = oldN/(weight+oldN);
270 double Anew = weight+oldN;
271 double newAverage = frac*oldAverage + weight*energy/Anew;
272 double deltaE = energy-newAverage;
273 double newRMS = frac*(oldRMS + (newAverage-oldAverage)*(newAverage-oldAverage)) + weight*deltaE*deltaE/Anew;
274
275 double newAverage2 = frac*oldAverage2 + weight*eshift/Anew;
276
277 m_CellList[index2].nevt = Anew;
278 m_CellList[index2].average = newAverage;
279 m_CellList[index2].rms = newRMS;
280 m_CellList[index2].offset = newAverage2;
281
282 }
283 }
#define ATH_MSG_INFO(x)
std::vector< CellInfo > m_CellList
std::vector< int > m_symCellIndex
str index
Definition DeMoScan.py:362

◆ 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()

StatusCode LArMinBiasAlg::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 98 of file LArMinBiasAlg.cxx.

99 {
100 //.............................................
101
102 ATH_MSG_DEBUG(" LArMinBiasAlg execute()");
103
104
105 if (m_first) {
106
107 const CaloDetDescrManager_Base *cMgr=nullptr;
108 if(m_isSC){
109 SG::ReadCondHandle<CaloSuperCellDetDescrManager> caloMgrHandle{m_caloSCMgrKey, ctx};
110 ATH_CHECK(caloMgrHandle.isValid());
111 cMgr=(const CaloDetDescrManager_Base *)(*caloMgrHandle);
112 } else {
113 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey, ctx};
114 ATH_CHECK(caloMgrHandle.isValid());
115 cMgr=(const CaloDetDescrManager_Base *)(*caloMgrHandle);
116 }
117
118 SG::ReadCondHandle<LArMCSym> mcsym (m_mcSymKey, ctx);
119 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl (m_cablingKey, ctx);
120 const LArOnOffIdMapping* cabling{*cablingHdl};
121 if(!cabling) {
122 ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_cablingKey.key() );
123 return StatusCode::FAILURE;
124 }
125
126 m_ncell = m_calo_id->calo_cell_hash_max();
127 ATH_MSG_DEBUG("Hash max: "<<m_ncell);
128
129 ATH_MSG_INFO(" --- first event " << m_ncell);
130 m_symCellIndex.resize(m_ncell,-1);
131 std::vector<int> doneCell;
132 doneCell.resize(m_ncell,-1);
133
134 //m_readCell.resize(m_ncell,0);
135
136 m_eCell.resize(m_ncell,0.);
137
138 m_CellList.reserve(MAX_SYM_CELLS);
139 int nsym=0;
140 // loop over cells
141 // and find symmetry cells
142 for (unsigned int i=0;i<((unsigned int)(m_ncell));i++) {
143 IdentifierHash idHash=i;
144 Identifier id=m_calo_id->cell_id(idHash);
145 if (m_calo_id->is_tile(id)) continue;
146 // convert cell id to symmetric identifier
147 HWIdentifier hwid2 = mcsym->ZPhiSymOfl(id);
148 Identifier id2 = cabling->cnvToIdentifier(hwid2);
149 int i2 = (int) (m_calo_id->calo_cell_hash(id2));
150 if(i2>=m_ncell) {
151 ATH_MSG_WARNING("problem: i2: "<<i2<<" for id: "<<m_calo_id->print_to_string(id)<<" symmetrized: "<<m_calo_id->print_to_string(id2));
152 }
153 // we have already processed this hash => just need to associate cell i to the same symmetric cell
154 if (doneCell[i2]>=0) {
155 m_symCellIndex[i]=doneCell[i2];
156 ATH_MSG_DEBUG("Adding cell "<<id.get_identifier32().get_compact()<<" to a symmetrized cell "<<id2.get_identifier32().get_compact());
157 }
158 // we have not already processed this hash, add an entry for this new symmetric cell
159 else {
160 ATH_MSG_DEBUG("New symmetrized cell "<<id2.get_identifier32().get_compact());
161 doneCell[i2]=nsym;
162 m_symCellIndex[i] = nsym;
164 const CaloDetDescrElement* calodde = cMgr->get_element(id);
165 cell.eta = calodde->eta();
166 cell.phi = calodde->phi();
167 cell.region = m_calo_id->region(id);
168 cell.ieta = m_calo_id->eta(id);
169 cell.layer = m_calo_id->calo_sample(id);
170 cell.region = m_calo_id->region(id);
171 cell.ieta = m_calo_id->eta(id);
172 //cell.identifier = id2.get_identifier32().get_compact();
173 cell.identifier = id2;
174 cell.average=0.;
175 cell.offset=0.;
176 cell.rms=0.;
177 cell.nevt=0.;
178 m_CellList.push_back(cell);
179 nsym++;
180 }
181 }
182 ATH_MSG_INFO(" --- number of symmetric cells found " << nsym << " " << m_CellList.size());
183 if (nsym>=MAX_SYM_CELLS) ATH_MSG_ERROR(" More than "<<MAX_SYM_CELLS<<" number of symmetric cells... Fix array size for ntuple writing !!!! ");
184 m_nsymcell=nsym;
185 m_first=false;
186 }
187
188 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
189 if (!eventInfo.isValid()) {
190 ATH_MSG_ERROR ("Could not retrieve EventInfo");
191 return StatusCode::FAILURE;
192 }
193 int channelNumber = eventInfo->mcChannelNumber();
194
195 m_nevt_total++;
196
197 double weight=1.;
198
199// Dataset ID for lowPt MinBias
200 if (channelNumber==m_datasetID_lowPt) {
202 m_n1+=1;
203 }
204// Dataset ID for highPt MinBias
205 else if (channelNumber==m_datasetID_highPt) {
207 m_n2+=1;
208 }
209 else {
210 ATH_MSG_WARNING(" Neither low nor high Pt MinBias sample " << channelNumber << " set weight to 1.0 ");
211 weight=1.;
212 }
213
214
215 if ((m_nevt_total%100)==1) ATH_MSG_INFO(" ---- process event number " << m_nevt_total << " " << channelNumber << " weight " << weight);
216
217 for (int i=0;i<m_ncell;i++) m_eCell[i]=0.;
218
219 auto hitVectorHandles = m_larHitKeys.makeHandles(ctx);
220 for (auto & inputHits : hitVectorHandles) {
221 if (!inputHits.isValid()) {
222 ATH_MSG_ERROR("BAD HANDLE"); //FIXME improve error here
223 //return StatusCode::FAILURE;
224 continue;
225 }
226
227 for (const LArHit* hit : *inputHits)
228 {
229 Identifier hitCellID=hit->cellID();
230 double energy = hit->energy();
231 double time =hit->time();
232 Identifier cellID;
233 if(m_isSC){
234 cellID=m_scidtool->offlineToSuperCellID(hitCellID);
235 } else {
236 cellID=hitCellID;
237 }
238 int index = (int) (m_calo_id->calo_cell_hash(cellID));
239
240 if (index < m_ncell && index>=0 && std::fabs(time)<25.) {
241 m_eCell[index] += energy;
242 }
243
244 } // loop over hits in container
245 } // loop over containers
246
247 for (int i=0;i<m_ncell;i++) {
248 addCell(i,m_eCell[i],0.,weight);
249 }
250
251
252 return StatusCode::SUCCESS;
253 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
#define MAX_SYM_CELLS
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Gaudi::Property< int > m_datasetID_lowPt
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadHandleKeyArray< LArHitContainer > m_larHitKeys
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Property< double > m_weight_lowPt
Gaudi::Property< int > m_datasetID_highPt
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
ToolHandle< ICaloSuperCellIDTool > m_scidtool
SG::ReadCondHandleKey< LArMCSym > m_mcSymKey
std::vector< double > m_eCell
BooleanProperty m_isSC
const CaloCell_Base_ID * m_calo_id
Gaudi::Property< double > m_weight_highPt
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSCMgrKey
void addCell(int index, double e1, double e2, double wt=1.)
time(flags, cells_name, *args, **kw)

◆ 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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ fillNtuple()

void LArMinBiasAlg::fillNtuple ( )
private

Definition at line 285 of file LArMinBiasAlg.cxx.

286 {
287
288 ATH_MSG_INFO(" in fillNtuple " << m_nsymcell);
289 for (int i=0;i<m_nsymcell;i++) {
290 m_identifier[i] = m_CellList[i].identifier.get_identifier32().get_compact();
291 m_layer[i] = m_CellList[i].layer;
292 m_region[i] = m_CellList[i].region;
293 m_ieta[i] = m_CellList[i].ieta;
294 m_eta[i] = m_CellList[i].eta;
295 m_phi[i] = m_CellList[i].phi;
296 m_nevt[i] = m_CellList[i].nevt;
297 m_offset[i] = (float) (m_CellList[i].offset);
298 m_average[i] = (float) (m_CellList[i].average);
299 m_rms[i] = (float) (std::sqrt(m_CellList[i].rms));
300 }
301 m_tree->Fill();
302 ATH_MSG_INFO(" after tree fill ");
303
304 for (int i=0;i<m_nsymcell;i++) {
305 m_CellList[i].nevt=0;
306 m_CellList[i].offset=0.;
307 m_CellList[i].average=0;
308 m_CellList[i].rms=0;
309 }
310 ATH_MSG_INFO(" end of fillNtuple ");
311
312 }
double m_average[MAX_SYM_CELLS]
double m_rms[MAX_SYM_CELLS]
double m_offset[MAX_SYM_CELLS]
int m_region[MAX_SYM_CELLS]
double m_nevt[MAX_SYM_CELLS]
int m_layer[MAX_SYM_CELLS]
float m_eta[MAX_SYM_CELLS]
float m_phi[MAX_SYM_CELLS]
int m_ieta[MAX_SYM_CELLS]
int m_identifier[MAX_SYM_CELLS]

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode LArMinBiasAlg::initialize ( )
overridevirtual

Definition at line 28 of file LArMinBiasAlg.cxx.

29 {
30
31 ATH_MSG_INFO ( " LArMinBiasAlg initialize() " );
32
33 ATH_CHECK( m_thistSvc.retrieve() );
34
35
36 m_tree = new TTree("m_tree","Offset ntuple");
37 m_tree->Branch("ncell",&m_nsymcell,"ncell/I");
38 m_tree->Branch("nevt_total",&m_nevt_total,"nevt_total/I");
39 m_tree->Branch("identifier",m_identifier,"identifier[ncell]/I");
40 m_tree->Branch("region",m_region,"region[ncell]/I");
41 m_tree->Branch("ieta",m_ieta,"ieta[ncell]/I");
42 m_tree->Branch("layer",m_layer,"layer[ncell]/I");
43 m_tree->Branch("region",m_region,"region[ncell]/I");
44 m_tree->Branch("ieta",m_ieta,"ieta[ncell]/I");
45 m_tree->Branch("eta",m_eta,"eta[ncell]/F");
46 m_tree->Branch("phi",m_phi,"phi[ncell]/F");
47 m_tree->Branch("nevt",m_nevt,"nevt[ncell]/D");
48 m_tree->Branch("average",m_average,"average[ncell]/D");
49 m_tree->Branch("rms",m_rms,"rms[ncell]/D");
50 m_tree->Branch("reference",m_offset,"offset[ncell]/D");
51
52 if( m_thistSvc->regTree("/file1/offset",m_tree).isFailure()) {
53 ATH_MSG_WARNING(" cannot register ntuple " );
54 return StatusCode::SUCCESS;
55 }
56
57 const CaloIdManager* mgr = nullptr;
58 ATH_CHECK( detStore()->retrieve( mgr ) );
59 if(m_isSC) {
60 m_calo_id = (const CaloCell_Base_ID*)mgr->getCaloCell_SuperCell_ID();
61 } else {
62 m_calo_id = (const CaloCell_Base_ID*)mgr->getCaloCell_ID();
63 }
64
65 ATH_CHECK(m_mcSymKey.initialize());
66
67 ATH_CHECK(m_cablingKey.initialize());
68
69 ATH_CHECK(m_caloMgrKey.initialize());
70
71 ATH_CHECK(m_caloSCMgrKey.initialize(m_isSC));
72
73 ATH_CHECK(m_eventInfoKey.initialize());
74
75 ATH_CHECK(m_larHitKeys.assign(m_inputKeys.value()));
76 ATH_CHECK(m_larHitKeys.initialize(!m_inputKeys.empty() ));
77
78 if(m_isSC) ATH_CHECK( m_scidtool.retrieve() );
79
80 m_n1=0;
81 m_n2=0;
82
84
85 return StatusCode::SUCCESS;
86
87 }
const ServiceHandle< StoreGateSvc > & detStore() const
StringArrayProperty m_inputKeys
ServiceHandle< ITHistSvc > m_thistSvc

◆ 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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ 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()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ stop()

StatusCode LArMinBiasAlg::stop ( )
overridevirtual

Definition at line 89 of file LArMinBiasAlg.cxx.

90 {
91 ATH_MSG_INFO("number of events in the two samples " << m_n1 << " " << m_n2);
92 this->fillNtuple();
93 ATH_MSG_INFO(" stop after fill ntuple");
94 return StatusCode::SUCCESS;
95 }

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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_average

double LArMinBiasAlg::m_average[MAX_SYM_CELLS] {}
private

Definition at line 97 of file LArMinBiasAlg.h.

97{};

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArMinBiasAlg::m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
private

Definition at line 65 of file LArMinBiasAlg.h.

65{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};

◆ m_calo_id

const CaloCell_Base_ID* LArMinBiasAlg::m_calo_id = nullptr
private

Definition at line 77 of file LArMinBiasAlg.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> LArMinBiasAlg::m_caloMgrKey
private
Initial value:
{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }

Definition at line 67 of file LArMinBiasAlg.h.

67 { this
68 , "CaloDetDescrManager"
69 , "CaloDetDescrManager"
70 , "SG Key for CaloDetDescrManager in the Condition Store" };

◆ m_caloSCMgrKey

SG::ReadCondHandleKey<CaloSuperCellDetDescrManager> LArMinBiasAlg::m_caloSCMgrKey
private
Initial value:
{ this
, "CaloSuperCellDetDescrManager"
, "CaloSuperCellDetDescrManager"
, "SG Key for CaloSuperCellDetDescrManager in the Condition Store" }

Definition at line 72 of file LArMinBiasAlg.h.

72 { this
73 , "CaloSuperCellDetDescrManager"
74 , "CaloSuperCellDetDescrManager"
75 , "SG Key for CaloSuperCellDetDescrManager in the Condition Store" };

◆ m_CellList

std::vector<CellInfo> LArMinBiasAlg::m_CellList
private

Definition at line 114 of file LArMinBiasAlg.h.

◆ m_datasetID_highPt

Gaudi::Property<int> LArMinBiasAlg::m_datasetID_highPt {this, "datasetID_highPt", 119996}
private

Definition at line 60 of file LArMinBiasAlg.h.

60{this, "datasetID_highPt", 119996};

◆ m_datasetID_lowPt

Gaudi::Property<int> LArMinBiasAlg::m_datasetID_lowPt {this, "datasetID_lowPt", 119995}
private

Definition at line 59 of file LArMinBiasAlg.h.

59{this, "datasetID_lowPt", 119995};

◆ 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_eCell

std::vector<double> LArMinBiasAlg::m_eCell
private

Definition at line 79 of file LArMinBiasAlg.h.

◆ m_eta

float LArMinBiasAlg::m_eta[MAX_SYM_CELLS] {}
private

Definition at line 95 of file LArMinBiasAlg.h.

95{};

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> LArMinBiasAlg::m_eventInfoKey {this,"EvtInfo", "EventInfo", "EventInfo name"}
private

Definition at line 118 of file LArMinBiasAlg.h.

118{this,"EvtInfo", "EventInfo", "EventInfo name"};

◆ 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 AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_first

float LArMinBiasAlg::m_first {true}
private

Definition at line 116 of file LArMinBiasAlg.h.

116{true};

◆ m_identifier

int LArMinBiasAlg::m_identifier[MAX_SYM_CELLS] {}
private

Definition at line 93 of file LArMinBiasAlg.h.

93{};

◆ m_ieta

int LArMinBiasAlg::m_ieta[MAX_SYM_CELLS] {}
private

Definition at line 94 of file LArMinBiasAlg.h.

94{};

◆ m_inputKeys

StringArrayProperty LArMinBiasAlg::m_inputKeys
private
Initial value:
{this, "InputHitContainers", {"LArHitEMB", "LArHitEMEC", "LArHitHEC", "LArHitFCAL"},
"Name of input hit vectors (default=[LArHitEMB, LArHitEMEC, LArHitHEC, LArHitFCAL])" }

Definition at line 119 of file LArMinBiasAlg.h.

119 {this, "InputHitContainers", {"LArHitEMB", "LArHitEMEC", "LArHitHEC", "LArHitFCAL"},
120 "Name of input hit vectors (default=[LArHitEMB, LArHitEMEC, LArHitHEC, LArHitFCAL])" };

◆ m_isSC

BooleanProperty LArMinBiasAlg::m_isSC {this, "SuperCell", false, "Creating for SC ?"}
private

Definition at line 122 of file LArMinBiasAlg.h.

122{this, "SuperCell", false, "Creating for SC ?"};

◆ m_larHitKeys

SG::ReadHandleKeyArray<LArHitContainer> LArMinBiasAlg::m_larHitKeys
private

Definition at line 121 of file LArMinBiasAlg.h.

◆ m_layer

int LArMinBiasAlg::m_layer[MAX_SYM_CELLS] {}
private

Definition at line 91 of file LArMinBiasAlg.h.

91{};

◆ m_mcSymKey

SG::ReadCondHandleKey<LArMCSym> LArMinBiasAlg::m_mcSymKey { this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object" }
private

Definition at line 63 of file LArMinBiasAlg.h.

64{ this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object" };

◆ m_n1

int LArMinBiasAlg::m_n1 = 0
private

Definition at line 85 of file LArMinBiasAlg.h.

◆ m_n2

int LArMinBiasAlg::m_n2 = 0
private

Definition at line 86 of file LArMinBiasAlg.h.

◆ m_ncell

int LArMinBiasAlg::m_ncell = 0
private

Definition at line 117 of file LArMinBiasAlg.h.

◆ m_nevt

double LArMinBiasAlg::m_nevt[MAX_SYM_CELLS] {}
private

Definition at line 90 of file LArMinBiasAlg.h.

90{};

◆ m_nevt_total

int LArMinBiasAlg::m_nevt_total = 0
private

Definition at line 84 of file LArMinBiasAlg.h.

◆ m_nsymcell

int LArMinBiasAlg::m_nsymcell = 0
private

Definition at line 89 of file LArMinBiasAlg.h.

◆ m_offset

double LArMinBiasAlg::m_offset[MAX_SYM_CELLS] {}
private

Definition at line 99 of file LArMinBiasAlg.h.

99{};

◆ m_phi

float LArMinBiasAlg::m_phi[MAX_SYM_CELLS] {}
private

Definition at line 96 of file LArMinBiasAlg.h.

96{};

◆ m_region

int LArMinBiasAlg::m_region[MAX_SYM_CELLS] {}
private

Definition at line 92 of file LArMinBiasAlg.h.

92{};

◆ m_rms

double LArMinBiasAlg::m_rms[MAX_SYM_CELLS] {}
private

Definition at line 98 of file LArMinBiasAlg.h.

98{};

◆ m_scidtool

ToolHandle<ICaloSuperCellIDTool> LArMinBiasAlg::m_scidtool {this, "CaloSuperCellIDTool", "CaloSuperCellIDTool", "Offline / SuperCell ID mapping tool"}
private

Definition at line 123 of file LArMinBiasAlg.h.

123{this, "CaloSuperCellIDTool", "CaloSuperCellIDTool", "Offline / SuperCell ID mapping tool"};

◆ m_symCellIndex

std::vector<int> LArMinBiasAlg::m_symCellIndex
private

Definition at line 115 of file LArMinBiasAlg.h.

◆ m_thistSvc

ServiceHandle<ITHistSvc> LArMinBiasAlg::m_thistSvc {this,"THistSvc","THistSvc"}
private

Definition at line 82 of file LArMinBiasAlg.h.

82{this,"THistSvc","THistSvc"};

◆ m_tree

TTree* LArMinBiasAlg::m_tree = nullptr
private

Definition at line 83 of file LArMinBiasAlg.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.

◆ m_weight_highPt

Gaudi::Property<double> LArMinBiasAlg::m_weight_highPt {this, "weight_lowPt", 0.138128}
private

Definition at line 62 of file LArMinBiasAlg.h.

62{this, "weight_lowPt", 0.138128};

◆ m_weight_lowPt

Gaudi::Property<double> LArMinBiasAlg::m_weight_lowPt {this, "weight_highPt", 39.8606}
private

Definition at line 61 of file LArMinBiasAlg.h.

61{this, "weight_highPt", 39.8606};

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