ATLAS Offline Software
G4ProcessHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "G4ProcessHelper.hh"
6 #include "CustomParticle.h"
8 #include "G4ParticleTable.hh"
9 #include "G4DecayTable.hh"
10 #include "CLHEP/Random/RandFlat.h"
11 #include "CLHEP/Units/PhysicalConstants.h"
12 #include <iostream>
13 #include <fstream>
14 #include <stdexcept>
15 
17 
18 G4ProcessHelper::G4ProcessHelper()
19  : theRmesoncloud(0)
20  , theRbaryoncloud(0)
21 {
22  G4cout << "G4ProcessHelper constructor: start" << G4endl;
23  particleTable = G4ParticleTable::GetParticleTable();
24  theProton = particleTable->FindParticle("proton");
25  theNeutron = particleTable->FindParticle("neutron");
26 
27 
28  // I opted for string based read-in, as it would make physics debugging easier later on
29 
30  std::ifstream process_stream ("ProcessList.txt");
31  G4String line;
32  while(getline(process_stream,line)){
33  std::vector<G4String> tokens;
34 
35  //Getting a line
36  ReadAndParse(line,tokens,"#");
37 
38  //Important info
39  G4String incident = tokens[0];
40  // G4cout << "Incident particle: " << incident << G4endl;
41  G4ParticleDefinition* incidentDef = particleTable->FindParticle(incident);
42  G4int incidentPDG = incidentDef->GetPDGEncoding();
43  known_particles[incidentDef]=true;
44 
45  G4String target = tokens[1];
46  // G4cout << "Target particle: " << target << G4endl;
47 
48  // Making a ReactionProduct
49  ReactionProduct prod;
50  for (unsigned int i = 2; i != tokens.size();i++){
51  G4String part = tokens[i];
52  if (particleTable->contains(part))
53  {
54  prod.push_back(particleTable->FindParticle(part)->GetPDGEncoding());
55  } else {
56  G4cout<<"Particle: "<<part<<" is unknown."<<G4endl;
57  G4Exception("G4ProcessHelper", "UnkownParticle", FatalException,
58  "Initialization: The reaction product list contained an unknown particle");
59  }
60  }
61  if (target == "proton"){
62  pReactionMap[incidentPDG].push_back(prod);
63  } else if (target == "neutron") {
64  nReactionMap[incidentPDG].push_back(prod);
65  } else {
66  G4Exception("G4ProcessHelper", "IllegalTarget", FatalException,
67  "Initialization: The reaction product list contained an illegal target particle");
68  }
69  }
70 
71  process_stream.close();
72  G4cout << "Found " << pReactionMap.size() << " proton interactions and " << nReactionMap.size() << " neutron interactions in ProcessList.txt." << G4endl;
73 
74  std::map<G4String,G4double> parameters;
75  ReadInPhysicsParameters(parameters);
76 
77  resonant = false;
78  reggemodel = false;
79  if (parameters["Resonant"]!=0.) resonant=true;
80  ek_0 = parameters["ResonanceEnergy"]*CLHEP::GeV;
81  gamma = parameters["Gamma"]*CLHEP::GeV;
82  amplitude = parameters["Amplitude"]*CLHEP::millibarn;
83  xsecmultiplier = parameters["XsecMultiplier"];
84  suppressionfactor = parameters["ReggeSuppression"];
85  hadronlifetime = parameters["HadronLifeTime"];
86  mixing = parameters["Mixing"];
87  if(parameters["ReggeModel"]!=0.) reggemodel=true;
88  doDecays=parameters["DoDecays"];
89 
90  G4cout<<"Read in physics parameters:"<<G4endl;
91  G4cout<<"Resonant = "<< resonant <<G4endl;
92  G4cout<<"ResonanceEnergy = "<<ek_0/CLHEP::GeV<<" GeV"<<G4endl;
93  G4cout<<"XsecMultiplier = "<<xsecmultiplier<<G4endl;
94  G4cout<<"Gamma = "<<gamma/CLHEP::GeV<<" GeV"<<G4endl;
95  G4cout<<"Amplitude = "<<amplitude/CLHEP::millibarn<<" millibarn"<<G4endl;
96  G4cout<<"ReggeSuppression = "<<100*suppressionfactor<<" %"<<G4endl;
97  G4cout<<"HadronLifeTime = "<<hadronlifetime;
98  if (doDecays) G4cout<<" ns"<<G4endl;
99  else G4cout<<" s"<<G4endl;
100  G4cout<<"ReggeModel = "<< reggemodel <<G4endl;
101  G4cout<<"Mixing = "<< mixing*100 <<" %"<<G4endl;
102  G4cout<<"DoDecays = "<< doDecays << G4endl;
103 
104  if ((!doDecays && hadronlifetime>0.) ||
105  (doDecays && hadronlifetime<=0.) ){
106  G4cout << "WARNING: Inconsistent treatment of R-Hadron properties! Lifetime of " << hadronlifetime
107  << " and doDecays= " << doDecays << G4endl;
108  }
109 
110  G4ParticleTable::G4PTblDicIterator* theParticleIterator;
111  theParticleIterator = particleTable->GetIterator();
112 
113  theParticleIterator->reset();
114  while( (*theParticleIterator)() ){
115  CustomParticle* particle = dynamic_cast<CustomParticle*>(theParticleIterator->value());
116  std::string name = theParticleIterator->value()->GetParticleName();
117  G4DecayTable* table = theParticleIterator->value()->GetDecayTable();
118  if(particle!=0&&table!=0&&name.find("cloud")>name.size()) {
119  particle->SetPDGLifeTime(hadronlifetime*CLHEP::s);
120  particle->SetPDGStable(false);
121  G4cout<<"Lifetime of: "<<name<<" set to: "<<particle->GetPDGLifeTime()/CLHEP::s<<" s."<<G4endl;
122  G4cout<<"Stable: "<<particle->GetPDGStable()<<G4endl;
123  }
124  if (particle && doDecays==1){
125  // Make them decay immediately!!
126  particle->SetPDGStable(false);
127  particle->SetPDGLifeTime(hadronlifetime*CLHEP::ns);
128  G4cout<<"Forcing a decay for "<<name<<G4endl;
129  G4cout<<"Lifetime of: "<<name<<" set to: "<<particle->GetPDGLifeTime()/CLHEP::ns<<" ns."<<G4endl;
130  G4cout<<"Stable: "<<particle->GetPDGStable()<<G4endl;
131  }
132 
133  G4cout << "Done with particle " << name << G4endl;
134  }
135  theParticleIterator->reset();
136  G4cout << "G4ProcessHelper constructor: end" << G4endl;
137  return;
138 }
139 
140 
141 void G4ProcessHelper::ReadInPhysicsParameters(std::map<G4String,G4double>& parameters) const
142  {
143  parameters["Resonant"]=0.;
144  parameters["ResonanceEnergy"]=0.;
145  parameters["XsecMultiplier"]=1.;
146  parameters["Gamma"]=0.;
147  parameters["Amplitude"]=0.;
148  parameters["ReggeSuppression"]=0.;
149  parameters["HadronLifeTime"]=0.;
150  parameters["ReggeModel"]=0.;
151  parameters["Mixing"]=0.;
152  parameters["DoDecays"]=0;
153 
154  std::ifstream physics_stream ("PhysicsConfiguration.txt");
155  G4String line;
156  char** endptr=0;
157  while (getline(physics_stream,line)) {
158  std::vector<G4String> tokens;
159  //Getting a line
160  ReadAndParse(line,tokens,"=");
161  G4String key = tokens[0];
162  G4double val = strtod(tokens[1],endptr);
163  parameters[key]=val;
164  }
165  physics_stream.close();
166  }
167 
168 
169 const G4ProcessHelper* G4ProcessHelper::Instance()
170 {
171  static const G4ProcessHelper instance;
172  return &instance;
173 }
174 
175 
176 G4bool G4ProcessHelper::ApplicabilityTester(const G4ParticleDefinition& aPart) const {
177  try {
178  return known_particles.at(&aPart);
179  }
180  catch (const std::out_of_range& e) {
181  return false;
182  }
183 }
184 
185 G4double G4ProcessHelper::GetInclusiveCrossSection(const G4DynamicParticle *aParticle,
186  const G4Element *anElement) const {
187  //We really do need a dedicated class to handle the cross sections. They might not always be constant
188 
189  //Disassemble the PDG-code
190  const G4int thePDGCode = aParticle->GetDefinition()->GetPDGEncoding();
191  const double boost = (aParticle->GetKineticEnergy()+aParticle->GetMass())/aParticle->GetMass();
192  G4double theXsec = 0;
193  G4String name = aParticle->GetDefinition()->GetParticleName();
194 
195  if (!reggemodel) {
196  // Flat cross section
197  if (MC::isRGlueball(thePDGCode)) {
198  theXsec = 24 * CLHEP::millibarn;
199  } else {
200  std::vector<G4int> nq=MC::containedQuarks(thePDGCode);
201  for (const G4int & quark : nq) {
202  // 12 mb taken from asymptotic pion-nucleon scattering cross sections
203  if (quark == MC::DQUARK || quark == MC::UQUARK) theXsec += 12 * CLHEP::millibarn;
204  // 6 mb taken from asymptotic kaon-nucleon scattering cross sections
205  // No data for D or B, so setting to behave like a kaon
206  if (MC::isStrange(quark) || MC::isCharm(quark) || MC::isBottom(quark)) theXsec += 6 * CLHEP::millibarn;
207  }
208  }
209  } else {
210  // From Eur. Phys. J. C (2010) 66: 493-501
211  // DOI 10.1140/epjc/s10052-010-1262-1
212  double R = Regge(boost);
213  double P = Pom(boost);
214  const bool containsSquark(MC::hasSquark(thePDGCode, MC::BQUARK) || MC::hasSquark(thePDGCode, MC::TQUARK));
215  if (containsSquark) {
216  if (MC::isRBaryon(thePDGCode)) { // ~q q q
217  theXsec = (thePDGCode > 0) ? 2*P*CLHEP::millibarn : (2*(P+R)+30/sqrt(boost))*CLHEP::millibarn;
218  }
219  else if (MC::isRMeson(thePDGCode)) { // ~q qbar
220  theXsec = (thePDGCode > 0) ? (P+R)*CLHEP::millibarn : P*CLHEP::millibarn;
221  }
222  }
223  else {
224  if (MC::isRBaryon(thePDGCode)) { theXsec=3*P*CLHEP::millibarn; } // ~g q q q
225  else if (MC::isRMeson(thePDGCode) || MC::isRGlueball(thePDGCode)) { theXsec=(R+2*P)*CLHEP::millibarn; } // ~g q qbar or ~g g or ~g g g
226  }
227  }
228 
229 
230 
231  //Adding resonance
232 
233  if (resonant) {
234  // Described in Section 5.1 of http://r-hadrons.web.cern.ch/r-hadrons/download/mackeprang_thesis.pdf
235  // mentioned but dismissed in Section 3.3 of https://arxiv.org/pdf/hep-ex/0404001.pdf
236  double e_0 = ek_0 + aParticle->GetDefinition()->GetPDGMass(); //Now total energy
237 
238  e_0 = sqrt(aParticle->GetDefinition()->GetPDGMass()*aParticle->GetDefinition()->GetPDGMass()
239  + theProton->GetPDGMass()*theProton->GetPDGMass()
240  + 2.*e_0*theProton->GetPDGMass());
241  const double sqrts=sqrt(aParticle->GetDefinition()->GetPDGMass()*aParticle->GetDefinition()->GetPDGMass()
242  + theProton->GetPDGMass()*theProton->GetPDGMass() + 2*aParticle->GetTotalEnergy()*theProton->GetPDGMass());
243 
244  const double res_result = amplitude*(gamma*gamma/4.)/((sqrts-e_0)*(sqrts-e_0)+(gamma*gamma/4.));//Non-relativistic Breit Wigner
245 
246  theXsec += res_result;
247  }
248 
249 
250  return theXsec * pow(anElement->GetN(),0.7)*1.25 * xsecmultiplier;// * 0.523598775598299;
251 
252 }
253 
254 ReactionProduct G4ProcessHelper::GetFinalState(const G4Track& aTrack, G4ParticleDefinition*& aTarget) const {
255  return GetFinalStateInternal(aTrack,aTarget,false);
256 }
257 
258 // Version where we know if we baryonize already
259 ReactionProduct G4ProcessHelper::GetFinalStateInternal(const G4Track& aTrack,G4ParticleDefinition*& aTarget, const bool baryonize_failed) const {
260 
261  const G4DynamicParticle* aDynamicParticle = aTrack.GetDynamicParticle();
262 
263  //-----------------------------------------------
264  // Choose n / p as target
265  // and get ReactionProductList pointer
266  //-----------------------------------------------
267 
268  G4Material* aMaterial = aTrack.GetMaterial();
269  const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
270  const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
271 
272  G4double NumberOfProtons=0;
273  G4double NumberOfNucleons=0;
274 
275  for ( size_t elm=0 ; elm < aMaterial->GetNumberOfElements() ; elm++ )
276  {
277  //Summing number of protons per unit volume
278  NumberOfProtons += NbOfAtomsPerVolume[elm]*(*theElementVector)[elm]->GetZ();
279  //Summing nucleons (not neutrons)
280  NumberOfNucleons += NbOfAtomsPerVolume[elm]*(*theElementVector)[elm]->GetN();
281  }
282 
283  const ReactionMap* reactionMap{};
284  if (NumberOfNucleons>0 && CLHEP::RandFlat::shoot()<NumberOfProtons/NumberOfNucleons) {
285  reactionMap = &pReactionMap;
286  aTarget = theProton;
287  } else {
288  reactionMap = &nReactionMap;
289  aTarget = theNeutron;
290  }
291 
292  G4int theIncidentPDG = aDynamicParticle->GetDefinition()->GetPDGEncoding();
293  const bool containsSquark(MC::hasSquark(theIncidentPDG, MC::BQUARK) || MC::hasSquark(theIncidentPDG, MC::TQUARK));
294  if (reggemodel
295  && MC::isRMeson(theIncidentPDG) && containsSquark
296  && CLHEP::RandFlat::shoot()*mixing>0.5
297  && aDynamicParticle->GetDefinition()->GetPDGCharge()==0.
298  )
299  {
300  // G4cout<<"Oscillating..."<<G4endl;
301  theIncidentPDG *= -1;
302  }
303 
304 
305  bool baryonise=false;
306 
307  if (!baryonize_failed
308  && reggemodel
309  && CLHEP::RandFlat::shoot()>0.9
310  && MC::isRMeson(theIncidentPDG) &&
311  ( (theIncidentPDG > 0) || !containsSquark )
312  )
313  {
314  baryonise=true;
315  }
316 
317  // Reference directly to the ReactionProductList we are looking at. Makes life easier :-)
318  const ReactionProductList& aReactionProductList = reactionMap->at(theIncidentPDG);
319 
320  //-----------------------------------------------
321  // Count processes
322  // kinematic check
323  // compute number of 2 -> 2 and 2 -> 3 processes
324  //-----------------------------------------------
325 
326  G4int N22 = 0; //Number of 2 -> 2 processes
327  G4int N23 = 0; //Number of 2 -> 3 processes. Couldn't think of more informative names
328 
329  //This is the list to be populated
330  ReactionProductList theReactionProductList;
331  std::vector<bool> theChargeChangeList;
332 
333  for (const ReactionProduct& prod : aReactionProductList) {
334  const G4int secondaries = prod.size();
335  // If the reaction is not possible we will not consider it
336  /* if(ReactionIsPossible(*prod_it,aDynamicParticle)
337  &&(
338  !baryonise||(baryonise&&ReactionGivesBaryon(*prod_it))
339  ))*/
340  if (ReactionIsPossible(prod,*aTarget,aDynamicParticle) &&
341  (
342  (baryonise && ReactionGivesBaryon(prod)) ||
343  (!baryonise && !ReactionGivesBaryon(prod)) ||
344  MC::isRBaryon(theIncidentPDG) ||
345  !reggemodel
346  )
347  )
348  {
349  // The reaction is possible. Let's store and count it
350  theReactionProductList.push_back(prod);
351  if (secondaries == 2) {
352  N22++;
353  } else if (secondaries ==3) {
354  N23++;
355  } else {
356  G4cerr << "ReactionProduct has unsupported number of secondaries: "<<secondaries<<G4endl;
357  }
358  }
359  }
360 
361  if (theReactionProductList.size()==0 && baryonize_failed) {
362  G4Exception("G4ProcessHelper", "NoProcessPossible", FatalException,
363  "GetFinalState: No process could be selected from the given list.");
364  } else if (theReactionProductList.size()==0 && !baryonize_failed) {
365  // Baryonization had not yet failed -- try again
366  G4cout << "G4ProcessHelper::GetFinalStateInternal WARNING Could not select an appropriate process in first pass" << G4endl;
367  return GetFinalStateInternal(aTrack,aTarget,true);
368  }
369 
370  // For the Regge model no phase space considerations. We pick a process at random
371  if (reggemodel) {
372  const int n_rps = theReactionProductList.size();
373  const int select = static_cast<int>(CLHEP::RandFlat::shoot()*n_rps);
374  // G4cout<<"Possible: "<<n_rps<<", chosen: "<<select<<G4endl;
375  return theReactionProductList[select];
376  }
377 
378  // Fill a probability map. Remember total probability
379  // 2->2 is 0.15*1/n_22 2->3 uses phase space
380  G4double p22 = 0.15;
381  G4double p23 = 1-p22; // :-)
382 
383  std::vector<G4double> Probabilities;
384  std::vector<G4bool> TwotoThreeFlag;
385 
386  G4double CumulatedProbability = 0;
387 
388  // To each ReactionProduct we assign a cumulated probability and a flag
389  // discerning between 2 -> 2 and 2 -> 3
390  for (unsigned int i = 0; i != theReactionProductList.size(); i++){
391  if (theReactionProductList[i].size() == 2) {
392  if(0==N22) { throw std::runtime_error("G4ProcessHelper::GetFinalState: N22 is zero!"); }
393  CumulatedProbability += p22/N22;
394  TwotoThreeFlag.push_back(false);
395  } else {
396  if(0==N23) { throw std::runtime_error("G4ProcessHelper::GetFinalState: N23 is zero!"); }
397  CumulatedProbability += p23/N23;
398  TwotoThreeFlag.push_back(true);
399  }
400  Probabilities.push_back(CumulatedProbability);
401  }
402 
403  //Renormalising probabilities
404  for (std::vector<G4double>::iterator it = Probabilities.begin();
405  it != Probabilities.end();
406  ++it)
407  {
408  *it /= CumulatedProbability;
409  }
410 
411  // Choosing ReactionProduct
412 
413  G4bool selected = false;
414  G4int tries = 0;
415  // ReactionProductList::iterator prod_it;
416 
417  //Keep looping over the list until we have a choice, or until we have tried 100 times
418  unsigned int i=0;
419  while(!selected && tries < 100){
420  i=0;
421  G4double dice = CLHEP::RandFlat::shoot();
422  while( i<theReactionProductList.size() && dice>Probabilities[i] ){
423  i++;
424  }
425 
426  if(!TwotoThreeFlag[i]) {
427  // 2 -> 2 processes are chosen immediately
428  selected = true;
429  } else {
430  // 2 -> 3 processes require a phase space lookup
431  if (PhaseSpace(theReactionProductList[i],*aTarget,aDynamicParticle)>CLHEP::RandFlat::shoot()) selected = true;
432  }
433  // double suppressionfactor=0.5;
434  auto table ATLAS_THREAD_SAFE = particleTable; // safe because table has been loaded by now
435  if(selected && table->FindParticle(theReactionProductList[i][0])->GetPDGCharge()!=aDynamicParticle->GetDefinition()->GetPDGCharge())
436  {
437  /*
438  G4cout<<"Incoming particle "<<aDynamicParticle->GetDefinition()->GetParticleName()
439  <<" has charge "<<aDynamicParticle->GetDefinition()->GetPDGCharge()<<G4endl;
440  G4cout<<"Suggested particle "<<particleTable->FindParticle(theReactionProductList[i][0])->GetParticleName()
441  <<" has charge "<<particleTable->FindParticle(theReactionProductList[i][0])->GetPDGCharge()<<G4endl;
442  */
443  if(CLHEP::RandFlat::shoot()<suppressionfactor) selected = false;
444  }
445  tries++;
446  // G4cout<<"Tries: "<<tries<<G4endl;
447  }
448  if(tries>=100) G4cerr<<"Could not select process!!!!"<<G4endl;
449 
450  //Return the chosen ReactionProduct
451  return theReactionProductList[i];
452 }
453 
454 G4double G4ProcessHelper::ReactionProductMass(const ReactionProduct& aReaction,const G4ParticleDefinition& aTarget,const G4DynamicParticle* aDynamicParticle) const{
455  // Incident energy:
456  const G4double E_incident = aDynamicParticle->GetTotalEnergy();
457  //G4cout<<"Total energy: "<<E_incident<<" Kinetic: "<<aDynamicParticle->GetKineticEnergy()<<G4endl;
458  // sqrt(s)= sqrt(m_1^2 + m_2^2 + 2 E_1 m_2)
459  const G4double m_1 = aDynamicParticle->GetDefinition()->GetPDGMass();
460  const G4double m_2 = aTarget.GetPDGMass();
461  //G4cout<<"M_R: "<<m_1/CLHEP::GeV<<" GeV, M_np: "<<m_2/CLHEP::GeV<<" GeV"<<G4endl;
462  const G4double sqrts = sqrt(m_1*m_1 + m_2*(m_2 + 2 * E_incident));
463  //G4cout<<"sqrt(s) = "<<sqrts/CLHEP::GeV<<" GeV"<<G4endl;
464  // Sum of rest masses after reaction:
465  G4double M_after = 0;
466  for (const auto& product_pdg_id : aReaction) {
467  //G4cout<<"Mass contrib: "<<(particleTable->FindParticle(production_pdg_id)->GetPDGMass())/CLHEP::MeV<<" MeV"<<G4endl;
468  auto table ATLAS_THREAD_SAFE = particleTable; // safe because table has been loaded by now
469  M_after += table->FindParticle(product_pdg_id)->GetPDGMass();
470  }
471  //G4cout<<"Intending to return this ReactionProductMass: " << sqrts << " - " << M_after << " MeV"<<G4endl;
472  return sqrts - M_after;
473 }
474 
475 G4bool G4ProcessHelper::ReactionIsPossible(const ReactionProduct& aReaction,const G4ParticleDefinition& aTarget,const G4DynamicParticle* aDynamicParticle) const{
476  if (ReactionProductMass(aReaction,aTarget,aDynamicParticle)>0) return true;
477  return false;
478 }
479 
480 G4bool G4ProcessHelper::ReactionGivesBaryon(const ReactionProduct& aReaction) const{
481  for (const auto& product_pdg_id : aReaction) {
482  if (MC::isRBaryon(product_pdg_id)) return true;
483  }
484  return false;
485 }
486 
487 G4double G4ProcessHelper::PhaseSpace(const ReactionProduct& aReaction,const G4ParticleDefinition& aTarget,const G4DynamicParticle* aDynamicParticle) const {
488  const G4double qValue = ReactionProductMass(aReaction,aTarget,aDynamicParticle);
489  // Eq 4 of https://arxiv.org/pdf/hep-ex/0404001.pdf
490  const G4double phi = sqrt(1+qValue/(2*0.139*CLHEP::GeV))*pow(qValue/(1.1*CLHEP::GeV),3./2.);
491  return (phi/(1+phi));
492 }
493 
494 void G4ProcessHelper::ReadAndParse(const G4String& str,
495  std::vector<G4String>& tokens,
496  const G4String& delimiters) const
497 {
498  // Skip delimiters at beginning.
499  G4String::size_type lastPos = str.find_first_not_of(delimiters, 0);
500  if (lastPos==G4String::npos) return;
501 
502  // Find first "non-delimiter".
503  G4String::size_type pos = str.find_first_of(delimiters, lastPos);
504 
505  while (G4String::npos != pos || G4String::npos != lastPos)
506  {
507  //Skipping leading / trailing whitespaces
508  G4String temp = str.substr(lastPos, pos - lastPos);
509  while(temp.c_str()[0] == ' ') temp.erase(0,1);
510  while(temp[temp.size()-1] == ' ') temp.erase(temp.size()-1,1);
511 
512  // Found a token, add it to the vector.
513  tokens.push_back(temp);
514 
515  // Skip delimiters. Note the "not_of"
516  lastPos = str.find_first_not_of(delimiters, pos);
517  if (lastPos==G4String::npos) continue;
518 
519  // Find next "non-delimiter"
520  pos = str.find_first_of(delimiters, lastPos);
521  }
522 }
523 
524 double G4ProcessHelper::Regge(const double boost) const
525 {
526  // https://link.springer.com/content/pdf/10.1140%2Fepjc%2Fs10052-010-1262-1.pdf Eq 1
527  // Originally from https://arxiv.org/pdf/0710.3930.pdf
528  const double a=2.165635078566177;
529  const double b=0.1467453738547229;
530  const double c=-0.9607903711871166;
531  return 1.5*exp(a+b/boost+c*log(boost));
532 }
533 
534 
535 double G4ProcessHelper::Pom(const double boost) const
536 {
537  // https://link.springer.com/content/pdf/10.1140%2Fepjc%2Fs10052-010-1262-1.pdf Eq 2
538  // Originally from https://arxiv.org/pdf/0710.3930.pdf
539  const double a=4.138224000651535;
540  const double b=1.50377557581421;
541  const double c=-0.05449742257808247;
542  const double d=0.0008221235048211401;
543  return a + b*sqrt(boost) + c*boost + d*pow(boost,1.5);
544 }
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
isStrange
bool isStrange(const T &p)
Definition: AtlasPID.h:142
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
checkFileSG.line
line
Definition: checkFileSG.py:75
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
isRMeson
bool isRMeson(const T &p)
Definition: AtlasPID.h:494
hist_file_dump.d
d
Definition: hist_file_dump.py:137
DMTest::P
P_v1 P
Definition: P.h:23
isRGlueball
bool isRGlueball(const T &p)
PDG rule 11g: Within several scenarios of new physics, it is possible to have colored particles suffici...
Definition: AtlasPID.h:482
skel.it
it
Definition: skel.GENtoEVGEN.py:396
python.SystemOfUnits.millibarn
int millibarn
Definition: SystemOfUnits.py:77
boost
Definition: DVLIterator.h:29
beamspotman.tokens
tokens
Definition: beamspotman.py:1284
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
isBottom
bool isBottom(const T &p)
Definition: AtlasPID.h:148
TrigVtx::gamma
@ gamma
Definition: TrigParticleTable.h:26
lumiFormat.i
int i
Definition: lumiFormat.py:85
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
CustomParticle
Definition: CustomParticle.h:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
python.ext.table_printer.table
list table
Definition: table_printer.py:81
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
isRBaryon
bool isRBaryon(const T &p)
Definition: AtlasPID.h:509
a
TList * a
Definition: liststreamerinfos.cxx:10
CustomParticle.h
copySelective.target
string target
Definition: copySelective.py:37
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
isCharm
bool isCharm(const T &p)
Definition: AtlasPID.h:145
hasSquark
bool hasSquark(const T &p, const int &q)
Definition: AtlasPID.h:417
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
str
Definition: BTagTrackIpAccessor.cxx:11
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
checker_macros.h
Define macros for attributes used to control the static checker.
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
DerivationFramework::ClustersInCone::select
void select(const xAOD::IParticle *particle, const float coneSize, const xAOD::CaloClusterContainer *clusters, std::vector< bool > &mask)
Definition: ClustersInCone.cxx:14
python.compressB64.c
def c
Definition: compressB64.py:93
containedQuarks
std::vector< int > containedQuarks(const T &p)
Definition: AtlasPID.h:878
HepMCHelpers.h
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37