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

Top algorithm to generate classification histograms for Local Hadron Calibration. More...

#include <GetLCClassification.h>

Inheritance diagram for GetLCClassification:
Collaboration diagram for GetLCClassification:

Public Member Functions

 GetLCClassification (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~GetLCClassification ()
virtual StatusCode initialize ()
virtual StatusCode execute ()
virtual StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
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

Protected Member Functions

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 mapinsert (const std::vector< Gaudi::Histo1DDef > &dims)
void mapparse ()
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< Gaudi::Histo1DDef > m_dimensions
 definition of all dimensions used for classification
std::map< std::string, Gaudi::Histo1DDef > m_dimensionsmap
 property to set all dimensions introduced above
std::vector< int > m_isampmap
 Vector of indices in m_dimensions.
std::vector< TH2F * > m_hclus
 Vector of actual histograms.
std::string m_outputFileName
 Name of the output file to save histograms in.
std::unique_ptr< TFile > m_outputFile
 Output file to save histograms in.
SG::ReadHandleKey< xAOD::CaloClusterContainerm_clusterCollName
 Name of the CaloClusterContainer to use.
std::string m_NormalizationType
 string to choose different normalization types
int m_NormalizationTypeNumber
std::string m_ClassificationType
 string to choose different classification types
int m_ClassificationTypeNumber
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

Detailed Description

Top algorithm to generate classification histograms for Local Hadron Calibration.

Version
$Id: GetLCClassification.h,v 1.1.1.1 2008-11-04 08:56:11 menke Exp $
Author
Sven Menke menke.nosp@m.@mpp.nosp@m.mu.mp.nosp@m.g.de
Date
3-October-2008

This class is an Algorithm to generate the 2D histograms from single pion simulations to classify as hadronic or electromagnetic. The output histograms need a combination step to calculate the actual probabilty distributions.

Definition at line 31 of file GetLCClassification.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ GetLCClassification()

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

Definition at line 42 of file GetLCClassification.cxx.

44 : AthAlgorithm(name, pSvcLocator),
45 m_outputFile(nullptr),
46 m_clusterCollName("CaloTopoClusters"),
51{
52
53 std::vector<Gaudi::Histo1DDef> dims(6);
54 dims[0] = Gaudi::Histo1DDef("side",-1.5,1.5,1);
55 dims[1] = Gaudi::Histo1DDef("|eta|",0.,5.,25);
56 dims[2] = Gaudi::Histo1DDef("phi",-M_PI,M_PI,1);
57 dims[3] = Gaudi::Histo1DDef("log10(E_clus (MeV))",log10(200),log10(1e6),14);
58 dims[4] = Gaudi::Histo1DDef("log10(<rho_cell (MeV/mm^3)>)-log10(E_clus (MeV))",-9.0,-4.0,20);
59 dims[5] = Gaudi::Histo1DDef("log10(lambda_clus (mm))",0.0,4.0,20);
60
61 mapinsert(dims);
62
63 // Dimensions to use for classification
64 declareProperty("ClassificationDimensions",m_dimensionsmap);
65
66 // Name of output file to save histograms in
67 declareProperty("OutputFileName",m_outputFileName);
68
69 // Name of ClusterContainer to use
70 declareProperty("ClusterCollectionName",m_clusterCollName);
71
72 // Normalization type "Const", "Lin", "Log", "NClus"
73 declareProperty("NormalizationType",m_NormalizationType);
74
75 // Classification type "None" for single pion MC or
76 // "ParticleID_EM" for ParticleID based em-type clusters
77 // "ParticleID_HAD" for ParticleID based had-type clusters
78 declareProperty("ClassificationType", m_ClassificationType);
79
80}
#define M_PI
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_ClassificationType
string to choose different classification types
std::unique_ptr< TFile > m_outputFile
Output file to save histograms in.
std::string m_outputFileName
Name of the output file to save histograms in.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCollName
Name of the CaloClusterContainer to use.
void mapinsert(const std::vector< Gaudi::Histo1DDef > &dims)
std::string m_NormalizationType
string to choose different normalization types
std::map< std::string, Gaudi::Histo1DDef > m_dimensionsmap
property to set all dimensions introduced above

◆ ~GetLCClassification()

GetLCClassification::~GetLCClassification ( )
virtual

Definition at line 84 of file GetLCClassification.cxx.

85{ }

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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< 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< 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 GetLCClassification::execute ( )
virtual

Definition at line 253 of file GetLCClassification.cxx.

254{
255 SG::ReadHandle<xAOD::CaloClusterContainer> cc (m_clusterCollName);
256
257 // total calib hit energy of all clusters
258 double eCalibTot(0.);
259 double nClusECalibGt0 = 0.0;
260
261 for (const xAOD::CaloCluster * theCluster : *cc) {
262 double eC=999;
263 if (!theCluster->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_TOT,eC)) {
264 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_TOT" );
265 return StatusCode::FAILURE;
266 }
268 double emFrac = 0;
269 if (!theCluster->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_EM,emFrac)) {
270 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_FRAC_EM" );
271 return StatusCode::FAILURE;
272 }
274 eC = 0;
276 eC = 0;
277 }
278 eCalibTot += eC;
279 if ( eC > 0 ) {
280 nClusECalibGt0++;
281 }
282 }
283
284 if ( eCalibTot > 0 && nClusECalibGt0 > 0) {
285 const double inv_eCalibTot = 1. / eCalibTot;
286 const double inv_nClusECalibGt0 = 1. / nClusECalibGt0;
287 for (const xAOD::CaloCluster * pClus : *cc) {
288 double eng = pClus->e();
289 if ( eng > 0 ) {
291 double emFrac = 0;
292 if (pClus->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_EM,emFrac)) {
293 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_FRAC_EM" );
294 return StatusCode::FAILURE;
295 }
297 continue;
299 continue;
300 }
301
302 double eta = fabs(pClus->eta());
303
304 int iside = 0;
305 int ieta = 0;
306 int iphi = 0;
307 int ilogE = 0;
308 int nside = 1;
309 int neta = 1;
310 int nphi = 1;
311 int nlogE = 1;
312
313 if ( m_isampmap[0] >= 0 ) {
314 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[0]];
315 nside = hd.bins();
316 iside = (int)(nside*(((pClus->eta()<0?-1.0:1.0) - hd.lowEdge())
317 /(hd.highEdge()-hd.lowEdge())));
318 if ( iside < 0 || iside > nside-1 ) {
319 ATH_MSG_WARNING( " Side index out of bounds " <<
320 iside << " not in [0," << nside-1 << "]" );
321 iside = -1;
322 }
323 }
324
325 if ( m_isampmap[1] >= 0 ) {
326 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[1]];
327 neta = hd.bins();
328 ieta = (int)(neta*((eta - hd.lowEdge())
329 /(hd.highEdge()-hd.lowEdge())));
330 if ( ieta < 0 || ieta > neta-1 ) {
331 ATH_MSG_WARNING( " Eta index out of bounds " <<
332 ieta << " not in [0," << neta-1 << "]" );
333 ieta = -1;
334 }
335 }
336 if ( m_isampmap[2] >= 0 ) {
337 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[2]];
338 nphi = hd.bins();
339 iphi = (int)(nphi*((pClus->phi() - hd.lowEdge())
340 /(hd.highEdge()-hd.lowEdge())));
341 if ( iphi < 0 || iphi > nphi-1 ) {
342 ATH_MSG_WARNING( " Phi index out of bounds " <<
343 iphi << " not in [0," << nphi-1 << "]" );
344 iphi = -1;
345 }
346 }
347
348 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[3]];
349 nlogE = hd.bins();
350 ilogE = (int)(nlogE*((log10(eng) - hd.lowEdge())
351 /(hd.highEdge()-hd.lowEdge())));
352 if ( ilogE >= 0 && ilogE < nlogE ) {
353 double dens=0,lamb=0,ecal=0;
354 if (!pClus->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_TOT,ecal)) {
355 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_TOT" );
356 return StatusCode::FAILURE;
357 }
358 if (!pClus->retrieveMoment(xAOD::CaloCluster::FIRST_ENG_DENS,dens)) {
359 ATH_MSG_ERROR( "Failed to retrieve cluster moment FIRST_ENG_DENS" );
360 return StatusCode::FAILURE;
361 }
362 if (!pClus->retrieveMoment(xAOD::CaloCluster::CENTER_LAMBDA,lamb)) {
363 ATH_MSG_ERROR( "Failed to retrieve cluster moment CENTER_LAMBDA" );
364 return StatusCode::FAILURE;
365 }
366 if ( dens > 0 &&
367 lamb > 0 &&
368 ecal > 0 )
369 {
370 int iH = ilogE*nphi*neta*nside+iphi*neta*nside+ieta*nside+iside;
371 if ( m_hclus[iH]) {
372 double norm = 0.0;
374 norm = ecal*inv_eCalibTot;
375 }
377 // cluster has to have at least 1% of the calib hit E
378 norm = log10(ecal*inv_eCalibTot)+2.0;
379 }
381 norm = inv_nClusECalibGt0;
382 }
383 else {
384 norm = 1.0;
385 }
386 if ( norm > 0 ) {
387 m_hclus[iH]->Fill(log10(dens)-log10(eng),log10(lamb),norm);
388 }
389 }
390 }
391 }
392 }
393 }
394 }
395
396 return StatusCode::SUCCESS;
397}
Scalar eta() const
pseudorapidity method
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
std::vector< Gaudi::Histo1DDef > m_dimensions
definition of all dimensions used for classification
std::vector< int > m_isampmap
Vector of indices in m_dimensions.
std::vector< TH2F * > m_hclus
Vector of actual histograms.
@ FIRST_ENG_DENS
First Moment in E/V.
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
@ PARTICLEID_EM
Definition GetLCDefs.h:25
@ PARTICLEID_HAD
Definition GetLCDefs.h:25
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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

