7 #include "GaudiKernel/MsgStream.h"
8 #include "GaudiKernel/DataSvc.h"
26 return StatusCode::SUCCESS;
39 return StatusCode::FAILURE;
44 std::vector<HepMC::ConstGenParticlePtr> bQuarks;
45 for (itr = mcCollptr->
begin(); itr!=mcCollptr->
end(); ++itr) {
47 const HepMC::GenEvent* genEvt = (*itr);
48 for (
auto pitr: *genEvt) {
49 int p_id = pitr->pdg_id();
50 if ( (std::abs(p_id)==5) && (pitr->status() == 62 || pitr->status() == 63) ) {
51 bQuarks.push_back(pitr);
56 if ( bQuarks.size()==0)
return StatusCode::FAILURE;
60 for (
auto bItr = bQuarks.begin(); bItr!=bQuarks.end(); ++bItr) {
61 double thisPt=(*bItr)->momentum().perp();
62 if (thisPt>lastPt) { recordedBQuarkIt=bItr; }
65 auto BQMom=(*recordedBQuarkIt)->momentum();
66 double b_pt = BQMom.perp();
67 double b_rapid = BQMom.pseudoRapidity();
68 double b_phi = BQMom.phi();
70 unsigned int nAccumulatedEvents =
bqKinematics[0].size();
72 for (
unsigned int i=0;
i<nAccumulatedEvents; ++
i) {
88 return StatusCode::SUCCESS;
96 ATH_MSG_INFO(
"Total number of unique events = " << uniqueEvents);
99 return StatusCode::SUCCESS;