Skip to content
Snippets Groups Projects
Commit a950a988 authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

Merge branch 'NPTool.2.dev' of https://gitlab.in2p3.fr/np/nptool into NPTool.2.dev

parents d1853b22 9cb78bb9
No related branches found
No related tags found
No related merge requests found
Pipeline #178823 passed
......@@ -45,21 +45,25 @@ Analysis::~Analysis(){
void Analysis::Init() {
///////////////////////////////////////////////////////////////////////////////
// cout << " == == == == SIMULATION == == == ==" << endl;
// isSim=true;
// isPhaseSpace=false;
// cout << " == == == == EXPERIMENT == == == ==" << endl;
// isSim=false;
// isPhaseSpace=false;
if(NPOptionManager::getInstance()->HasDefinition("Sim")){
cout << " == == == == SIMULATION == == == ==" << endl;
isSim=true;
isPhaseSpace=false;
} else if (NPOptionManager::getInstance()->HasDefinition("Exp")) {
cout << " == == == == EXPERIMENT == == == ==" << endl;
isSim=false;
isPhaseSpace=false;
} else {
cout << " == == == == PHASE SPACE == == == ==" << endl;
isSim=false;
isPhaseSpace=true;
}
agata_zShift=51*mm;
//BrhoRef=0.65;
if(isSim && !isPhaseSpace){
//cout << "here_InIsSimLoop" << endl;
Initial = new TInitialConditions();
ReactionConditions = new TReactionConditions();
RootInput::getInstance()->GetChain()->SetBranchAddress("InitialConditions",&Initial);
......@@ -160,7 +164,7 @@ void Analysis::Init() {
ALight=reaction.GetParticle3()->GetA();
MHeavy=reaction.GetParticle4()->Mass();
MLight=reaction.GetParticle3()->Mass();
bool writetoscreen=true;
//bool writetoscreen=true;
for(int i=0;i<GATCONF_SIZE;i++){ // loop over the bits
GATCONF_Counter[i] = 0 ;
......@@ -168,14 +172,14 @@ void Analysis::Init() {
// ThetaCM_detected->Sumw2();
// ThetaLab_detected->Sumw2();
//cout << "here_endInit" << endl;
}
////////////////////////////////////////////////////////////////////////////////
void Analysis::TreatEvent(){
// Reinitiate calculated variable
//cout << "here_TreatEvent" << endl;
ReInitValue();
if(isSim && !isPhaseSpace){
ThetaCM_emmitted->Fill(ReactionConditions->GetThetaCM());
ThetaLab_emmitted->Fill(ReactionConditions->GetTheta(0));
......@@ -200,12 +204,13 @@ void Analysis::TreatEvent(){
//ParticleMult=M2->Si_E.size();////+MG->DSSD_E.size();
ParticleMult=M2->Si_E.size()+MG->DSSD_E.size();
//cout << "here_BeforeMustLoop" << endl;
////////////////////////////////////////////////////////////////////////////
//////////////////////////////// LOOP on MUST2 ////////////////////////////
////////////////////////////////////////////////////////////////////////////
unsigned int sizeM2 = M2->Si_E.size();
for(unsigned int countMust2 = 0; countMust2 < sizeM2; countMust2++){
//cout << "here_InMustLoop" << endl;
/************************************************/
// Part 0 : Get the useful Data
......@@ -284,9 +289,10 @@ void Analysis::TreatEvent(){
ThetaLab.push_back(thetalab_tmp/deg);
PhiLab.push_back(philab_tmp/deg);
//cout << "here_EndMustLoop" << endl;
}
//cout << "here_BeforeMugastLoop" << endl;
////////////////////////////////////////////////////////////////////////////
//////////////////////////////// LOOP on MUGAST ////////////////////////////
////////////////////////////////////////////////////////////////////////////
......@@ -350,10 +356,10 @@ void Analysis::TreatEvent(){
// elab_tmp, //particle energy after Si
// 0.5*500.*micrometer, //thickness of Si
// ThetaMGSurface); //angle of impingement
elab_tmp = LightAl.EvaluateInitialEnergy(
elab_tmp, //particle energy after Al
0.4*micrometer, //thickness of Al
ThetaMGSurface); //angle of impingement
//elab_tmp = LightAl.EvaluateInitialEnergy(
// elab_tmp, //particle energy after Al
// 0.4*micrometer, //thickness of Al
// ThetaMGSurface); //angle of impingement
elab_tmp = LightTarget.EvaluateInitialEnergy(
elab_tmp, //particle energy after leaving target
TargetThickness*0.5, //distance passed through target
......@@ -682,6 +688,7 @@ void Analysis::End(){
////////////////////////////////////////////////////////////////////////////////
void Analysis::InitOutputBranch(){
//cout << "here_InitOutput" << endl;
//RootOutput::getInstance()->GetTree()->Branch("Ex",&Ex,"Ex/D");
RootOutput::getInstance()->GetTree()->Branch("Ex",&Ex);
//RootOutput::getInstance()->GetTree()->Branch("EDC",&EDC,"EDC/D");
......@@ -808,6 +815,8 @@ void Analysis::InitOutputBranch(){
////////////////////////////////////////////////////////////////////////////////
void Analysis::InitInputBranch(){
//cout << "here_InitInput" << endl;
SetBranchStatus();
// RootInput:: getInstance()->GetChain()->SetBranchAddress("GATCONF",&vGATCONF);
//
......@@ -878,6 +887,7 @@ void Analysis::InitInputBranch(){
////////////////////////////////////////////////////////////////////////////////
void Analysis::SetBranchStatus(){
//cout << "here_SetBranchStatus" << endl;
// Set Branch status
RootInput::getInstance()->GetChain()->SetBranchStatus("LTS",true);
/* RootInput::getInstance()->GetChain()->SetBranchStatus("T_FPMW_CATS1",true);
......@@ -941,6 +951,7 @@ void Analysis::SetBranchStatus(){
////////////////////////////////////////////////////////////////////////////////
void Analysis::ReInitValue(){
//cout << "here_ReInit" << endl;
Ex.clear();
Ecm.clear();
AddBack_EDC.clear();
......
......@@ -94,8 +94,7 @@ ConfigMugast
DISABLE_CHANNEL_Y= 7 57
MAX_STRIP_MULTIPLICITY= 10
STRIP_ENERGY_MATCHING= 0.20 MeV
%STRIP_ENERGY_MATCHING= 0.06 MeV
STRIP_ENERGY_MATCHING= 0.06 MeV
DSSD_X_E_RAW_THRESHOLD= 8250
DSSD_Y_E_RAW_THRESHOLD= 8100
DSSD_X_E_THRESHOLD= 1
......
......@@ -2,7 +2,6 @@ ConfigMust2
MAX_STRIP_MULTIPLICITY 100
STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA 1
STRIP_ENERGY_MATCHING_SIGMA 0.2
%STRIP_ENERGY_MATCHING_SIGMA 0.02
%%%%%%%%%%%%%%%% Disabling dead strips %%%%%%%%%%%%%%%%
......
......@@ -2,4 +2,5 @@
cd ~/Programs/nptool/Projects/e793s;
cmake ./;
make -j6;
npanalysis -R RunToTreat_PartII.txt -E Reaction/47Kdp_08Nov.reaction -D Detector/mugast_08Nov.detector -C Calibration.txt -O $1;
#npanalysis --definition Exp -R RunToTreat_PartII.txt -E Reaction/47Kdp_08Nov.reaction -D Detector/mugast_08Nov.detector -C Calibration.txt -O $1;
npanalysis --definition Exp -R RunToTreat_PartI.txt -E Reaction/47Kdp_08Nov.reaction -D Detector/mugast_18May22_TestingThickerTarget.detector -C Calibration.txt -O $1;
......@@ -122,7 +122,8 @@ void CS(double Energy, double Spin, double spdf, double angmom){
}
/* Solid Angle (from simulation) */
auto file = new TFile("../SolidAngle_HistFile_15Feb_47Kdp.root");
//auto file = new TFile("../SolidAngle_HistFile_15Feb_47Kdp.root");
auto file = new TFile("../SolidAngle_HistFile_17May22_47Kdp_0143.root");
//auto file = new TFile("../SolidAngle_HistFile_06May_WideStripMatching_LargeRun.root");
TH1F* SolidAngle = (TH1F*) file->FindObjectAny("SolidAngle_Lab_MG");
TCanvas* c_SolidAngle = new TCanvas("c_SolidAngle","c_SolidAngle",1000,1000);
......@@ -503,6 +504,7 @@ vector<vector<double>> GetExpDiffCross(double Energy){
////////////////////////////////////////////////////////////////////////////////
TH1F* PullThetaLabHist(int i, double minTheta, double gatesize){
//TFile* file = new TFile("GateThetaLabHistograms.root","READ");
TFile* file = new TFile("GateThetaLabHistograms_ReadMe.root","READ");
string histname = "cThetaLabGate_"
+ to_string((int) (minTheta+(i*gatesize))) + "-"
......@@ -556,11 +558,33 @@ void Scale(TGraph* g , TGraphErrors* ex){
}
////////////////////////////////////////////////////////////////////////////////
//TGraph* TWOFNR(double E, double J0, double J, double n, double l, double j, const char* model){
TGraph* TWOFNR(double E, double J0, double J, double n, double l, double j){
/* This function mved between directories in order to run TWOFNR in proper *
* location. This is, weirdly, the least tempremental way of doing this. */
cout << "========================================================" << endl;
int johnson, tandyval;
cout << "Using Johnson-Soper ..."; johnson=5; tandyval=0;
//cout << "Using Johnson-Tandy 1 ..."; johnson=6; tandyval=1;
//cout << "Using Johnson-Tandy 2 ..."; johnson=6; tandyval=2;
//cout << "Using Johnson-Tandy 3 ..."; johnson=6; tandyval=3;
//cout << "Using Johnson-Tandy 4 ..."; johnson=6; tandyval=4;
int modelA,modelB;
// switch (model):{
// case 'K': case 'k':{
// cout << " ... Koning-Delaroche." << endl; modelA=6; modelB=4;
// }
// case 'C': case 'c':{
cout << " ... and Chapel-Hill." << endl; modelA=2; modelB=2;
// }
// case 'B': case 'b':{
// cout << " ... Bechetti-Greenlees." << endl; modelA=1; modelB=1;
// }
// }
char origDirchar[200];
getcwd(origDirchar,200);
string origDir{origDirchar};
......@@ -597,12 +621,15 @@ TGraph* TWOFNR(double E, double J0, double J, double n, double l, double j){
Front_Input << 1 << std::endl;
Front_Input << J0 << std::endl;
Front_Input << 1 << std::endl;
Front_Input << 5 << std::endl;
Front_Input << johnson << std::endl;
if(johnson==6){//JTandy selected, give version
Front_Input << tandyval << std::endl;
}
Front_Input << 1 << std::endl;
Front_Input << J << std::endl;
Front_Input << 1 << std::endl;
Front_Input << 6 << std::endl;
Front_Input << 4 << std::endl;
Front_Input << modelA << std::endl;
Front_Input << modelB << std::endl;
Front_Input << 1 << std::endl;
Front_Input << 1 << std::endl;
Front_Input << 1 << std::endl;
......
......@@ -43,21 +43,22 @@ void Plots_47Kdp(){
det_gate = "Mugast.TelescopeNumber>0 && Mugast.TelescopeNumber<8";
cout << "==============================================" << endl;
cout << "=============== CROSS SECTIONS ===============" << endl;
cout << "=============== (d,p) reaction ===============" << endl;
cout << "==============================================" << endl;
cout << ""<< endl;
cout << "\t- CS(stateE, stateSp, orb_l, orb_j, nodes) "<< endl;
cout << "\t---- 0.143, p3/2 = CS(0.143, 2, 1, 1.5) "<< endl;
cout << "\t---- 0.279, p3/2 = CS(0.279, 2, 1, 1.5) "<< endl;
cout << "\t---- 0.728, f7/2 = CS(0.728, 3, 3, 3.5) "<< endl;
cout << "\t---- 0.968, p1/2 = CS(0.968, 0, 1, 0.5) "<< endl;
cout << "\t---- 1.410, p3/2 = CS(1.410, 2, 1, 1.5) "<< endl;
cout << "\t---- 1.981, p3/2 = CS(1.981, 2, 1, 1.5) "<< endl;
cout << "\t---- 2.410, p3/2 = CS(2.410, 0, 1, 0.5) "<< endl;
cout << "\t---- 3.2 , f7/2 = CS(3.2 , 3, 3, 3.5) "<< endl;
cout << "\t---- 3.6 , f5/2 = CS(3.6 , 3, 3, 2.5) "<< endl;
cout << "\t---- 3.8 , f5/2 = CS(3.8 , 3, 3, 2.5) "<< endl;
cout << "\t---- 4.1 , f5/2 = CS(4.1 , 3, 3, 2.5) "<< endl;
cout << "\t---- 4.4 , f5/2 = CS(4.4 , 3, 3, 2.5) "<< endl;
cout << "- CS(stateE, stateSp, orb_l, orb_j, nodes) "<< endl;
cout << "---- 0.143, p3/2 = CS(0.143, 2, 1, 1.5) "<< endl;
cout << "---- 0.279, p3/2 = CS(0.279, 2, 1, 1.5) "<< endl;
cout << "---- 0.728, f7/2 = CS(0.728, 3, 3, 3.5) "<< endl;
cout << "---- 0.968, p1/2 = CS(0.968, 0, 1, 0.5) "<< endl;
cout << "---- 1.410, p3/2 = CS(1.410, 2, 1, 1.5) "<< endl;
cout << "---- 1.981, p3/2 = CS(1.981, 2, 1, 1.5) "<< endl;
cout << "---- 2.410, p3/2 = CS(2.410, 0, 1, 0.5) "<< endl;
cout << "---- 3.2 , f7/2 = CS(3.2 , 3, 3, 3.5) "<< endl;
cout << "---- 3.6 , f5/2 = CS(3.6 , 3, 3, 2.5) "<< endl;
cout << "---- 3.8 , f5/2 = CS(3.8 , 3, 3, 2.5) "<< endl;
cout << "---- 4.1 , f5/2 = CS(4.1 , 3, 3, 2.5) "<< endl;
cout << "---- 4.4 , f5/2 = CS(4.4 , 3, 3, 2.5) "<< endl;
cout << ""<< endl;
cout << "==============================================" << endl;
......
......@@ -18,7 +18,7 @@ void Plots_47Kdt(){
det_gate = "MUST2.TelescopeNumber>0 && MUST2.TelescopeNumber<5";
cout << "==============================================" << endl;
cout << "=============== CROSS SECTIONS ===============" << endl;
cout << "=============== (d,t) reaction ===============" << endl;
cout << "==============================================" << endl;
}
#!/bin/bash
rfile='./Reaction/47Kdp_Sim_0000MeV.reaction'
rfile='./Reaction/47Kdp_Sim_0143MeV.reaction'
#rfile='./Reaction/47Kdp_Sim_0968MeV.reaction'
#rfile='./Reaction/47Kdp_Sim_3605MeV.reaction'
#rfile='./Reaction/47Kdp_Sim_3605MeV_Flat.reaction'
#rfile='./Reaction/47Kdp_Sim.reaction'
#rfile='./Reaction/IsotropicProtons.reaction'
#rfile='./Reaction/47Kdp_Sim_Flat3500MeV.reaction'
cd ~/Programs/nptool/Projects/e793s;
cmake ./;
make -j6;
npsimulation -D ./Detector/mugast_08Nov.detector -E $rfile -B ./runsimulation.mac -O $1;
directory=' /home/charlottepaxman/Programs/nptool/Outputs/Simulation/'
dotroot='.root'
filename=$directory$1$dotroot
dash='-'
for x in 1 2 3 4 5
do
outname=$1$dash$x
npsimulation -D ./Detector/mugast_08Nov.detector -E $rfile -B ./runsimulation.mac -O $outname;
filename=$directory$1$dash$x$dotroot
done
sim='Sim_'
outfile=$sim$1
......@@ -17,6 +32,11 @@ outfile=$sim$1
echo "TTreeName" > RunToTreat_AutoGenerated.txt
echo " SimulatedTree" >> RunToTreat_AutoGenerated.txt
echo "RootFileName" >> RunToTreat_AutoGenerated.txt
echo $filename >> RunToTreat_AutoGenerated.txt
npanalysis -R RunToTreat_AutoGenerated.txt -E $rfile -D Detector/mugast_08Nov.detector -C Calibration.txt -O $outfile;
for x in 1 2 3 4 5
do
filename=$directory$1$dash$x$dotroot
echo $filename >> RunToTreat_AutoGenerated.txt
done
npanalysis --definition Sim -R RunToTreat_AutoGenerated.txt -E $rfile -D Detector/mugast_08Nov.detector -O $outfile;
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