(UNKNOWN PRODUCT) » INCLUDE » PReaction

class PReaction: public TObject

  PReaction Class implementation file

  A PReaction object represents a complete reaction process,
  made up of a sequence of PChannels, namely a succession of
  particle decays. All the participating PParticles and PChannels
  must be instantiated before the PReaction is set up.

                                  Author:  M.A. Kagarlis
                                  Written: 03.02.99
                                  Revised: 02/11/2005 by R. Holzmann
                                  Revised: 2007-2009 I. Froehlich


  A few important variables explained:

  nchan    = number of channels in reaction
  ndpar    = number of produced particles
  ntpar    = number of stable (tracked) particles in final state
  nclones  = number of particles in reaction, incl. beam and target

  cindex[nclones] = array holding for a given particle m the index j+1
                    of its channel: cindex[m] = j+1 (note the +1!)

  dindex[nchan-1] = array holding for a given decay channel k
                    the index m of the parent, i.e. decaying particle:
                    dindex[k] = m


Function Members (Methods)

public:
virtual~PReaction()
voidTObject::AbstractMethod(const char* method) const
Bool_tAddBulk(PBulkInterface* mybulk)
Bool_tAddFileOutput(PFileOutput* file)
Bool_tAddPrologueBulk(PBulkInterface* mybulk)
voidAddReaction(const char* reaction)
voidallParticles()
virtual voidTObject::AppendPad(Option_t* option = "")
voidasciiNo()
voidasciiYes()
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
voidClose()
Bool_tCloseFile()
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
voidDisableWeightReset()
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
Bool_tDo(const char* command)
Bool_tDo(TH1* f, const char* command, Int_t flag = 1)
Bool_tDo(TH2* f, const char* command, Int_t flag = 1)
Bool_tDo(TH3* f, const char* command, Int_t flag = 1)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
int*GetCIndex()
PProjector*GetCurrentProjector()
PDistributionManager*GetDistributionManager()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
PFilter**GetFilter()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
intGetNumAll()
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
PParticle**GetProducts()
Int_tGetReactionId()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
voidInitChannels()
Bool_tInput(TNtuple* f)
Bool_tInput(const char* f, const char* command = "")
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
voidIsInline()
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
intloop(int i = -1, int wf = 0, int verbose = 1)
intLoop(int i = -1, int wf = 0, int verbose = 1)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
PReaction&operator=(const PReaction&)
Bool_tOutput(TNtuple* f, const char* command = (char *)"")
Bool_tOutput(const char* f, const char* command = "")
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
PReaction()
PReaction(const char* filename)
PReaction(const PReaction&)
PReaction(PChannel**, int n = 2, unsigned int ff = 0, TTree* ttree = __null, const char* filename = __null)
PReaction(PChannel**, const char*, int n = 2, int f0 = 1, int f1 = 0, int f2 = 0, int f3 = 0, TTree* ttree = __null)
PReaction(PParticle*, const char* reaction, const char* file_name = __null, Int_t f0 = 1, Int_t f1 = 0, Int_t f2 = 0, Int_t f3 = 0, TTree* ttree = __null)
PReaction(Double_t momentum, const char* beam, const char* target, const char* reaction, const char* file_name = __null, Int_t f0 = 1, Int_t f1 = 0, Int_t f2 = 0, Int_t f3 = 0, TTree* ttree = __null)
PReaction(const char* command, const char* beam, const char* target, const char* reaction, const char* file_name = __null, Int_t f0 = 1, Int_t f1 = 0, Int_t f2 = 0, Int_t f3 = 0, TTree* ttree = __null)
voidPreheating(Int_t num)
virtual voidPrint(const Option_t* delme = __null) const
voidPrintReport() const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidsetDecayAll(Float_t tau = 1.)
voidSetDecayAll(Float_t tau = 1.)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetFilter(int ch_id, PFilter* filter)
voidSetHGeant(int flag)
voidsetHGeant(int flag)
voidSetMaxFileSize(Int_t bytes)
voidSetName(const char*)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPythia(TPythia6* p)
voidSetTrigCond(Int_t n)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetUserAnalysis(Int_t(*)(PParticle**,Int_t) f)
voidSetUserAnalysis(void* f)
voidSetUserSelection(Int_t(*)(PParticle*) f)
voidSetUserSelection(void* f)
voidSetWriteIndex(Bool_t flag)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidtrackedParticles()
virtual voidTObject::UseCurrentStyle()
voidVertexNo()
voidVertexYes()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidConvertFilename()
voidInitLoop()
Int_tIsExtTree()
PParticle*MakeParticle(char* name)
Bool_tparse_script(const char* e, const char* beam, const char* target, const char* reaction, const char* file_name = __null, Int_t f0 = 1, Int_t f1 = 0, Int_t f2 = 0, Int_t f3 = 0, TTree* ttree = __null)
Int_tParseChannel(PParticle* parent, const char* channel, TList& plutoList, Int_t& numChannels)
static voidpassEvent(float, float, float, int, int*, int*, int*, int*, float*, float*, float*, float*, float*, float*, float*, float*)
voidSetReactionId()
voidSetUp(PChannel**)

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
private:
unsigned intHGeant
static intactiveCntnumber of clones for root branches,
unsigned intallPARTICLES
unsigned intasciiOUTPUT
static FILE*asciif
PBulkInterface*bulk[5]
intbulkdecay_pos
PChannel**channel
TArrayIcindex
PProjector*current_projector
unsigned intdecayALL
intdecay_done[10000]
TArrayIdindex
intdoonce
Double_t*event_impact_param
Double_t*event_plane
static TClonesArray*evt[11]
unsigned intextTREE
TPythia6*fPythia! pointer to Pythia object
static const unsigned intff0
static const unsigned intff1
static const unsigned intff2
static const unsigned intff3
static const unsigned intff4
TStringfile1
TStringfile2
TStringfilename
intfileoutput_pos
PFileOutput*files[5]
Int_tfilter_counter[100]
Int_tfilter_keys[100]
Double_t*filter_values[100]
TArrayIftrack
unsigned intgetVERTEX
static Int_tglobalEventCounter
unsigned intinactivate_decayed_particles
Int_tis_inline
intkey_branches[10]
intloop_count
Int_tnMaxBytes
Int_tnTrigCond
intnchan
intnclones
intndpar
intntpar
Int_tnum_filters! Filters from PBatch commands
TStringoriginal_filename
PParticle**particle
PParticle**particle_stack
Int_tpre_heating
PBulkInterface*pro_bulk[5]
intpro_bulkdecay_pos
const char*r_beam
const char*r_target
Int_treactionIdreaction identifier
TStringreaction_string
unsigned intresetCHANNELS
intreset_count
TFile*rootfile
unsigned intropt
intsize_branches
intstacksize
intstatus
PReaction*sub_reaction
Float_ttauMaxmax lifetime for decay (see decayALL option)
TTree*tree
Int_t(*)(PParticle**,Int_t)userAnalysis! pointer to analysis function
Int_t(*)(PParticle*)userSelection! pointer to selection function
Double_t*vertex_x
Double_t*vertex_y
Double_t*vertex_z
Int_tweight_reset
Double_t*weight_version
unsigned intwriteINDEX

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