◆ finalize()

StatusCode GetLCClassification::finalize ( )
virtual

Definition at line 239 of file GetLCClassification.cxx.

240{
241 ATH_MSG_INFO( "Writing out histograms" );
242 m_outputFile->cd();
243 for(unsigned int i=0;i<m_hclus.size();i++) {
244 m_hclus[i]->Write();
245 }
246 m_outputFile->Close();
247
248 return StatusCode::SUCCESS;
249}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode GetLCClassification::initialize ( )
virtual

Definition at line 89 of file GetLCClassification.cxx.

90{
91 m_outputFile = std::make_unique<TFile>(m_outputFileName.c_str(),"RECREATE");
92 m_outputFile->cd();
93 m_hclus.resize(0);
94 mapparse();
95
96 if ( m_NormalizationType == "Lin" ) {
97 ATH_MSG_INFO( "Using weighting proportional to E_calib" );
99 }
100 else if ( m_NormalizationType == "Log" ) {
101 ATH_MSG_INFO( "Using weighting proportional to log(E_calib)" );
103 }
104 else if ( m_NormalizationType == "NClus" ) {
105 ATH_MSG_INFO( "Using weighting proportional to 1/N_Clus_E_calib>0" );
107 }
108 else {
109 ATH_MSG_INFO( "Using constant weighting" );
111 }
112
113 if ( m_ClassificationType == "None" ) {
114 ATH_MSG_INFO( "Expecting single particle input" );
116 }
117 else if ( m_ClassificationType == "ParticleID_EM" ) {
118 ATH_MSG_INFO( "Expecting ParticleID simulation as input -- use EM type clusters only" );
120 }
121 else if ( m_ClassificationType == "ParticleID_HAD" ) {
122 ATH_MSG_INFO( "Expecting ParticleID simulation as input -- use HAD type clusters only" );
124 }
125 else {
126 ATH_MSG_WARNING( " unknown classification type " << m_ClassificationType << " given! Using None instead" );
128 }
129
130 int iside(-1);
131 int ieta(-1);
132 int iphi(-1);
133 int ilogE(-1);
134 int ilogrho(-1);
135 int iloglambda(-1);
136
137 m_isampmap.resize(4,-1);
138 for(unsigned int idim=0;idim<m_dimensions.size();idim++) {
139 if ( m_dimensions[idim].title() == "side" ) {
140 iside = idim;
141 m_isampmap[0] = iside;
142 }
143 else if ( m_dimensions[idim].title() == "|eta|" ) {
144 ieta = idim;
145 m_isampmap[1] = ieta;
146 }
147 else if ( m_dimensions[idim].title() == "phi" ) {
148 iphi = idim;
149 m_isampmap[2] = iphi;
150 }
151 else if ( m_dimensions[idim].title() == "log10(E_clus (MeV))" ) {
152 ilogE = idim;
153 m_isampmap[3] = ilogE;
154 }
155 else if ( m_dimensions[idim].title() == "log10(<rho_cell (MeV/mm^3)>)-log10(E_clus (MeV))" )
156 ilogrho = idim;
157 else if ( m_dimensions[idim].title() == "log10(lambda_clus (mm))" )
158 iloglambda = idim;
159 }
160 if ( ilogE < 0 || ilogrho < 0 || iloglambda < 0 ) {
161 ATH_MSG_FATAL( " Mandatory dimension log10E, log10rho or log10lambda missing ..." );
162 return StatusCode::FAILURE;
163 }
164 int nside = 1;
165 if (iside>=0) nside = m_dimensions[iside].bins();
166 //
167 int neta = 1;
168 if (ieta>=0) neta = m_dimensions[ieta].bins();
169 //
170 int nphi = 1;
171 if (iphi>=0) nphi = m_dimensions[iphi].bins();
172 int nlogE = m_dimensions[ilogE].bins();
173 m_hclus.resize(nside*neta*nphi*nlogE,nullptr);
174 for ( int jside=0;jside<nside;jside++) {
175 for ( int jeta=0;jeta<neta;jeta++) {
176 for ( int jphi=0;jphi<nphi;jphi++) {
177 for(int jlogE=0;jlogE<nlogE;jlogE++) {
178 TString hname("hclus");
179 hname += "_iside_";
180 hname += jside;
181 hname += "_[";
182 hname += (iside>=0?m_dimensions[iside].lowEdge():-1);
183 hname += ",";
184 hname += (iside>=0?m_dimensions[iside].highEdge():-1);
185 hname += ",";
186 hname += nside;
187 hname += "]";
188 hname += "_ieta_";
189 hname += jeta;
190 hname += "_[";
191 hname += (ieta>=0?m_dimensions[ieta].lowEdge():-1);
192 hname += ",";
193 hname += (ieta>=0?m_dimensions[ieta].highEdge():-1);
194 hname += ",";
195 hname += neta;
196 hname += "]";
197 hname += "_iphi_";
198 hname += jphi;
199 hname += "_[";
200 hname += (iphi>=0?m_dimensions[iphi].lowEdge():-1);
201 hname += ",";
202 hname += (iphi>=0?m_dimensions[iphi].highEdge():-1);
203 hname += ",";
204 hname += nphi;
205 hname += "]";
206 hname += "_ilogE_";
207 hname += jlogE;
208 hname += "_[";
209 hname += m_dimensions[ilogE].lowEdge();
210 hname += ",";
211 hname += m_dimensions[ilogE].highEdge();
212 hname += ",";
213 hname += nlogE;
214 hname += "]";
215 int iH = jlogE*nphi*neta*nside+jphi*neta*nside+jeta*nside+jside;
216 m_hclus[iH] = new TH2F(hname,hname,
217 m_dimensions[ilogrho].bins(),
218 m_dimensions[ilogrho].lowEdge(),
219 m_dimensions[ilogrho].highEdge(),
220 m_dimensions[iloglambda].bins(),
221 m_dimensions[iloglambda].lowEdge(),
222 m_dimensions[iloglambda].highEdge());
223 m_hclus[iH]->Sumw2();
224 m_hclus[iH]->SetXTitle("log10(<#rho_{cell}> (MeV/mm^{3})) - log10(E_{clus} (MeV))");
225 m_hclus[iH]->SetYTitle("log10(#lambda_{clus} (mm))");
226 m_hclus[iH]->SetZTitle("Number of Clusters");
227 }
228 }
229 }
230 }
231
232 ATH_CHECK( m_clusterCollName.initialize() );
233
234 return StatusCode::SUCCESS;
235}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
static const std::vector< std::string > bins
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< 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.

