diff --git a/Inputs/DetectorConfiguration/Riken_30mm.detector b/Inputs/DetectorConfiguration/Riken_30mm.detector index 8661159da643abececfe1e2295ace79e32afc8f5..9b4ab4aec4e3b209c26c16fe6df7bf8603191609 100644 --- a/Inputs/DetectorConfiguration/Riken_30mm.detector +++ b/Inputs/DetectorConfiguration/Riken_30mm.detector @@ -11,17 +11,17 @@ GeneralTarget THICKNESS= 1 RADIUS= 45 MATERIAL= CD2 - X= 10 - Y= -10 - Z= 50 + X= 0 + Y= 0 + Z= 0 CryoTarget - THICKNESS= 3000 + THICKNESS= 3 RADIUS= 45 TEMPERATURE= 26 PRESSURE= 1 MATERIAL= D2 - WINDOWSTHICKNESS= 15 + WINDOWSTHICKNESS= 0 WINDOWSMATERIAL= Mylar X= 0 Y= 0 @@ -114,4 +114,8 @@ A= 12.57 -56.09 129.14 B= 59.44 -56.09 110.34 C= 65.26 -9.66 124.87 D= 18.39 -9.66 143.67 + + + + diff --git a/Inputs/DetectorConfiguration/Riken_45mm.detector b/Inputs/DetectorConfiguration/Riken_45mm.detector deleted file mode 100644 index a4293bd6cb7c6d9ac9dbea193706f29a0df20c02..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/Riken_45mm.detector +++ /dev/null @@ -1,89 +0,0 @@ - -%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%% Telescope 1 %%%%%%% -M2Telescope -X1_Y1= 10.85 105.03 162.16 -X1_Y128= 22.8 9.84 191.95 -X128_Y1= 104.09 105.03 124.76 -X128_Y128= 116.04 9.84 154.55 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 2 %%%%%%% -M2Telescope -X1_Y1= -116.04 9.84 154.55 -X1_Y128= -22.8 9.84 191.95 -X128_Y1= -104.09 105.03 124.76 -X128_Y128= -10.85 105.03 162.16 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 3 %%%%%%% -M2Telescope -X1_Y1= -10.85 -105.03 162.16 -X1_Y128= -22.8 -9.84 191.95 -X128_Y1= -104.09 -105.03 124.76 -X128_Y128= -116.04 -9.84 154.55 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 4 %%%%%%% -M2Telescope -X1_Y1= 116.04 -9.84 154.55 -X1_Y128= 22.8 -9.84 191.95 -X128_Y1= 104.09 -105.03 124.76 -X128_Y128= 10.85 -105.03 162.16 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 5 %%%%%%% -M2Telescope -X1_Y1= -50.23 -50.23 341 -X1_Y128= 50.23 -50.23 341 -X128_Y1= -50.23 50.23 341 -X128_Y128= 50.23 50.23 341 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%%%%%%%%%%%%%%% -AddThinSi -%%%%%%%%% Det 1 %%%%%%%% -ThinSi -A= 18.08 9.61 142.76 -B= 64.95 9.61 123.96 -C= 59.12 56.04 109.43 -D= 12.25 56.04 128.23 - -%%%%%%%%% Det 2 %%%%%%%% -ThinSi -A= -116.04 9.84 154.55 -B= -22.8 9.84 191.95 -C= -104.09 105.03 124.76 -D= -10.85 105.03 162.16 - -%%%%%%%%% Det 3 %%%%%%%% -ThinSi -A= -12.25 56.04 128.23 -B= -59.12 56.04 109.43 -C= -64.95 9.61 123.96 -D= -18.08 9.61 142.76 - -%%%%%%%%% Det 4 %%%%%%%% -ThinSi -A= -10.85 -105.03 162.16 -B= -22.8 -9.84 191.95 -C= -104.09 -105.03 124.76 -D= -116.04 -9.84 154.55 - - diff --git a/Inputs/DetectorConfiguration/Riken_55mm.detector b/Inputs/DetectorConfiguration/Riken_55mm.detector deleted file mode 100644 index 86c78d2890ab969cb4aaa8502e77d07a5ef55832..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/Riken_55mm.detector +++ /dev/null @@ -1,89 +0,0 @@ - -%%%%%%%%%%%%%%%%%%%%% -MUST2Array -%%%%%%% Telescope 1 %%%%%%% -M2Telescope -X1_Y1= 10.85 105.03 162.16 -X1_Y128= 22.8 9.84 191.95 -X128_Y1= 104.09 105.03 124.76 -X128_Y128= 116.04 9.84 154.55 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 2 %%%%%%% -M2Telescope -X1_Y1= -116.04 9.84 154.55 -X1_Y128= -22.8 9.84 191.95 -X128_Y1= -104.09 105.03 124.76 -X128_Y128= -10.85 105.03 162.16 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 3 %%%%%%% -M2Telescope -X1_Y1= -10.85 -105.03 162.16 -X1_Y128= -22.8 -9.84 191.95 -X128_Y1= -104.09 -105.03 124.76 -X128_Y128= -116.04 -9.84 154.55 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 4 %%%%%%% -M2Telescope -X1_Y1= 116.04 -9.84 154.55 -X1_Y128= 22.8 -9.84 191.95 -X128_Y1= 104.09 -105.03 124.76 -X128_Y128= 10.85 -105.03 162.16 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%% Telescope 5 %%%%%%% -M2Telescope -X1_Y1= -50.23 -50.23 341 -X1_Y128= 50.23 -50.23 341 -X128_Y1= -50.23 50.23 341 -X128_Y128= 50.23 50.23 341 -SI= 1 -SILI= 0 -CSI= 1 -VIS= all - -%%%%%%%%%%%%%%%%%%%% -AddThinSi -%%%%%%%%% Det 1 %%%%%%%% -ThinSi -A= 17.9 9.26 131.58 -B= 64.77 9.26 112.78 -C= 58.95 53.69 98.26 -D= 12.38 53.69 117.06 - -%%%%%%%%% Det 2 %%%%%%%% -ThinSi -A= -116.04 9.84 154.55 -B= -22.8 9.84 191.95 -C= -104.09 105.03 124.76 -D= -10.85 105.03 162.16 - -%%%%%%%%% Det 3 %%%%%%%% -ThinSi -A= -12.08 53.69 117.06 -B= -58.95 53.69 98.26 -C= -64.77 9.26 112.78 -D= -17.9 9.26 131.58 - -%%%%%%%%% Det 4 %%%%%%%% -ThinSi -A= -10.85 -105.03 162.16 -B= -22.8 -9.84 191.95 -C= -104.09 -105.03 124.76 -D= -116.04 -9.84 154.55 - - diff --git a/Inputs/DetectorConfiguration/Riken_65mm.detector b/Inputs/DetectorConfiguration/Riken_65mm.detector index 5470d39192c13ca49b9165d9977f853c7610314b..71a3c84bab878833a0c88de61bb768b86592448e 100644 --- a/Inputs/DetectorConfiguration/Riken_65mm.detector +++ b/Inputs/DetectorConfiguration/Riken_65mm.detector @@ -11,9 +11,9 @@ GeneralTarget THICKNESS= 1 RADIUS= 45 MATERIAL= CD2 - X= 10 - Y= -10 - Z= 50 + X= 0 + Y= 0 + Z= 0 CryoTarget THICKNESS= 3000 @@ -27,13 +27,11 @@ CryoTarget Y= 0 Z= 0 - - %%%%%%%%%%%%%%%%%%%%% MUST2Array %%%%%%% Telescope 1 %%%%%%% M2Telescope -X1_Y1= 10.85 105.03 146.16 +X1_Y1= 10.85 105.03 146.16 X1_Y128= 22.8 9.84 175.95 X128_Y1= 104.09 105.03 108.76 X128_Y128= 116.04 9.84 138.55 @@ -44,7 +42,7 @@ VIS= all %%%%%%% Telescope 2 %%%%%%% M2Telescope -X1_Y1= -116.04 9.84 138.55 +X1_Y1= -116.04 9.84 138.55 X1_Y128= -22.8 9.84 175.95 X128_Y1= -104.09 105.03 108.76 X128_Y128= -10.85 105.03 146.16 @@ -55,7 +53,7 @@ VIS= all %%%%%%% Telescope 3 %%%%%%% M2Telescope -X1_Y1= -10.85 -105.03 146.16 +X1_Y1= -10.85 -105.03 146.16 X1_Y128= -22.8 -9.84 175.95 X128_Y1= -104.09 -105.03 108.76 X128_Y128= -116.04 -9.84 138.55 @@ -66,7 +64,7 @@ VIS= all %%%%%%% Telescope 4 %%%%%%% M2Telescope -X1_Y1= 116.04 -9.84 138.55 +X1_Y1= 116.04 -9.84 138.55 X1_Y128= 22.8 -9.84 175.95 X128_Y1= 104.09 -105.03 108.76 X128_Y128= 10.85 -105.03 146.16 @@ -77,7 +75,7 @@ VIS= all %%%%%%% Telescope 5 %%%%%%% M2Telescope -X1_Y1= -50.23 -50.23 325 +X1_Y1= -50.23 -50.23 325 X1_Y128= 50.23 -50.23 325 X128_Y1= -50.23 50.23 325 X128_Y128= 50.23 50.23 325 @@ -117,3 +115,4 @@ C= 64.48 -9.85 85.31 D= 17.61 -9.85 104.11 + diff --git a/NPAnalysis/10He_Riken/Analysis b/NPAnalysis/10He_Riken/Analysis index 73acf47f2d6e340653baac089ce92f0d1716e695..4a6726f22173df4161279eda7ba26322d4933327 100755 Binary files a/NPAnalysis/10He_Riken/Analysis and b/NPAnalysis/10He_Riken/Analysis differ diff --git a/NPAnalysis/10He_Riken/include/ObjectManager.hh b/NPAnalysis/10He_Riken/include/ObjectManager.hh index 8cef0cdee67777ad8b16301617c9a42042b4adc7..eef1cd4254777d0770bb24083d14f12fc0c4aa56 100644 --- a/NPAnalysis/10He_Riken/include/ObjectManager.hh +++ b/NPAnalysis/10He_Riken/include/ObjectManager.hh @@ -106,17 +106,22 @@ namespace ENERGYLOSS // Declare your Energy loss here : EnergyLoss He3TargetWind = EnergyLoss ( "3He_Mylar.txt" , - 1000 , + 100000 , 1 , 3 ); EnergyLoss He3TargetGaz = EnergyLoss ( "3He_D2gaz_1b_26K.txt" , - 100 , + 100000 , 1 , 3 ); EnergyLoss He3StripAl = EnergyLoss ( "3He_Al.txt" , - 100 , + 100000 , + 1 , + 3 ); + + EnergyLoss He3StripSi = EnergyLoss ( "3He_Si.txt" , + 100000 , 1 , 3 ); diff --git a/NPAnalysis/10He_Riken/src/Analysis.cc b/NPAnalysis/10He_Riken/src/Analysis.cc index a88cb3a92c65fd92962699030df914937fb7478d..a05f1ef61a1c56792bebc901f3622417e5095a1e 100644 --- a/NPAnalysis/10He_Riken/src/Analysis.cc +++ b/NPAnalysis/10He_Riken/src/Analysis.cc @@ -31,7 +31,8 @@ int main(int argc,char** argv) myDetector -> ReadConfigurationFile(detectorfileName) ; // Attach more branch to the output - double ThinSi=-1 ;double Ex = 0 ; double EE = 0 ; double TT = 0 ; double X = 0 ; double Y = 0 ; int det ; double ResolTheta=0; + double ThinSi=-1 ;double Ex = 0 ; double EE = 0 ; double TT = 0 ; double X = 0 ; double Y = 0 ; int det ; double ResolThetaCM=0; + double ThetaCM=0; RootOutput::getInstance()->GetTree()->Branch("ExcitationEnergy",&Ex,"Ex/D") ; RootOutput::getInstance()->GetTree()->Branch("E",&EE,"EE/D") ; RootOutput::getInstance()->GetTree()->Branch("A",&TT,"TT/D") ; @@ -39,7 +40,8 @@ int main(int argc,char** argv) RootOutput::getInstance()->GetTree()->Branch("Y",&Y,"Y/D") ; RootOutput::getInstance()->GetTree()->Branch("Y",&Y,"Y/D") ; RootOutput::getInstance()->GetTree()->Branch("ThinSi_E",&ThinSi,"ThinSi/D") ; - + RootOutput::getInstance()->GetTree()->Branch("ThetaCM",&ThetaCM,"ThetaCM/D") ; + RootOutput::getInstance()->GetTree()->Branch("ResolThetaCM",&ResolThetaCM,"ResolThetaCM/D") ; // Get the formed Chained Tree and Treat it TChain* Chain = RootInput:: getInstance() -> GetChain() ; @@ -74,79 +76,83 @@ double TrueE=0 ; double TrueTheta=0 ; // TVector3 BeamDirection = TVector3(cos(BeamPhi)*sin(BeamTheta) , sin(BeamPhi)*sin(BeamTheta) , cos(BeamTheta)) ; TVector3 BeamDirection = TVector3(0,0,1) ; BeamDirection.SetTheta(BeamTheta) ; BeamDirection.SetPhi(BeamPhi) ; - double Theta = ThetaCalculation ( HitDirection , BeamDirection ) ; - + double Theta = ThetaCalculation ( HitDirection , BeamDirection ) ; + double ThetaN = ThetaCalculation ( HitDirection , TVector3(0,0,1) ) ; + if(E>-1000 && ThinSi>0 ) { - - E=E+ThinSi; + + //E=E+ThinSi; // E= He3StripAl.EvaluateInitialEnergy( E , // Energy of the detected particle // 2*2*0.4*micrometer , // One for ThinSi and one for Must // 0 ); -// E= He3StripAl.EvaluateInitialEnergy( E , // Energy of the detected particle -// 2*0.4*micrometer , // Target Thickness at 0 degree -// 0 ); + E= He3StripAl.EvaluateInitialEnergy( E , // Energy of the detected particle + 0.4*micrometer , // Target Thickness at 0 degree + 0 ); // -// E= He3TargetWind.EvaluateInitialEnergy( E , // Energy of the detected particle -// 2*15*micrometer , // Target Thickness at 0 degree -// Theta ); +// double Eb= He3StripSi.EvaluateInitialEnergy( E , // Energy of the detected particle +// 20*micrometer , // Target Thickness at 0 degree +// 0 ); + + //cout << E << " " << Eb-E << " " << ThinSi << endl ; + + E= He3TargetWind.EvaluateInitialEnergy( E , // Energy of the detected particle + 15*micrometer , // Target Thickness at 0 degree + ThetaN ); -// E= He3TargetGaz.EvaluateInitialEnergy( E , // Energy of the detected particle -// 3*mm , // Target Thickness at 0 degree -// Theta ); - - - - - E=E+ThinSi; - + E= He3TargetGaz.EvaluateInitialEnergy( E , // Energy of the detected particle + 1.5*mm , // Target Thickness at 0 degree + ThetaN ); + + ThetaCM = myReaction -> EnergyLabToThetaCM( E , 1 ) /deg ; + ResolThetaCM =ThetaCM - Init->GetICEmittedAngleThetaCM(0) ; Ex = myReaction -> ReconstructRelativistic( E , Theta ) ; X = HitDirection . X(); Y = HitDirection . Y(); } - else if(ThinSi>0) - { - -// ThinSi= He3StripAl.EvaluateInitialEnergy( ThinSi , // Energy of the detected particle -// 2*0.4*micrometer , // Target Thickness at 0 degree -// 0 ); +// else if(ThinSi>0) +// { // +//// ThinSi= He3StripAl.EvaluateInitialEnergy( ThinSi , // Energy of the detected particle +//// 2*0.4*micrometer , // Target Thickness at 0 degree +//// 0 ); +//// // ThinSi= He3TargetWind.EvaluateInitialEnergy( ThinSi , // Energy of the detected particle -// 2*15*micrometer , // Target Thickness at 0 degree -// Theta ); -// -// ThinSi= He3TargetGaz.EvaluateInitialEnergy( ThinSi , // Energy of the detected particle -// 3*mm , // Target Thickness at 0 degree -// Theta ); - - E= ThinSi; - - Ex = myReaction -> ReconstructRelativistic( E , Theta ) ; - X = HitDirection . X(); - Y = HitDirection . Y(); - - } - if(E>-1000 ) +// 15*micrometer , // Target Thickness at 0 degree +// ThetaN ); +//// +//// ThinSi= He3TargetGaz.EvaluateInitialEnergy( ThinSi , // Energy of the detected particle +//// 3*mm , // Target Thickness at 0 degree +//// ThetaN ); +// +// E= ThinSi; +// +// Ex = myReaction -> ReconstructRelativistic( E , Theta ) ; +// X = HitDirection . X(); +// Y = HitDirection . Y(); +// +// } + + else if(E>-1000 ) { -// E= He3StripAl.EvaluateInitialEnergy( E , // Energy of the detected particle -// 2*0.4*micrometer , -// 0 ); -// -// E= He3TargetWind.EvaluateInitialEnergy( E , // Energy of the detected particle -// 2*15*micrometer , // Target Thickness at 0 degree -// Theta ); -// -// E= He3TargetGaz.EvaluateInitialEnergy( E , // Energy of the detected particle -// 3*mm , // Target Thickness at 0 degree -// Theta ); + E= He3StripAl.EvaluateInitialEnergy( E , // Energy of the detected particle + 0.4*micrometer , + 0 ); + + E= He3TargetWind.EvaluateInitialEnergy( E , // Energy of the detected particle + 15*micrometer , // Target Thickness at 0 degree + ThetaN ); + + E= He3TargetGaz.EvaluateInitialEnergy( E , // Energy of the detected particle + 1.5*mm , // Target Thickness at 0 degree + ThetaN ); - ResolTheta = Theta/deg - Init->GetICEmittedAngleThetaLabWorldFrame(0); Ex = myReaction -> ReconstructRelativistic( E, Theta ) ; X = HitDirection . X(); Y = HitDirection . Y(); diff --git a/NPAnalysis/10He_Riken/src/GNUmakefile b/NPAnalysis/10He_Riken/src/GNUmakefile index 742a90a491df079d882318b4948c91f27adfe056..1d51c0a332bee2d9721bd0b61501125b32189c95 100644 --- a/NPAnalysis/10He_Riken/src/GNUmakefile +++ b/NPAnalysis/10He_Riken/src/GNUmakefile @@ -23,12 +23,13 @@ LDFLAGS+= -L$(NPLIB)/lib -lVDetector -lIORoot -lReaction -lEnergyLoss \ LDFLAGS+= -L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) SRC= $(wildcard *.cc) +INC= $(wildcard *.hh) OBJ=$(SRC:.cc=.o) #all:$(EXEC) # @$(CPP) -o $@ -c $< $(CXXFLAGS) -Analysis:$(OBJ) +Analysis:$(OBJ) $(INC) @$(CPP) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) mv Analysis ../Analysis diff --git a/NPLib/Tools/NPEnergyLoss.cxx b/NPLib/Tools/NPEnergyLoss.cxx index 4e14530371ac83ed11e306f0f4a6447fa25177e4..360ffe49b9658c6f98ee63dc21954d0d6f59cf2a 100644 --- a/NPLib/Tools/NPEnergyLoss.cxx +++ b/NPLib/Tools/NPEnergyLoss.cxx @@ -10,11 +10,6 @@ using namespace std; #include "TSpline.h" #include "TAxis.h" -// ROOT -#include "Math/InterpolationTypes.h" -#include "Math/Interpolator.h" -using namespace ROOT::Math; - // NPL using namespace NPL; @@ -22,7 +17,7 @@ using namespace NPL; //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... EnergyLoss::EnergyLoss() - {} + {fInter = NULL ;} //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... EnergyLoss::~EnergyLoss() @@ -120,7 +115,7 @@ EnergyLoss::EnergyLoss(string Path , int NumberOfSlice=100 , int LiseColumn=0 , } - + fInter = new Interpolator( fEnergy , fdEdX_Total ) ; cout << "///////////////////////////////// " << endl ; } @@ -236,18 +231,16 @@ double EnergyLoss::EvaluateInitialEnergy( double Energy , // Energy of the de Energy = Energy / (double) fNumberOfMass ; if (Angle > halfpi) Angle = pi-Angle ; - TargetThickness = TargetThickness / ( cos(Angle) ) ; + TargetThickness = TargetThickness / ( cos(Angle) ) ; + double SliceThickness = TargetThickness / (double)fNumberOfSlice ; - Interpolator* s = new Interpolator( fEnergy , fdEdX_Total ) ; - for (int i = 0; i < fNumberOfSlice ; i++) { - double de = s->Eval(Energy) * SliceThickness ; - Energy += de ; + double de = fInter->Eval(Energy) * SliceThickness ; + Energy += de ; } - delete s ; return (Energy*fNumberOfMass) ; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... diff --git a/NPLib/Tools/NPEnergyLoss.h b/NPLib/Tools/NPEnergyLoss.h index 6388a12221827576ba9253265bdf0ad41b8ed48f..4dd07068de665d8e2986d29aec22b2ad3f79f694 100644 --- a/NPLib/Tools/NPEnergyLoss.h +++ b/NPLib/Tools/NPEnergyLoss.h @@ -12,6 +12,12 @@ using namespace std ; #include "CLHEP/Units/GlobalSystemOfUnits.h" #include "CLHEP/Units/PhysicalConstants.h" using namespace CLHEP ; + +// ROOT +#include "Math/InterpolationTypes.h" +#include "Math/Interpolator.h" +using namespace ROOT::Math; + // Class by Nicolas de Sereville. // Added and update June 2009 @@ -37,7 +43,7 @@ namespace NPL vector<double> fdEdX_Nuclear ; // Nuclear Stopping Power vector<double> fdEdX_Electronic ; // Electronic Stopping Power vector<double> fdEdX_Total ; // Total Stopping Power - + Interpolator* fInter ; // Interpolator Used to evaluate Energy loss at given energy public : // General Function on dE/dX table double EvaluateNuclearLoss (double ener) const;