(UNKNOWN PRODUCT) » INCLUDE » PDecayManager

class PDecayManager: public TObject

  PDecayManager

  Author:   Volker Hejny
  Written:  Sep. 99
  Revised:  21.03.05 RH (writing parent indices to ascii file implemented)
  Revised:  10.12.04 RH (beam smearing/skewing implemented)
  Revised:  28.08.03 RH (random decays implemented)
  Revised:  04.07.03 RH (adjusted for multiple Root files: 1.9Gb limit!)
  Revised:  15.12.00 RH (adjustments for Pythia decay routines)
  Revised:  26.09.00 R. Holzmann (adjusted to gcc 2.95.2 20000220)
  Revised:  08.08.00 R. Holzmann (weight treatment fixed)
  Revised:  21.06.00 MK (adjustments for decay modes from PData)
  Revised:  14.04.00 R. Holzmann (minor adjustments for
                                  PFireball and HGeant operation)
  Revised:  27.07.07 IF: Changes for the new framework,
                         Removed beam smearing as covered by the Distr.Manager

  The purpose of PDecayManager is to produce a set of possible
  decay branches of a initial particle using a list of particle
  decay modes. The list of decay modes is empty by default. The
  user has to take care about the filling of this list. This can
  be done using the defaults supplied by this file (at end) or
  by hand.



  The following templates and the class PReactionList are
  private members of PDecayManager, but I due to problems using
  ClassImp() and ClassDef() with nested classes, they are not
  derived from TObject and not known inside ROOT. The members are
  all public for better use inside PDecayManager.

  template<class T> class PNextList
    It implements a linked list of pointers to object T. All elements
    of this templates are public. The destructor does not imply a
    delete of the object T itself. If this is wanted -> use member
    function Delete().

    T 	 *Curr;		// pointer to object T
    PNextList  *Next;		// pointer to next list node

    PNextList();		// standard constructor
    PNextList(T*);		// initalized with object T
    ~PNextList();		// standard destructor

    void Add(T*);		// add object T to list
    void Delete();            // delete the objects T in the list


  template<class T> class PStack
    It implements a last-in-first-out standard stack via a single linked
    list. Additionally the number of objects is counted. All elements
    are public.

    PNextList<T>	*top;	// pointer to top node
    Int_t		Count;	// number of elements in the stack

    PStack();			// standarad constructor
    ~PStack();		// the destructor deletes the nodes
				// starting at top node, but not the
				// objects T itself.

    void Push(T*);
    T *Pop();			// standard stack operators

    PStack<T> *Clone(PStack<T> *UseThis);
				// returns a pointer to a clone of the stack.
 				// either an existing, empty stack is used
				// (giving UseThis as an optional argument)
				// or a new stack is constructed internally.


  class PReactionList
    It implements two connected stacks of PChannel objects to organize
    the already processed decay channels and the work to do.
    'Processed' means that all possible decay channels of the daughter
    particles have been put on the ToDo stack.
    The variable ReactionWeight contains the overall weight of
    this specific channel. All elements of this class are public.

    PStack<PChannel> 	*Finished;	// channels already looked at
    PStack<PChannel> 	*ToDo;		// decays to be done
    Double_t		ReactionWeight;	// overall branching ratio
    Int_t		ID;		// serial number of this object
    static Int_t	maxID;		// maximum serial number

    PReactionList();
    ~PReactionList(); 		// again: deletes only the stacks,
					// not the objects in it.
    PReactionList *Clone(); 		// doubles the whole PReactionList
					// returning a pointer to the
					// new one.



Function Members (Methods)

