ATLAS Offline Software
Loading...
Searching...
No Matches
Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper Class Reference

#include <CalibrationDataInterfaceROOT.h>

Collaboration diagram for Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper:

Public Member Functions

 HadronisationReferenceHelper (TMap *mapSF, TMap *mapEff)
 HadronisationReferenceHelper ()
bool getReference (const std::string &spec, std::string &ref) const
 Retrieve the (full) name of the reference histogram, given the hadronisation specification.

Private Attributes

std::map< std::string, std::string > m_refs
 map from hadronisation specification to container name

Detailed Description

Definition at line 363 of file CalibrationDataInterfaceROOT.h.

Constructor & Destructor Documentation

◆ HadronisationReferenceHelper() [1/2]

Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::HadronisationReferenceHelper ( TMap * mapSF,
TMap * mapEff )

Definition at line 2749 of file CalibrationDataInterfaceROOT.cxx.

2750{
2751 // Create the map from hadronisation specifications to reference container names for
2752 // a given ROOT file directory.
2753 //
2754 // mapSF: reference specification as extracted from calibration scale factor file
2755 // mapEff: reference specification as extracted from MC efficiency file
2756 // (null if the two files are identical)
2757
2758 // First take the scale factor file's map
2759 if (mapSF) {
2760 TMapIter next(mapSF); TObjString* spec;
2761 while ((spec = (TObjString*) next())) {
2762 TObjString* ref = (TObjString*) mapSF->GetValue(spec);
2763 m_refs[string(spec->GetName())] = string(ref->GetName());
2764 }
2765 }
2766 // Then do the same with the efficiency file's map. The result will be to override any
2767 // items from the SF file's map. An exception is made for the scale factor calibration object,
2768 // for which (for the sake of consistency) the SF reference must be retained.
2769 if (mapEff) {
2770 TMapIter next(mapEff); TObjString* spec;
2771 while ((spec = (TObjString*) next())) {
2772 TObjString* ref = (TObjString*) mapEff->GetValue(spec);
2773 m_refs[string(spec->GetName())] = string(ref->GetName());
2774 }
2775 }
2776}
const boost::regex ref(r_ef)
std::map< std::string, std::string > m_refs
map from hadronisation specification to container name

◆ HadronisationReferenceHelper() [2/2]

Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::HadronisationReferenceHelper ( )
inline

Definition at line 367 of file CalibrationDataInterfaceROOT.h.

367{;}

Member Function Documentation

◆ getReference()

bool Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::getReference ( const std::string & spec,
std::string & ref ) const

Retrieve the (full) name of the reference histogram, given the hadronisation specification.

The return value will be false if the specification cannot be found, and true otherwise.

Definition at line 2780 of file CalibrationDataInterfaceROOT.cxx.

2782{
2783 // Extract the reference histogram name corresponding to the given hadronisation specification (if existing).
2784 // The return value is used to indicate whether the specification could be found.
2785 //
2786 // spec: hadronisation specification
2787 // ref: container name corresponding to this specification
2788
2789 std::map<string, string>::const_iterator it = m_refs.find(spec);
2790 if (it == m_refs.end()) return false;
2791
2792 ref = it->second;
2793 return true;
2794}

Member Data Documentation

◆ m_refs

std::map<std::string, std::string> Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::m_refs
private

map from hadronisation specification to container name

Definition at line 376 of file CalibrationDataInterfaceROOT.h.


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