◆ mapinsert()

void GetLCClassification::mapinsert ( const std::vector< Gaudi::Histo1DDef > & dims)
private

Definition at line 399 of file GetLCClassification.cxx.

399 {
400 for (unsigned int i=0;i<dims.size();i++) {
401 m_dimensionsmap[dims[i].title()] = dims[i];
402 }
403}

◆ mapparse()

void GetLCClassification::mapparse ( )
private

Definition at line 405 of file GetLCClassification.cxx.

405 {
406
407 for (std::pair<const std::string, Gaudi::Histo1DDef>& p : m_dimensionsmap) {
408 m_dimensions.push_back(p.second);
409 ATH_MSG_DEBUG( " New Dimension: "
410 << p.second.title() << ", [" << p.second.lowEdge()
411 << ", " << p.second.highEdge()
412 << ", " << p.second.bins()
413 << "]" );
414 }
415}
#define ATH_MSG_DEBUG(x)

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< 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< 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< 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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ 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< 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}
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< 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< 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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_ClassificationType

std::string GetLCClassification::m_ClassificationType
private

string to choose different classification types

Available options are "None": the input MC is expected to be just a single pion MC with one sort of particles; "ParticleID_EM" Gena's ParticleID classification (EM type objects) for the use of QCD MC; "ParticleID_HAD" Gena's ParticleID classification (HAD type objects) for the use of QCD MC;

