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

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

#include <GetLCOutOfCluster.h>

Inheritance diagram for GetLCOutOfCluster:
Collaboration diagram for GetLCOutOfCluster:

Public Member Functions

 GetLCOutOfCluster (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~GetLCOutOfCluster ()
virtual StatusCode initialize ()
virtual StatusCode execute (const EventContext &ctx)
 Execute method.
virtual StatusCode finalize ()
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< StoreGateSvc > StoreGateSvc_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 out-of-cluster corrections
Gaudi::Property< std::map< std::string, Gaudi::Histo1DDef > > m_dimensionsmap {this, "OutOfClusterDimensions", {}, "Dimensions to use for out-of-cluster corrections"}
 property to set all dimensions introduced above
std::vector< int > m_isampmap
 Vector of indices in m_dimensions.
std::vector< TProfile2D * > m_ooc
 Vector of actual histograms.
Gaudi::Property< std::string > m_outputFileName {this, "OutputFileName", "", "Name of the output file to save histograms in"}
 Name of the output file to save histograms in.
std::unique_ptr< TFile > m_outputFile {nullptr}
 Output file to save histograms in.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCollName {this, "ClusterCollectionName", "CaloTopoClusters", "Name of the CaloClusterContainer to use"}
 Name of the CaloClusterContainer to use.
Gaudi::Property< std::vector< std::string > > m_invalidSamplingNames {this, "InvalidSamplings", {"PreSamplerB", "PreSamplerE", "TileGap3"}, "Names of samplings to ignore"}
 vector of names of the calorimeter samplings not to use when applying the out-of-cluster weights.
std::set< int > m_invalidSamplings
 actual set of samplings to be ignored for out-of-cluster weights
Gaudi::Property< std::string > m_NormalizationType {this, "NormalizationType", "Lin", "Normalization type: Const, Lin, Log or NClus"}
 string to choose different normalization types
int m_NormalizationTypeNumber {0}
Gaudi::Property< std::string > m_ClassificationType {this, "ClassificationType", "None", "Classification type: None, ParticleID_EM or ParticleID_HAD"}
 string to choose different classification types
int m_ClassificationTypeNumber {0}
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

Top algorithm to generate OutOfCluster histograms for Local Hadron Calibration.

Version
$Id: GetLCOutOfCluster.h,v 1.2 2008-11-04 14:33:37 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 correct for out-of-cluster energy deposits.

Definition at line 31 of file GetLCOutOfCluster.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ GetLCOutOfCluster()

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

Definition at line 41 of file GetLCOutOfCluster.cxx.

43 : AthAlgorithm(name, pSvcLocator)
44{
45
46 std::vector<Gaudi::Histo1DDef> dims(6);
47 dims[0] = Gaudi::Histo1DDef("side",-1.5,1.5,1);
48 dims[1] = Gaudi::Histo1DDef("|eta|",0.,5.,50);
49 dims[2] = Gaudi::Histo1DDef("phi",-M_PI,M_PI,1);
50 dims[3] = Gaudi::Histo1DDef("log10(E_clus (MeV))",log10(200),log10(1e6),14);
51 dims[4] = Gaudi::Histo1DDef("log10(lambda_clus (mm))",0.0,4.0,14);
52 dims[5] = Gaudi::Histo1DDef("weight",0.,3.0,1);
53
54 mapinsert(dims);
55}
#define M_PI
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
void mapinsert(const std::vector< Gaudi::Histo1DDef > &dims)

◆ ~GetLCOutOfCluster()

GetLCOutOfCluster::~GetLCOutOfCluster ( )
virtual

Definition at line 59 of file GetLCOutOfCluster.cxx.

60{ }

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

StatusCode GetLCOutOfCluster::execute ( const EventContext & ctx)
virtual

Execute method.

Implements AthAlgorithm.

Definition at line 244 of file GetLCOutOfCluster.cxx.

245{
246 SG::ReadHandle<xAOD::CaloClusterContainer> cc (m_clusterCollName, ctx);
247
248 // total calib hit energy of all clusters
249 double eCalibTot(0.);
250 double nClusECalibGt0 = 0.0;
251
252 for (const xAOD::CaloCluster* theCluster : *cc) {
253 double eC=999;
254 if (!theCluster->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_TOT,eC)) {
255 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_TOT" );
256 return StatusCode::FAILURE;
257 }
259 double emFrac=-999;
260 if (!theCluster->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_EM,emFrac)){
261 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_FAC_EM" );
262 return StatusCode::FAILURE;
263 }
265 eC = 0;
267 eC = 0;
268 }
269 eCalibTot += eC;
270 if ( eC > 0 ) {
271 nClusECalibGt0++;
272 }
273 }
274
275 if ( eCalibTot > 0 && nClusECalibGt0 > 0 ) {
276 const double inv_eCalibTot = 1. / eCalibTot;
277 const double inv_nClusECalibGt0 = 1. / nClusECalibGt0;
278 for (const xAOD::CaloCluster* pClus : *cc) {
279 double eng = pClus->e();
280
282 double emFrac=-999;
283 if (!pClus->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_EM,emFrac)){
284 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_FAC_EM");
285 return StatusCode::FAILURE;
286 }
288 continue;
290 continue;
291 }
292
293 // subtract the samplings to ignore from eng
294 for (int sampling : m_invalidSamplings) {
295 eng -= pClus->eSample((CaloSampling::CaloSample)(sampling));
296 }
297
298 if ( eng > 0 ) {
299
300 int iside = 0;
301 int iphi = 0;
302 int ilogE = 0;
303 int nside = 1;
304 int nphi = 1;
305 int nlogE = 1;
306
307 if ( m_isampmap[0] >= 0 ) {
308 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[0]];
309 nside = hd.bins();
310 iside = (int)(nside*(((pClus->eta()<0?-1.0:1.0) - hd.lowEdge())
311 /(hd.highEdge()-hd.lowEdge())));
312 if ( iside < 0 || iside > nside-1 ) {
313 ATH_MSG_WARNING( " Side index out of bounds " <<
314 iside << " not in [0," << nside-1 << "]" );
315 iside = -1;
316 }
317 }
318
319 if ( m_isampmap[1] >= 0 ) {
320 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[1]];
321 nphi = hd.bins();
322 iphi = (int)(nphi*((pClus->phi() - hd.lowEdge())
323 /(hd.highEdge()-hd.lowEdge())));
324 if ( iphi < 0 || iphi > nphi-1 ) {
325 ATH_MSG_WARNING( " Phi index out of bounds " <<
326 iphi << " not in [0," << nphi-1 << "]" );
327 iphi = -1;
328 }
329 }
330
331 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[2]];
332 nlogE = hd.bins();
333 ilogE = (int)(nlogE*((log10(eng) - hd.lowEdge())
334 /(hd.highEdge()-hd.lowEdge())));
335 if ( ilogE >= 0 && ilogE < nlogE ) {
336 double lamb,eout,etot,isol;
337 if (!pClus->retrieveMoment(xAOD::CaloCluster::CENTER_LAMBDA,lamb) ||
338 !pClus->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_OUT_L,eout) ||
339 !pClus->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_TOT,etot) ||
340 !pClus->retrieveMoment(xAOD::CaloCluster::ISOLATION,isol)) {
341 ATH_MSG_ERROR( "Failed to retrieve a cluster moment (CENTER_LAMBDA,ENG_CALIB_OUT,ENG_CALIB_TOT,ISOLATION)" );
342 return StatusCode::FAILURE;
343 }
344
345 if ( lamb > 0 &&
346 etot > 0 &&
347 isol > 0.5 )
348 {
349 int iO = ilogE*nphi*nside+iphi*nside+iside;
350 if (m_ooc[iO]) {
351 double norm = 0.0;
353 norm = etot*inv_eCalibTot;
354 }
356 // cluster has to have at least 1% of the calib hit E
357 norm = log10(etot*inv_eCalibTot)+2.0;
358 }
360 norm = inv_nClusECalibGt0;
361 }
362 else {
363 norm = 1.0;
364 }
365 if ( norm > 0 ) {
366 m_ooc[iO]->Fill(fabs(pClus->eta()),log10(lamb),eout/eng/isol,norm);
367 }
368 }
369 }
370 }
371 }
372 }
373 }
374
375 return StatusCode::SUCCESS;
376}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCollName
Name of the CaloClusterContainer to use.
std::set< int > m_invalidSamplings
actual set of samplings to be ignored for out-of-cluster weights
std::vector< TProfile2D * > m_ooc
Vector of actual histograms.
std::vector< Gaudi::Histo1DDef > m_dimensions
definition of all dimensions used for out-of-cluster corrections
std::vector< int > m_isampmap
Vector of indices in m_dimensions.
@ ENG_CALIB_OUT_L
Attached Calibration Hit energy outside clusters but inside the calorimeter with loose matching (Angl...
@ 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.
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
@ 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< 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.

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

◆ finalize()

StatusCode GetLCOutOfCluster::finalize ( )
virtual

Definition at line 230 of file GetLCOutOfCluster.cxx.

231{
232 ATH_MSG_INFO( "Writing out histograms" );
233 m_outputFile->cd();
234 for(unsigned int i=0;i<m_ooc.size();i++) {
235 m_ooc[i]->Write();
236 }
237 m_outputFile->Close();
238
239 return StatusCode::SUCCESS;
240}
#define ATH_MSG_INFO(x,...)
std::unique_ptr< TFile > m_outputFile
Output file to save histograms in.

◆ initialize()

StatusCode GetLCOutOfCluster::initialize ( )
virtual

Definition at line 64 of file GetLCOutOfCluster.cxx.

64 {
65
66 m_outputFile = std::make_unique<TFile>(m_outputFileName.value().c_str(),"RECREATE");
67 m_outputFile->cd();
68 m_ooc.resize(0);
69
70 mapparse();
71
72 if ( m_NormalizationType == "Lin" ) {
73 ATH_MSG_INFO( "Using weighting proportional to E_calib" );
75 }
76 else if ( m_NormalizationType == "Log" ) {
77 ATH_MSG_INFO( "Using weighting proportional to log(E_calib)" );
79 }
80 else if ( m_NormalizationType == "NClus" ) {
81 ATH_MSG_INFO( "Using weighting proportional to 1/N_Clus_E_calib>0" );
83 }
84 else {
85 ATH_MSG_INFO( "Using constant weighting" );
87 }
88
89 if ( m_ClassificationType == "None" ) {
90 ATH_MSG_INFO( "Expecting single particle input" );
92 }
93 else if ( m_ClassificationType == "ParticleID_EM" ) {
94 ATH_MSG_INFO( "Expecting ParticleID simulation as input -- use EM type clusters only" );
96 }
97 else if ( m_ClassificationType == "ParticleID_HAD" ) {
98 ATH_MSG_INFO( "Expecting ParticleID simulation as input -- use HAD type clusters only" );
100 }
101 else {
102 ATH_MSG_WARNING( " unknown classification type " << m_ClassificationType.value() << " given! Using None instead" );
104 }
105
106 int iside(-1);
107 int ieta(-1);
108 int iphi(-1);
109 int ilogE(-1);
110 int iloglambda(-1);
111 int iweight(-1);
112
113 m_isampmap.resize(3,-1);
114 for(unsigned int idim=0;idim<m_dimensions.size();idim++) {
115 if ( m_dimensions[idim].title() == "side" ) {
116 iside = idim;
117 m_isampmap[0] = iside;
118 }
119 else if ( m_dimensions[idim].title() == "|eta|" )
120 ieta = idim;
121 else if ( m_dimensions[idim].title() == "phi" ) {
122 iphi = idim;
123 m_isampmap[1] = iphi;
124 }
125 else if ( m_dimensions[idim].title() == "log10(E_clus (MeV))" ) {
126 ilogE = idim;
127 m_isampmap[2] = ilogE;
128 }
129 else if ( m_dimensions[idim].title() == "log10(lambda_clus (mm))" )
130 iloglambda = idim;
131 else if ( m_dimensions[idim].title() == "weight" )
132 iweight = idim;
133 }
134 if ( ilogE < 0 || ieta < 0 || iloglambda < 0 || iweight < 0 || iside < 0 ) {
135 ATH_MSG_FATAL(" Mandatory dimension log10E, |eta|, log10lambda or weight missing ...");
136 return StatusCode::FAILURE;
137 }
138 int nside = m_dimensions[iside].bins();
139 int nphi=1;
140 if (iphi>=0) nphi = m_dimensions[iphi].bins();
141 int nlogE = m_dimensions[ilogE].bins();
142 m_ooc.resize(nside*nphi*nlogE,nullptr);
143 for ( int jside=0;jside<nside;jside++) {
144 for ( int jphi=0;jphi<nphi;jphi++) {
145 for(int jlogE=0;jlogE<nlogE;jlogE++) {
146 TString oname("ooc");
147 oname += "_iside_";
148 oname += jside;
149 oname += "_[";
150 oname += m_dimensions[iside].lowEdge();
151 oname += ",";
152 oname += m_dimensions[iside].highEdge();
153 oname += ",";
154 oname += nside;
155 oname += "]";
156 oname += "_iphi_";
157 oname += jphi;
158 oname += "_[";
159 oname += (iphi>=0?m_dimensions[iphi].lowEdge():-1);
160 oname += ",";
161 oname += (iphi>=0?m_dimensions[iphi].highEdge():-1);
162 oname += ",";
163 oname += nphi;
164 oname += "]";
165 oname += "_ilogE_";
166 oname += jlogE;
167 oname += "_[";
168 oname += m_dimensions[ilogE].lowEdge();
169 oname += ",";
170 oname += m_dimensions[ilogE].highEdge();
171 oname += ",";
172 oname += nlogE;
173 oname += "]";
174 int iO = jlogE*nphi*nside+jphi*nside+jside;
175 m_ooc[iO] = new TProfile2D(oname,oname,
176 m_dimensions[ieta].bins(),
177 m_dimensions[ieta].lowEdge(),
178 m_dimensions[ieta].highEdge(),
179 m_dimensions[iloglambda].bins(),
180 m_dimensions[iloglambda].lowEdge(),
181 m_dimensions[iloglambda].highEdge(),
182 m_dimensions[iweight].lowEdge(),
183 m_dimensions[iweight].highEdge());
184 m_ooc[iO]->SetXTitle("|#eta_{clus}|");
185 m_ooc[iO]->SetYTitle("log_{10}(#lambda_{clus} (mm))");
186 m_ooc[iO]->SetZTitle("E_{out of cluster} / E_{clus}^{EM-no-PS/Gap3} / Isolation");
187 }
188 }
189 }
190 //--- check sampling names to use exclude in correction
191 for (const std::string& name : m_invalidSamplingNames.value()) {
192 int theSampling(CaloSampling::Unknown);
193 for (unsigned int jsamp = 0;jsamp< CaloSampling::Unknown; jsamp++) {
195 theSampling = jsamp;
196 break;
197 }
198 }
199 if ( theSampling == CaloSampling::Unknown ) {
200 msg(MSG::ERROR) << "Calorimeter sampling "
201 << name
202 << " is not a valid Calorimeter sampling name and will be ignored! "
203 << "Valid names are: ";
204 for (unsigned int jsamp = 0;jsamp< CaloSampling::Unknown; jsamp++) {
206 if ( jsamp < CaloSampling::Unknown-1)
207 msg() << ", ";
208 else
209 msg() << ".";
210 }
211 msg() << endmsg;
212 }
213 else {
214 m_invalidSamplings.insert(theSampling);
215 }
216 }
217
218 msg(MSG::INFO) << "Samplings to exclude from the out-of-cluster weighting:";
219 for (const std::string& name : m_invalidSamplingNames.value())
220 msg() << " " << name;
221 msg() << endmsg;
222
223 ATH_CHECK( m_clusterCollName.initialize() );
224
225 return StatusCode::SUCCESS;
226}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x,...)
static const std::vector< std::string > bins
static const std::string & getSamplingName(const CaloSampling::CaloSample theSample)
Returns a string (name) for each CaloSampling.
Gaudi::Property< std::string > m_NormalizationType
string to choose different normalization types
Gaudi::Property< std::vector< std::string > > m_invalidSamplingNames
vector of names of the calorimeter samplings not to use when applying the out-of-cluster weights.
Gaudi::Property< std::string > m_ClassificationType
string to choose different classification types
Gaudi::Property< std::string > m_outputFileName
Name of the output file to save histograms in.

