![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/SystemOfUnits.h"
19 #include "TLorentzVector.h"
45 return StatusCode::SUCCESS;
52 return StatusCode::SUCCESS;
64 if(
sc.isFailure() || !truthjetTES) {
67 <<
sc.isFailure() <<
" "<< !truthjetTES);
68 return StatusCode::SUCCESS;
72 double lead_jet_pt = 0.0;
75 std::vector<xAOD::JetContainer::const_iterator>
jets,bjets;
76 for(jitr = (*truthjetTES).begin(); jitr !=(*truthjetTES).end(); ++jitr) {
78 if(std::abs((*jitr)->eta()) >
m_jetEtaMax)
continue;
79 if((*jitr)->pt() > lead_jet_pt) lead_jet_pt = (*jitr)->pt();
87 ATH_MSG_ERROR(
"No TruthParticle collection with name " <<
"TruthGen" <<
" found in StoreGate!");
88 return StatusCode::FAILURE;
95 int njets =
jets.size();
102 std::vector< const xAOD::TruthParticle* > bHadrons;
103 unsigned int nPart = xTruthParticleContainer->
size();
104 for (
unsigned int iPart = 0; iPart < nPart; ++iPart) {
110 bHadrons.push_back(
part);
115 for(
uint j = 0; j < bHadrons.size(); j++){
116 TLorentzVector
genpart(bHadrons.at(j)->px(), bHadrons.at(j)->py(), bHadrons.at(j)->pz(), bHadrons.at(j)->e());
120 bjets.push_back(
jets[
i]);
133 weight = genEvt->weights().front();
141 setFilterPassed(pass);
142 return StatusCode::SUCCESS;
147 int id = std::abs(pID);
def retrieve(aClass, aKey=None)
Gaudi::Property< std::string > m_TruthJetContainerName
Const iterator class for DataVector/DataList.
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Gaudi::Property< int > m_nJetsMin
xAODMultiBjetFilter(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< double > m_deltaRFromTruth
Gaudi::Property< double > m_jetEtaMax
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool isBwithWeakDK(const int pID) const
Base class for event generator filtering modules.
virtual StatusCode filterFinalize()
virtual StatusCode filterInitialize()
::StatusCode StatusCode
StatusCode definition for legacy code.
Provide simplified clock_gettime() function for MacOSX.
Gaudi::Property< double > m_jetPtMin
Class describing a truth particle in the MC record.
virtual ~xAODMultiBjetFilter()
Gaudi::Property< double > m_bottomPtMin
virtual StatusCode filterEvent()
Gaudi::Property< int > m_nBJetsMax
double m_SumOfWeights_Pass
Gaudi::Property< double > m_leadJet_ptMax
tuple genpart
Check that the actual generators, tune, and main PDF are consistent with the JO name.
Gaudi::Property< double > m_leadJet_ptMin
#define ATH_MSG_WARNING(x)
double m_SumOfWeights_Evt
Gaudi::Property< int > m_nBJetsMin
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Property< int > m_nJetsMax
Gaudi::Property< double > m_bottomEtaMax