FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Photospp::PhotosEvent Class Referenceabstract

#include <PhotosEvent.h>

Inheritance diagram for Photospp::PhotosEvent:
Photospp::PhotosHEPEVTEvent Photospp::PhotosHEPEVTEvent Photospp::PhotosHepMCEvent Photospp::PhotosHepMCEvent

Public Member Functions

virtual ~PhotosEvent ()
 
virtual vector< PhotosParticle * > getParticleList ()=0
 
virtual void print ()=0
 
void process ()
 
virtual ~PhotosEvent ()
 
virtual vector< PhotosParticle * > getParticleList ()=0
 
virtual void print ()=0
 
void process ()
 

Private Member Functions

vector< PhotosParticle * > filterParticles (vector< PhotosParticle * > particles)
 
vector< PhotosParticle * > filterParticles (vector< PhotosParticle * > particles)
 

Private Attributes

vector< PhotosBranch * > m_branch_points
 

Detailed Description

Definition at line 26 of file PhotosEvent.h.

Constructor & Destructor Documentation

PhotosEvent::~PhotosEvent ( )
virtual

Definition at line 11 of file PhotosEvent.cxx.

References m_branch_points.

12 {
13  while(m_branch_points.size()!=0)
14  {
15  PhotosBranch *temp = m_branch_points.back();
16  m_branch_points.pop_back();
17  delete temp;
18  }
19 }
vector< PhotosBranch * > m_branch_points
Definition: PhotosEvent.h:44
Single branching point.
virtual Photospp::PhotosEvent::~PhotosEvent ( )
virtual

Member Function Documentation

vector< PhotosParticle * > PhotosEvent::filterParticles ( vector< PhotosParticle * >  particles)
private

Filter suppressed and invalid particles.

Definition at line 32 of file PhotosEvent.cxx.

References Photospp::Log::Debug(), Photospp::PhotosParticle::getDaughters(), Photospp::PhotosParticle::getPdgID(), Photospp::PhotosParticle::getStatus(), i, p, and Photospp::PhotosParticle::STABLE.

Referenced by process().

33 {
34  vector<PhotosParticle *> filtered;
35  for(int i=0;i<(int)particles.size();i++)
36  {
37  PhotosParticle *p = particles.at(i);
38  if(!p) continue;
39 
40  //check that the particle decays
41  if(p->getStatus()==PhotosParticle::STABLE) continue;
42 
43  //check for self decays
44  vector<PhotosParticle *> daughters = p->getDaughters();
45  int j=0;
46  for(j=0;j<(int)daughters.size();j++)
47  if(daughters.at(j)->getPdgID()==p->getPdgID()) break;
48  if(j!=(int)daughters.size()) continue;
49 
50  Log::Debug(2)<<"Passed particle filter"<<endl;
51  filtered.push_back(p);
52  }
53  return filtered;
54 }
Int_t i
Definition: run_full.C:25
Double_t p
Definition: anasim.C:58
static const int STABLE
static ostream & Debug(unsigned short int code=0, bool count=true)
Definition: Log.cxx:30
Abstract base class for particle in the event. This class also handles boosting.
vector<PhotosParticle *> Photospp::PhotosEvent::filterParticles ( vector< PhotosParticle * >  particles)
private

Filter suppressed and invalid particles.

virtual vector<PhotosParticle*> Photospp::PhotosEvent::getParticleList ( )
pure virtual

Get an unfiltered list of particles from the event record

Implemented in Photospp::PhotosHEPEVTEvent, Photospp::PhotosHEPEVTEvent, Photospp::PhotosHepMCEvent, and Photospp::PhotosHepMCEvent.

Referenced by process().

virtual vector<PhotosParticle*> Photospp::PhotosEvent::getParticleList ( )
pure virtual

Get an unfiltered list of particles from the event record

Implemented in Photospp::PhotosHEPEVTEvent, Photospp::PhotosHEPEVTEvent, Photospp::PhotosHepMCEvent, and Photospp::PhotosHepMCEvent.

virtual void Photospp::PhotosEvent::print ( )
pure virtual
virtual void Photospp::PhotosEvent::print ( )
pure virtual
void PhotosEvent::process ( )

Process event

Definition at line 21 of file PhotosEvent.cxx.

References Photospp::PhotosBranch::createBranches(), filterParticles(), getParticleList(), i, and m_branch_points.

Referenced by main().

22 {
23  //print();
24  vector<PhotosParticle*> particles = filterParticles( getParticleList() );
26 
27  for(int i=0;i<(int)m_branch_points.size();i++)
28  m_branch_points.at(i)->process();
29  //print();
30 }
static vector< PhotosBranch * > createBranches(vector< PhotosParticle * > particles)
Int_t i
Definition: run_full.C:25
vector< PhotosBranch * > m_branch_points
Definition: PhotosEvent.h:44
vector< PhotosParticle * > filterParticles(vector< PhotosParticle * > particles)
Definition: PhotosEvent.cxx:32
virtual vector< PhotosParticle * > getParticleList()=0
void Photospp::PhotosEvent::process ( )

Process event

Member Data Documentation

vector< PhotosBranch * > PhotosEvent::m_branch_points
private

branch points which should be given to PHOTOS

Definition at line 44 of file PhotosEvent.h.

Referenced by process(), and ~PhotosEvent().


The documentation for this class was generated from the following files: