46 std::vector<int> photons;
50 bool checkEvent =
true;
52 Pythia8::Event&
event = pythia.event;
57 for(
int ii=0; ii !=
event.size(); ++ii){
62 if(event[ii].
id() == 25 && abs(event[ii].status()) == 22){
71 return StatusCode::FAILURE;
74 std::vector<int> daughters =
event[higgsIndex].daughterList();
75 while(daughters.size()==1){
76 daughters=
event[daughters[0]].daughterList();
79 std::vector<int> photons;
81 for(
const auto d: daughters){
82 if(event[d].
id() == 22){
87 if(photons.size() < 2){
88 ATH_MSG_ERROR(
"Wrong number of photons from H decay. Expected >= 2, got " + std::to_string(photons.size()));
89 return StatusCode::FAILURE;
92 for(
const auto p: photons){
93 daughters =
event[p].daughterList();
94 while(daughters.size() == 1){
95 daughters =
event[daughters[0]].daughterList();
98 if(daughters.size() < 2)
continue;
101 for(
const auto d: daughters){
112 pythia.forceTimeShower( photons[0], photons[1], 1000000);
115 if(trials % 1000 == 0 ){
116 ATH_MSG_WARNING(
"Has the decay been setup in Pythia correctly? Possibly stuck in loop so far " << trials <<
" attempts have been made");
119 pythia.forceHadronLevel();
124 return StatusCode::SUCCESS;