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 2750 of file CalibrationDataInterfaceROOT.cxx.

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

◆ 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 2781 of file CalibrationDataInterfaceROOT.cxx.

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

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: