Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Opal maps

Merged snuverink_j requested to merge OPAL-maps into master
1 file
+ 2
72
Compare changes
  • Side-by-side
  • Inline
@@ -292,30 +292,7 @@ void ThickTracker::fillDrift( lstruct_t& mapBeamLine,double& elementPos,
int nSlices = 1;
double stepSize = undefSpace;
////=====================================================
////Redefine constants for comparison with COSY Infinity
////=====================================================
// double E=(itsReference.getE() - itsReference.getM());
// E = std::round(E);
// double AMU = 1.66053873e-27;
// double EZERO = 1.602176462e-19 ;
// double CLIGHT= 2.99792458e8 ;
// double AMUMEV = AMU*(CLIGHT*CLIGHT)/EZERO ;
// double M0= 1.00727646688;
// //M0 = 1./1822.8884845;
//
// double ETA = E/(M0*AMUMEV) ;
// double PHI = std::sqrt(ETA*(2+ETA)) ;
//
// gamma0=ETA+1;
// beta0= std::sqrt(1-1/(gamma0*gamma0));
//
// beta0 = (PHI / (1 + ETA));
// gamma0 = PHI / beta0;
//
////=====================================================
if ( considerSC_m && stepSize < minStepSizeIfSC_m ){
nSlices = std::ceil( undefSpace / minStepSizeIfSC_m );
stepSize = undefSpace / nSlices;
@@ -356,33 +333,6 @@ void ThickTracker::defMapTrackingElement(std::shared_ptr<Component> element, str
double P0 = (itsBunch_m-> getP()); //beta0 * gamma0 * EProt * 1e6 / Physics::c;
double q = (itsBunch_m->getQ()); // particle change [e]
////=====================================================
////Redefine constants for comparison with COSY Infinity
////=====================================================
// double E=(itsReference.getE() - itsReference.getM());
// E = std::round(E);
// double AMU = 1.66053873e-27;
// double EZERO = 1.602176462e-19 ;
// double CLIGHT= 2.99792458e8 ;
// double AMUMEV = AMU*(CLIGHT*CLIGHT)/EZERO ;
// double M0= 1.00727646688;
// //M0 = 1./1822.8884845;
//
// double ETA = E/(M0*AMUMEV) ;
// double PHI = std::sqrt(ETA*(2+ETA)) ;
//
// P0 = (AMUMEV*M0)*PHI;
// gamma0=ETA+1;
// beta0= std::sqrt(1-1/(gamma0*gamma0));
//
// beta0 = (PHI / (1 + ETA));
// gamma0 = PHI / beta0;
//
////=====================================================
//select the right Hamiltonian for the beam line
switch(element->getType()) {
case ElementBase::ElementType::DRIFT: {
@@ -605,10 +555,6 @@ void ThickTracker::execute() {
msg<<"gamma: " << itsBunch_m->getInitialGamma()<< endl;
msg<<"E0: " << itsBunch_m->getM() <<endl;
std::ofstream mbl;
mbl.open ("mapBeamLine.txt");
mbl << std::setprecision(16);
std::ofstream tmap;
tmap.open ("TransferMap.txt");
tmap << std::setprecision(16);
@@ -697,23 +643,7 @@ void ThickTracker::execute() {
defMapTrackingElement(element, mapTrackingElement, mapBeamLine);
}
//=================================
// TODO: remove Messages later
//=================================
for (mapBeamLineit=mapBeamLine.begin(); mapBeamLineit != mapBeamLine.end(); ++mapBeamLineit) {
msg << "=============================="<< endl
<< "Name: " << mapBeamLineit->elementName << endl
<< "InPosition: "<< mapBeamLineit->elementPos <<endl
<< "FinPosition: "<< mapBeamLineit->elementPos + mapBeamLineit->nSlices*mapBeamLineit->stepSize << endl;
mbl<< "Name: " << mapBeamLineit->elementName<<std::endl
<< "Position: " <<mapBeamLineit->elementPos <<std::endl
<< "StepSize: " <<mapBeamLineit->stepSize <<std::endl
<< "NSLices: " <<mapBeamLineit->nSlices<<std::endl
<< "map:\n" <<mapBeamLineit->elementMap<<std::endl
<< "---------------------------------" <<std::endl;
}
//=================================
IpplTimings::stopTimer(mapCreation_m);
Loading