StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
StExampleFilter Class Reference

#include <StExampleFilter.h>

Inheritance diagram for StExampleFilter:

Public Member Functions

int RejectEG (const StGenParticleMaster &ptl) const
int RejectGT (const StGenParticleMaster &ptl) const
int RejectGE (const StGenParticleMaster &ptl) const
- Public Member Functions inherited from StMCFilter
 StMCFilter (const char *name)
virtual void Finish () const
 Finish called at the end of GEANT.
const std::string & GetName () const
double & User (int idx)
 Return a reference to one of 10 user words.
double User (int idx) const
 Returns one of the 10 user words.
virtual void parseConfig (std::string key, float value)

Additional Inherited Members

- Static Public Member Functions inherited from StMCFilter
static StMCFilterselected ()
 Returns a pointer to the selected filter.
- Static Protected Member Functions inherited from StMCFilter
static int GetNTotEG ()
 Number of total EG events.
static int GetNTotGT ()
 Number of total GT events.
static int GetNTotGE ()
 Number of total GE events.
static int GetNRejEG ()
 Number of rejected GE events.
static int GetNRejGT ()
 Number of rejected GT events.
static int GetNRejGE ()
 Number of rejected GE events.
static void FINISH ()
 Print of numbers above at the end of STARSIM.
- Protected Attributes inherited from StMCFilter
std::string fName
char fBeg [1]
int fCnt [3][2]
double fUser [20]
char fEnd [1]
- Static Protected Attributes inherited from StMCFilter
static myMap_t * mgMap =0

Detailed Description

Example of implementation of StMCFilter class more info in;lter.ppt

Definition at line 17 of file StExampleFilter.h.

Member Function Documentation

int StExampleFilter::RejectEG ( const StGenParticleMaster ptl) const

user reject function called immediately after Event Generator. Currently Pythia Vertex in zero. EG==EventGenerator

StMCFilter base class is :

  1. A user interface. User must overload functions: a)RejectEG (StGenParticles &) ? called inside Pythia. Interaction point in (0,0,0); EG == EventGenerator b)RejectGT (StGenParticles &) ? called inside Geant before tracking. Interaction point generated by Geant; GT==GeantTracking c)RejectGE (StGenParticles &) ? called inside Geant after tracking; GE==GeantEnd
  2. All three methods have exactly the same input arguments;
  3. User must provide the unique name of the his filter. Selection of filter is based on this name.
  4. Apart of that in this base class all the machinery of connection to Pythia and Geant is hidden
  5. At the end Finish() is called. Print statistics. Could be overloaded

An argument of RejectXX(StGenParticles &Ptl) Class StGenParticles is a container class containing StGenParticle objects. Each object represents one particle(track). User methods of StGenParticles class:

  1. Ptl.Size() ? number of particles;
  2. Ptl(index) ? pointer to particle (StGenParticle*)
  3. Ptl.Print() ? print all particles;
  4. Ptl.Print(char* tit) ? print container

Class StGenParticle ideologically is based on HEPEVT standard


  • int GetStatusCode; /// 1= final particle
  • int GetPdgCode; //PDG particle code
  • int GetGeaCode(); //Geant particle code
  • StGenParticle *GetMother(int i); //mother particle(0=beam,1=target)
  • StGenParticle *GetDaughter(int i); //daughter ith particle
  • double GetCalcMass (); //calculated mass
  • double GetMass(); //mass
  • int GetNDaughters
  • void Momentum(double p4[4]); //four momentum
  • void Vertex(double v[3]) //vertex in cm;
  • double Time(); //time in cm
  • int IsPrimary(); //Is this particle a primary one?
  • int IsFinal () //Is this particle a final one?

Additional methods:

  • double R (); //Rxy of vertex
  • double Rho (); //Rxyz of vertex
  • double P (); /// Full momentum
  • double Pt (); //Transverse momentum
  • double Energy();
  • double Eta (); //Pseudo rapidity
  • double Phi ();
  • double Theta ();
            Filter kumac commands
    gexec $STAR_LIB/
    gexec $STAR_LIB/
    gexec $STAR_LIB/
    gexec $STAR_LIB/
    gfilter filterName
    All three methods are called in a proper places. Method which is not overloaded, always returns zero (no rejection)

Reimplemented from StMCFilter.

Definition at line 89 of file StExampleFilter.cxx.

int StExampleFilter::RejectGE ( const StGenParticleMaster ptl) const

user reject function called after GEANT tracking Vertex and tracks are already generated. GE==GeantEnd

Reimplemented from StMCFilter.

Definition at line 115 of file StExampleFilter.cxx.

int StExampleFilter::RejectGT ( const StGenParticleMaster ptl) const

user reject function called before GEANT tracking Vertex is already generated. GT == GeantTracker

Reimplemented from StMCFilter.

Definition at line 109 of file StExampleFilter.cxx.

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