PReaction(PChannel** , const char* , int n = 2, int f0 = 1, int f1 = 0, int f2 = 0, int f3 = 0, TTree* ttree = __null)
 Reaction constructor by pointer to array of pointers to Channels,
 output file name (see below), options (see below), pointer to external event tree
 (if called from the decay manager).
 Options:
   f0: 0=Tracked, 1=All particles in ROOT output file_name.root
   f1: unused
   f2: 0=Do not calculate, 1=Calculate production vertices for product particles
   f3: 0=Do not produce, 1=Produce GEANT ascii output file_name.evt (tracked particles always)

   Format of the ASCII output in file_name.evt:
   EvSeqNb NumPart Ebeam bPar phiEv flag <== number of particles in event
   E1 px1  py1  pz1  ID1  weight1      <-- 3-momentum components in GeV/c,
   E2 px2  py2  pz2  ID2  weight2        <-- GEANT particle ID,
   E3 px3  py3  pz3  ID3  weight3          <-- weight
   .    .    .    .   .    .   .   .   .   .  .   .

 See also PProjector/PBatch for additional conventions if filters are used.

PReaction()
PReaction(PChannel** , int n = 2, unsigned int ff = 0, TTree* ttree = __null, const char* filename = __null)
 same as above, but passing one unsigned int as flag
 position of arguments shuffled to break ambiguity with previous constructor
PReaction(Double_t momentum, const char* beam, const char* target, const char* reaction, const char* file_name = __null, Int_t f0 = 1, Int_t f1 = 0, Int_t f2 = 0, Int_t f3 = 0, TTree* ttree = __null)
 build reaction completely from descriptor string
PReaction(const char* command, const char* beam, const char* target, const char* reaction, const char* file_name = __null, Int_t f0 = 1, Int_t f1 = 0, Int_t f2 = 0, Int_t f3 = 0, TTree* ttree = __null)
 build reaction completely from descriptor string
