Fork me on GitHub

Ignore:
Timestamp:
Apr 16, 2014, 3:56:14 PM (11 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
64a4950
Parents:
f6b9fec
Message:

switch to a more stable Hector version

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*/
    1811
    1912/// \file H_RectangularAperture.cc
     
    2720
    2821// ROOT #includes
    29 #include "TPave.h"
     22//#include "TPave.h"
    3023
    3124// local #includes
     
    3326using namespace std;
    3427
    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, h are the length and height of the rectangular shape
     28H_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
    3730        /// @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);
    4231}
    4332
     
    4736}
    4837
    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);
     38void H_RectangularAperture::draw() const {
     39/*      TPave* tp = new TPave(fx-x1,fy-x2,fx+x1,fy+x2,1);
    5140        tp->SetFillStyle(3003);
    5241        tp->SetLineColor(2);
     
    5443        tp->Draw();
    5544        return;
     45*/
    5646}
    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;
     47void H_RectangularAperture::printProperties() const {
     48        cout << "Aperture shape:" << getTypeString() << ", rectangle Sides : "<<x1<<", "<<x2<<endl;
     49        cout << " \t Center : " << fx << "," << fy << endl;
     50        return;
    6251}
    63 
Note: See TracChangeset for help on using the changeset viewer.