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.
virtual | ~PDecayManager() |
void | TObject::AbstractMethod(const char* method) const |
Bool_t | AddBulk(PBulkInterface* mybulk) |
void | AddChannel(Int_t id, PDecayChannel* n) |
void | AddChannel(PParticle* p, PDecayChannel* n) |
void | AddChannel(const char* p, PDecayChannel* n) |
Bool_t | AddFileOutput(PFileOutput* file) |
Bool_t | AddPrologueBulk(PBulkInterface* mybulk) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
void | Clear(Int_t id) |
void | Clear(PParticle* p) |
virtual void | Clear(const Option_t* delme = __null) |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual void | TObject::Copy(TObject& object) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
void | DisableHelicityAngle() |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
Bool_t | Do(const char* command) |
Bool_t | Do(TH1F* f, char* command) |
Bool_t | Do(TH2F* f, char* command) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::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_t | GetCurrentWeight() |
PDistributionManager* | GetDistributionManager() |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::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_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TObject::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
void | InitReaction(PParticle* start, PDecayChannel* c1 = __null) |
Bool_t | Input(TNtuple* f) |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
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) |
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) |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
void | MyClear(char*) |
void | MyPrint() const |
void | MyPrint(char* name) const |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
void | TObject::operator delete(void* ptr) |
void | TObject::operator delete(void* ptr, void* vp) |
void | TObject::operator delete[](void* ptr) |
void | TObject::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_t | Output(TNtuple* f, char* command = (char *)"") |
virtual void | TObject::Paint(Option_t* option = "") |
PDecayManager() | |
PDecayManager(const PDecayManager&) | |
virtual void | TObject::Pop() |
virtual void | Print(const Option_t* delme = __null) const |
void | Print(Int_t id) const |
void | Print(PParticle* p) const |
void | PrintReactionList() const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
void | SetDecayAll(Float_t tau = 1.) |
void | SetDefault(Int_t id, Int_t recursive = 0) |
void | SetDefault(PParticle* p, Int_t recursive = 0) |
void | SetDefault(const char* p, Int_t recursive = 0) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
void | SetHGeant(Int_t fH) |
void | SetMaxFileSize(Int_t bytes) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | SetPythia(TPythia6* p) |
void | SetTrigCond(Int_t n) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | SetUserSelection(void* f) |
void | SetUserSelection(Int_t(*)(PParticle*) f) |
void | SetVerbose(Int_t v = 1) |
void | SetWriteIndex(Bool_t flag) |
virtual void | ShowMembers(TMemberInspector& insp) const |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
void | ConstructPChannel(PParticle* p, PDecayChannel* c1, PReactionList* RL, Int_t CopyFlag = 0) |
const char* | GetName(Int_t id) const |
void | PrintChain(PParticle* p, PChannel** l, Int_t c, ostream& os) const |
void | PrintReactionListEntry(PReactionList*, ostream& os) const |
static TObject::(anonymous) | TObject::kBitMask | |
static TObject::EStatusBits | TObject::kCanDelete | |
static TObject::EStatusBits | TObject::kCannotPick | |
static TObject::EStatusBits | TObject::kHasUUID | |
static TObject::EStatusBits | TObject::kInvalidObject | |
static TObject::(anonymous) | TObject::kIsOnHeap | |
static TObject::EStatusBits | TObject::kIsReferenced | |
static TObject::EStatusBits | TObject::kMustCleanup | |
static TObject::EStatusBits | TObject::kNoContextMenu | |
static TObject::(anonymous) | TObject::kNotDeleted | |
static TObject::EStatusBits | TObject::kObjInCanvas | |
static TObject::(anonymous) | TObject::kOverwrite | |
static TObject::(anonymous) | TObject::kSingleKey | |
static TObject::(anonymous) | TObject::kWriteDelete | |
static TObject::(anonymous) | TObject::kZombie |
PReaction* | CurrentReaction | pointer to currently used PReaction |
PNextList<PReactionList>* | CurrentReactionListPointer | pointer to the currently active decay branch |
Int_t | CurrentReactionNumber | serial number of currently active reaction |
Double_t | CurrentWeight | weight of currently active reaction |
PChannel** | ListForReaction | used for PReaction |
Int_t | NumberOfReactions | nb of reactions in ReactionList |
PNextList<PReactionList>* | ReactionList | collection of all possible decay branches |
PNextList<PChannel>* | UsedChannels | same for used channels |
PNextList<PParticle*>* | UsedParticleArrays | same for particle arrays |
PNextList<PParticle>* | UsedParticles | collection of used particles to delete them later on |
PBulkInterface* | bulk[5] | |
int | bulkdecay_pos | |
PProjector* | current_projector | |
Int_t | decaychannel_param | param for all known particle decay modes |
Bool_t | fHGeant | set if PLUTO runs in HGeant |
TPythia6* | fPythia | pointer to Pythia object |
Bool_t | fWriteIndex | write parent indices out, if set |
int | fileoutput_pos | |
PFileOutput* | files[5] | |
Int_t | maxFileSize | |
Int_t | nTrigCond | trigger multiplicity |
PDistributionManager* | pdist | |
PBulkInterface* | pro_bulk[5] | |
int | pro_bulkdecay_pos | |
Float_t | tauMax | |
void* | userSelection | selection function |
Int_t | verbose | verbose flag (0/1) |
Adds a specific PDecayChannel 'n' to the particle with ID 'id'.
Adds a specific PDecayChannel 'n' to the particle represented by a pointer to a PParticle object.
Adds a specific PDecayChannel 'n' to the particle represented just by its name.
Returns a pointer to PDecayChannel for the particle with the ID 'id.'
Returns a pointer to PDecayChannel for the particle represented by a pointer to a PParticle object.
Returns a pointer to PDecayChannel for the particle represented by its name.
Sets the default decay branches for the particle with ID 'id'.
Sets the default decay branches for the particle represented by a a pointer to a PParticle object.
Sets the default decay branches for the particle represented by its name.
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.
Deletes the current list of decay branches for the particle represented by a pointer to a PParticle object.
Deletes the current list of decay branches for the particle represented by its name.
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.
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
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.
This call sets the weight flag to zero and is obsolete.
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.
Prints the decay channels of the given particle (specified by a pointer to a PParticle).
Prints the decay channels of the given particle (specified by its name).
Prints one entry of the reaction list (used internally).
Prints one reaction chain (used internally).