Ejemplo n.º 1
0
void CaloEvaluator::printInputInfo(PHCompositeNode *topNode) {
  
  if (verbosity > 2) cout << "CaloEvaluator::printInputInfo() entered" << endl;

  // print out the truth container

  if (verbosity > 1) { 

    cout << endl;
    cout << PHWHERE << "   NEW INPUT FOR EVENT " << _ievent << endl;
    cout << endl;

    // need things off of the DST...
    PHG4TruthInfoContainer* truthinfo = findNode::getClass<PHG4TruthInfoContainer>(topNode,"G4TruthInfo");
    if (!truthinfo) {
      cerr << PHWHERE << " ERROR: Can't find G4TruthInfo" << endl;
      exit(-1);
    }
    
    cout << "PHG4TruthInfoContainer contents: " << endl; 

    PHG4TruthInfoContainer::Range truthrange = truthinfo->GetParticleRange();
    for(PHG4TruthInfoContainer::Iterator truthiter = truthrange.first;
	truthiter != truthrange.second;
	++truthiter) {
      PHG4Particle *particle = truthiter->second;

      cout << truthiter->first << " => pid: " << particle->get_pid()
	   << " pt: " << sqrt(pow(particle->get_px(),2)+pow(particle->get_py(),2)) << endl;
    }
  }

  return;
}