Changeset 17 in ZHANGProjects for ICOSIM/CPP/trunk/source/lattice.cc
- Timestamp:
- Sep 30, 2014, 11:05:33 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ICOSIM/CPP/trunk/source/lattice.cc
r15 r17 441 441 { 442 442 443 cout << "bunch size is: " << bunch.size() << endl; 444 445 443 446 if (idpart >= 0) { 444 447 if (idpart > bunch.size()) { … … 602 605 read(bunch); 603 606 }*/ 604 607 608 605 609 for (int p(0); p < bunch.size(); ++p) { //loop througt the particles 606 610 607 611 double dpopeff; 608 612 613 // .inabs = 0, particle lost, .inabs = 1, particle not lost 609 614 if (bunch[p].inabs == 1) { 610 615 … … 743 748 744 749 int lost(bunch.size()); 745 746 resColli[icop]->collipassCrystal(bunch, betgam, turn, outputpath); 747 748 nhitcolli[icop] = lost - bunch.size(); //nhitcolli(icop) gives the number particles getting lost in collimator number icop, 749 750 751 long int nhit = 0; 752 753 resColli[icop]->collipassCrystal(bunch, betgam, turn, nhit, outputpath); 754 755 //nhitcolli[icop] = lost - bunch.size(); //nhitcolli(icop) gives the number particles getting lost in collimator number icop, 756 757 nhitcolli[icop] = nhit; 758 759 // cout << "after the crystal: bunch size = " << bunch.size()<< endl; 750 760 } 751 761 … … 924 934 if (inside == false) { 925 935 cout <<"The particle is lost at element " << reseau[i]->NAME << endl; 936 // cout << "Particle ID is: " << p << endl; 937 // cout << "bunch size is: " << bunch.size() << endl; 938 // cout << "bunch status is: " << bunch[p].inabs << endl; 939 // 926 940 xh0 = bunch[p].coordonnees[0][0]; 927 941 bunch[p].inabs = 0; … … 1100 1114 } 1101 1115 } 1116 // cout << "bunch size is ...." << bunch.size() << endl; 1102 1117 1103 1118 if (plotflag == "Yes") { … … 1132 1147 vector <Particle> tempinabs; 1133 1148 1134 //we contine just with particles that are not lost1149 //we contine to track for the next turn; just with particles that are not lost 1135 1150 for (int w(0); w < bunch.size(); ++w) { 1136 1151 if (bunch[w].inabs != 0) { … … 1139 1154 } 1140 1155 1156 // cout << "bunch size before the turn: "<< bunch.size() << endl; 1157 1141 1158 bunch.clear(); 1142 1159 … … 1147 1164 tempinabs.clear(); 1148 1165 1149 } 1166 // cout << "bunch size after the turn " <<bunch.size() << endl; 1167 }
Note: See TracChangeset
for help on using the changeset viewer.