 |
ATLAS Offline Software
|
Go to the documentation of this file.
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;
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
Const iterator class for DataVector/DataList.
Scalar phi() const
phi method
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::vector< double > bqKinematics[3]
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CheckCloningFactor(const std::string &name, ISvcLocator *pSvcLocator)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.