|
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
56 using namespace asg::msgUserCode;
58 int main(
int argc,
char*
argv[] ){std::cout << __PRETTY_FUNCTION__ << std::endl;
59 #ifdef XAOD_STANDALONE
62 StatusCode::enableFailure();
68 std::string
jetType =
"AntiKt4EMTopo";
69 TString
fileName = gSystem->Getenv(
"ASG_TEST_FILE_MC");
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) {
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() );
98 #ifdef XAOD_STANDALONE
101 #else // Athena "Store" is the same StoreGate used by the TEvent
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;
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);
184 for(
const auto& ph : *photons) {
190 metPhotons.asDataVector(),
195 for(
const auto& tau : *taus) {
201 metTaus.asDataVector(),
207 for(
const auto&
mu : *muons) {
214 metMuons.asDataVector(),
251 #ifdef XAOD_STANDALONE // POOL::TEvent should handle this when changing events
254 assert(
event->fill());
259 #ifndef XAOD_STANDALONE
MissingETAuxContainer_v1 MissingETAuxContainer
ReadStats & stats()
Access the object belonging to the current thread.
virtual StatusCode rebuildJetMET(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
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
StatusCode accept(const xAOD::Muon *mu)
@ LCTopo
Indicator for MET contribution from TopoClusters with LCW calibration applied.
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)
void addGhostMuonsToJets(const xAOD::MuonContainer &muons, xAOD::JetContainer &jets)
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
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.
Photon_v1 Photon
Definition of the current "egamma version".
struct TBPatternUnitContext Muon
@ Track
Indicator for MET contribution from reconstructed charged particle tracks.
A relatively simple transient store for objects created in analysis.
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...
@ Tau
The object is a tau (jet)
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
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
bool empty() const noexcept
Returns true if the collection is empty.
Tool for accessing xAOD files outside of Athena.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.