diff --git a/Projects/BeLise/13Be.reaction b/Projects/BeLise/13Be.reaction new file mode 100644 index 0000000000000000000000000000000000000000..dd2089e419dbaaefe11aea3a3053ecbd524a2cb8 --- /dev/null +++ b/Projects/BeLise/13Be.reaction @@ -0,0 +1,32 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Beam + Particle= 12Be + Energy= 360 + SigmaEnergy= 20 + SigmaThetaX= 0.6138 + SigmaPhiY= 0.3812 + SigmaX= 6.216 + SigmaY= 6.109 + MeanThetaX= 0 + MeanPhiY= 0 + MeanX= 0 + MeanY= 0 + %EnergyProfilePath= + %XThetaXProfilePath= + %YPhiYProfilePath= + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +TwoBodyReaction + Beam= 12Be + Target= 2H + Light= 1H + Heavy= 13Be + ExcitationEnergyLight= 0.0 + ExcitationEnergyHeavy= 0 + CrossSectionPath= 11Li(d,3He)10He.txt CS10He + ShootLight= 1 + ShootHeavy= 1 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Projects/BeLise/9Be.reaction b/Projects/BeLise/9Be.reaction new file mode 100644 index 0000000000000000000000000000000000000000..524cf6c4e65125525f808fe0d244836a641a772c --- /dev/null +++ b/Projects/BeLise/9Be.reaction @@ -0,0 +1,32 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Beam + Particle= 10Be + Energy= 280 + SigmaEnergy= 20 + SigmaThetaX= 0.6138 + SigmaPhiY= 0.3812 + SigmaX= 6.216 + SigmaY= 6.109 + MeanThetaX= 0 + MeanPhiY= 0 + MeanX= 0 + MeanY= 0 + %EnergyProfilePath= + %XThetaXProfilePath= + %YPhiYProfilePath= + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +TwoBodyReaction + Beam= 10Be + Target= 2H + Light= 3H + Heavy= 9Be + ExcitationEnergyLight= 0.0 + ExcitationEnergyHeavy= 0.0 + CrossSectionPath= 11Li(d,3He)10He.txt CS2 + ShootLight= 1 + ShootHeavy= 1 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Projects/BeLise/9Li.reaction b/Projects/BeLise/9Li.reaction new file mode 100644 index 0000000000000000000000000000000000000000..65d3430805560dffedb2f71741618e3bc2d515d0 --- /dev/null +++ b/Projects/BeLise/9Li.reaction @@ -0,0 +1,32 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Beam + Particle= 10Be + Energy= 280 + SigmaEnergy= 20 + SigmaThetaX= 0.6138 + SigmaPhiY= 0.3812 + SigmaX= 6.216 + SigmaY= 6.109 + MeanThetaX= 0 + MeanPhiY= 0 + MeanX= 0 + MeanY= 0 + %EnergyProfilePath= + %XThetaXProfilePath= + %YPhiYProfilePath= + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +TwoBodyReaction + Beam= 10Be + Target= 2H + Light= 3He + Heavy= 9Li + ExcitationEnergyLight= 0.0 + ExcitationEnergyHeavy= 0 + CrossSectionPath= 11Li(d,3He)10He.txt CS10He + ShootLight= 1 + ShootHeavy= 1 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Projects/BeLise/Analysis.cxx b/Projects/BeLise/Analysis.cxx new file mode 100644 index 0000000000000000000000000000000000000000..0a2383837b66684c1a2e2055d7b89b691f609dad --- /dev/null +++ b/Projects/BeLise/Analysis.cxx @@ -0,0 +1,214 @@ +/***************************************************************************** + * Copyright (C) 2009-2014 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk * + * * + * Creation Date : march 2025 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * Class describing the property of an Analysis object * + * * + *---------------------------------------------------------------------------* + * Comment: * + * * + * * + *****************************************************************************/ +#include<iostream> +using namespace std; +#include"Analysis.h" +#include"NPAnalysisFactory.h" +#include"NPDetectorManager.h" +#include"NPOptionManager.h" +#include"RootOutput.h" +#include"RootInput.h" +//////////////////////////////////////////////////////////////////////////////// +Analysis::Analysis(){ +} +//////////////////////////////////////////////////////////////////////////////// +Analysis::~Analysis(){ +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::Init(){ + M2= (TMust2Physics*) m_DetectorManager->GetDetector("MUST2Array"); + Initial=new TInitialConditions(); + InitOutputBranch(); + InitInputBranch(); + Rand = TRandom3(); + myReaction= new NPL::Reaction(); + myReaction->ReadConfigurationFile(NPOptionManager::getInstance()->GetReactionFile()); + DetectorNumber = 0 ; + ThetaNormalTarget = 0 ; + ThetaM2Surface = 0; + X_M2 = 0 ; + Y_M2 = 0 ; + Z_M2 = 0 ; + Si_E_M2 = 0 ; + CsI_E_M2 = 0 ; + Energy = 0; + E_M2 = 0; + Si_X_M2 = 0; + Si_Y_M2 = 0; + ZTarget = 0; + TargetThickness = m_DetectorManager->GetTargetThickness()*micrometer; + // Energy loss table: the G4Table are generated by the simulation + He3CD2 = EnergyLoss("Example/He3_CD2.G4table","G4Table",100 ); + He3Al = EnergyLoss("Example/He3_Al.G4table","G4Table",10); + He3Si = EnergyLoss("Example/He3_Si.G4table","G4Table",10); + //Li11CD2 = EnergyLoss("ExampleLi11_CD2.G4table","G4Table",100); +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::TreatEvent(){ + // Reinitiate calculated variable + ReInitValue(); + // Get the Init information on beam position and energy + // and apply by hand the experimental resolution + // This is because the beam diagnosis are not simulated + // PPAC position resolution on target is assumed to be 1mm + double XTarget = Rand.Gaus(Initial->GetIncidentPositionX(),1); + double YTarget = Rand.Gaus(Initial->GetIncidentPositionY(),1); + TVector3 BeamDirection = Initial->GetBeamDirection(); + // Beam energy is measured using F3 and F2 plastic TOF + double BeamEnergy = Rand.Gaus(Initial->GetIncidentInitialKineticEnergy(),4.5); + //BeamEnergy = Li11CD2.Slow(BeamEnergy,TargetThickness/2.,0); + + myReaction->SetBeamEnergy(BeamEnergy); + //////////////////////////// LOOP on MUST2 Hit ////////////////// + for(unsigned int countMust2 = 0 ; countMust2 < M2->Si_E.size() ; countMust2++){ + /************************************************/ + //Part 0 : Get the usefull Data + // MUST2 + int X = M2->Si_X[countMust2]; + int Y = M2->Si_Y[countMust2]; + int TelescopeNumber = M2->TelescopeNumber[countMust2]; + Si_X_M2 = X ; + Si_Y_M2 = Y ; + + /************************************************/ + // Forward Telescope Only + if(TelescopeNumber<5){ + DetectorNumber = TelescopeNumber ; + /************************************************/ + // Part 1 : Impact Angle + ThetaM2Surface = 0; + ThetaNormalTarget = 0; + if(XTarget>-1000 && YTarget>-1000){ + TVector3 BeamImpact(XTarget,YTarget,0); + TVector3 HitDirection = M2 -> GetPositionOfInteraction(countMust2) - BeamImpact ; + ThetaLab = HitDirection.Angle( BeamDirection ); + + ThetaM2Surface = HitDirection.Angle(- M2 -> GetTelescopeNormal(countMust2) ); + ThetaNormalTarget = HitDirection.Angle( TVector3(0,0,1) ) ; + X_M2 = M2 -> GetPositionOfInteraction(countMust2).X() ; + Y_M2 = M2 -> GetPositionOfInteraction(countMust2).Y() ; + Z_M2 = M2 -> GetPositionOfInteraction(countMust2).Z() ; + } + + else{ + BeamDirection = TVector3(-1000,-1000,-1000); + ThetaM2Surface = -1000 ; + ThetaNormalTarget = -1000 ; + } + + /************************************************/ + + /************************************************/ + + // Part 2 : Impact Energy + Energy = ELab = E_M2 = 0; + Si_E_M2 = M2->Si_E[countMust2]; + CsI_E_M2= M2->CsI_E[countMust2]; + + // if CsI + if(CsI_E_M2>0 ){ + // The energy in CsI is calculate form dE/dx Table because + // 20um resolution is poor + Energy = + He3Si.EvaluateEnergyFromDeltaE(Si_E_M2,300*micrometer, + ThetaM2Surface, 0.01*MeV, + 450.*MeV,0.001*MeV ,1000); + E_M2=CsI_E_M2; + } + + else + Energy = Si_E_M2; + + E_M2 += Si_E_M2; + + // Evaluate energy using the thickness + ELab = He3Al.EvaluateInitialEnergy( Energy,0.4*micrometer , ThetaM2Surface); + // Target Correction + ELab = He3CD2.EvaluateInitialEnergy( ELab ,TargetThickness/2., ThetaNormalTarget); + /************************************************/ + + /************************************************/ + // Part 3 : Excitation Energy Calculation + Ex = myReaction -> ReconstructRelativistic( ELab , ThetaLab ); + /************************************************/ + + + /************************************************/ + // Part 4 : Theta CM Calculation + ThetaCM = myReaction -> EnergyLabToThetaCM( ELab , ThetaLab)/deg; + ThetaLab=ThetaLab/deg; + /************************************************/ + + } + }//end loop MUST2 +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::End(){ +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::InitOutputBranch() { + RootOutput::getInstance()->GetTree()->Branch("Ex",&Ex,"Ex/D"); + RootOutput::getInstance()->GetTree()->Branch("ELab",&ELab,"ELab/D"); + RootOutput::getInstance()->GetTree()->Branch("ThetaLab",&ThetaLab,"ThetaLab/D"); + RootOutput::getInstance()->GetTree()->Branch("ThetaCM",&ThetaCM,"ThetaCM/D"); +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::InitInputBranch(){ + RootInput:: getInstance()->GetChain()->SetBranchStatus("InitialConditions",true ); + RootInput:: getInstance()->GetChain()->SetBranchStatus("fIC_*",true ); + RootInput:: getInstance()->GetChain()->SetBranchAddress("InitialConditions",&Initial); +} + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::ReInitValue(){ + Ex = -1000 ; + ELab = -1000; + ThetaLab = -1000; + ThetaCM = -1000; +} + +//////////////////////////////////////////////////////////////////////////////// +// Construct Method to be pass to the DetectorFactory // +//////////////////////////////////////////////////////////////////////////////// +NPL::VAnalysis* Analysis::Construct(){ + return (NPL::VAnalysis*) new Analysis(); +} + +//////////////////////////////////////////////////////////////////////////////// +// Registering the construct method to the factory // +//////////////////////////////////////////////////////////////////////////////// +extern "C"{ +class proxy{ + public: + proxy(){ + NPL::AnalysisFactory::getInstance()->SetConstructor(Analysis::Construct); + } +}; + +proxy p; +} + diff --git a/Projects/BeLise/Analysis.h b/Projects/BeLise/Analysis.h new file mode 100644 index 0000000000000000000000000000000000000000..1e546814cbe2a02b632230569772c525fdfe321d --- /dev/null +++ b/Projects/BeLise/Analysis.h @@ -0,0 +1,76 @@ +#ifndef Analysis_h +#define Analysis_h +/***************************************************************************** + * Copyright (C) 2009-2014 this file is part of the NPTool Project * + * * + * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * + * For the list of contributors see $NPTOOL/Licence/Contributors * + *****************************************************************************/ + +/***************************************************************************** + * Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk * + * * + * Creation Date : march 2025 * + * Last update : * + *---------------------------------------------------------------------------* + * Decription: * + * Class describing the property of an Analysis object * + * * + *---------------------------------------------------------------------------* + * Comment: * + * * + * * + *****************************************************************************/ +#include"NPVAnalysis.h" +#include "TMust2Physics.h" +#include "TInitialConditions.h" +#include "NPEnergyLoss.h" +#include "NPReaction.h" +#include "TRandom3.h" +class Analysis: public NPL::VAnalysis{ + public: + Analysis(); + ~Analysis(); + + public: + void Init(); + void TreatEvent(); + void End(); + void InitOutputBranch(); + void InitInputBranch(); + void ReInitValue(); + static NPL::VAnalysis* Construct(); + + private: + double Ex; + double ELab; + double ThetaLab; + double ThetaCM; + NPL::Reaction* myReaction; + + // intermediate variable + TRandom3 Rand; + int DetectorNumber; + double ThetaNormalTarget; + double ThetaM2Surface; + double X_M2; + double Y_M2; + double Z_M2; + double Si_E_M2; + double CsI_E_M2; + double Energy ; + double E_M2 ; + double Si_X_M2; + double Si_Y_M2; + double ZTarget; + double TargetThickness; + + NPL::EnergyLoss He3CD2 ; + NPL::EnergyLoss He3Al ; + NPL::EnergyLoss He3Si ; + NPL::EnergyLoss Li11CD2 ; + + TMust2Physics* M2; + TInitialConditions* Initial; +}; +#endif diff --git a/Projects/BeLise/CMakeLists.txt b/Projects/BeLise/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..6806d778cdd5240538c93278f2ac5dcce3429083 --- /dev/null +++ b/Projects/BeLise/CMakeLists.txt @@ -0,0 +1,2 @@ +cmake_minimum_required (VERSION 2.8) +include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/BeLise/ShowResults.C b/Projects/BeLise/ShowResults.C new file mode 100644 index 0000000000000000000000000000000000000000..6c2d5867b0550fafc5bc08cc53d8a0a17037d5cb --- /dev/null +++ b/Projects/BeLise/ShowResults.C @@ -0,0 +1,75 @@ +#include"NPReaction.h" + +TCutG* ETOF=NULL; +TCutG* EDE=NULL; +TChain* chain=NULL ; +TCanvas* c1 = NULL; + +//////////////////////////////////////////////////////////////////////////////// +void LoadCuts(){ +TFile* File_ETOF = new TFile("cuts/ETOF.root","READ"); +ETOF = (TCutG*) File_ETOF->FindObjectAny("ETOF"); + +TFile* File_EDE = new TFile("cuts/EDE.root","READ"); +EDE= (TCutG*) File_EDE->FindObjectAny("EDE"); +} + +//////////////////////////////////////////////////////////////////////////////// +void LoadChain(){ +chain = new TChain("PhysicsTree"); +chain->Add("../../Outputs/Analysis/Example1.root"); +} + +//////////////////////////////////////////////////////////////////////////////// +void ShowResults(){ +LoadChain(); +LoadCuts(); + +c1 = new TCanvas("Example1","Example1",0,0,600,600); +c1->Divide(2,2); + +// Light Particle ID // +// E-DE +c1->cd(1); +chain->Draw("SSSD.Energy:MUST2.Si_E>>hIDE(1000,0,35,1000,0,5)","MUST2.CsI_E<0 && MUST2.TelescopeNumber<5","colz"); +EDE->Draw("same"); + +// E-TOF +c1->cd(2); +chain->Draw("-MUST2.Si_T:SSSD.Energy+MUST2.Si_E>>hIDT(1000,0,35,1000,-15,0)","MUST2.CsI_E<0 && MUST2.TelescopeNumber<5","colz"); +ETOF->Draw("same"); + +// Kinematical Line // +c1->cd(3); +//chain->Draw("ELab:ThetaLab>>hKine(500,0,45,400,0,40)","MUST2.CsI_E<0 && MUST2.TelescopeNumber<5 && EDE && ETOF","colz"); +chain->Draw("ELab:ThetaLab","MUST2.CsI_E<0 && MUST2.TelescopeNumber<5 && EDE && ETOF","colz"); + +NPL::Reaction r("11Li(d,3He)10He@553"); +r.SetExcitationHeavy(1.4); +TGraph* Kine = r.GetKinematicLine3(); +Kine->SetLineWidth(2); +Kine->SetLineColor(kOrange-3); +Kine->Draw("c"); + +// Excitation Energy // +c1->cd(4); +int bin=50; +double Emin = -5; +double Emax = 5; + +chain->Draw(Form("Ex>>hEx(%d,%f,%f)",bin,Emin,Emax),"MUST2.CsI_E<0 && MUST2.TelescopeNumber<5 && EDE && ETOF"); +TH1F* hEx = (TH1F*) gDirectory->FindObjectAny("hEx"); +hEx->GetYaxis()->SetTitle(Form("counts / %d keV",(int) (1000*(Emax-Emin)/bin))); +hEx->GetXaxis()->SetTitle("E_{10He}"); +hEx->SetFillStyle(1001); +hEx->SetLineColor(kAzure+7); +hEx->SetFillColor(kAzure+7); + +hEx->Fit("gaus"); + +TF1* f = hEx->GetFunction("gaus"); +f->SetLineWidth(2); +f->SetLineColor(kOrange-3); +f->SetNpx(1000); + +} diff --git a/Projects/BeLise/configs/ConfigMust2.dat b/Projects/BeLise/configs/ConfigMust2.dat new file mode 100755 index 0000000000000000000000000000000000000000..d64d9707f2837e0f7e551b03e5f27f54578ae242 --- /dev/null +++ b/Projects/BeLise/configs/ConfigMust2.dat @@ -0,0 +1,15 @@ +ConfigMust2 + MAX_STRIP_MULTIPLICITY 100 + STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA 5 + STRIP_ENERGY_MATCHING_SIGMA 0.02 + DISABLE_CHANNEL MM1STRY12 + DISABLE_CHANNEL MM2STRY12 + DISABLE_CHANNEL MM3STRY12 + DISABLE_CHANNEL MM4STRY12 + DISABLE_CHANNEL MM1STRX12 + DISABLE_CHANNEL MM2STRX12 + DISABLE_CHANNEL MM3STRX12 + DISABLE_CHANNEL MM4STRX12 + SI_X_E_RAW_THRESHOLD 0 + CSI_E_RAW_THRESHOLD 0 + CSI_SIZE 256 diff --git a/Projects/S1554/macro/MgCS2.cxx b/Projects/S1554/macro/MgCS2.cxx index 099bcd2a5f3eb3cddd8992be623ea2251a9cfd3d..637df58977d534bfb53855a2e706b8e6f9f1587f 100644 --- a/Projects/S1554/macro/MgCS2.cxx +++ b/Projects/S1554/macro/MgCS2.cxx @@ -42,7 +42,7 @@ void MgCS2(){ h->Draw("colz"); // CS TCanvas* c = new TCanvas("CS","CS",800,800); -// c->Divide(2,2); + c->Divide(2,2); TGraph* CSth; // Region double s1,s2; diff --git a/Projects/SharcEfficiency/Analysis.cxx b/Projects/SharcEfficiency/Analysis.cxx index a859821c3a385c139f7506e26ace03d37d1b98d0..048ada9b27c03f629baa5d887700ed258c9cbd4c 100644 --- a/Projects/SharcEfficiency/Analysis.cxx +++ b/Projects/SharcEfficiency/Analysis.cxx @@ -192,7 +192,7 @@ void Analysis::TreatEvent(){ // S1107 bool check = false; - if(Sharc->DetectorNumber[0] == 1 && Sharc->Strip_E[0]>1.83) +/* if(Sharc->DetectorNumber[0] == 1 && Sharc->Strip_E[0]>1.83) check = true; else if(Sharc->DetectorNumber[0] == 2 && Sharc->Strip_E[0]>1.88) @@ -224,6 +224,9 @@ void Analysis::TreatEvent(){ else if(Sharc->DetectorNumber[0] == 12 && Sharc->Strip_E[0]>1.99) check = true; +*/ + if(Sharc->DetectorNumber[0] == 4 && Sharc->Strip_E[0]>1.) + check = true; if(Trifoil->Energy.size()>0){