![]() |
ATLAS Offline Software
|
#include <TElectronEfficiencyCorrectionTool.h>
Classes | |
| struct | HistEdge |
| struct | Result |
Public Types | |
| using | HistArray = std::vector<std::unique_ptr<TH1>> |
Public Member Functions | |
| TElectronEfficiencyCorrectionTool (const char *name="TElectronEfficiencyCorrectionTool") | |
| Standard constructor. | |
| ~TElectronEfficiencyCorrectionTool ()=default | |
| Standard destructor. | |
| void | addFileName (const std::string &val) |
| This is more of an utility so the initialize is different wrt to an athena component. | |
| void | bookToyMCScaleFactors (const int nToyMC) |
| Running these before the initialize will setup the booking of toys. | |
| void | bookCombToyMCScaleFactors (const int nToyMC) |
| int | initialize () |
| Initialize this class. | |
| int | calculate (const PATCore::ParticleDataType::DataType dataType, const unsigned int runnumber, const double cluster_eta, const double et, Result &result, const bool onlyTotal=false) const |
The main calculate method: dataType PATCore::ParticleDataType::DataType (e.g DATA,FULL etc) @ runnumber the run number. | |
| int | getNbins (std::map< float, std::vector< float > > &ptEta) const |
| Helpers to get the binning of the uncertainties in a std::map (pt, eta) | |
| int | getNSyst () const |
| get number of systematics | |
| void | setSeed (const unsigned long int seed) |
| Set the Random Seed. | |
| bool | uncorrEmpty (const PATCore::ParticleDataType::DataType dataType) |
| Check if stat+uncorr has input. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Functions providing the same interface as AthMessaging | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level of the object. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
Private Member Functions | |
| int | getHistograms () |
| Load all histograms from the input file(s) | |
| int | setupHistogramsInFolder (const TObjArray &dirNameArray, int lastIdx) |
| bool | setupUncorrToySyst (std::vector< std::vector< TH1 * > > &objs, std::vector< std::vector< TH1 * > > &sysObjs, std::vector< std::vector< HistArray > > &uncorrToyMCSyst) |
| std::vector< HistArray > | buildToyMCTable (const std::vector< TH1 * > &sf, const std::vector< TH1 * > &eig, const std::vector< TH1 * > &stat, const std::vector< TH1 * > &uncorr, const std::vector< std::vector< TH1 * > > &corr) |
| std::vector< TH2 * > | buildSingleToyMC (const TH1 *sf, const TH1 *stat, const TH1 *uncorr, const std::vector< TH1 * > &corr, int &randomCounter) |
| TH2 * | buildSingleCombToyMC (const TH1 *sf, const TH1 *stat, const TH1 *uncorr, const std::vector< TH1 * > &corr, const int nSys, int &randomCounter) |
| void | setupTempMapsHelper (TH1 *obj, std::vector< std::vector< TH1 * > > &objs, std::vector< std::vector< TH1 * > > &sysObjs, int &seenSystematics) |
| int | setup (const std::vector< TH1 * > &hists, std::vector< HistArray > &histList, std::vector< unsigned int > &beginRunNumberList, std::vector< unsigned int > &endRunNumberList, const int runNumBegin, const int runNumEnd) const |
| Fill and interpret the setup, depending on which histograms are found in the input file(s) | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Static Private Member Functions | |
| static void | fillHistEdges (const std::vector< HistArray > &sfPerPeriodHist, std::vector< std::vector< HistEdge > > &sfPerPeriodEdges) |
Private Attributes | |
| bool | m_doToyMC |
| Flag to control Toys. | |
| bool | m_doCombToyMC |
| int | m_nToyMC |
| The number of toys. | |
| unsigned long int | m_seed |
| The Random seed. | |
| int | m_nSysMax |
| Maximum number of systematics. | |
| std::vector< std::vector< HistArray > > | m_uncorrToyMCSystFull |
| std::vector< std::vector< HistArray > > | m_uncorrToyMCSystFast |
| std::vector< std::string > | m_corrFileNameList |
| The list of file name(s) | |
| std::vector< unsigned int > | m_begRunNumberList |
| List of run numbers where histograms become valid for full simulation. | |
| std::vector< unsigned int > | m_endRunNumberList |
| List of run numbers where histograms stop being valid for full simulation. | |
| std::vector< unsigned int > | m_begRunNumberListFastSim |
| List of run numbers where histograms become valid for fast simulation. | |
| std::vector< unsigned int > | m_endRunNumberListFastSim |
| List of run numbers where histograms stop being valid for fast simulation. | |
| std::vector< std::vector< HistArray > > | m_histList |
| List of histograms for full Geant4 simulation. | |
| std::vector< std::vector< HistEdge > > | m_histEdges |
| std::vector< std::vector< HistArray > > | m_sysList |
| std::vector< std::vector< HistArray > > | m_fastHistList |
| List of histograms for fast simulation. | |
| std::vector< std::vector< HistEdge > > | m_fastHistEdges |
| std::vector< std::vector< HistArray > > | m_fastSysList |
| TRandom3 | m_Rndm |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) | |
Definition at line 35 of file TElectronEfficiencyCorrectionTool.h.
| using Root::TElectronEfficiencyCorrectionTool::HistArray = std::vector<std::unique_ptr<TH1>> |
Definition at line 39 of file TElectronEfficiencyCorrectionTool.h.
| TElectronEfficiencyCorrectionTool::TElectronEfficiencyCorrectionTool | ( | const char * | name = "TElectronEfficiencyCorrectionTool" | ) |
Standard constructor.
Definition at line 72 of file TElectronEfficiencyCorrectionTool.cxx.
|
default |
Standard destructor.
|
inline |
This is more of an utility so the initialize is different wrt to an athena component.
Add an input file with the auxiliary measurement needed before we call initialize
Definition at line 66 of file TElectronEfficiencyCorrectionTool.h.
|
inline |
Definition at line 75 of file TElectronEfficiencyCorrectionTool.h.
|
inline |
Running these before the initialize will setup the booking of toys.
Definition at line 71 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 437 of file TElectronEfficiencyCorrectionTool.cxx.
|
private |
Definition at line 397 of file TElectronEfficiencyCorrectionTool.cxx.
|
private |
Definition at line 484 of file TElectronEfficiencyCorrectionTool.cxx.
| int TElectronEfficiencyCorrectionTool::calculate | ( | const PATCore::ParticleDataType::DataType | dataType, |
| const unsigned int | runnumber, | ||
| const double | cluster_eta, | ||
| const double | et, | ||
| Result & | result, | ||
| const bool | onlyTotal = false ) const |
The main calculate method: dataType PATCore::ParticleDataType::DataType (e.g DATA,FULL etc) @ runnumber the run number.
1st dimension of the stored measurements @ cluster_eta the cluster eta. 2nd dimension of the stored measurements @ electron et. third dimension of the stored measurments @ result struct filled with SF, Total uncertainty, Stat uncertainty, Uncorr uncertainty @ onlyTotal do only the "total" systematic returns 0 in failure
Toy production is controlled by internal flags set by the Asg Tool. As toys are special.
Definition at line 160 of file TElectronEfficiencyCorrectionTool.cxx.
|
staticprivate |
Definition at line 930 of file TElectronEfficiencyCorrectionTool.cxx.
|
private |
Load all histograms from the input file(s)
Definition at line 587 of file TElectronEfficiencyCorrectionTool.cxx.
| int TElectronEfficiencyCorrectionTool::getNbins | ( | std::map< float, std::vector< float > > & | ptEta | ) | const |
Helpers to get the binning of the uncertainties in a std::map (pt, eta)
Definition at line 546 of file TElectronEfficiencyCorrectionTool.cxx.
|
inline |
| int TElectronEfficiencyCorrectionTool::initialize | ( | ) |
Initialize this class.
Definition at line 87 of file TElectronEfficiencyCorrectionTool.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inherited |
The standard message stream.
Definition at line 49 of file AsgMessaging.cxx.
|
inherited |
The standard message stream.
| lvl | The message level to set the stream to |
Definition at line 57 of file AsgMessaging.cxx.
|
inherited |
Test the output level of the object.
| lvl | The message level to test against |
true If messages at level "lvl" will be printed Definition at line 41 of file AsgMessaging.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
inline |
Definition at line 110 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Fill and interpret the setup, depending on which histograms are found in the input file(s)
Definition at line 891 of file TElectronEfficiencyCorrectionTool.cxx.
|
private |
setup obj arrays at specific indices
Definition at line 663 of file TElectronEfficiencyCorrectionTool.cxx.
|
private |
Definition at line 801 of file TElectronEfficiencyCorrectionTool.cxx.
|
private |
Definition at line 859 of file TElectronEfficiencyCorrectionTool.cxx.
| bool TElectronEfficiencyCorrectionTool::uncorrEmpty | ( | const PATCore::ParticleDataType::DataType | dataType | ) |
Check if stat+uncorr has input.
Definition at line 151 of file TElectronEfficiencyCorrectionTool.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
List of run numbers where histograms become valid for full simulation.
Definition at line 186 of file TElectronEfficiencyCorrectionTool.h.
|
private |
List of run numbers where histograms become valid for fast simulation.
Definition at line 191 of file TElectronEfficiencyCorrectionTool.h.
|
private |
The list of file name(s)
Definition at line 184 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 173 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Flag to control Toys.
Definition at line 172 of file TElectronEfficiencyCorrectionTool.h.
|
private |
List of run numbers where histograms stop being valid for full simulation.
Definition at line 189 of file TElectronEfficiencyCorrectionTool.h.
|
private |
List of run numbers where histograms stop being valid for fast simulation.
Definition at line 194 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 201 of file TElectronEfficiencyCorrectionTool.h.
|
private |
List of histograms for fast simulation.
Definition at line 200 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 202 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 197 of file TElectronEfficiencyCorrectionTool.h.
|
private |
List of histograms for full Geant4 simulation.
Definition at line 196 of file TElectronEfficiencyCorrectionTool.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Maximum number of systematics.
Definition at line 179 of file TElectronEfficiencyCorrectionTool.h.
|
private |
The number of toys.
Definition at line 175 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 204 of file TElectronEfficiencyCorrectionTool.h.
|
private |
The Random seed.
Definition at line 177 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 198 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 182 of file TElectronEfficiencyCorrectionTool.h.
|
private |
Definition at line 181 of file TElectronEfficiencyCorrectionTool.h.