 |
ATLAS Offline Software
|
Go to the documentation of this file.
29 return StatusCode::SUCCESS;
37 auto outputJets = std::make_unique<std::vector<TrigBtagEmulationJet>>();
38 auto sortedPreselJets = std::make_unique<std::vector<TrigBtagEmulationJet>>();
53 sortedPreselJets->reserve(theJetContainer->
size());
59 outputJets->push_back(
toAdd );
68 if ( bjetContainerHandle.
isValid() ) {
76 for (std::size_t ijet(0); ijet < outputJets->size(); ijet++) {
77 const auto &emuljet = outputJets->
at(ijet);
91 for (
const auto&
jet : *outputJets.get() ) {
98 sort(sortedPreselJets->begin(), sortedPreselJets->end(),
99 [] (
const auto& lhs,
const auto& rhs) ->
bool
100 { return lhs.pt() > rhs.pt(); }
104 for(
unsigned int i = 0;
i < 10 and
i < sortedPreselJets->size();
i++) {
105 ATH_MSG_DEBUG(
" - pt=" << (sortedPreselJets->at(
i).pt() * 0.001) <<
" eta=" << sortedPreselJets->at(
i).eta() );
113 outputJets->push_back(
toAdd );
124 ATH_MSG_DEBUG(
"jet container size: " << theJetContainer->
size() <<
", btag container size: " << theBTagContainer->
size());
137 const auto &jetLink = btagToJetAccessor(*btag);
138 if (jetLink.size() > 0 && jetLink.at(0).isValid()) {
140 double mv2c20_score, mv2c10_score;
141 btag->MVx_discriminant(
"MV2c20", mv2c20_score);
142 btag->MVx_discriminant(
"MV2c10", mv2c10_score);
144 << jetLink.at(0).index() <<
" pt=" << (btaggedJet->
pt() * 0.001) <<
" eta=" << btaggedJet->
eta()
145 <<
", mv2c20=" << mv2c20_score <<
", mv2c10=" << mv2c10_score);
150 bool isJetPresent =
false;
151 for (
const xAOD::Jet *theJet : *theJetContainer) {
153 if ((!isGSCchain && btaggedJet == theJet) ||
160 if (matchedJet ==
nullptr) {
168 bool isJetUnique =
true;
170 if (matchedJet->
p4().Et() == j.et() &&
171 matchedJet->
eta() == j.eta() && matchedJet->
phi() == j.phi()) {
176 if (isJetPresent && isJetUnique) {
187 emulCtx.
store( storage_name, std::move(outputJets) );
189 emulCtx.
store( storage_name +
"_presel", std::move(sortedPreselJets) );
192 return StatusCode::SUCCESS;
201 return *emulCtx.
get<std::vector<TrigBtagEmulationJet>>(
m_jetcontainer.value() +
"_presel");
206 return splitJet->
p4().DeltaR( gscJet->
p4() ) < 0.05;
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
AthConfigFlags bjet(AthConfigFlags flags, str instanceName, str recoMode)
std::string find(const std::string &s)
return a remapped string
const_pointer_type cptr()
Dereference the pointer.
The common trigger namespace for trigger analysis tools.
bool msgLvl(const MSG::Level lvl) const
virtual double phi() const
The azimuthal angle ( ) of the particle.
Helper class to provide constant type-safe access to aux data.
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
const T * get(const std::string &name) const
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual double eta() const
The pseudorapidity ( ) of the particle.
void store(const std::string &name, std::unique_ptr< T > &&object)
virtual FourMom_t p4() const
The full 4-momentum of the particle.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
const T * at(size_type n) const
Access an element, as an rvalue.
virtual double pt() const
The transverse momentum ( ) of the particle.
size_type size() const noexcept
Returns the number of elements in the collection.