Skip to content
Snippets Groups Projects
Commit 1095a8fc authored by adrien-matta's avatar adrien-matta
Browse files

Merge branch 'NPTool.dev.prerelease' of https://github.com/adrien-matta/nptool...

Merge branch 'NPTool.dev.prerelease' of https://github.com/adrien-matta/nptool into NPTool.dev.prerelease

Conflicts:
	Inputs/DetectorConfiguration/MUGAST.detector
parents c1017a60 f6b4686a
No related branches found
No related tags found
No related merge requests found
%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%%
}%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1
GeneralTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1
......@@ -13,15 +13,24 @@ Target
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GaspardTracker
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Annular Back
GPDAnnular
Z= -148.6
RMIN= 16
RMAX= 45
FIRSTSTAGE= 1
SECONDSTAGE= 1
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 End-Cap Back
GPDTrapezoid
X128_Y128= 41.963 21.364 -138.589
X1_Y128= 23.737 39.592 -138.591
X128_Y1= 122.368 54.712 -71.098
X1_Y1= 57.084 119.996 -71.098
FIRSTSTAGE= 1
SECONDSTAGE= 0
THIRDSTAGE= 0
FIRSTSTAGE= 1
SECONDSTAGE= 1
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2
GPDTrapezoid
......@@ -54,11 +63,19 @@ GPDTrapezoid
THIRDSTAGE= 0
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Barrel
<<<<<<< HEAD
%GPDSquare
X1_Y1= -61.823 128.742 53.5
X128_Y1= -61.823 128.742 -58.5
X1_Y128= -132.251 58.314 -58.5
X128_Y128= -132.251 58.314 53.5
=======
GPDSquare
X128_Y1= -61.823 128.742 53.5
X1_Y128= -61.823 128.742 -58.5
X128_Y128= -132.251 58.314 -58.5
X1_Y1= -132.251 58.314 53.5
>>>>>>> f6b4686ada3bd21e20e035ddb4e9549f9980aa08
FIRSTSTAGE= 1
SECONDSTAGE= 1
THIRDSTAGE= 1
......@@ -123,15 +140,15 @@ M2Telescope
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Paris
%Paris
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParisCluster
%ParisCluster
A= 291.358 -7.734 -38.5
B= 291 -7.118 129
C= 246.046 -168.989 129
D= 246.661 -168.641 -38.5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParisCluster
%ParisCluster
A= 243.139 158.516 -38.5
B= 242.517 158.852 129
C= 290.527 -2.142 129
......
......@@ -19,7 +19,7 @@
GeneralTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1
Target
THICKNESS= 1
THICKNESS= 0.00001
RADIUS= 7.5
MATERIAL= CD2
X= 0
......@@ -46,7 +46,7 @@ GPDAnnular
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 End-Cap Back
%GPDTrapezoid
GPDTrapezoid
X128_Y128= 55.338 -14.346 -146.501
X1_Y128= 55.338 14.346 -146.501
X128_Y1= 138.519 -48.717 -69.236
......@@ -56,7 +56,7 @@ GPDAnnular
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2
%GPDTrapezoid
GPDTrapezoid
X128_Y128= 49.215 29.045 -146.501
X1_Y128= 28.986 49.274 -146.501
X128_Y1= 132.395 63.500 -69.236
......@@ -66,7 +66,7 @@ GPDAnnular
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3
%GPDTrapezoid
GPDTrapezoid
X128_Y128= 14.263 55.338 -146.501
X1_Y128= -14.346 55.338 -146.501
X128_Y1= 48.717 138.519 -69.236
......@@ -76,7 +76,7 @@ GPDAnnular
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4
%GPDTrapezoid
GPDTrapezoid
X128_Y128= -29.045 49.215 -146.501
X1_Y128= -49.274 28.986 -146.501
X128_Y1= -63.500 132.395 -69.236
......@@ -86,7 +86,7 @@ GPDAnnular
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
%GPDTrapezoid
GPDTrapezoid
X128_Y128= -55.338 14.346 -146.501
X1_Y128= -55.338 -14.346 -146.501
X128_Y1= -138.519 48.717 -69.236
......@@ -96,7 +96,7 @@ GPDAnnular
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%6
%GPDTrapezoid
GPDTrapezoid
X128_Y128= -49.215 -29.045 -146.501
X1_Y128= -28.986 -49.274 -146.501
X128_Y1= -132.395 -63.500 -69.236
......@@ -106,7 +106,7 @@ GPDAnnular
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%7
%GPDTrapezoid
GPDTrapezoid
X128_Y128= -14.263 -55.338 -146.501
X1_Y128= 14.346 -55.338 -146.501
X128_Y1= -48.717 -138.519 -69.236
......@@ -116,7 +116,7 @@ GPDAnnular
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8
%GPDTrapezoid
GPDTrapezoid
X128_Y128= 29.045 -49.215 -146.501
X1_Y128= 49.274 -28.986 -146.501
X128_Y1= 63.500 -132.395 -69.236
......@@ -286,7 +286,7 @@ GPDSquare
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Front-Cap Back
%GPDTrapezoid
GPDTrapezoid
X128_Y128= 55.338 14.346 146.501
X1_Y128= 55.338 -14.346 146.501
X128_Y1= 138.518 48.726 69.237
......@@ -296,7 +296,7 @@ GPDSquare
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2
%GPDTrapezoid
GPDTrapezoid
X128_Y128= 28.986 49.274 146.501
X1_Y128= 49.215 29.045 146.501
X128_Y1= 63.492 132.401 69.237
......@@ -306,7 +306,7 @@ GPDSquare
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3
%GPDTrapezoid
GPDTrapezoid
X128_Y128= -14.346 55.338 146.501
X1_Y128= 14.263 55.338 146.501
X128_Y1= -48.726 138.518 69.237
......@@ -316,7 +316,7 @@ GPDSquare
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4
%GPDTrapezoid
GPDTrapezoid
X128_Y128= -49.274 28.986 146.501
X1_Y128= -29.045 49.215 146.501
X128_Y1= -132.401 63.492 69.237
......@@ -326,7 +326,7 @@ GPDSquare
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
%GPDTrapezoid
GPDTrapezoid
X128_Y128= -55.338 -14.346 146.501
X1_Y128= -55.338 14.346 146.501
X128_Y1= -138.518 -48.726 69.237
......@@ -336,7 +336,7 @@ GPDSquare
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%6
%GPDTrapezoid
GPDTrapezoid
X128_Y128= -28.986 -49.274 146.501
X1_Y128= -49.215 -29.045 146.501
X128_Y1= -63.492 -132.401 69.237
......@@ -346,7 +346,7 @@ GPDSquare
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%7
%GPDTrapezoid
GPDTrapezoid
X128_Y128= 14.346 -55.338 146.501
X1_Y128= -14.263 -55.338 146.501
X128_Y1= 48.726 -138.518 69.237
......@@ -356,7 +356,7 @@ GPDSquare
THIRDSTAGE= 1
VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8
%GPDTrapezoid
GPDTrapezoid
X128_Y128= 49.274 -28.986 146.501
X1_Y128= 29.045 -49.215 146.501
X128_Y1= 132.401 -63.492 69.237
......
......@@ -4,13 +4,13 @@
% Energy are given in MeV , Position in mm %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Isotropic
EnergyLow= 1
EnergyHigh= 1.
EnergyLow= 10
EnergyHigh= 10.
HalfOpenAngleMin= 0
HalfOpenAngleMax= 180
x0= 0
y0= 0
z0= 0
particle= gamma
particle= alpha
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Supported particle type: proton, neutron, deuton, triton, He3 , alpha
......@@ -102,7 +102,7 @@ int main(int argc, char** argv){
double YTarget = 0;
TVector3 BeamDirection = TVector3(0,0,1);
double BeamEnergy = BeamCD2.Slow(OriginalBeamEnergy,Rand.Uniform(0,TargetThickness),0);
myReaction->SetBeamEnergy(BeamEnergy);
myReaction->SetBeamEnergy(273.4);
//////////////////////////// LOOP on MUST2 //////////////////
......@@ -197,13 +197,15 @@ int main(int argc, char** argv){
/************************************************/
// Part 3 : Excitation Energy Calculation
Ex = myReaction -> ReconstructRelativistic( ELab , ThetaLab );
ThetaLab=ThetaLab/deg;
/************************************************/
/************************************************/
/************************************************/
// Part 4 : Theta CM Calculation
ThetaCM = myReaction -> EnergyLabToThetaCM( ELab , ThetaLab)/deg;
cout << ThetaCM << " " << Init->GetThetaCM(0) << endl;
cout << ThetaCM << " " << Init->GetThetaCM(0) << endl;
ThetaLab=ThetaLab/deg;
/************************************************/
}//end loop GASPARD
......
No preview for this file type
TTreeName
SimulatedTree
RootFileName
../../Outputs/Simulation/74Kr_g.root
../../Outputs/Simulation/74Kr_f.root
......@@ -26,10 +26,7 @@
* *
*****************************************************************************/
#include <iostream>
#include <fstream>
#include <cmath>
// ROOT headers
#include "TROOT.h"
#include "TSystem.h"
#include "TFile.h"
......@@ -40,10 +37,16 @@
#include "TH1F.h"
#include "TCanvas.h"
// NPTOOL headers
#include "TInitialConditions.h"
#include "TInteractionCoordinates.h"
using namespace std ;
// C++ headers
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
void GeometricalEfficiency(const char * fname = "myResult"){
// Open output ROOT file from NPTool simulation run
......@@ -65,10 +68,10 @@ void GeometricalEfficiency(const char * fname = "myResult"){
tree->SetBranchStatus("InteractionCoordinates", true);
// Prepare histograms
TH1F *hDetecTheta = new TH1F("hDetecTheta", "DetecTheta", 180,0,180);
TH1F *hDetecThetaCM = new TH1F("hDetecThetaCM", "hDetecThetaCM", 180,0,180);
TH1F *hEmittTheta = new TH1F("hEmittTheta", "EmittTheta", 180,0,180);
TH1F *hEmittThetaCM = new TH1F("hEmittThetaCM", "hEmittThetaCM", 180,0,180);
TH1F *hDetecTheta = new TH1F("hDetecTheta", "DetecTheta", 180, 0, 180);
TH1F *hDetecThetaCM = new TH1F("hDetecThetaCM", "hDetecThetaCM", 180, 0, 180);
TH1F *hEmittTheta = new TH1F("hEmittTheta", "EmittTheta", 180, 0, 180);
TH1F *hEmittThetaCM = new TH1F("hEmittThetaCM", "hEmittThetaCM", 180, 0, 180);
// Read the TTree
int nentries = tree->GetEntries();
......@@ -84,18 +87,26 @@ void GeometricalEfficiency(const char * fname = "myResult"){
}
}
TCanvas* c4 = new TCanvas("c4", "CM Frame");
// efficiency in lab frame in %
TCanvas *c = new TCanvas("c", "efficiency");
TH1F *hEfficiency = new TH1F("hEfficiency", "Efficiency MUGAST", 180, 0, 180);
hEfficiency->Divide(hDetecTheta, hEmittTheta, 100, 1);
hEfficiency->GetXaxis()->SetTitle("#Theta (deg)");
hEfficiency->GetYaxis()->SetTitle("#epsilon (%)");
hEfficiency->Draw();
TCanvas* c4 = new TCanvas("c4", "CM Frame");
TH1F* SolidACM = new TH1F(*hDetecThetaCM);
SolidACM->Sumw2();
TF1* C = new TF1("C",Form("%i /(4*%f)",nentries,M_PI),0,180);
SolidACM->Divide(C,1);
SolidACM->Divide(hEmittThetaCM);
SolidACM->Draw();
SolidACM->GetXaxis()->SetTitle("#theta_{CM} (deg)");
SolidACM->GetYaxis()->SetTitle("d#Omega (sr) ");
TF1* f = new TF1("f",Form("2 * %f * sin(x*%f/180.) *1*%f/180.",M_PI,M_PI,M_PI),0,180);
f->Draw("SAME");
f->Draw("SAME");
SolidACM->GetXaxis()->SetTitle("#theta_{CM} (deg)");
SolidACM->GetYaxis()->SetTitle("d#Omega (sr) ");
c4->Update();
}
......@@ -141,7 +141,7 @@ namespace GPDANNULAR
const G4double AluStripThickness = 0.4*micrometer;
const G4double FirstStageThickness = 300*micrometer;
const G4double FirstStageRmin = 16*mm;
const G4double FirstStageRmax = 52*mm;
const G4double FirstStageRmax = 45*mm;
// const G4double VacBoxThickness = 3*cm ;
const G4double VacBoxThickness = 0.4*cm;
......
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