Skip to content
Snippets Groups Projects
Commit 81deb6f7 authored by PLAGNOL Leo's avatar PLAGNOL Leo
Browse files

update on Project Monster@ALTO

parent 5e29023e
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #381682 passed
...@@ -10,6 +10,7 @@ OpticalPhysics 0 ...@@ -10,6 +10,7 @@ OpticalPhysics 0
HadronPhysicsINCLXX 0 HadronPhysicsINCLXX 0
HadronPhysicsQGSP_BIC_HP 0 HadronPhysicsQGSP_BIC_HP 0
HadronPhysicsQGSP_BERT_HP 1 HadronPhysicsQGSP_BERT_HP 1
HadronPhysicsQGSP_INCLXX_HP 1
Decay 0 Decay 0
Menate_R 0 Menate_R 0
NeutronHP 1 NeutronHP 1
void ShowHistograms()
{
// Load File
TString NPPATH = getenv("NPTOOL");
TFile* file = new TFile(NPPATH+"/Outputs/Simulation/MonsterNeutronTest.root");
TTree* SimulatedTree = (TTree*)file->Get("SimulatedTree");
// Declare histograms
TH1F* h1_TOF_Monster = new TH1F("h1_TOF_Monster", "h1_TOF_Monster", 200, 0, 200);
TH1F* h1_TOF_Plastic = new TH1F("h1_TOF_Plastic", "h1_TOF_Plastic", 20, 0, 5);
TH1F* h1_TOF_diff_Monster_Plastic = new TH1F("h1_TOF_diff_Monster_Plastic", "h1_TOF_diff_Monster_Plastic", 200, 0, 200);
TH2F* h2_TOF_DetNbr_Monster = new TH2F("h2_TOF_DetNbr_Monster", "h2_TOF_DetNbr_Monster", 40, 1, 41, 200, 0, 200);
TH1F* h1_Energy_Monster = new TH1F("h1_Energy_Monster", "h1_Energy_Monster", 500, 0, 10);
TH1F* h1_Energy_Plastic = new TH1F("h1_Energy_Plastic", "h1_Energy_Plastic", 500, 0, 10);
TH2F* h2_InitialEnergy_TOFdiff = new TH2F("h2_InitialEnergy_TOFdiff", "h2_InitialEnergy_TOFdiff", 500, 0, 10, 200, 0, 200);
TH1F* h1_Energy_Ge = new TH1F("h1_Energy_Ge", "h1_Energy_Ge", 1000, 0, 5000);
// Fill histograms
SimulatedTree->Draw("Monster.fMonster_Time>>h1_TOF_Monster", "", "goff");
SimulatedTree->Draw("Plastic_BEDO.fPlastic_BEDO_Time>>h1_TOF_Plastic", "", "goff");
SimulatedTree->Draw("Monster.fMonster_Time-Plastic_BEDO.fPlastic_BEDO_Time>>h1_TOF_diff_Monster_Plastic", "", "goff");
SimulatedTree->Draw("Monster.fMonster_Time:Monster.fMonster_T_DetectorNbr>>h2_TOF_DetNbr_Monster", "", "goff");
SimulatedTree->Draw("Monster.fMonster_Energy>>h1_Energy_Monster", "", "goff");
SimulatedTree->Draw("Plastic_BEDO.fPlastic_BEDO_Energy>>h1_Energy_Plastic", "", "goff");
// SimulatedTree->Draw("Monster.fMonster_Time-Plastic_BEDO.fPlastic_BEDO_Time:InitialConditions.fIC_Kinetic_Energy>>h2_InitialEnergy_TOFdiff", "", "goff");
/*Temporary : no betas to tag on right now*/SimulatedTree->Draw("Monster.fMonster_Time:InitialConditions.fIC_Kinetic_Energy>>h2_InitialEnergy_TOFdiff", "", "goff");
SimulatedTree->Draw("Coaxial_Germanium.fCoaxial_Germanium_Energy>>h1_Energy_Ge", "", "goff");
// Rename axes
h1_TOF_Monster ->SetTitle("TOF_Monster;TOF (ns);#");
h1_TOF_Plastic ->SetTitle("TOF_Plastic;TOF (ns);#");
h1_TOF_diff_Monster_Plastic->SetTitle("TOF_diff;TOF_Monster-TOF_Plastic (ns);#");
h2_TOF_DetNbr_Monster ->SetTitle("TOF_vs_DetNbr;Monster Detector Number;TOF (ns)");
h1_Energy_Monster ->SetTitle("Energy_Monster;Energy (MeV);#");
h1_Energy_Plastic ->SetTitle("Energy_Plastic;Energy (MeV);#");
h2_InitialEnergy_TOFdiff ->SetTitle("Initial_Energy_vs_TOF;Initial Energy (MeV);TOF (ns)");
h1_Energy_Ge ->SetTitle("Energy_Ge;Energy (MeV);#");
gStyle->SetOptStat(0);
TCanvas* c_TOF = new TCanvas("c_TOF", "c_TOF");
c_TOF->Divide(2,2);
c_TOF->cd(1);
h1_TOF_Monster->Draw();
c_TOF->cd(2);
h1_TOF_Plastic->Draw();
c_TOF->cd(3);
h1_TOF_diff_Monster_Plastic->Draw();
c_TOF->cd(4);
h2_TOF_DetNbr_Monster->Draw("colz");
TCanvas* c_Energy = new TCanvas("c_Energy", "c_Energy");
c_Energy->Divide(2,2);
c_Energy->cd(1);
h1_Energy_Monster->Draw();
c_Energy->cd(2);
h1_Energy_Plastic->Draw();
c_Energy->cd(3);
h2_InitialEnergy_TOFdiff->Draw("colz");
c_Energy->cd(4);
h1_Energy_Ge->Draw();
return;
}
npsimulation -D Monster.detector -E sources/isotropic_neutron.source -B test.mac -O MonsterNeutronTest
root macros/ShowHistograms.C
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% An Isotropic Source to be used as EventGenerator %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Energy are given in MeV , Position in mm %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Isotropic
EnergyLow= 1 keV
EnergyHigh= 20 MeV
EnergyDistribution= flat
HalfOpenAngleMin= 0 deg
HalfOpenAngleMax= 90 deg
x0= 0 mm
y0= 0 mm
z0= 0 mm
SigmaX= 0 mm
SigmaY= 0 mm
Multiplicity= 1
Particle= gamma
%Isotropic
% EnergyLow= 0 MeV
% EnergyHigh= 5 MeV
% %EnergyDistribution= FromHisto
% EnergyDistribution= flat
% %EnergyDistributionHist= ./EnergyDistributions/gaussian.root h
% HalfOpenAngleMin= 0 deg
% HalfOpenAngleMax= 180 deg
% x0= 0 mm
% y0= 0 mm
% z0= 0 mm
% SigmaX= 0 mm
% SigmaY= 0 mm
% Multiplicity= 1
% Particle= positron
%Isotropic
% EnergyLow= 1 MeV
% EnergyHigh= 1 MeV
% EnergyDistribution= flat
% HalfOpenAngleMin= 0 deg
% HalfOpenAngleMax= 180 deg
% x0= 0 mm
% y0= 0 mm
% z0= 0 mm
% SigmaX= 0 mm
% SigmaY= 0 mm
% Multiplicity= 1
% Particle= gamma
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Supported particle type: proton, neutron, deuton, triton, He3 , alpha
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Isotropic Isotropic
EnergyLow= 1 MeV EnergyLow= 1 MeV
EnergyHigh= 1 MeV EnergyHigh= 10 MeV
HalfOpenAngleMin= 0 deg HalfOpenAngleMin= 0 deg
HalfOpenAngleMax= 180 deg HalfOpenAngleMax= 180 deg
x0= 0 mm x0= 0 mm
......
MultipleParticle
x0= 0 mm
y0= 0 mm
z0= 0 nm
HalfOpenAngleMin= 0 deg
HalfOpenAngleMax= 180 deg
SigmaX= 0 mm
SigmaY= 0 mm
Events= 10
EventFile= sources/neutrons.txt
Multiplicity 10
neutron 1 0
neutron 2 0
neutron 3 0
neutron 4 0
neutron 5 0
neutron 6 0
neutron 7 0
neutron 8 0
neutron 9 0
neutron 10 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment