![]() |
|
|||
File indexing completed on 2025-04-19 09:10:12
0001 #ifndef PHOTONS_Tools_Dress_Blob_Base_H 0002 #define PHOTONS_Tools_Dress_Blob_Base_H 0003 0004 #include "ATOOLS/Math/Vector.H" 0005 #include "PHOTONS++/Main/Dipole_Type.H" 0006 0007 namespace ATOOLS { 0008 class Poincare; 0009 } 0010 0011 namespace PHOTONS { 0012 class Dress_Blob_Base { 0013 protected: 0014 bool m_photonsadded; 0015 bool m_success; 0016 bool m_soft; 0017 Dipole_Type::code m_dtype; 0018 Particle_Vector_Vector m_pvv; 0019 Particle_Vector_Vector m_pvv_new; 0020 ATOOLS::Particle_Vector m_chargedinparticles; 0021 ATOOLS::Particle_Vector m_neutralinparticles; 0022 ATOOLS::Particle_Vector m_chargedoutparticles; 0023 ATOOLS::Particle_Vector m_neutraloutparticles; 0024 ATOOLS::Particle_Vector m_softphotons; 0025 ATOOLS::Particle_Vector m_olddipole; 0026 ATOOLS::Particle_Vector m_newdipole; 0027 ATOOLS::Particle_Vector m_oldspectator; 0028 ATOOLS::Particle_Vector m_newspectator; 0029 ATOOLS::Particle * p_newinitialstate; 0030 ATOOLS::Vec4D m_K; 0031 ATOOLS::Vec4D m_p; 0032 ATOOLS::Vec4D m_pN; 0033 ATOOLS::Vec4D m_P; 0034 ATOOLS::Vec4D m_PN; 0035 ATOOLS::Vec4D m_Q; 0036 ATOOLS::Vec4D m_QN; 0037 ATOOLS::Vec3D m_kappaC; 0038 ATOOLS::Vec3D m_kappaN; 0039 double m_accu; 0040 double m_genweight; 0041 double m_genmaxweight; 0042 double m_nbar; 0043 int m_n; 0044 double m_omegaMax; 0045 double m_omegaMin; 0046 double m_M; 0047 std::vector<double> m_mC; 0048 std::vector<double> m_mN; 0049 double m_u; 0050 0051 void BuildNewParticleVectorVector(); 0052 double CalculateBeta(const ATOOLS::Vec4D&); 0053 ATOOLS::Vec4D CalculateMomentumSum(const ATOOLS::Particle_Vector&); 0054 void CalculateWeights(); 0055 void CheckAvaragePhotonNumberForNumericalErrors(); 0056 void DeleteAll(ATOOLS::Particle_Vector&); 0057 inline void DeleteAllPhotons() { DeleteAll(m_softphotons); } 0058 void DetermineU(); 0059 std::vector<double> GenerateNumberAndEnergies(); 0060 void GeneratePhotons(const double&, const double&); 0061 void GeneratePhotons(const IdPairNbarVector&); 0062 double KallenFunction(const double&, const double&, 0063 const double&); 0064 std::string ProcessName(); 0065 0066 virtual void CalculateAvaragePhotonNumber(const double&, 0067 const double&) = 0; 0068 virtual bool CheckIfExceedingPhotonEnergyLimits() = 0; 0069 virtual void CheckMomentumConservationInQCMS(const ATOOLS::Poincare&, 0070 const ATOOLS::Poincare&) = 0; 0071 virtual void CorrectMomenta() = 0; 0072 virtual void DefineDipole() = 0; 0073 virtual double Func(const double&, const std::vector<double>&, 0074 const std::vector<double>&, 0075 const std::vector<ATOOLS::Vec3D>&, 0076 const double&) = 0; 0077 virtual void ResetVariables() = 0; 0078 virtual void ReturnMomenta() = 0; 0079 virtual void DetermineKappa() = 0; 0080 virtual void DetermineQAndKappa() = 0; 0081 0082 public: 0083 Dress_Blob_Base(); 0084 virtual ~Dress_Blob_Base(); 0085 0086 inline bool AddedAnything() { return m_photonsadded; } 0087 inline bool DoneSuccessfully() { return m_success; } 0088 inline Particle_Vector_Vector GetCorrectedParticles() { return m_pvv; } 0089 inline ATOOLS::Particle * GetPhoton(int i) { return m_softphotons.at(i); } 0090 inline int GetPhotonNumber() { return m_softphotons.size(); } 0091 inline ATOOLS::Particle_Vector GetPhotons() { return m_softphotons; } 0092 0093 virtual void AddRadiation() = 0; 0094 }; 0095 0096 0097 0098 0099 /*! 0100 \file Dress_Blob_Base.H 0101 \brief contains the class Dress_Blob_Base 0102 */ 0103 0104 /*! 0105 \class Dress_Blob_Base 0106 \brief base class for treatment classes Dipole_FF and Dipole_FI 0107 */ 0108 //////////////////////////////////////////////////////////////////////////////////////////////////// 0109 // Description of member variables for Dress_Blob_Base 0110 //////////////////////////////////////////////////////////////////////////////////////////////////// 0111 /*! 0112 \var bool Dress_Blob_Base::m_photonsadded 0113 \brief true if more than zero photons were added to the blob, i.e if the momentum configuration has changed 0114 */ 0115 0116 /*! 0117 \var bool Dress_Blob_Base::m_success 0118 \brief true if event generation ended successfully, e.g. momentum conservation is fulfilled 0119 */ 0120 0121 /*! 0122 \var bool Dress_Blob_Base::m_soft 0123 \brief true if only soft corrections should be accounted for 0124 0125 Set by <tt>Photons::s_mode</tt> which is set by the YFSMODE switch 0126 in Fragmentation.dat. 0127 */ 0128 0129 /*! 0130 \var Dipole::code Dress_Blob_Base::m_dtype 0131 \brief specifies the Dipole_Type 0132 */ 0133 0134 /*! 0135 \var Particle_Vector_Vector Dress_Blob_Base::m_pvv 0136 \brief ensemble of particle Vectors passed from Define_Dipole 0137 */ 0138 0139 /*! 0140 \var Particle_Vector Dress_Blob_Base::m_chargedinparticles 0141 \brief first element of m_pvv, contains all charged initial state particles 0142 */ 0143 0144 /*! 0145 \var Particle_Vector Dress_Blob_Base::m_neutralinparticles 0146 \brief second element of m_pvv, contains all neutral initial state particles 0147 */ 0148 0149 /*! 0150 \var Particle_Vector Dress_Blob_Base::m_chargedoutparticles 0151 \brief third element of m_pvv, contains all charged final state particles 0152 */ 0153 0154 /*! 0155 \var Particle_Vector Dress_Blob_Base::m_neutraloutparticles 0156 \brief fourth element of m_pvv, contains all neutral final state particles 0157 */ 0158 0159 /*! 0160 \var Particle_Vector Dress_Blob_Base::m_softphotons 0161 \brief contains all generated QED bremsstrahlung 0162 0163 This Particle_Vector contains all photons generated in the event. If the 0164 event is rejected its contents will be deleted and the vector erased. with 0165 the routine Dress_Blob_Base::DeleteAll(Particle_Vector). If the event is 0166 successful the routine Define_Dipole::AddRadiation() will add its contents 0167 to the blob as final state particles. 0168 */ 0169 0170 /*! 0171 \var Particle_Vector Dress_Blob_Base::m_olddipole 0172 \brief contains a copy of all charged particles of the original blob 0173 0174 A copy of all charged particles needs to be made since their properties will 0175 be modified within the algorithm and the original blob must not be modified 0176 in case the event fails. 0177 */ 0178 0179 /*! 0180 \var Particle_Vector Dress_Blob_Base::m_newdipole 0181 \brief contains a copy of all charged particles after the treatment 0182 0183 A second copy of all charged particles needs to be made within the generation 0184 process since the original configuration must not be modified in case the event 0185 is rejected and needs to be regenerated. 0186 */ 0187 0188 /*! 0189 \var Particle_Vector Dress_Blob_Base::m_oldspectator 0190 \brief contains a copy of all neutral final state particles of the original blob 0191 0192 A copy of all neutral final state particles needs to be made since their 0193 properties will be modified within the algorithm and the original blob must 0194 not be modified in case the event fails. 0195 */ 0196 0197 /*! 0198 \var Particle_Vector Dress_Blob_Base::m_newspectator 0199 \brief contains a copy of all neutral final state particles after the treatment 0200 0201 A second copy of all neutral final state particles needs to be made within 0202 the generation process since the original configuration must not be modified 0203 in case the event is rejected and needs to be regenerated. 0204 */ 0205 0206 /*! 0207 \var Vec4D Dress_Blob_Base::m_K 0208 \brief sum of all QED bremsstrahlung photon momenta 0209 */ 0210 0211 /*! 0212 \var Vec4D Dress_Blob_Base::m_p 0213 \brief sum of all charged initial state momenta 0214 */ 0215 0216 /*! 0217 \var Vec4D Dress_Blob_Base::m_pN 0218 \brief sum of all neutral initial state momenta 0219 */ 0220 0221 /*! 0222 \var Vec4D Dress_Blob_Base::m_P 0223 \brief sum of all charged final state momenta after radiation 0224 */ 0225 0226 /*! 0227 \var Vec4D Dress_Blob_Base::m_PN 0228 \brief sum of all neutral final state momenta after radiation 0229 */ 0230 0231 /*! 0232 \var Vec4D Dress_Blob_Base::m_Q 0233 \brief sum of all charged final state momenta before radiation 0234 */ 0235 0236 /*! 0237 \var Vec4D Dress_Blob_Base::m_QN 0238 \brief sum of all neutral final state momenta before radiation 0239 */ 0240 0241 /*! 0242 \var double Dress_Blob_Base::m_accu 0243 \brief accuracy used to determine the state of the momentum conservation 0244 0245 Set by the global accuracy set in ... 0246 */ 0247 0248 /*! 0249 \var double Dress_Blob_Base::m_genweight 0250 \brief weight of the event generated 0251 */ 0252 0253 /*! 0254 \var double Dress_Blob_Base::m_genmaxweight 0255 \brief maximum weight of the configuration for which the event should be generated 0256 */ 0257 0258 /*! 0259 \var double Dress_Blob_Base::m_omegaMax 0260 \brief maximal energy for QED bremsstrahlung, determined kinematically 0261 */ 0262 0263 /*! 0264 \var double Dress_Blob_Base::m_omegaMin 0265 \brief minimal energy for QED bremsstrahlung, infrared cut-off 0266 */ 0267 0268 /*! 0269 \var double Dress_Blob_Base::m_nbar 0270 \brief avarage photon number \f$ \bar{n} \f$ 0271 */ 0272 0273 /*! 0274 \var double Dress_Blob_Base::m_n 0275 \brief actual photon number \f$ n \f$ of the event 0276 */ 0277 0278 /*! 0279 \var double Dress_Blob_Base::m_M 0280 \brief mass of the initial state particle, invariant mass of the initial/final state 0281 */ 0282 0283 /*! 0284 \var std::vector<double> Dress_Blob_Base::m_mC 0285 \brief mass of all charged final state particles individually 0286 */ 0287 0288 /*! 0289 \var std::vector<double> Dress_Blob_Base::m_mN 0290 \brief mass of all neutral final state particle individually 0291 */ 0292 0293 /*! 0294 \var double Dress_Blob_Base::m_u 0295 \brief scaling parameter in the momentum reconstruction 0296 */ 0297 //////////////////////////////////////////////////////////////////////////////////////////////////// 0298 // Description of all member method for Dress_Blob_Base 0299 //////////////////////////////////////////////////////////////////////////////////////////////////// 0300 /*! 0301 \fn Dress_Blob_Base::Dress_Blob_Base 0302 \brief initialises general event generation variables, e.g infrared cut-off 0303 */ 0304 0305 /*! 0306 \fn double Dress_Blob_Base::CalculateBeta(Vec4D) 0307 \brief calculates \f$ \beta \f$ of a given 4-vector 0308 */ 0309 0310 /*! 0311 \fn Vec4D Dress_Blob_Base::CalculateMomentumSum(Particle_Vector) 0312 \brief calculates the sum of all momenta of the Particle_Vector given 0313 */ 0314 0315 /*! 0316 \fn void Dress_Blob_Base::CalculateWeights() 0317 \brief determines the all weights of the event generated by calling all weight classes 0318 0319 If <tt>m_soft</tt> is set to true, higher order corrections will 0320 not be taken into account. 0321 */ 0322 0323 /*! 0324 \fn void Dress_Blob_Base::DeleteAll(Particle_Vector) 0325 \brief deletes all references of the pointer the given Particle_Vector contains and erases the vector itself 0326 */ 0327 0328 /*! 0329 \fn void Dress_Blob_Base::DeleteAllPhotons() 0330 \brief calls Dress_Blob_Base::DeleteAll(m_softphotons) 0331 */ 0332 0333 /*! 0334 \fn void Dress_Blob_Base::DetermineU() 0335 \brief determines the scaling parameter m_u 0336 0337 This method determines the scaling parameter \f$ u \f$ as the solution of 0338 \f$ f(u) = 0 \f$, which is implemented in the respective treatment classes 0339 Dipole_FF and Dipole_FI as <tt>Func(double, std::vector<double>, 0340 std::vector<double>, std::vector<Vec3D>, double)</tt>. 0341 0342 \f$ u \f$ is determined via nested intervals to a precission of \f$ 10^{-12} \f$. 0343 */ 0344 0345 /*! 0346 \fn std::vector<double> Dress_Blob_Base::GenerateNumberAndEnergies() 0347 \brief generates the actual photon number of the event and each photon's energy 0348 0349 The method first generates the number of photons to be generated according to 0350 a Poisson distribution with mean \f$ \bar{n} \f$ and instantaneously generates 0351 their energies according to a \f$ \frac{1}{E} \f$ energy distribution. Sets 0352 m_n and returns a vector containing the energies. 0353 */ 0354 0355 /*! 0356 \fn void Dress_Blob_Base::GeneratePhotons(const double&, const double&) 0357 \brief generates a photon configuration in a dipole 0358 0359 The values to be passed are both \f$ \beta \f$ 's. First calls 0360 <tt>Dress_Blob_Base::GenerateNumberAndEnergies()</tt> to generate the 0361 actual photon number of the event and their energies. Then it calls the 0362 class Generate_One_Photon in its dipole constructor to generate the 0363 complete photon and puts it into the m_softphotons Particle_Vector. 0364 */ 0365 0366 /*! 0367 \fn void Dress_Blob_Base::GeneratePhotons(const IdPairNbarVector&) 0368 \brief generates a photon configuration in a multipole 0369 0370 The variable passed is a vector containing the avarage photon numbers 0371 \f$ \bar{n}_i \f$ of all individual dipoles (for the ordering convention 0372 see Generate_Multipole_Photon_Angle::IndexLookup()). The generation of 0373 the actual photon number and their energies proceeds as above, but then 0374 instead of the dipole constructor of the Generate_One_Photon class its 0375 multipole constructor is called and, again, the complete photons are put 0376 into the m_softphotons Particle_Vector. 0377 0378 The multipole version of GeneratePhotons is able to handle dipoles as well, 0379 but the dipole version is faster due to the existence of analytical 0380 solutions in this case. 0381 */ 0382 0383 /*! 0384 \fn double Dress_Blob_Base::KallenFunction(double, double, double) 0385 \brief calculates the Kallen-Function of three variables \f$ x,y,z \f$ 0386 */ 0387 0388 /*! 0389 \fn void Dress_Blob_Base::CalculateAvaragePhotonNumber(const double, const double) 0390 \brief purely virtual in Dress_Blob_Base 0391 */ 0392 0393 /*! 0394 \fn bool Dress_Blob_Base::CheckIfExceedingPhotonEnergyLimits() 0395 \brief purely virtual in Dress_Blob_Base 0396 */ 0397 0398 /*! 0399 \fn void Dress_Blob_Base::CheckMomentumConservationInQCMS() 0400 \brief purely virtual in Dress_Blob_Base 0401 */ 0402 0403 /*! 0404 \fn void Dress_Blob_Base::CorrectMomenta() 0405 \brief purely virtual in Dress_Blob_Base 0406 */ 0407 0408 /*! 0409 \fn void Dress_Blob_Base::DefineDipole() 0410 \brief purely virtual in Dress_Blob_Base 0411 */ 0412 0413 /*! 0414 \fn double Dress_Blob_Base::Func(double, std::vector<double>, std::vector<double>, std::vector<Vec3D>, double) 0415 \brief purely virtual in Dress_Blob_Base 0416 */ 0417 0418 /*! 0419 \fn void Dress_Blob_Base::ResetVariables() 0420 \brief purely virtual in Dress_Blob_Base 0421 */ 0422 0423 /*! 0424 \fn void Dress_Blob_Base::ReturnMomenta() 0425 \brief purely virtual in Dress_Blob_Base 0426 */ 0427 0428 /*! 0429 \fn bool Dress_Blob_Base::AddedAnything() 0430 \brief returns m_photonsadded 0431 */ 0432 0433 /*! 0434 \fn bool Dress_Blob_Base::DoneSuccessfully() 0435 \brief returns m_success 0436 */ 0437 0438 /*! 0439 \fn Particle_Vector_Vector Dress_Blob_Base::GetCorrectedParticles() 0440 \brief returns m_pvv with the corrected particles (except photons) as entries 0441 */ 0442 0443 /*! 0444 \fn Particle * Dress_Blob_Base::GetPhoton(int) 0445 \brief returns the photon at the given psoition in m_softphotons 0446 */ 0447 0448 /*! 0449 \fn int Dress_Blob_Base::GetPhotonNumber() 0450 \brief returns the number of photon generated in the event 0451 */ 0452 0453 /*! 0454 \fn Particle_Vector Dress_Blob_Base::GetPhotons() 0455 \brief returns m_softphotons 0456 */ 0457 0458 /*! 0459 \fn void Dress_Blob_Base::AddRadiation() 0460 \brief purely virtual in Dress_Blob_Base 0461 */ 0462 0463 0464 0465 } 0466 0467 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |