diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim001.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim001.C index ccaed6d612077178c3ee4ae2828ce941234a7370..934465694505ebade57ca2a4f865481684af02ee 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim001.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim001.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim002.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim002.C index 692714a288ff66db7b4c8740245c059e4c6b1d2e..504d695080b880520ef0ae54b6bdc9b2cc42b358 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim002.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim002.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim003.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim003.C index a4302d2e5e224103a9d54aafabb0cf4eec3284b2..7c09a3edd67caef347892441bef71d8e13537cd3 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim003.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim003.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim004.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim004.C index 772b066433467c02f7fc3a257e5f04b00d39050f..edb8fbe671b75c332a89df5a9246650480aaeb1b 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim004.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim004.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim005.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim005.C index a09bf3b5595947a39975d81e1bd0a2fc790f8202..d5aead334811d53971e99559c6a9915805c8f642 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim005.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim005.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim006.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim006.C index 73fa6e0ad2f82cfc8252bd91e1c2f72acbfad4ad..ba8a6dd2323a850ee3bbd98a6c34c967457c2664 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim006.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim006.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim007.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim007.C index 65212257c37b57ed7ed5f0364d010fd88714b543..73e6b3ca827b3518a97cd94685ed1f3393a7e636 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim007.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim007.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim008.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim008.C index 4955394d271ef2864563b305046b7412c80947e1..d849f48e73e99bbf47c926e0ebf81fffbb5f8811 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim008.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim008.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim009.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim009.C index 56efe87039e7811a7287557fcce02c105abe3276..c1e8aaa32f771e8b22cae184fa98ac11c0c8e454 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim009.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim009.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim010.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim010.C index c6c56e5b7584150d8acbb4f4c1e71781ac6aa297..c6c1e196adf962fe0ba79d159f88fed0116457f5 100644 --- a/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim010.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim010.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -//const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* //const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim001.C b/n14dc11an/prm/prm_reac.n14dc11an_sim001.C index 2e26178db32f10aab090a9e09ce0f63c7df11db6..7744bc435e45664d195d00a304172ff69a1342a7 100644 --- a/n14dc11an/prm/prm_reac.n14dc11an_sim001.C +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim001.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim002.C b/n14dc11an/prm/prm_reac.n14dc11an_sim002.C index b33b3e555ca4b53076f40f5030a8f380ceddefba..ecaea70db6d6e957ece05490a7eb63cc9b74817e 100644 --- a/n14dc11an/prm/prm_reac.n14dc11an_sim002.C +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim002.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim003.C b/n14dc11an/prm/prm_reac.n14dc11an_sim003.C index 92d63320887257024fa538a2492cc5aced467a6c..0a72d367763f7258e88f1d3cae21716ce25eabb4 100644 --- a/n14dc11an/prm/prm_reac.n14dc11an_sim003.C +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim003.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim004.C b/n14dc11an/prm/prm_reac.n14dc11an_sim004.C index ce3e135cf75fc4a9b5021e4e3e6c8bdbae4b2f09..127b4b48fdfb094f15a377bf1b5a800ea6630ee6 100644 --- a/n14dc11an/prm/prm_reac.n14dc11an_sim004.C +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim004.C @@ -1,10 +1,10 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ +/* ////////////////////////// */ /* Event information */ //Long64_t ntot = 2.e9; // number of events diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim005.C b/n14dc11an/prm/prm_reac.n14dc11an_sim005.C index 4ef042911d0e32d0c918c1ac9313df83651779c7..b033b1bb0dcf4f3a804c022e27ecec69d6377f33 100644 --- a/n14dc11an/prm/prm_reac.n14dc11an_sim005.C +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim005.C @@ -1,9 +1,9 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; +/* /\* Common constants *\/ */ +/* const Double_t u = 931.49432/1000.; // GeV */ +/* const Double_t c = 299.7924; // speed of light, mm/ns */ +/* const Double_t pi = 4.*atan(1.); */ +/* const Double_t d2r = pi/180.; */ +/* const Double_t dummy = -1000.; */ ////////////////////////// /* Event information */ diff --git a/simthm.C b/simthm.C index 91693aca16a2dd84f0373eb5747f5b460dbbef35..a32a695008adaa03d205e8776c608c027d33f37b 100644 --- a/simthm.C +++ b/simthm.C @@ -46,10 +46,22 @@ //#include "Math/InterpolationTypes.h" //#include "Math/Types.h" -#include "prm_reac.C" // parameter file +//#include "prm_reac.C" // parameter file +/* Common constants */ +const Double_t u = 931.49432/1000.; // GeV +const Double_t c = 299.7924; // speed of light, mm/ns +const Double_t pi = 4.*atan(1.); +const Double_t d2r = pi/180.; +const Double_t dummy = -1000.; +////////////////////////// using namespace std; +/* #include */ +/* Bool_t FileExists(const std::string& name) { */ +/* return std::filesystem::is_regular_file(name); */ +/* } */ + extern "C" { void enewzsub_etot_(int *z1, float *m1, float *bfr_ene, char matter1[33], int *unit_pressure, float *pressure, float *temperature, @@ -64,7 +76,7 @@ extern "C" { /* float *density); */ } -Double_t sgm_ppac_ab(Double_t z){ +Double_t sgm_ppac_ab(Double_t z, Double_t za, Double_t zb, Double_t sgm_ppac_a, Double_t sgm_ppac_b){ Double_t sgm = sqrt(pow((zb-z)/(zb-za),2)*sgm_ppac_a + pow((za-z)/(zb-za),2)*sgm_ppac_b); return sgm; @@ -107,8 +119,20 @@ Double_t strip_position(Double_t x, Int_t n_strip, Double_t psd_half){ return x_strip; } +//int main(int argc, char **argv) { int main() { + #include "prm_reac.C" // parameter file + /* cout << Form("%s/prm/prm_reac.%s_%s.C",argv[1],argv[1],argv[2]) << endl; */ + /* cout << FileExists(Form("%s/prm/prm_reac.%s_%s.C", */ + /* argv[1],argv[1],argv[2])) << endl; */ + /* getchar(); */ + + /* gRoot->ProcessLine(Form(".L %s/prm/prm_reac.%s_%s.C", */ + /* argv[1],argv[1],argv[2])); */ + +//#include "Form("%s/prm/prm_reac.%s_%s.C",argv[1],argv[1],argv[2])" TApplication theApp("App", NULL, NULL); + //TApplication theApp("App", &argc, argv); // For enewz for(Int_t ichar=0;ichar<33;ichar++){ @@ -200,8 +224,17 @@ int main() { TString fname; //sprintf(fname,"%s/root/%s_%s.root",dir,label,simnum); fname = Form("%s/root/%s_%s.root",dir,label,simnum); + /* cout << "label: " << argv[1] << endl; */ + /* cout << "sim number: " << argv[2] << endl; */ + cout << endl; + cout << "Directory: "<< dir << endl; + cout << "Label: "<< label << endl; + cout << "Sim number: "<< simnum << endl; + cout << "Parameter file name: " + << Form("%s/prm/prm_reac.%s_%s.C",dir,label,simnum) << endl; cout << "Output file name: " << fname.Data() << endl; - cout << "OK to run?" << endl; getchar(); + cout << "OK to run?" << endl; + getchar(); // to store the parameter file gSystem->Exec(Form("mkdir -vp %s/prm",dir)); // Creates prm/ directory if there is not @@ -370,7 +403,7 @@ int main() { // pos.xtar -> pos.xtar_MC // pos.ytar -> pos.ytar_MC // -> pos.rtar_MC - Double_t sgm_track = sgm_ppac_ab(pos.ztar); + Double_t sgm_track = sgm_ppac_ab(pos.ztar, za, zb, sgm_ppac_a, sgm_ppac_b); pos.xtar_MC = ran->Gaus(pos.xtar,sgm_track); pos.ytar_MC = ran->Gaus(pos.ytar,sgm_track); pos.rtar_MC = sqrt(pos.xtar_MC*pos.xtar_MC + pos.ytar_MC*pos.ytar_MC);