#include using std::cout; using std::cerr; using std::cin; using std::endl; #include using std::valarray; #include using std::vector; #include using std::string; #include using std::list; #include #include using std::fstream; #include using std::pair; #include using std::map; //#include #include "TVector3.h" #include "TRandom.h" #include "TRotation.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 "PndDrcPhoton.h" #include "PndDrcOptReflAbs.h" #include "PndDrcOptReflSurf.h" #include "PndDrcSurfAbs.h" #include "PndDrcSurfPolyFlat.h" #include "PndDrcOptReflSilver.h" #include "PndDrcOptMatAbs.h" #include "PndDrcOptMatLithotecQ0.h" #include "PndDrcOptDev.h" #include "PndDrcOptDevSys.h" #include "PndDrcOptVol.h" #include "PndDrcOptDevManager.h" int main() { PndDrcOptReflSurf refl_surf; string filename; double prob; cout<< "Give filename and probability" <>filename; cin>>prob; refl_surf.setProb(prob); cout<<" probability: "<setVerbosity(verbosity); manager->addDeviceSystem(opt_system); fstream geo; geo.open("Geo.C",std::ios::out); geo<<"{"<SetRange(-100,-100,-100,100,100,100);"<SetView(0,90,90,i);"<print(geo); // // the intention is to play around with routines. // create a list of photons in bar fstream out; out.open(filename.c_str(),std::ios::out); for (double zz=-390; zz<=390; zz+=10) { XYZPoint pos(0,-9,zz); double nevents=1000; double pi=3.1415926535; bool photons_exist = false; int icnt_coinc = 0; int icnt_measured = 0; int icnt_flying = 0; int icnt_lost = 0; int icnt_absorbed = 0; for (int ievent=0; ieventcerenkov(pos,dir,beta,300,200,400,600)) photons_exist = true; if (photons_exist) { manager->propagate(); // propagate photons } list list_photon = manager->photonList(); // get list manager->clearPhotonList(); bool det1 = false; bool det2 = false; double time1=0; double time2=0; list::iterator iph; for(iph=list_photon.begin(); iph != list_photon.end(); ++iph) { //if ((*iph).fate()==PndDrc::PhotMeasured) cout<<" Measured"< time1)*/) { icnt_coinc++; //cout<<" coincident hit of both detectors"<