Changeset 281 in svn for trunk/Utilities/Hector/src/H_RecRPObject.cc
- Timestamp:
- Mar 1, 2009, 3:56:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Hector/src/H_RecRPObject.cc
r3 r281 1 /* 2 ---- Hector the simulator ---- 3 A fast simulator of particles through generic beamlines. 4 J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be 5 6 http://www.fynu.ucl.ac.be/hector.html 7 8 Centre de Physique des Particules et de Phénoménologie (CP3) 9 Université Catholique de Louvain (UCL) 10 */ 11 1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 * * 3 * --<--<-- A fast simulator --<--<-- * 4 * / --<--<-- of particle --<--<-- * 5 * ----HECTOR----< * 6 * \ -->-->-- transport through -->-->-- * 7 * -->-->-- generic beamlines -->-->-- * 8 * * 9 * JINST 2:P09005 (2007) * 10 * X Rouby, J de Favereau, K Piotrzkowski (CP3) * 11 * http://www.fynu.ucl.ac.be/hector.html * 12 * * 13 * Center for Cosmology, Particle Physics and Phenomenology * 14 * Universite catholique de Louvain * 15 * Louvain-la-Neuve, Belgium * 16 * * 17 * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 12 18 13 19 /// \file H_RecRPObject.cc … … 41 47 l_1(new TF1("l_1","[0] + [1]*x + [2]*x*x ",emin,emax)), 42 48 l_2(new TF1("l_2","[0] + [1]*x + [2]*x*x ",emin,emax)) 43 { 44 // emax = -1; /* GeV */ 45 } 46 47 H_RecRPObject::H_RecRPObject(float ss1, float ss2, H_AbstractBeamLine* beam) : emin(0), emax(-1), x1(0), x2(0), y1(0), y2(0), s1(ss1), s2(ss2), 49 {} 50 51 H_RecRPObject::H_RecRPObject(const float ss1, const float ss2, const H_AbstractBeamLine* beam) : emin(0), emax(-1), x1(0), x2(0), y1(0), y2(0), s1(ss1), s2(ss2), 48 52 txip(NOT_YET_COMPUTED), tyip(NOT_YET_COMPUTED), energy(NOT_YET_COMPUTED), q2(NOT_YET_COMPUTED), pt(NOT_YET_COMPUTED), 49 thebeam(beam ),53 thebeam(beam->clone()), 50 54 f_1(new TF1("f_1","[0] + [1]*x + [2]*x*x ",emin,emax)), 51 55 f_2(new TF1("f_2","[0] + [1]*x + [2]*x*x ",emin,emax)), … … 58 62 l_1(new TF1("l_1","[0] + [1]*x + [2]*x*x ",emin,emax)), 59 63 l_2(new TF1("l_2","[0] + [1]*x + [2]*x*x ",emin,emax)) 60 { 61 if(ss1==ss2) cout<<"<H_RecRPObject> WARNING : detectors are on same position"<<endl; 62 // emax = -1; /* GeV */ 64 {if(ss1==ss2) cout<<"<H_RecRPObject> WARNING : detectors are on same position"<<endl; 65 } 66 67 H_RecRPObject::H_RecRPObject(const H_RecRPObject& r): 68 emin(r.emin), emax(r.emax), x1(r.x1), x2(r.x2), y1(r.y1), y2(r.y2), s1(r.s1), s2(r.s2), 69 txip(r.txip), tyip(r.tyip), energy(r.energy), q2(r.q2), pt(r.pt), 70 //thebeam(r.thebeam->clone()), 71 thebeam(new H_AbstractBeamLine(*(r.thebeam))), 72 f_1(new TF1(*(r.f_1))), f_2(new TF1(*(r.f_2))), g_1(new TF1(*(r.g_1))), g_2(new TF1(*(r.g_2))), 73 d_1(new TF1(*(r.d_1))), d_2(new TF1(*(r.d_2))), k_1(new TF1(*(r.k_1))), k_2(new TF1(*(r.k_2))), 74 l_1(new TF1(*(r.l_1))), l_2(new TF1(*(r.l_2))) 75 {} 76 77 H_RecRPObject& H_RecRPObject::operator=(const H_RecRPObject& r) { 78 if (this == &r) return *this; 79 emin = r.emin, emax = r.emax; 80 x1 = r.x1; x2 = r.x2; 81 y1 = r.y1; y2 = r.y2; 82 s1 = r.s1; s2 = r.s2; 83 txip= r.txip; tyip=r.tyip; 84 energy= r.energy; q2= r.q2; pt= r.pt; 85 //thebeam = r.thebeam->clone(); 86 thebeam = new H_AbstractBeamLine(*(r.thebeam)); 87 f_1 = new TF1(*(r.f_1)); 88 f_2 = new TF1(*(r.f_2)); 89 g_1 = new TF1(*(r.g_1)); 90 g_2 = new TF1(*(r.g_2)); 91 d_1 = new TF1(*(r.d_1)); 92 d_2 = new TF1(*(r.d_2)); 93 k_1 = new TF1(*(r.k_1)); 94 k_2 = new TF1(*(r.k_2)); 95 l_1 = new TF1(*(r.l_1)); 96 l_2 = new TF1(*(r.l_2)); 97 return *this; 63 98 } 64 99 … … 308 343 return pt; 309 344 } 345 346 std::ostream& operator<< (std::ostream& os, const H_RecRPObject& rp) { 347 os << "e_min=" << rp.emin << "\t e_max= " << rp.emax << endl; 348 os << "x1=" << rp.x1 << "\t x2= " << rp.x2 << "\t y1=" << rp.y1 << "\t y2=" << rp.y2 349 << "\t s1=" << rp.s1 << "\t s2=" << rp.s2 << endl; 350 os << "txip=" << rp.txip << "\t tyip=" << rp.tyip << "\t energy=" << rp.energy << "\t q2=" << rp.q2 << "\t pt=" << rp.pt << endl; 351 return os; 352 }
Note:
See TracChangeset
for help on using the changeset viewer.