33main(
int argc,
char* argv[])
40 using namespace asg::testEgEfficiencyCorr;
42 MSG::Level mylevel = MSG::INFO;
51 <<
" Usage: <<APP_NAME << [xAOD file name] [Num of events to use]");
59 const TString fileName = argv[1];
61 std::unique_ptr<TFile> ifile(TFile::Open(fileName,
"READ"));
71 "AsgElectronEfficiencyCorrectionTool/ElEffCorrectionTool");
82 <<
static_cast<long long int>(event.getEntries()));
85 long long int entries =
event.getEntries();
87 const long long int e = atoll(argv[2]);
95 for (
long long int entry = 0; entry <
entries; ++entry) {
96 event.getEntry(entry);
100 ANA_CHECK(event.retrieve(electrons,
"Electrons"));
105 ANA_MSG_ERROR(
"ERROR no cluster associated to the Electron \n");
110 if (std::abs(cluster->
etaBE(2)) >= 2.47) {
114 int index = ElEffCorrectionTool->systUncorrVariationIndex(*el);
124 ElEffCorrectionTool, *el, nominalSF, totalPos, totalNeg, isToys) ==
128 << el->pt() <<
" : eta = " << el->eta()
129 <<
" : Bin index = " <<
index <<
" : SF = " << nominalSF
130 <<
" + " << totalPos <<
" - " << totalNeg <<
" <===");
@ Error
Some error happened during the object correction.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Tool for accessing xAOD files outside of Athena.
static void enableDataSubmission(::Bool_t value)
Function for turning data submission on/off.
A relatively simple transient store for objects created in analysis.
int result(asg::StandaloneToolHandle< IAsgElectronEfficiencyCorrectionTool > &tool, const xAOD::Electron &el, double &nominalSF, double &totalPos, double &totalNeg, const bool isToys)
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Electron_v1 Electron
Definition of the current "egamma version".