| 1 | #include <iostream>
|
|---|
| 2 | #include <vector>
|
|---|
| 3 | #include <utility>
|
|---|
| 4 | #include <strstream>
|
|---|
| 5 | #include <fstream>
|
|---|
| 6 |
|
|---|
| 7 | int main()
|
|---|
| 8 | {
|
|---|
| 9 |
|
|---|
| 10 | std::vector<std::pair<int,int> > materials;
|
|---|
| 11 | std::vector<std::pair<int,int> > projectiles;
|
|---|
| 12 | std::vector<double> energies;
|
|---|
| 13 |
|
|---|
| 14 | std::pair<int,int> H(1,1);
|
|---|
| 15 | std::pair<int,int> d(2,1);
|
|---|
| 16 | std::pair<int,int> O(16,8);
|
|---|
| 17 | std::pair<int,int> Al(27,13);
|
|---|
| 18 | std::pair<int,int> Fe(56,26);
|
|---|
| 19 | std::pair<int,int> Pb(207,82);
|
|---|
| 20 |
|
|---|
| 21 | std::pair<int,int> t(3,1);
|
|---|
| 22 | std::pair<int,int> alpha(4,2);
|
|---|
| 23 | std::pair<int,int> Li6(6,3);
|
|---|
| 24 | std::pair<int,int> Li7(7,3);
|
|---|
| 25 | std::pair<int,int> C(12,6);
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | materials.push_back(H);
|
|---|
| 29 | materials.push_back(d);
|
|---|
| 30 | materials.push_back(O);
|
|---|
| 31 | materials.push_back(Al);
|
|---|
| 32 | materials.push_back(Fe);
|
|---|
| 33 | materials.push_back(Pb);
|
|---|
| 34 |
|
|---|
| 35 | projectiles.push_back(d);
|
|---|
| 36 | projectiles.push_back(t);
|
|---|
| 37 | projectiles.push_back(alpha);
|
|---|
| 38 | projectiles.push_back(Li6);
|
|---|
| 39 | projectiles.push_back(Li7);
|
|---|
| 40 | projectiles.push_back(C);
|
|---|
| 41 |
|
|---|
| 42 | energies.push_back(100.);
|
|---|
| 43 | energies.push_back(250.);
|
|---|
| 44 | energies.push_back(500.);
|
|---|
| 45 | energies.push_back(800.);
|
|---|
| 46 |
|
|---|
| 47 | std::vector<std::pair<int,int> >::iterator imat;
|
|---|
| 48 | std::vector<std::pair<int,int> >::iterator ipro;
|
|---|
| 49 | std::vector<double>::iterator iener;
|
|---|
| 50 |
|
|---|
| 51 | for (imat=materials.begin();imat<materials.end();imat++)
|
|---|
| 52 | {
|
|---|
| 53 | for (ipro=projectiles.begin();ipro<projectiles.end();ipro++)
|
|---|
| 54 | {
|
|---|
| 55 | for (iener=energies.begin();iener<energies.end();iener++)
|
|---|
| 56 | {
|
|---|
| 57 | int m_a=imat->first;
|
|---|
| 58 | int m_z=imat->second;
|
|---|
| 59 | int p_a=ipro->first;
|
|---|
| 60 | int p_z=ipro->second;
|
|---|
| 61 | double e=*iener;
|
|---|
| 62 | std::strstream f_name;
|
|---|
| 63 | f_name << m_a <<"_" << m_z<<"_" << p_a<<"_"<< p_z<<
|
|---|
| 64 | "_"<<e<<".in";
|
|---|
| 65 | std::cout << m_a <<" " << m_z<<" " << e<< "f_name " <<
|
|---|
| 66 | f_name.str() << std::endl;
|
|---|
| 67 | std::ofstream file(f_name.str());
|
|---|
| 68 | file << m_a <<" " << m_z<<" " << std::endl;
|
|---|
| 69 | file << "1" << std::endl;
|
|---|
| 70 | file << p_a <<" " << p_z<<" " << std::endl;
|
|---|
| 71 | file << "20000" << std::endl; // number of events
|
|---|
| 72 | file << e << std::endl;
|
|---|
| 73 | file << "1" << std::endl;
|
|---|
| 74 | file.close();
|
|---|
| 75 |
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | }
|
|---|
| 79 | }
|
|---|
| 80 | }
|
|---|