Bool_t parse_script(const char* e, const char* beam, const char* target, const char* reaction, const char* file_name = __null, Int_t f0 = 1, Int_t f1 = 0, Int_t f2 = 0, Int_t f3 = 0, TTree* ttree = __null)
 Build "reaction" completely from descriptor string  (author: V. Hejny)
 For "command, the batch script syntax is supported
 to set the beam parameters. The following variables
 can be used:
 _T1, _T2, _P1, _P2 as kinetic beam energy/momentum
 for the beam/target (in GeV), and
 _theta1, _theta2, _phi as beam inclination (in rad).
 It should be mentioned, that for the target, the
 notation is opposite, i.e. theta2 has the opposite
 rotation as theta1, and T2 goes into the opposite
 direction as T1

 If no variable is used, only T1 as the beam energy is
 assumed

 Examples:
 "2.2"               -> Beam energy is 2.2 GeV
 "_T1=1.5; _T2=1.2"  -> Collider experiment
 "_T1=1.5; _theta=2*TMath::DegToRad();"
                     -> Beam inclination of 2 deg
PReaction(PParticle* , const char* reaction, const char* file_name = __null, Int_t f0 = 1, Int_t f1 = 0, Int_t f2 = 0, Int_t f3 = 0, TTree* ttree = __null)
 build reaction completely from descriptor string  (author: V. Hejny)
void AddReaction(const char* reaction)
void ConvertFilename(void)
~PReaction()
 Reaction destructor
PParticle * MakeParticle(char* name)
    cout << name << endl;
Int_t ParseChannel(PParticle* parent, const char* channel, TList& plutoList, Int_t& numChannels)
 parse reaction descriptor string  (author: V. Hejny)
Bool_t AddBulk(PBulkInterface* mybulk)
Add a bulk interface to the list
Each bulk object will be executed during the event loop
after the normal decay
Bool_t AddPrologueBulk(PBulkInterface* mybulk)
Add a bulk interface to the list
Each bulk object will be executed during the event loop
before the normal decay
void SetReactionId()
 compute the reaction id from the list of product ids of 1st channel
 (to be used in SetUp() as sourceId)
void SetUp(PChannel** )
 get the channels and particles, identify the physics, set up the defaults.
void InitChannels()
void SetName(const char* )
 Sets up output file names
void InitLoop()
 resets the dynamical objects of the reaction, creates tree and opens output files
int Loop(int i = -1, int wf = 0, int verbose = 1)
 Simulate "nevents" events
void SetFilter(int ch_id, PFilter* filter)
outdated
void Close()
 close root output file
void PrintReport() const
void Print(const Option_t* delme = __null) const
void SetUserSelection(void* f)
void SetUserAnalysis(void* f)
PReaction()
PReaction(const char* filename)
int loop(int i = -1, int wf = 0, int verbose = 1)
kept for backward compatibility
int GetNumAll()
 number of events to simulate
{ return ndpar; }
int * GetCIndex()
 returns number of all the particles in the reaction
void VertexYes()
 returns product channel index
void VertexNo()
 turn off vertex calculation after initialization
void allParticles()
 put all particles on root file after initialization
void trackedParticles()
 put tracked particles on root file file after initialization
void asciiYes()
 enable ascii output for GEANT after initialization
void asciiNo()
 disable ascii output for GEANT after initialization
PParticle ** GetProducts()
 sets up output file names
{ return particle_stack; }
PFilter ** GetFilter()
 This function is invoked by the Filter class. It directs loop to
 impose a filter at address (*filter) following the decay represented
 by the reaction Channel number ch_id. See also PFilter.
{ return NULL; }
void SetHGeant(int flag)
 close root output file
{HGeant = (flag!=0);}
void setHGeant(int flag)
 from the HGeant prompt
{SetHGeant(flag);}
void SetUserSelection(Int_t(*)(PParticle*) f)
void SetUserAnalysis(Int_t(*)(PParticle**,Int_t) f)
void SetTrigCond(Int_t n)
{nTrigCond = n;}
void setDecayAll(Float_t tau = 1.)
SetDecayAll(Float_t tau = 1.)
pl-> SetPythia(TPythia6* p)
void SetMaxFileSize(Int_t bytes)
{nMaxBytes = bytes;}
void SetWriteIndex(Bool_t flag)
void DisableWeightReset()
Int_t GetReactionId()
{ return reactionId; }
PDistributionManager * GetDistributionManager(void)
Bool_t AddFileOutput(PFileOutput* file)
Bool_t Do(const char* command)
return GetCurrentProjector()
Bool_t Do(TH1* f, const char* command, Int_t flag = 1)
Bool_t Do(TH2* f, const char* command, Int_t flag = 1)
Bool_t Do(TH3* f, const char* command, Int_t flag = 1)
Bool_t Output(TNtuple* f, const char* command = (char *)"")
Bool_t Input(TNtuple* f)
Bool_t Output(const char* f, const char* command = "")
Bool_t Input(const char* f, const char* command = "")
Bool_t CloseFile(void)
void Preheating(Int_t num)
void IsInline(void)
pure inline PReaction, e.g. FAIRROOT
Int_t IsExtTree()
 resets the dynamical objects of the reaction and opens files
{ return extTREE; }
void passEvent(float , float , float , int , int* , int* , int* , int* , float* , float* , float* , float* , float* , float* , float* , float* )
 ascii file