File indexing completed on 2025-04-19 09:10:14
0001 #ifndef SHERPA_SoftPhysics_Beam_Remnant_Handler_H
0002 #define SHERPA_SoftPhysics_Beam_Remnant_Handler_H
0003
0004 #include "SHERPA/SoftPhysics/Soft_Collision_Handler.H"
0005 #include "REMNANTS/Main/Remnant_Handler.H"
0006 #include "SHRiMPS/Main/Shrimps.H"
0007
0008 namespace SHERPA {
0009 class Beam_Remnant_Handler {
0010 private:
0011 REMNANTS::Remnant_Handler * p_remnants, * p_bunchremnants;
0012 SHRIMPS::Shrimps * p_shrimps;
0013 BEAM::Beam_Spectra_Handler * p_beam;
0014 ATOOLS::Blob * p_beamblobs[2];
0015 Soft_Collision_Handler * p_schandler;
0016
0017 bool m_bunchrescatter, m_fill, m_vmode;
0018 int m_beam;
0019 std::string m_name;
0020
0021 ATOOLS::Return_Value::code TreatNoFill(ATOOLS::Blob_List *const bloblist);
0022 ATOOLS::Return_Value::code FillBunchBlobs(ATOOLS::Blob_List *const,
0023 ATOOLS::Particle_List *const=NULL);
0024 bool FillSimpleBunchBlobs(ATOOLS::Blob_List *const bloblist);
0025 bool FillRescatterBunchBlobs(ATOOLS::Blob_List *const bloblist);
0026 ATOOLS::Blob * FillBunchBlob(int,ATOOLS::Particle *);
0027 public :
0028 Beam_Remnant_Handler(BEAM::Beam_Spectra_Handler *const beam,
0029 REMNANTS::Remnant_Handler *const remnants,
0030 Soft_Collision_Handler *const softcollisions);
0031 ~Beam_Remnant_Handler();
0032 ATOOLS::Return_Value::code FillBeamAndBunchBlobs(ATOOLS::Blob_List *const,
0033 const bool & onlyBunch=false);
0034 ATOOLS::Return_Value::code FillRescatterBeamBlobs(ATOOLS::Blob_List *const);
0035 void CleanUp(const size_t & mode=0);
0036
0037 inline void AddBunchRescattering(REMNANTS::Remnant_Handler *const remnants,
0038 Soft_Collision_Handler *const softcollisions) {
0039 if (remnants && remnants->Id()==PDF::isr::bunch_rescatter) {
0040 p_bunchremnants = remnants; p_schandler = softcollisions;
0041 m_bunchrescatter = true;
0042 }
0043 }
0044 inline void SetShrimps(SHRIMPS::Shrimps * shrimps) {
0045 if (shrimps!=NULL) { p_shrimps = shrimps; m_name = std::string("Shrimps"); }
0046 }
0047 inline const bool NeedsToDealWithRescattering() {
0048 return p_bunchremnants->NeedsToMakeBeamBlobs();
0049 }
0050 inline REMNANTS::Remnant_Handler * GetRemnants() const { return p_remnants; }
0051 inline REMNANTS::Remnant_Handler * GetBunchRemnants() const { return p_bunchremnants; }
0052 inline const int Fill() const { return m_fill; }
0053 inline const std::string & Name() const { return m_name; }
0054 };
0055 }
0056
0057 #endif
0058