File indexing completed on 2025-04-19 09:10:16
0001 #ifndef SHRIMPS_Ladders_Ladder_H
0002 #define SHRIMPS_Ladders_Ladder_H
0003
0004 #include "SHRiMPS/Ladders/Ladder_Particle.H"
0005 #include "SHRiMPS/Ladders/T_Prop.H"
0006 #include "ATOOLS/Phys/Blob.H"
0007 #include "ATOOLS/Phys/Particle.H"
0008 #include "ATOOLS/Math/Poincare.H"
0009 #include "ATOOLS/Math/Vector.H"
0010 #include "ATOOLS/Org/Message.H"
0011 #include <map>
0012 #include <list>
0013
0014 namespace SHRIMPS {
0015 struct ladder_type {
0016 enum code {
0017 unknown = 0,
0018 single_diffractive = 1,
0019 double_diffractive = 2,
0020 elastic = 3,
0021 inelastic = 4
0022 };
0023 };
0024
0025 class Ladder {
0026 private:
0027 LadderMap m_emissions;
0028 TPropList m_tprops;
0029 ATOOLS::Vec4D m_position;
0030 Ladder_Particle m_inpart[2];
0031 bool m_isrescatter;
0032 ladder_type::code m_type;
0033 public:
0034 Ladder(const ATOOLS::Vec4D & position=ATOOLS::Vec4D(0.,0.,0.,0.),
0035 const bool & rescatter=false);
0036 ~Ladder();
0037
0038 Ladder_Particle *
0039 AddRapidity(const double y,
0040 const ATOOLS::Flavour & flav=ATOOLS::Flavour(kf_gluon),
0041 const ATOOLS::Vec4D & mom=ATOOLS::Vec4D(0.,0.,0.,0.));
0042 void DeleteRapidity(LadderMap::iterator yiter);
0043 void AddPropagator(T_Prop prop);
0044 void DeletePropagator(TPropList::iterator piter);
0045 void UpdatePropagatorKinematics();
0046 void Reset(const bool & all=true);
0047 void ResetFS();
0048
0049 void OutputRapidities();
0050 bool ExtractHardest(TPropList::iterator & winner,const double & qt2min=0.);
0051 void HardestIncomingMomenta(const TPropList::iterator & winner,
0052 ATOOLS::Vec4D & q0,ATOOLS::Vec4D & q1);
0053 void FixType(const double & ymin, const double & ymax);
0054
0055 inline LadderMap * GetEmissions() { return &m_emissions; }
0056 inline TPropList * GetProps() { return &m_tprops; }
0057 inline const ATOOLS::Vec4D & Position() const { return m_position; }
0058 inline Ladder_Particle * InPart(const size_t & pos) { return pos<2?&m_inpart[pos]:NULL; }
0059 inline const bool IsRescatter() const { return m_isrescatter; }
0060 inline const ladder_type::code & Type() const { return m_type; }
0061 inline Ladder_Particle * FSPart(const double y) {
0062 return (m_emissions.find(y)==m_emissions.end() ?
0063 NULL : &m_emissions.find(y)->second);
0064 }
0065 inline ATOOLS::Vec4D FSMomentum() {
0066 ATOOLS::Vec4D sum(0.,0.,0.,0.);
0067 for (LadderMap::iterator lit=m_emissions.begin();lit!=m_emissions.end();lit++)
0068 sum += lit->second.Momentum();
0069 return sum;
0070 }
0071 bool CheckFourMomentum();
0072 friend std::ostream & operator<<(std::ostream & s, const Ladder &);
0073 };
0074
0075 std::ostream & operator<<(std::ostream & s, Ladder &);
0076 }
0077 #endif