Definition at line 136 of file GetLCClassification.h.

◆ m_ClassificationTypeNumber

int GetLCClassification::m_ClassificationTypeNumber
private

Definition at line 138 of file GetLCClassification.h.

◆ m_clusterCollName

SG::ReadHandleKey<xAOD::CaloClusterContainer> GetLCClassification::m_clusterCollName
private

Name of the CaloClusterContainer to use.

Definition at line 111 of file GetLCClassification.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dimensions

std::vector<Gaudi::Histo1DDef> GetLCClassification::m_dimensions
private

definition of all dimensions used for classification

The currently defined dimensions are:

side: negative values for eta < 0 and positive for eta > 0; 1 bin from -1.5 to 1.5 for no side dependency

|eta|: the absolute value of eta; normally in ATLAS the bounds are within [0,5], smaller ones are useful for test beam setups.

phi: the phi range; 1 bin from -pi to pi for no phi dependency

log10(E_clus): the log10 of the cluster energy; typical range should be within the generated energy range of single pions with about 50% room to the maximum created energy - i.e. use log10(1 TeV) as max value if you generated up tp 2 TeV pions

log10(<rho_cell>) - log10(E_clus): the log10 of the cell energy density moment normalized to the cluster energy; typical ranges are from -9 to -4

log10(lambda_clus): the log10 of the cluster depth in the calorimeter; typical ranges are from 0 to 4

