Changeset 3c40083 in git for external/Hector/H_RectangularAperture.cc
- Timestamp:
- Apr 16, 2014, 3:56:14 PM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 64a4950
- Parents:
- f6b9fec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/Hector/H_RectangularAperture.cc
rf6b9fec r3c40083 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 * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 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 */ 18 11 19 12 /// \file H_RectangularAperture.cc … … 27 20 28 21 // ROOT #includes 29 #include "TPave.h"22 //#include "TPave.h" 30 23 31 24 // local #includes … … 33 26 using namespace std; 34 27 35 H_RectangularAperture::H_RectangularAperture(const float l, const float h, const float posx, const float posy) :H_Aperture(RECTANGULAR,l,h,0,0,posx,posy) {36 /// @param l, hare the length and height of the rectangular shape28 H_RectangularAperture::H_RectangularAperture(const float x1, const float x2, const float posx, const float posy) :H_Aperture(RECTANGULAR,x1,x2,0,0,posx,posy) { 29 /// @param x1, x2 are the length and height of the rectangular shape 37 30 /// @param posx, posy are the (x,y) coordinates of the center of the rectangular shape 38 }39 40 H_RectangularAperture* H_RectangularAperture::clone() const {41 return new H_RectangularAperture(x1,x2,fx,fy);42 31 } 43 32 … … 47 36 } 48 37 49 void H_RectangularAperture::draw( const float scale) const {50 TPave* tp = new TPave((fx-x1)*scale,(fy-x2)*scale,(fx+x1)*scale,(fy+x2)*scale,1);38 void H_RectangularAperture::draw() const { 39 /* TPave* tp = new TPave(fx-x1,fy-x2,fx+x1,fy+x2,1); 51 40 tp->SetFillStyle(3003); 52 41 tp->SetLineColor(2); … … 54 43 tp->Draw(); 55 44 return; 45 */ 56 46 } 57 58 std::ostream& operator<< (std::ostream& os, const H_RectangularAperture& ap) { 59 os << "Aperture shape:" << ap.aptypestring << ", rectangle sides : " << ap. x1 <<", " << ap.x2 <<endl; 60 os << " \t Center : " << ap.fx << "," << ap.fy << endl; 61 return os; 47 void H_RectangularAperture::printProperties() const { 48 cout << "Aperture shape:" << getTypeString() << ", rectangle Sides : "<<x1<<", "<<x2<<endl; 49 cout << " \t Center : " << fx << "," << fy << endl; 50 return; 62 51 } 63
Note:
See TracChangeset
for help on using the changeset viewer.