ATLAS Offline Software
PseudoTopRecoRun.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3  */
4 
6 
7 #include "TopEvent/Event.h"
8 #include "TopEvent/EventTools.h"
10 
11 #include <iostream>
12 #include <vector>
13 #include <cmath>
14 #include <fstream>
15 
16 namespace top {
17  PseudoTopRecoRun::PseudoTopRecoRun(const std::string& kLeptonType, std::shared_ptr<top::TopConfig> config) :
18  m_name("RECO::PseudoTopRecoRun_" + kLeptonType),
19  m_PseudoTopReco(nullptr) {
20  m_PseudoTopReco = std::unique_ptr<top::PseudoTopReco> (new top::PseudoTopReco(m_name));
21  top::check(m_PseudoTopReco->setProperty("config", config), "Failed to setProperty of PseudoTopReco");
22  top::check(m_PseudoTopReco->setProperty("LeptonType", kLeptonType), "Failed to setProperty of PseudoTopReco");
23  //top::check( m_PseudoTopReco->setProperty("RecoType", kRecoType), "Failed to setProperty of PseudoTopReco" );
24  top::check(m_PseudoTopReco->initialize(), "Failed to initialize PseudoTopRecoTool");
25  }
26 
28  top::check(m_PseudoTopReco->execute(event), "Failed to run PseudoTopReco");
29  return true;
30  }
31 
33  top::check(m_PseudoTopReco->execute(plEvent), "Failed to run PseudoTopReco");
34  return true;
35  }
36 
37  std::string PseudoTopRecoRun::name() const {
38  return m_name;
39  }
40 }
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::PseudoTopRecoRun::apply
virtual bool apply(const top::Event &) const override
This does stuff based on the information in an event.
Definition: PseudoTopRecoRun.cxx:27
top::PseudoTopRecoRun::name
std::string name() const override
A human readable name.
Definition: PseudoTopRecoRun.cxx:37
PseudoTopRecoRun.h
top::PseudoTopRecoRun::m_name
std::string m_name
Definition: PseudoTopRecoRun.h:26
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
EventTools.h
A few functions for doing operations on particles / events. Currently holds code for dR,...
top::PseudoTopRecoRun::applyParticleLevel
virtual bool applyParticleLevel(const top::ParticleLevelEvent &plEvent) const override
This does stuff based on the information in a particle level event.
Definition: PseudoTopRecoRun.cxx:32
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
top::PseudoTopRecoRun::m_PseudoTopReco
std::unique_ptr< top::PseudoTopReco > m_PseudoTopReco
Definition: PseudoTopRecoRun.h:28
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
top::ParticleLevelEvent
Definition: ParticleLevelEvent.h:24
Event.h
TopConfig.h
top::Event
Very simple class to hold event data after reading from a file.
Definition: Event.h:49
top::PseudoTopRecoRun::PseudoTopRecoRun
PseudoTopRecoRun(const std::string &kLeptonType, std::shared_ptr< top::TopConfig > config)
Definition: PseudoTopRecoRun.cxx:17
top::PseudoTopReco
Definition: PseudoTopReco.h:40