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

#include <PhotosHEPEVTEvent.h>

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

Public Member Functions

 ~PhotosHEPEVTEvent ()
 
 PhotosHEPEVTEvent ()
 
void addParticle (PhotosHEPEVTParticle *p)
 
PhotosHEPEVTParticlegetParticle (int i)
 
void setParticle (int i, PhotosHEPEVTParticle *p)
 
int getParticleCount ()
 
std::vector< PhotosParticle * > getParticleList ()
 
void print ()
 
void clear ()
 
 ~PhotosHEPEVTEvent ()
 
 PhotosHEPEVTEvent ()
 
void addParticle (PhotosHEPEVTParticle *p)
 
PhotosHEPEVTParticlegetParticle (int i)
 
void setParticle (int i, PhotosHEPEVTParticle *p)
 
int getParticleCount ()
 
std::vector< PhotosParticle * > getParticleList ()
 
void print ()
 
void clear ()
 
void process ()
 
void process ()
 

Private Attributes

std::vector
< PhotosHEPEVTParticle * > 
particle_list
 

Detailed Description

Definition at line 51 of file PhotosHEPEVTEvent.h.

Constructor & Destructor Documentation

Photospp::PhotosHEPEVTEvent::~PhotosHEPEVTEvent ( )

Default destructor

Definition at line 7 of file PhotosHEPEVTEvent.cxx.

References i, and particle_list.

8 {
9  for(unsigned int i=0;i<particle_list.size();i++) delete particle_list[i];
10 }
Int_t i
Definition: run_full.C:25
std::vector< PhotosHEPEVTParticle * > particle_list
Photospp::PhotosHEPEVTEvent::PhotosHEPEVTEvent ( )

Default constructor

Definition at line 12 of file PhotosHEPEVTEvent.cxx.

12 {}
Photospp::PhotosHEPEVTEvent::~PhotosHEPEVTEvent ( )

Default destructor

Photospp::PhotosHEPEVTEvent::PhotosHEPEVTEvent ( )

Default constructor

Member Function Documentation

void Photospp::PhotosHEPEVTEvent::addParticle ( PhotosHEPEVTParticle p)

Add particle at the end of event record

Definition at line 14 of file PhotosHEPEVTEvent.cxx.

References particle_list, Photospp::PhotosHEPEVTParticle::setBarcode(), and Photospp::PhotosHEPEVTParticle::setEvent().

Referenced by make_simple_tau_event(), and Photospp::PhotosHEPEVTParticle::setMothers().

15 {
16  p->setEvent(this);
17 
18  p->setBarcode(particle_list.size());
19  particle_list.push_back(p);
20 }
std::vector< PhotosHEPEVTParticle * > particle_list
void Photospp::PhotosHEPEVTEvent::addParticle ( PhotosHEPEVTParticle p)

Add particle at the end of event record

void Photospp::PhotosHEPEVTEvent::clear ( void  )

Remove all particles from the event

Definition at line 54 of file PhotosHEPEVTEvent.cxx.

References i, and particle_list.

55 {
56  for(unsigned int i=0;i<particle_list.size();i++) delete particle_list[i];
57  particle_list.clear();
58 }
Int_t i
Definition: run_full.C:25
std::vector< PhotosHEPEVTParticle * > particle_list
void Photospp::PhotosHEPEVTEvent::clear ( )

Remove all particles from the event

PhotosHEPEVTParticle * Photospp::PhotosHEPEVTEvent::getParticle ( int  i)

Get particle at index 'i'

Definition at line 22 of file PhotosHEPEVTEvent.cxx.

References i, and particle_list.

Referenced by Photospp::PhotosHEPEVTParticle::addDaughter(), Photospp::PhotosHEPEVTParticle::checkMomentumConservation(), checkMomentumConservationInEvent(), Photospp::PhotosHEPEVTParticle::getDaughters(), and Photospp::PhotosHEPEVTParticle::getMothers().