◆ 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; }

◆ mapinsert()

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

Definition at line 378 of file GetLCOutOfCluster.cxx.

378 {
379 for (unsigned int i=0;i<dims.size();i++) {
380 m_dimensionsmap.value()[dims[i].title()] = dims[i];
381 }
382}
Gaudi::Property< std::map< std::string, Gaudi::Histo1DDef > > m_dimensionsmap
property to set all dimensions introduced above

◆ mapparse()

void GetLCOutOfCluster::mapparse ( )
private

Definition at line 384 of file GetLCOutOfCluster.cxx.

384 {
385
386 for (std::pair<const std::string, Gaudi::Histo1DDef>& p : m_dimensionsmap.value()) {
387 m_dimensions.push_back(p.second);
388 ATH_MSG_DEBUG(" New Dimension: "
389 << p.second.title() << ", [" << p.second.lowEdge()
390 << ", " << p.second.highEdge()
391 << ", " << p.second.bins()
392 << "]");
393 }
394}
#define ATH_MSG_DEBUG(x,...)

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

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

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

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

◆ 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, 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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_ClassificationType

Gaudi::Property<std::string> GetLCOutOfCluster::m_ClassificationType {this, "ClassificationType", "None", "Classification type: None, ParticleID_EM or ParticleID_HAD"}
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 154 of file GetLCOutOfCluster.h.

154{this, "ClassificationType", "None", "Classification type: None, ParticleID_EM or ParticleID_HAD"};

◆ m_ClassificationTypeNumber

int GetLCOutOfCluster::m_ClassificationTypeNumber {0}
private

Definition at line 156 of file GetLCOutOfCluster.h.

156{0};

◆ m_clusterCollName

SG::ReadHandleKey<xAOD::CaloClusterContainer> GetLCOutOfCluster::m_clusterCollName {this, "ClusterCollectionName", "CaloTopoClusters", "Name of the CaloClusterContainer to use"}
private

Name of the CaloClusterContainer to use.

Definition at line 113 of file GetLCOutOfCluster.h.

113{this, "ClusterCollectionName", "CaloTopoClusters", "Name of the CaloClusterContainer to use"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_dimensions

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

definition of all dimensions used for out-of-cluster corrections

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^EMnoPSnoGap3): the log10 of the cluster energy on EM scale without pre-samplers and gap scintillators; 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(lambda_clus): the log10 of the cluster depth in the calorimeter; typical ranges are from 0 to 4

weight: the ratio E_outOfCluster/E_clus^EMnoPSnoGap3/Isolation; the bounds define the level of truncation for the weights to suppress noise and bad sampling ratios. Typical bounds are 0. to 5.

Definition at line 76 of file GetLCOutOfCluster.h.

◆ m_dimensionsmap

Gaudi::Property<std::map<std::string,Gaudi::Histo1DDef> > GetLCOutOfCluster::m_dimensionsmap {this, "OutOfClusterDimensions", {}, "Dimensions to use for out-of-cluster corrections"}
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 84 of file GetLCOutOfCluster.h.

84{this, "OutOfClusterDimensions", {}, "Dimensions to use for out-of-cluster corrections"};

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 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_invalidSamplingNames

Gaudi::Property<std::vector<std::string> > GetLCOutOfCluster::m_invalidSamplingNames {this, "InvalidSamplings", {"PreSamplerB", "PreSamplerE", "TileGap3"}, "Names of samplings to ignore"}
private

vector of names of the calorimeter samplings not to use when applying the out-of-cluster weights.

The pre-sampler layers (barrel and endcap) and the gap-scintillators should not receive out-of-cluster weights as they mainly deal with dead-material corrections.

Definition at line 122 of file GetLCOutOfCluster.h.

122{this, "InvalidSamplings", {"PreSamplerB", "PreSamplerE", "TileGap3"}, "Names of samplings to ignore"};

◆ m_invalidSamplings

std::set<int> GetLCOutOfCluster::m_invalidSamplings
private

