CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDecayBase.hh
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtGen/EvtDecayBase.hh
12//
13// Description:
14//
15// Modification history:
16//
17// DJL/RYD August 11, 1998 Module created
18//
19//------------------------------------------------------------------------
20
21#ifndef EVTDECAYBASE_HH
22#define EVTDECAYBASE_HH
23
25#include "EvtGenBase/EvtId.hh"
26#include <string>
28#include <stdlib.h>
29#include <vector>
30class EvtParticle;
31class EvtSpinType;
32
34 public:
35
36 //These pure virtual methods has to be implemented
37 //by any derived class
38 virtual void getName(std::string& name)=0;
39 virtual void decay(EvtParticle *p)=0;
40 virtual void makeDecay(EvtParticle *p)=0;
41 virtual EvtDecayBase* clone()=0;
42
43
44 //These virtual methods can be implemented by the
45 //derived class to implement nontrivial functionality.
46 virtual void init();
47 virtual void initProbMax();
48 virtual std::string commandName();
49 virtual void command(std::string cmd);
50
51
52 double getProbMax( double prob );
53 double resetProbMax( double prob );
54
56 virtual ~EvtDecayBase();
57
58 virtual bool matchingDecay(const EvtDecayBase &other) const;
59
60 EvtId getParentId() {return _parent;}
61 double getBranchingFraction() {return _brfr;}
62 void disableCheckQ() {_chkCharge=0;};
63 void checkQ();
64 int getNDaug() {return _ndaug;}
65 EvtId* getDaugs() {return _daug;}
66 EvtId getDaug(int i) {return _daug[i];}
67 int getNArg() {return _narg;}
68 int getPHOTOS() {return _photos;}
69 void setPHOTOS() {_photos=1;}
70 void setVerbose() {_verbose=1;}
71 void setSummary() {_summary=1;}
72 double* getArgs();
73 std::string* getArgsStr() {return _args;}
74 double getArg(int j);
75 std::string getArgStr(int j) {return _args[j];}
76 std::string getModelName() {return _modelname; }
77 int getDSum() {return _dsum; }
78 int summary() {return _summary; }
79 int verbose() {return _verbose; }
80
81 void saveDecayInfo(EvtId ipar, int ndaug,EvtId *daug,
82 int narg, std::vector<std::string>& args,
83 std::string name, double brfr);
84 void printSummary();
85
86
87 //Does not really belong here but I don't have a better place.
88 static void findMasses(EvtParticle *p, int ndaugs,
89 EvtId daugs[10], double masses[10]);
90 static void findMass(EvtParticle *p);
91 static double findMaxMass(EvtParticle *p);
92
93 //Methods to set the maximum probability.
94 void setProbMax(double prbmx);
95 void noProbMax();
96
97 void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1);
98 void checkNDaug(int d1, int d2=-1);
99
102
103 // lange - some models can take more daughters
104 // than they really have to fool aliases (VSSBMIX for example)
105 virtual int nRealDaughters() { return _ndaug;}
106
107protected:
108
111
112private:
113
114
115 int _photos;
116 int _ndaug;
117 EvtId _parent;
118 int _narg;
119 EvtId *_daug;
120 double *_argsD;
121 std::string *_args;
122 std::string _modelname;
123 double _brfr;
124 int _dsum;
125 int _summary;
126 int _verbose;
127
128
129 int defaultprobmax;
130 double probmax;
131 int ntimes_prob;
132
133 //Should charge conservation be checked when model is
134 //created? 1=yes 0 no.
135 int _chkCharge;
136
137
138 //These are used for gathering statistics.
139 double sum_prob;
140 double max_prob;
141
142};
143
144#endif
145
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
virtual void decay(EvtParticle *p)=0
double getArg(int j)
virtual EvtDecayBase * clone()=0
std::string * getArgsStr()
virtual ~EvtDecayBase()
double resetProbMax(double prob)
void setProbMax(double prbmx)
virtual void init()
static void findMass(EvtParticle *p)
virtual bool matchingDecay(const EvtDecayBase &other) const
virtual void getName(std::string &name)=0
void disableCheckQ()
static double findMaxMass(EvtParticle *p)
std::string getModelName()
EvtId getParentId()
void printSummary()
void saveDecayInfo(EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
virtual int nRealDaughters()
virtual void command(std::string cmd)
double * getArgs()
double getProbMax(double prob)
virtual void makeDecay(EvtParticle *p)=0
double getBranchingFraction()
static void findMasses(EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
virtual void initProbMax()
bool daugsDecayedByParentModel()
virtual std::string commandName()
void setSummary()
bool _daugsDecayedByParentModel
EvtId getDaug(int i)
void setVerbose()
std::string getArgStr(int j)
Definition EvtId.hh:27