Definition at line 73 of file GetLCClassification.h.

◆ m_dimensionsmap

std::map<std::string,Gaudi::Histo1DDef> GetLCClassification::m_dimensionsmap
private

property to set all dimensions introduced above

Gaudi has only a map<string,Histo1DDef> to use as property. So the syntax for all dimensions introduced above is {'Title': ('Title',Low,High,Bins), ... }.

Definition at line 81 of file GetLCClassification.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< 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 79 of file AthAlgorithm.h.

◆ m_hclus

std::vector<TH2F *> GetLCClassification::m_hclus
private

Vector of actual histograms.

Internal list of histograms to fill and save.

Definition at line 93 of file GetLCClassification.h.

◆ m_isampmap

std::vector<int> GetLCClassification::m_isampmap
private

Vector of indices in m_dimensions.

Internal list of indices in m_dimensions object.

Definition at line 87 of file GetLCClassification.h.

◆ m_NormalizationType

std::string GetLCClassification::m_NormalizationType
private

string to choose different normalization types

Available options are "Const": every cluster counts with weight 1; "Lin": Each cluster is weighted with E_calib_clus/E_calib_tot; "Log": Each cluster is weighted with log10(E_calib_clus/E_calib_tot)+2; "NClus": Each cluster is weighted with 1/TotalNumberOfClustersWithE_calib>0.

Definition at line 123 of file GetLCClassification.h.

◆ m_NormalizationTypeNumber

int GetLCClassification::m_NormalizationTypeNumber
private

Definition at line 125 of file GetLCClassification.h.

◆ m_outputFile

std::unique_ptr<TFile> GetLCClassification::m_outputFile
private

Output file to save histograms in.

Internal variable pointing to the output file.

Definition at line 106 of file GetLCClassification.h.

◆ m_outputFileName

std::string GetLCClassification::m_outputFileName
private

Name of the output file to save histograms in.

Use this property to set the name of the output file containing the classification histograms.

Definition at line 100 of file GetLCClassification.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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