actual set of samplings to be ignored for out-of-cluster weights

This set is created according to the names given in the property m_invalidSamplingNames.

Definition at line 129 of file GetLCOutOfCluster.h.

◆ m_isampmap

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

Vector of indices in m_dimensions.

Internal list of indices in m_dimensions object.

Definition at line 90 of file GetLCOutOfCluster.h.

◆ m_NormalizationType

Gaudi::Property<std::string> GetLCOutOfCluster::m_NormalizationType {this, "NormalizationType", "Lin", "Normalization type: Const, Lin, Log or NClus"}
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 141 of file GetLCOutOfCluster.h.

141{this, "NormalizationType", "Lin", "Normalization type: Const, Lin, Log or NClus"};

◆ m_NormalizationTypeNumber

int GetLCOutOfCluster::m_NormalizationTypeNumber {0}
private

Definition at line 143 of file GetLCOutOfCluster.h.

143{0};

◆ m_ooc

std::vector<TProfile2D *> GetLCOutOfCluster::m_ooc
private

Vector of actual histograms.

Internal list of histograms to fill and save.

Definition at line 96 of file GetLCOutOfCluster.h.

◆ m_outputFile

std::unique_ptr<TFile> GetLCOutOfCluster::m_outputFile {nullptr}
private

Output file to save histograms in.

Internal variable pointing to the output file.

Definition at line 109 of file GetLCOutOfCluster.h.

109{nullptr};

◆ m_outputFileName

Gaudi::Property<std::string> GetLCOutOfCluster::m_outputFileName {this, "OutputFileName", "", "Name of the output file to save histograms in"}
private

Name of the output file to save histograms in.

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

Definition at line 103 of file GetLCOutOfCluster.h.

103{this, "OutputFileName", "", "Name of the output file to save histograms in"};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.


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