IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 322e29a1 authored by Felix Riehn's avatar Felix Riehn Committed by ralfulrich
Browse files

added boost from cms to lab

parent ecc792d9
No related branches found
No related tags found
No related merge requests found
...@@ -66,34 +66,40 @@ public: ...@@ -66,34 +66,40 @@ public:
void DoDiscrete(Particle& p, Stack& s) const { void DoDiscrete(Particle& p, Stack& s) const {
// get energy of particle from stack // get energy of particle from stack
// stack is in GeV in lab. frame // stack is in GeV in lab. frame
// convert to GeV in cm. frame // convert to GeV in cm. frame (assuming proton at rest as target)
EnergyType E = p.GetEnergy(); EnergyType E = p.GetEnergy();
double Ecm = sqrt( 2. * E * 0.93827_GeV ) / 1_GeV ; EnergyType Ecm = sqrt( 2. * E * 0.93827_GeV );
// FOR NOW: set beam to proton // FOR NOW: set beam to proton
int kBeam = 13; //p.GetPID(); int kBeam = 13; //p.GetPID();
// FOR NOW: set target to proton // FOR NOW: set target to proton
int kTarget = 1; //p.GetPID(); int kTarget = 1; //p.GetPID();
std::cout << "ProcessSplit: " << " DoDiscrete: E(GeV):" << E / 1_GeV << " Ecm(GeV): " << Ecm << std::endl; std::cout << "ProcessSplit: " << " DoDiscrete: E(GeV):" << E / 1_GeV << " Ecm(GeV): " << Ecm / 1_GeV << std::endl;
if (E < 8.5_GeV || Ecm < 10. ) { if (E < 8.5_GeV || Ecm < 10_GeV ) {
std::cout << "ProcessSplit: " << " DoDiscrete: dropping particle.." << std::endl; std::cout << "ProcessSplit: " << " DoDiscrete: dropping particle.." << std::endl;
p.Delete(); p.Delete();
fCount++; fCount++;
} else { } else {
//p.SetEnergy(E / 2); // Sibyll does not know about units..
//s.NewParticle().SetEnergy(E / 2); double sqs = Ecm / 1_GeV;
// running sibyll // running sibyll
sibyll_( kBeam, kTarget, Ecm); sibyll_( kBeam, kTarget, sqs);
// print final state
int print_unit = 6; int print_unit = 6;
sib_list_( print_unit ); sib_list_( print_unit );
// delete current particle // delete current particle
p.Delete(); p.Delete();
const EnergyType proton_mass = 0.93827_GeV;
const double gamma = ( E + proton_mass ) / ( Ecm );
const double gambet = sqrt( E * E - proton_mass * proton_mass ) / Ecm;
// add particles from sibyll to stack // add particles from sibyll to stack
for(int i=0; i<s_plist_.np; ++i){ for(int i=0; i<s_plist_.np; ++i){
//transform to lab. frame
s.NewParticle().SetEnergy( s_plist_.p[3][i] * 1_GeV ); const double en_lab = gambet * s_plist_.p[2][i] + gamma * s_plist_.p[3][i];
// add to corsika stack
s.NewParticle().SetEnergy( en_lab * 1_GeV );
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment