|
ATLAS Offline Software
|
Go to the documentation of this file.
10 std::cout <<
"Examples are only defined in the analysis release." << std::endl;
15 #ifdef XAOD_STANDALONE
60 using namespace asg::msgUserCode;
62 int main(
int argc,
char*
argv[]) {std::cout << __PRETTY_FUNCTION__ << std::endl;
65 #ifdef XAOD_STANDALONE
69 StatusCode::enableFailure();
76 TString
fileName = gSystem->Getenv(
"ASG_TEST_FILE_MC");
77 std::string
jetType =
"AntiKt4EMTopo";
79 if (std::string(
argv[
i]) ==
"-filen" &&
i+1<
argc) {
81 }
else if (std::string(
argv[
i]) ==
"-jetcoll" &&
i+1<
argc) {
83 }
else if (std::string(
argv[
i]) ==
"-invisEle") {
85 }
else if (std::string(
argv[
i]) ==
"-debug") {
91 std::unique_ptr< TFile >
ifile( TFile::Open(
fileName,
"READ" ) );
92 assert(
ifile.get() );
95 #ifdef XAOD_STANDALONE
98 #else // Athena "Store" is the same StoreGate used by the TEvent
108 jetCalibrationTool.
setTypeAndName(
"JetCalibrationTool/jetCalibTool");
110 ANA_CHECK( jetCalibrationTool.
setProperty(
"ConfigFile",
"JES_MC15cRecommendation_May2016_rel21.config") );
116 metSystTool.
setTypeAndName(
"met::METSystematicsTool/metSystTool");
127 if(ievent % 10 == 0) std::cout <<
"event number: " << ievent << std::endl;
134 std::string coreMetKey =
"MET_Core_" +
jetType;
136 if(
debug) std::cout <<
"Using core MET " << coreMet << std::endl;
153 std::cout <<
"Failed to set the original object links" << std::endl;
160 std::string metAssocKey =
"METAssoc_" +
jetType;
170 isys != recSysList.
end();
178 newMetContainer->setStore(newMetAuxContainer);
186 if(
el->pt()>20
e3 &&
el->eta()<2.47) {
188 invisElectrons.push_back(
el);
190 metElectrons.push_back(
el);
194 if(!invisElectrons.empty()){
201 metElectrons.asDataVector(),
207 for(
const auto *
mu : *muons) {
208 if(
mu->pt()>20
e3 &&
mu->eta()<2.4) metMuons.push_back(
mu);
213 metMuons.asDataVector(),
235 metSystTool->
setRandomSeed(
int(1e6*(*newMetContainer)[
"PVSoftTrk"]->
phi()) );
240 if(
debug) std::cout <<
"Soft track met: " << softTrkMet->
met();
246 if(
debug) std::cout <<
"Jet track met: " << jetTrkMet->
met();
257 #ifdef XAOD_STANDALONE // POOL::TEvent should handle this when changing events
260 assert(
event->fill());
265 #ifndef XAOD_STANDALONE // POOL::TEvent should handle this when changing events
Electron_v1 Electron
Definition of the current "egamma version".
MissingETAuxContainer_v1 MissingETAuxContainer
ReadStats & stats()
Access the object belonging to the current thread.
virtual StatusCode markInvisible(const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, xAOD::MissingETContainer *metCont)=0
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
static void enableFailure() noexcept
std::set< SystematicVariation >::const_iterator const_iterator
Class to wrap a set of SystematicVariations.
MissingETContainer_v1 MissingETContainer
@ kClassAccess
Access auxiliary data using the aux containers.
uint64_t bitmask_t
Type for status word bit mask.
virtual StatusCode rebuildMET(const std::string &metKey, xAOD::Type::ObjectType metType, xAOD::MissingETContainer *metCont, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale=MissingETBase::UsageHandler::PhysicsObject)=0
IAppMgrUI * Init(const char *options="POOLRootAccess/basic.opts")
Bootstraps (creates and configures) the Gaudi Application with the provided options file.
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
Principal data object for Missing ET.
const_iterator end() const
description: const iterator to the end of the set
Auxiliary data store for xAOD::MissingETContainer.
static IOStats & instance()
Singleton object accessor.
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
Container for xAOD::MissingET_v1 objects.
void record(const T *p, const std::string &key)
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
struct TBPatternUnitContext Muon
@ Track
Indicator for MET contribution from reconstructed charged particle tracks.
A relatively simple transient store for objects created in analysis.
This module implements the central registry for handling systematic uncertainties with CP tools.
DataVector adapter that acts like it holds const pointers.
StatusCode retrieve(const T *&obj)
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...
const_iterator begin() const
description: const iterator to the beginning of the set
virtual StatusCode rebuildTrackMET(const std::string &metJetKey, const std::string &metSoftKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT)=0
Tool for accessing xAOD files outside of Athena.
float met() const
Returns .
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.