#include using std::cout; using std::cerr; using std::cin; using std::endl; #include using std::valarray; #include using std::fstream; #include using std::string; #include using std::list; #include "TObject.h" #include "TVector3.h" #include "TRandom.h" #include "Math/Vector3D.h" using ROOT::Math::XYZVector; #include "Math/Point3D.h" using ROOT::Math::XYZPoint; #include "Math/Transform3D.h" using ROOT::Math::Transform3D; #include "Math/RotationX.h" using ROOT::Math::RotationX; #include "Math/RotationY.h" using ROOT::Math::RotationY; #include "Math/RotationZ.h" using ROOT::Math::RotationZ; #include "Math/Rotation3D.h" using ROOT::Math::Rotation3D; #include "DrcPhoton.h" #include "DrcOptReflAbs.h" #include "DrcSurfAbs.h" #include "DrcOptMatAbs.h" #include "DrcOptDev.h" #include "DrcOptPixel.h" //---------------------------------------------------------------------- DrcOptPixel* DrcOptPixel::clone() const { return new DrcOptPixel(*this); } //---------------------------------------------------------------------- void DrcOptPixel::addSurface(const DrcSurfAbs& surf) { if (&surf) { DrcSurfAbs* tmp = surf.clone(); m_listSurf.push_back(tmp); } if (m_listSurf.size()>1) { cerr<<" *** DrcOptPixel::addSurface: too many surfaces: " <::const_iterator isurf; while (ph.fate() == Drc::PhotFlying) { ph.setDevice(this); for(isurf=m_listSurf.begin(); isurf != m_listSurf.end(); ++isurf) { XYZPoint pos_new; double path_length; if ((*isurf)->surfaceHit(ph,pos_new,path_length)) { // make path a little bit longer for observation if (m_photonTrace) { ph.setPosition(pos_new+200*ph.direction()); //50 mm } else { ph.setPosition(pos_new); } //ph.setPosition(pos_new); ph.setFate(Drc::PhotMeasured); //cout<<" in pixel "<