public:
virtual~PDecayManager()
voidTObject::AbstractMethod(const char* method) const
Bool_tAddBulk(PBulkInterface* mybulk)
voidAddChannel(Int_t id, PDecayChannel* n)
voidAddChannel(PParticle* p, PDecayChannel* n)
voidAddChannel(const char* p, PDecayChannel* n)
Bool_tAddFileOutput(PFileOutput* file)
Bool_tAddPrologueBulk(PBulkInterface* mybulk)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
voidClear(Int_t id)
voidClear(PParticle* p)
virtual voidClear(const Option_t* delme = __null)
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
voidDisableHelicityAngle()
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
Bool_tDo(const char* command)
Bool_tDo(TH1F* f, char* command)
Bool_tDo(TH2F* f, char* command)
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
PDecayChannel*GetChannel(Int_t id) const
PDecayChannel*GetChannel(PParticle* p) const
PDecayChannel*GetChannel(char* n) const
PProjector*GetCurrentProjector()
Double_tGetCurrentWeight()
PDistributionManager*GetDistributionManager()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
PReaction*GetNextReaction(const char* name, int f0 = 0, int f1 = 0, int f2 = 0, int f3 = 0, TTree* tt = __null)
PReaction*GetNextReaction(int wf, const char* name, int f0 = 0, int f1 = 0, int f2 = 0, int f3 = 0, TTree* tt = __null)
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
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
voidInitReaction(PParticle* start, PDecayChannel* c1 = __null)
Bool_tInput(TNtuple* f)
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
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
Int_tLoop(int num, int wf, const char* name, int f0 = 0, int f1 = 0, int f2 = 0, int f3 = 0, int rf = 0)
Int_tloop(int num, int wf, const char* name, int f0 = 0, int f1 = 0, int f2 = 0, int f3 = 0, int rf = 0)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
voidMyClear(char*)
voidMyPrint() const
voidMyPrint(char* name) 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)
PDecayManager&operator=(const PDecayManager&)
Bool_tOutput(TNtuple* f, char* command = (char *)"")
virtual voidTObject::Paint(Option_t* option = "")
PDecayManager()
PDecayManager(const PDecayManager&)
virtual voidTObject::Pop()
virtual voidPrint(const Option_t* delme = __null) const
voidPrint(Int_t id) const
voidPrint(PParticle* p) const
voidPrintReactionList() 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.)
voidSetDefault(Int_t id, Int_t recursive = 0)
voidSetDefault(PParticle* p, Int_t recursive = 0)
voidSetDefault(const char* p, Int_t recursive = 0)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetHGeant(Int_t fH)
voidSetMaxFileSize(Int_t bytes)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPythia(TPythia6* p)
voidSetTrigCond(Int_t n)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetUserSelection(void* f)
voidSetUserSelection(Int_t(*)(PParticle*) f)
voidSetVerbose(Int_t v = 1)
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
virtual voidTObject::UseCurrentStyle()
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:
voidConstructPChannel(PParticle* p, PDecayChannel* c1, PReactionList* RL, Int_t CopyFlag = 0)
const char*GetName(Int_t id) const
voidPrintChain(PParticle* p, PChannel** l, Int_t c, ostream& os) const
voidPrintReactionListEntry(PReactionList*, ostream& os) const

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:
PReaction*CurrentReactionpointer to currently used PReaction
PNextList<PReactionList>*CurrentReactionListPointerpointer to the currently active decay branch
Int_tCurrentReactionNumberserial number of currently active reaction
Double_tCurrentWeightweight of currently active reaction
PChannel**ListForReactionused for PReaction
Int_tNumberOfReactionsnb of reactions in ReactionList
PNextList<PReactionList>*ReactionListcollection of all possible decay branches
PNextList<PChannel>*UsedChannelssame for used channels
PNextList<PParticle*>*UsedParticleArrayssame for particle arrays
PNextList<PParticle>*UsedParticlescollection of used particles to delete them later on
PBulkInterface*bulk[5]
intbulkdecay_pos
PProjector*current_projector
Int_tdecaychannel_paramparam for all known particle decay modes
Bool_tfHGeantset if PLUTO runs in HGeant
TPythia6*fPythiapointer to Pythia object
Bool_tfWriteIndexwrite parent indices out, if set
intfileoutput_pos
PFileOutput*files[5]
Int_tmaxFileSize
Int_tnTrigCondtrigger multiplicity
PDistributionManager*pdist
PBulkInterface*pro_bulk[5]
intpro_bulkdecay_pos
Float_ttauMax
void*userSelectionselection function
Int_tverboseverbose flag (0/1)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

PDecayManager()
~PDecayManager()
void SetVerbose(Int_t v = 1)
 Setting verbose flag to optional parameter v. Omitting 'v' switches
 on verbose option.
void AddChannel(Int_t id, PDecayChannel* n)
 Adds a specific PDecayChannel 'n' to the particle with ID 'id'.
void AddChannel(PParticle* p, PDecayChannel* n)
 Adds a specific PDecayChannel 'n' to the particle represented by a
 pointer to a PParticle object.
void AddChannel(const char* p, PDecayChannel* n)
 Adds a specific PDecayChannel 'n' to the particle represented just
 by its name.
PDecayChannel * GetChannel(Int_t id) const
 Returns a pointer to PDecayChannel for the particle with the ID 'id.'
PDecayChannel * GetChannel(PParticle* p) const
 Returns a pointer to PDecayChannel for the particle represented by a
 pointer to a PParticle object.
PDecayChannel * GetChannel(char* n) const
 Returns a pointer to PDecayChannel for the particle represented
 by its name.
void SetDefault(Int_t id, Int_t recursive = 0)
 Sets the default decay branches for the particle with ID 'id'.
