10 std::cout <<
"Examples are only defined in the analysis release." << std::endl;
56using namespace asg::msgUserCode;
58int main(
int argc,
char* argv[] ){std::cout << __PRETTY_FUNCTION__ << std::endl;
62 StatusCode::enableFailure();
68 std::string
jetType =
"AntiKt4EMTopo";
69 TString
fileName = gSystem->Getenv(
"ASG_TEST_FILE_MC");
72 for (
int i=0;
i<
argc; ++
i) {
73 if (std::string(argv[i]) ==
"-filen" && i+1<argc) {
75 }
else if (std::string(argv[i]) ==
"-jetcoll" && i+1<argc) {
77 }
else if (std::string(argv[i]) ==
"-evtmax" && i+1<argc) {
78 evtmax =
atoi(argv[i+1]);
79 }
else if (std::string(argv[i]) ==
"-debug") {
86 jetCalibrationTool.setName(
"jetCalibTool");
88 ANA_CHECK( jetCalibrationTool.
setProperty(
"ConfigFile",
"JES_MC15cRecommendation_May2016_rel21.config") );
94 std::unique_ptr< TFile >
ifile( TFile::Open( fileName,
"READ" ) );
95 assert(
ifile.get() );
114 for(
size_t ievent = 0; ievent < std::min(
size_t(
event->getEntries()), evtmax); ++ievent){
115 if(ievent % 10 == 0) std::cout <<
"event number: " << ievent << std::endl;
120 std::string coreMetKey =
"MET_Core_" +
jetType;
122 if(
debug) std::cout <<
"Using core MET " << coreMet << std::endl;
151 if(jetCalibrationTool->applyCalibration(*calibJets).isFailure())
156 std::string metAssocKey =
"METAssoc_" +
jetType;
161 newMetContainer->setStore(newMetAuxContainer);
167 if(!invisibleElectrons->
empty()){
169 for(
const auto& el : *invisibleElectrons) {
171 metInvisibleElectrons.push_back(el);
176 ANA_CHECK( metMaker->markInvisible(metInvisibleElectrons.asDataVector(),metHelper,newMetContainer) );
184 for(
const auto& ph : *photons) {
187 ANA_CHECK(metMaker->rebuildMET(
"RefPhoton",
190 metPhotons.asDataVector(),
195 for(
const auto& tau : *
taus) {
201 metTaus.asDataVector(),
207 for(
const auto& mu : *muons) {
209 if(
mu->muonType()==xAOD::Muon::Combined &&
mu->pt()>10e3) metMuons.push_back(mu);
214 metMuons.asDataVector(),
222 ANA_CHECK( metMaker->rebuildJetMET(
"RefJet",
233 ANA_CHECK( metMaker->rebuildTrackMET(
"RefJetTrk",
251#ifdef XAOD_STANDALONE
254 assert(
event->fill());
259#ifndef XAOD_STANDALONE
DataVector adapter that acts like it holds const pointers.
bool empty() const noexcept
Returns true if the collection is empty.
void record(const T *p, const std::string &key)
ReadStats & stats()
Access the object belonging to the current thread.
static IOStats & instance()
Singleton object accessor.
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
A relatively simple transient store for objects created in analysis.
StatusCode accept(const xAOD::Muon *mu)
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
uint64_t bitmask_t
Type for status word bit mask.
IAppMgrUI * Init(const char *options="POOLRootAccess/basic.opts")
Bootstraps (creates and configures) the Gaudi Application with the provided options file.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
void addGhostMuonsToJets(const xAOD::MuonContainer &muons, xAOD::JetContainer &jets)
@ Photon
The object is a photon.
@ Muon
The object is a muon.
@ Tau
The object is a tau (jet)
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, const EventContext &ctx)
Function making a shallow copy of a constant container.
MissingETContainer_v1 MissingETContainer
bool setOriginalObjectLink(const IParticle &original, IParticle ©)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...
MissingETAuxContainer_v1 MissingETAuxContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
MissingETAssociationMap_v1 MissingETAssociationMap
Version control by type defintion.
@ LCTopo
Indicator for MET contribution from TopoClusters with LCW calibration applied.
@ Track
Indicator for MET contribution from reconstructed charged particle tracks.