:
                                           :
void HydjetAnalyzer::analyze( const Event& e, const EventSetup& )
{
  //runs every event

   Handle EvtHandle;

   // find initial (unsmeared, unfiltered,...) HepMCProduct
   // by its label - HydjetSource, that is
// e.getByLabel( "source", EvtHandle ) ;
   e.getByLabel( modLabel_, EvtHandle ) ;

   double part_eta, part_y, part_pt, part_phi, part_e, part_pz;
   const HepMC::GenEvent* myEvt = EvtHandle->GetEvent() ;
   if(myEvt)
     {
       for( HepMC::GenEvent::particle_const_iterator p = myEvt->particles_begin();
        p != myEvt->particles_end(); p++ )
     {
       if( !(*p)->end_vertex() && abs( (*p)->pdg_id() ) == 211)
         {
        part_eta = (*p)->momentum().eta();
        part_e   = (*p)->momentum().e();
        part_pt  = (*p)->momentum().perp();
        part_phi = (*p)->momentum().phi();
        part_pz  = (*p)->momentum().z();
        part_y = 0.5*log((part_e+part_pz)/(part_e-part_pz));

           phdNdEta->Fill(part_eta);
           phdNdY->Fill(part_y);
           phdNdPt->Fill(part_pt);
           phdNdPhi->Fill(part_phi);
         }
     }
     }

  HepMC::HeavyIon *hi = myEvt->heavy_ion();
  if ( hi ) {
     std::cout << "B = " << hi->impact_parameter() << std::endl;
  }

                                           :
                                           :

-- MinkyooChoi - 23 Feb 2009

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2009-02-24 - MinkyooChoi
 
KOREA-CMS
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding KoreaCmsWiki? Send feedback