Universita' di GenovaINFN Sezione di Genova  
AIRWATCH / EUSO Genova

WallInteraction - source file

//
// $Id: WallInteraction.cc,v 1.11 2005/03/21 17:58:55 thea Exp $
//
#include "EsafRandom.hh"
#include "WallInteraction.hh"
#include "EEvent.hh"

ClassImp(WallInteraction)

//______________________________________________________________________________
 WallInteraction::WallInteraction() {
    //
    // Constructor
    //

    fSpecRefl=Conf()->GetNum("WallInteraction.fSpecularReflectivity");
}

//______________________________________________________________________________
 Photon *WallInteraction::Transport(Photon *p) const {

    TRandom* rndm = EsafRandom::Get();
    if(rndm->Rndm() > fSpecRefl) {
        p=0;
        return p;
    }

    // ortho is ortho normal to the cylinder in the impact point.
    EVector ortho=p->pos;      
    ortho[Z]=0;
    ortho=ortho.Unit();

    p->dir -= ortho*2*p->dir.Dot(ortho);

    return p;
}
About Us | EUSO Official Website | Web pages created by Roberto Pesce and Alessandro Thea - Last Update Wed Nov 16 16:57:39 2005 Wed Nov 16 16:29:22 2005