void SetDefault(PParticle* p, Int_t recursive = 0)
 Sets the default decay branches for the particle represented by a
 a pointer to a PParticle object.
void SetDefault(const char* p, Int_t recursive = 0)
 Sets the default decay branches for the particle represented by its
 name.
void Clear(Int_t id)
 Deletes the current list of decay branches for the particle with the
 ID 'id'. This is necessary when one wants to introduce a new set
 of branches to a particle. The SetDefault() functions are calling
 this function automatically.
void Clear(PParticle* p)
 Deletes the current list of decay branches for the particle represented
 by a pointer to a PParticle object.
void MyClear(char* )
 Deletes the current list of decay branches for the particle represented
 by its name.
void InitReaction(PParticle* start, PDecayChannel* c1 = __null)
 This function calculates the whole tree of decay branches of particle
 'start'. If there is a 'CurrentChannel' given, the initial branches
 are fetched from this PDecayChannel. Otherwise the information is
 used, which has been added by AddChannel() or SetDefault() calls.
 Calling this function is mandatory as an initialization step
 before producing any data.
void ConstructPChannel(PParticle* p, PDecayChannel* c1, PReactionList* RL, Int_t CopyFlag = 0)
 This function is used internally inside InitReaction(). For one
 given parent particle 'p' and PDecayChannel 'c1' it constructs
 a PChannel and puts it in the ToDo stack of the PReactionList *RL.
    cout << "***enter for  " << p->ID() << endl;
 multiplying all the channel weights
PReaction * GetNextReaction(int wf, const char* name, int f0 = 0, int f1 = 0, int f2 = 0, int f3 = 0, TTree* tt = __null)
 GetNextReaction() looks for the next decay tree in 'ReactionList'
 and constructs a new PReaction. If the weight flag 'wf' is set,
 the channel weight is copied to the parent particle of the first
 PChannel. This results in equal statistics of all channels.
 The options are passed to the appropriate PReaction constructor.

 Normally this routine is called internally from the loop() function.
PReaction * GetNextReaction(const char* name, int f0 = 0, int f1 = 0, int f2 = 0, int f3 = 0, TTree* tt = __null)
 This call sets the weight flag to zero and is obsolete.
Int_t Loop(int num, int wf, const char* name, int f0 = 0, int f1 = 0, int f2 = 0, int f3 = 0, int rf = 0)
 This is the standard call to process all possible reaction channels
 of the reaction set up before.
 The total number of events given as the first argument are used
 as a 'equivalent number'. It reflects the sum of weights to
 get a proper normalization between the single channels. If the
 weight flag 'wf' is set, the channel probability is also put
 into this weight. This results in equal statistics for each channel.
 The other parameters are the same as for the PReaction::loop() call.
 The real number of events is returned.
Double_t GetCurrentWeight()
 Returns the weight of the current reaction channel.
void MyPrint() const
 Prints the particle decay list.
void Print(Int_t id) const
 Prints the decay channels of the given particle (specified by its id).
void Print(PParticle* p) const
 Prints the decay channels of the given particle (specified by a pointer
 to a PParticle).
void MyPrint(char* name) const
 Prints the decay channels of the given particle (specified by its name).
void PrintReactionList() const
 Prints the current reaction list
void PrintReactionListEntry(PReactionList* , ostream& os) const
 Prints one entry of the reaction list (used internally).
void PrintChain(PParticle* p, PChannel** l, Int_t c, ostream& os) const
 Prints one reaction chain (used internally).
const char * GetName(Int_t id) const
 Returns the name of a particle (specified by its id).
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
PDecayManager()
void Clear(Int_t id)
 clear the channel
Int_t loop(int num, int wf, const char* name, int f0 = 0, int f1 = 0, int f2 = 0, int f3 = 0, int rf = 0)
void Print(const Option_t* delme = __null) const
 prints out the decay channel list
void SetHGeant(Int_t fH)
void SetUserSelection(void* f)
void SetUserSelection(Int_t(*)(PParticle*) f)
void SetTrigCond(Int_t n)
void SetPythia(TPythia6* p)
void SetMaxFileSize(Int_t bytes)
void SetDecayAll(Float_t tau = 1.)
void DisableHelicityAngle(void)
PDistributionManager * GetDistributionManager(void)
void SetWriteIndex(Bool_t flag)
Bool_t AddFileOutput(PFileOutput* file)
Bool_t Do(const char* command)
return GetCurrentProjector()
Bool_t Do(TH1F* f, char* command)
Bool_t Do(TH2F* f, char* command)
Bool_t Output(TNtuple* f, char* command = (char *)"")
Bool_t Input(TNtuple* f)