23 {
24  if( i<0 || i>=(int)particle_list.size() ) return NULL;
25  return particle_list[i];
26 }
Int_t i
Definition: run_full.C:25
std::vector< PhotosHEPEVTParticle * > particle_list
PhotosHEPEVTParticle* Photospp::PhotosHEPEVTEvent::getParticle ( int  i)

Get particle at index 'i'

int Photospp::PhotosHEPEVTEvent::getParticleCount ( )

Get higher-most index of the particles in event (nhep)

Definition at line 34 of file PhotosHEPEVTEvent.cxx.

References particle_list.

Referenced by checkMomentumConservationInEvent(), and Photospp::PhotosHEPEVTParticle::getDaughters().

35 {
36  return particle_list.size();
37 }
std::vector< PhotosHEPEVTParticle * > particle_list
int Photospp::PhotosHEPEVTEvent::getParticleCount ( )

Get higher-most index of the particles in event (nhep)

std::vector< PhotosParticle * > Photospp::PhotosHEPEVTEvent::getParticleList ( )
virtual

Get an unfiltered list of particles from the event record

Implements Photospp::PhotosEvent.

Definition at line 39 of file PhotosHEPEVTEvent.cxx.

References i, and particle_list.

40 {
41  std::vector<PhotosParticle*> ret;
42 
43  for(unsigned int i=0;i<particle_list.size();i++) ret.push_back( (PhotosParticle*)particle_list[i] );
44 
45  return ret;
46 }
Int_t i
Definition: run_full.C:25
std::vector< PhotosHEPEVTParticle * > particle_list
Abstract base class for particle in the event. This class also handles boosting.
std::vector<PhotosParticle*> Photospp::PhotosHEPEVTEvent::getParticleList ( )
virtual

Get an unfiltered list of particles from the event record

Implements Photospp::PhotosEvent.

void Photospp::PhotosHEPEVTEvent::print ( )
virtual

Print out list of particles in the event

Implements Photospp::PhotosEvent.

Definition at line 48 of file PhotosHEPEVTEvent.cxx.

References i, Photospp::Log::Info(), and particle_list.

49 {
50  Log::Info()<<"PhotosHEPEVTEvent"<<endl<<"-----------------"<<endl;
51  for(unsigned int i=0;i<particle_list.size();i++) particle_list[i]->print();
52 }
Int_t i
Definition: run_full.C:25
static ostream & Info(bool count=true)
Definition: Log.cxx:38
std::vector< PhotosHEPEVTParticle * > particle_list
void Photospp::PhotosHEPEVTEvent::print ( )
virtual

Print out list of particles in the event

Implements Photospp::PhotosEvent.

void Photospp::PhotosEvent::process ( )
inherited

Process event

void PhotosEvent::process ( )
inherited

Process event

Definition at line 21 of file PhotosEvent.cxx.

References Photospp::PhotosBranch::createBranches(), Photospp::PhotosEvent::filterParticles(), Photospp::PhotosEvent::getParticleList(), i, and Photospp::PhotosEvent::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::PhotosHEPEVTEvent::setParticle ( int  i,
PhotosHEPEVTParticle p 
)

Set particle at index 'i'

Definition at line 28 of file PhotosHEPEVTEvent.cxx.

References i, p, and particle_list.

Referenced by Photospp::PhotosHEPEVTParticle::addDaughter().

29 {
30  if( i<0 || i>=(int)particle_list.size() ) return;
31  particle_list[i] = p;
32 }
Double_t p
Definition: anasim.C:58
Int_t i
Definition: run_full.C:25
std::vector< PhotosHEPEVTParticle * > particle_list
void Photospp::PhotosHEPEVTEvent::setParticle ( int  i,
PhotosHEPEVTParticle p 
)

Set particle at index 'i'

Member Data Documentation

std::vector< PhotosHEPEVTParticle * > Photospp::PhotosHEPEVTEvent::particle_list
private

List of all particles

Definition at line 93 of file PhotosHEPEVTEvent.h.

Referenced by addParticle(), clear(), getParticle(), getParticleCount(), getParticleList(), print(), setParticle(), and ~PhotosHEPEVTEvent().


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