diff --git a/INSTALL b/INSTALL index 5f4fa705f21ec3375cb06ba952f17382b93c083a..eb99292569a1add4c4a22b90fb3b9ddc7ca08b08 100644 --- a/INSTALL +++ b/INSTALL @@ -54,7 +54,9 @@ III) INSTALLATION b) First, you need to define some environment variables. You can source the NPEnvironment.bash or NPEnvironment.tchrc file - depending on your shell. + depending on your shell or include the relevant lines in your + .bashrc or .tcshrc file. Don't forget to customize these file + with the relevant path to your NPTool installation. This step is mandatory since the Makefiles used to build the package depend on some of these environment variables. @@ -76,3 +78,6 @@ III) INSTALLATION cd Template make This step is not mandatory for the G4 simulation to work. + If you want to use the ROOT macros in the $NPAnalysis/macros + directory you should execute in a ROOT terminal the commands + you can find in rootlogon.C diff --git a/Inputs/EventGenerator/134Snpt.reaction b/Inputs/EventGenerator/134Snpt.reaction new file mode 100644 index 0000000000000000000000000000000000000000..6ff89b7fe5c5750df094da8717258743867915b8 --- /dev/null +++ b/Inputs/EventGenerator/134Snpt.reaction @@ -0,0 +1,21 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% Reaction file for 60Fe(d,p)61Fe reaction %%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%Beam energy given in MeV ; Excitation in MeV ; emmitance in rad +Transfert + Beam= 134Sn + Target= 1H + Light= 3H + Heavy= 132Sn + ExcitationEnergy= 0.0 + BeamEnergy= 1340 + BeamEnergySpread= 0 + SigmaX= 0 + SigmaY= 0 + SigmaThetaX= 0 + SigmaPhiY= 0 + CrossSectionPath= CS_Ep10MeV_sn134pt_gs_1h9demi.dat + ShootLight= 1 + ShootHeavy= 0 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + diff --git a/NPEnvironment.bash b/Misc/NPEnvironment.bash similarity index 100% rename from NPEnvironment.bash rename to Misc/NPEnvironment.bash diff --git a/NPEnvironment.tchrc b/Misc/NPEnvironment.tchrc similarity index 100% rename from NPEnvironment.tchrc rename to Misc/NPEnvironment.tchrc diff --git a/Misc/rootlogon.C b/Misc/rootlogon.C new file mode 100644 index 0000000000000000000000000000000000000000..aba6d28ada6fc76f9e069f5d9a20d6a9caa46a6d --- /dev/null +++ b/Misc/rootlogon.C @@ -0,0 +1,5 @@ +{ + gROOT->ProcessLine(".include /YourPathToNPTool/NPTool/NPLib/include"); + gSystem->Load("/YourPathToNPTool/NPTool/NPLib/lib/libInitialConditions.so"); + gSystem->Load("/YourPathToNPTool/NPTool/NPLib/lib/libInteractionCoordinates.so"); +} diff --git a/NPAnalysis/Gaspard/macros/DisplayInputCrossSection.C b/NPAnalysis/Gaspard/macros/DisplayInputCrossSection.C new file mode 100644 index 0000000000000000000000000000000000000000..cd475ef129ac57ee8cfab4a8c2f9a4f17a5b8dc8 --- /dev/null +++ b/NPAnalysis/Gaspard/macros/DisplayInputCrossSection.C @@ -0,0 +1,132 @@ +void DisplayInputCrossSection() +{ + // Path to cross-section files + TString path = gSystem->Getenv("NPTOOL"); + path += "/Inputs/CrossSection/"; + + // Read cross-sections 132Sn(d,p) +/* TGraph *gr1 = new TGraph(path + "132Sndp_5A_MeV_3p3_ZR_FRC.lis"); + TGraph *gr2 = new TGraph(path + "132Sndp_5A_MeV_2f7_ZR_FRC.lis"); + TGraph *gr3 = new TGraph(path + "132Sndp_10A_MeV_3p3_ZR_FRC.lis"); + TGraph *gr4 = new TGraph(path + "132Sndp_10A_MeV_2f7_ZR_FRC.lis");*/ + // Jacques + TGraph *gr1 = ReadCrossSection("132Sndp_5A_MeV_3p3_ZR_FRC.lis"); + TGraph *gr2 = ReadCrossSection("132Sndp_5A_MeV_2f7_ZR_FRC.lis"); + TGraph *gr3 = ReadCrossSection("132Sndp_10A_MeV_3p3_ZR_FRC.lis"); + TGraph *gr4 = ReadCrossSection("132Sndp_10A_MeV_2f7_ZR_FRC.lis"); + // Didier + TGraph *gr5 = new TGraph(path + "sn132dp_gs_10AMeV.txt"); + + // Read cross-section 134Sn(p,t) + // Didier + TGraph *grpt1 = ReadCrossSectionPT("CS_Ep10MeV_sn134pt_gs_1h9demi.dat"); + TGraph *grpt2 = ReadCrossSectionPT("CS_Ep15MeV_sn134pt_gs_1h9demi.dat"); + TGraph *grpt3 = ReadCrossSectionPT("CS_Ep20MeV_sn134pt_gs_1h9demi.dat"); + + // Draw cross-sections + TCanvas *can = new TCanvas("can"); + can->SetLogy(); + can->Draw(); +// TH2F *hframe = new TH2F("hframe", "^{2}H(^{132}Sn,p)^{133}Sn", 180, 0, 180, 100, 1e-2, 100); + TH2F *hframe = new TH2F("hframe", "^{1}H(^{134}Sn,t)^{132}Sn_{g.s.}", 180, 0, 180, 100, 1e-8, 1e-5); + hframe->Draw(); + hframe->SetXTitle("#Theta_{c.m.} [deg]"); + hframe->SetYTitle("d#sigma/d#Omega [mb/sr]"); + grpt1->SetLineColor(kRed); grpt1->Draw("l"); + grpt2->SetLineColor(kMagenta); grpt2->Draw("l"); + grpt3->SetLineColor(kBlue); grpt3->Draw("l"); +/* gr1->SetLineColor(kRed); gr1->SetLineStyle(2); gr1->Draw("l"); + gr2->SetLineColor(kRed); gr2->Draw("l"); + gr3->SetLineColor(kBlue); gr3->SetLineStyle(2); gr3->Draw("l"); + gr4->SetLineColor(kBlue); gr4->Draw("l");*/ +// gr5->Draw("l"); + + // TLegend + TLegend *leg = new TLegend(0.50, 0.64, 0.82, 0.84); + leg->AddEntry(grpt1, "1h9/2 10 MeV/u", "l"); + leg->AddEntry(grpt2, "1h9/2 15 MeV/u", "l"); + leg->AddEntry(grpt3, "1h9/2 20 MeV/u", "l"); +/* TLegend *leg = new TLegend(0.16, 0.17, 0.48, 0.37); + leg->AddEntry(gr1, "3p3/2 5 MeV/u", "l"); + leg->AddEntry(gr2, "2f7/2 5 MeV/u", "l"); + leg->AddEntry(gr3, "3p3/2 10 MeV/u", "l"); + leg->AddEntry(gr4, "2f7/2 10 MeV/u", "l");*/ + leg->SetBorderSize(1); + leg->Draw(); + +/* TMultiGraph *mgr = new TMultiGraph(); + mgr->Add(gr1, "lp"); + mgr->Add(gr2, "lp"); + mgr->Add(gr3, "lp"); + mgr->Add(gr4, "lp"); + mgr->Draw("a*");*/ +// gr1->Draw("alp"); +} + + + +TGraph* ReadCrossSection(const char* fname) +{ + // Path to cross-section files + TString path = gSystem->Getenv("NPTOOL"); + path += "/Inputs/CrossSection/"; + + // Open file + ifstream fich; + fich.open(path + fname); + if (!fich) cout << "Probleme d'ouverture dans le fichier " << fname << endl; + + // Read file + Double_t angle, sigma; + Int_t nlines = 0; + TGraph *gr = new TGraph(); + while (fich >> angle >> sigma) { + gr->SetPoint(nlines++, angle, sigma * 15); // 15: fm^2 -> mb + D0^2 + } + + // Close file + fich.close(); + + // TGraph name + gr->SetTitle(fname); + + // test pour savoir si on a bien rempli le TGraph + if (gr->GetN() == 0) + cout << "Mauvaise lecture du fichier --> probablement mauvais format" << endl; + + return gr; +} + + + +TGraph* ReadCrossSectionPT(const char* fname) +{ + // Path to cross-section files + TString path = gSystem->Getenv("NPTOOL"); + path += "/Inputs/CrossSection/"; + + // Open file + ifstream fich; + fich.open(path + fname); + if (!fich) cout << "Probleme d'ouverture dans le fichier " << fname << endl; + + // Read file + Double_t angle, sigma, dum; + Int_t nlines = 0; + TGraph *gr = new TGraph(); + while (fich >> angle >> sigma >> dum >> dum >> dum >> dum >> dum >> dum >> dum >> dum >> dum) { + gr->SetPoint(nlines++, angle, sigma); + } + + // Close file + fich.close(); + + // TGraph name + gr->SetTitle(fname); + + // test pour savoir si on a bien rempli le TGraph + if (gr->GetN() == 0) + cout << "Mauvaise lecture du fichier --> probablement mauvais format" << endl; + + return gr; +} diff --git a/NPAnalysis/macros/ControlSimu.C b/NPAnalysis/macros/ControlSimu.C index 9717f67cf6c6a80bcb11cb07e53e9babbd14e3c7..7854bd567c6813dbcb44d4c66acd8a29a49bc5a0 100644 --- a/NPAnalysis/macros/ControlSimu.C +++ b/NPAnalysis/macros/ControlSimu.C @@ -37,7 +37,6 @@ #include "TH1F.h" #include "TH2F.h" -#include "TGaspardTrackerData.h" #include "TInitialConditions.h" #include "TInteractionCoordinates.h" @@ -91,7 +90,7 @@ void ControlSimu(const char * fname = "mySimul") hEmittanceXY -> Fill(initCond->GetICPositionX(0), initCond->GetICPositionY(0)); hIncidentZ -> Fill(initCond->GetICPositionZ(0)); hEmittanceXTheta -> Fill(initCond->GetICPositionX(0), initCond->GetICIncidentEmittanceTheta(0)); - hEmittanceYPhi -> Fill(initCond->GetICPositionX(0), initCond->GetICIncidentEmittancePhi(0)); + hEmittanceYPhi -> Fill(initCond->GetICPositionY(0), initCond->GetICIncidentEmittancePhi(0)); hIncidentTheta -> Fill(initCond->GetICIncidentAngleTheta(0)); hIncidentPhi -> Fill(initCond->GetICIncidentAnglePhi(0)); // ejected particle diff --git a/NPAnalysis/macros/GeometricalEfficiency.C b/NPAnalysis/macros/GeometricalEfficiency.C index c2e43a82ad2a6150cd92bb2f6437d6572948e1fe..3062f9bd40c3fdb64df0eadd0cb57243af9e6faf 100644 --- a/NPAnalysis/macros/GeometricalEfficiency.C +++ b/NPAnalysis/macros/GeometricalEfficiency.C @@ -36,6 +36,9 @@ #include "TBranch.h" #include "TH1F.h" +#include "TInitialConditions.h" +#include "TInteractionCoordinates.h" + using namespace std ;