#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 "TROOT.h" #include "TRint.h" #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 "PndDrcOptReflSurf.h" #include "PndDrcSurfPolyFlat.h" #include "PndDrcOptReflSilver.h" #include "PndDrcOptMatLithotecQ0.h" #include "PndDrcOptDevSys.h" #include "PndDrcOptVol.h" #include "PndDrcOptDevManager.h" int main(int argc, char *argv[]) { 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<<"{"<GetVersionInt() < 51600) { geo<<" TView *view = new TView(1);"<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::kPhotMeasured) cout<<" Measured"< time1)*/) { icnt_coinc++; //cout<<" coincident hit of both detectors"<