Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:09:47

0001 #ifndef AMEGIC_Phasespace_Channel_Generator_H
0002 #define AMEGIC_Phasespace_Channel_Generator_H
0003 
0004 #include "AMEGIC++/Phasespace/Channel_Generator_Base.H"
0005 
0006 
0007 namespace AMEGIC {
0008 
0009 typedef std::map<std::string,std::string> Decls;
0010   
0011   typedef std::vector<std::string> String_List;
0012 
0013   class Channel_Generator : public Channel_Generator_Base {
0014     Decls declarations;
0015     
0016     int         extrachannelflag,newchannel;
0017     int         tcount,acount,m_aid;
0018     String_List m_idc;
0019     std::string m_idstr;
0020 
0021     void        Step0(int,Point *,int&,std::ofstream&,ATOOLS::Flavour*,int&);
0022     bool        StepS(int,Point *,int&,std::ofstream&,ATOOLS::Flavour*,int&);
0023     void        StepNT(int,int,Point *,int&,std::ofstream& sf,ATOOLS::Flavour*,int&);
0024     void        SingleTStep(int,std::string*,Point **,int,int&,std::ofstream&,int,
0025                 String_List,String_List,String_List,String_List);
0026 
0027     void        GenerateMasses(int,Point **,int,int&,std::ofstream&);
0028     std::string LinkedMasses(Point *);
0029     void        SetProps(Point *,Point **,Point **,int&);
0030     void        CalcSmin(int,const char*,std::string,std::ofstream&,Point*);
0031     void        CalcTSmin(int,String_List&,std::ofstream&);
0032     void        IdentifyProps(Point *);
0033     void        BackLinks(Point *,Point * &);
0034     void        InitT(Point *);
0035     bool        Massive(ATOOLS::Flavour fl) { return (fl.Mass()!=0.) ? 1:0; }
0036     std::string Order(std::string);
0037     std::string IString(int);
0038     void        AddToVariables(int,const std::string&,const std::string&,const int&,std::ofstream&); 
0039     void        ClearDeclarations() { declarations.clear(); } 
0040     double      PMassSum(Point*,std::vector<int>*);
0041   public:
0042     Channel_Generator(int,int,Point *,int);
0043     ~Channel_Generator();
0044     int         MakeChannel(int&,int,std::string&,std::string&);
0045     Point     * GetPointlist()             { return plist; }
0046     std::string CreateChannelID(int);
0047   };
0048       //! The usual identifiers, number of incoming and outgoing legs.
0049     /*!
0050       This is a point list, i.e. a copy of the point list of the amplitude for
0051       which this channel is constructed. The copy is done with help of the class
0052       topology.
0053     */
0054     /*!
0055       The number of t-channel propagators helps in selecting the correct "principal"
0056       topology. This number is deterimined via the method IdentifyProps.
0057       Actually this might help also for efficient ISR channels in non-s channel
0058       cases later on.
0059     */
0060     /*!
0061       Step0 basically plays the role of distributing the different basic topologies for the final 
0062       state integral. Depending on tcount, the number of t-channel propagators in the amplitude,
0063       StepS (0 t's) or StepNT is called, for both the "Momenta"- and the "Weight"-mode. For StepS 
0064       some initialization work is done in Step0, mainly bacause StepS is called by the other 
0065       channels as well and because the invariant mass of the propagator in the s-channel has to 
0066       be known then.
0067     */
0068 
0069     /*!
0070       StepS initializes - if need be - the two invariant masses of the decay products by suitable 
0071       propagator terms via GenerateMasses. Then it decides on the decay type, either
0072       anisotropic or isotropic, depending on the flavour constellation.
0073       Finally it calls StepS for its decay products.
0074     */
0075     /*!
0076       StepNT is the start of a recursive method to fill multiple T-channels. Assume you have a 
0077       _ _ _    "comb-like structure", StepNT treats it by deciding which point is which type, 
0078       | | | |  s- or t-channel via SetProps. Via GenerateMasses the s-channel props receive 
0079       | | | |  their masses. However, StepNT then defines four vectors of legs, two incoming 
0080                and two outgoing each. Starting from the edges of the comb, either the left- 
0081       or the right-most s-channel prop and all the other s-channel props are treated as two 
0082       outgoing partner for a single t-channel. The single s-channel will be treated as belonging 
0083       to an incoming leg to continue to distribute the bulk of all the other s-channel 
0084       props in the next recursion step.
0085       This recursion, shuffling one s-channel leg into one incoming leg per step, is doen by 
0086       SingleTStep.
0087     */
0088     /*!
0089       SingleTStep initializes phase space boundaries and calls then a propagator structure 
0090       peaking at smin for the bulk of s-channel particles. Having two outgoing masses, the 
0091       TChannel method - Momenta or Weight - is called. Then a new s-channel prop to be singled
0092       out is selected.
0093     */
0094     /*!
0095       For a number of points, GenerateMasses defines the minimal invariant masses. It then works 
0096       consecutively and tries to find a sequence of propagators to be set such that the more 
0097       resonating a propagator is the earlier its mass will be selected to maximise the chance
0098       of it contributing significantly.
0099     */
0100     /*!
0101       Linked masses proceeds iterativley from a given point and creates a string that consists of 
0102       all numbers of outgoing particles that are off-springs of this point.
0103     */
0104     /*!
0105       SetProps selects t- and s-channel propagators in comb-like structures.
0106     */
0107     /*!
0108       CalcSmin determines the minimal invariant mass for a single propagator, defined by the sum 
0109       of the minimal invariant masses of all pairs of offsprings.
0110     */
0111     /*!
0112       CalcTSmin calculates the minimal invariant mass for a bulk of propagators 
0113       that has been already equipped with invariant masses.
0114     */
0115     /*!
0116       IdentifyProps checks for t-channel propagators.
0117       Starting by setting all t-flags in the points to zero via InitT, it first initializes the 
0118       previous-links in the points via BackLinks until it finds the second incoming endpoint 
0119       (with b=-1). Starting from there it walks over the previos links setting all
0120       t-flags on the way and incrementing the t-channel prop-counter step by step.
0121     */
0122     /*!
0123       A simple check whether a specific flavour is massive or not.
0124     */
0125 
0126     /*
0127       void    SetDouble(std::string,double);
0128       double  GetDouble(std::string);
0129       void    SetVector(std::string,Vec4D);
0130       Vec4D   GetVector(std::string);
0131       void    Clean();
0132       void    PrintSettings();
0133       ostream Translate(ATOOLS::Flavour);
0134     */
0135     /*!
0136       Copies the pointlist to make sure that we can work on it, identifies the types of 
0137       intermediate lines - whether they are s- or t-channel.
0138     */
0139     /*!
0140       This is the method seen from outside to initalize the channel in the library. It basically 
0141       produces the C-file of the channel and the methods of the file are initialized. MakeChannel 
0142       is called with a counters for the amplitude. 
0143       The individual methods, basically Weight and Momenta are filled by calling the method Step0 
0144       with different flags to switch in their respective "Momenta"- or "Weight"-mode. A counter 
0145       max_numb is passed through all these methods to count and collect the resonant propagators and 
0146       their flavours. Havong done that, with flag = 2, Step0 is passed again to fill in the
0147       ISRtype method. There, if tcount = 0, the isrtype will be set to 1, a Breit-Wigner pole
0148       with corresponding mass and width (that may be zero, such cases will be filtered in
0149       the MakeISRChannels). For t-channel type structures I'd like to have a similar structure,
0150       this is to be done. Finally MakeChannel returns the number of random numbers needed.
0151     */
0152 }  
0153 #endif
0154