Skip to content
Snippets Groups Projects
Commit f6feff2f authored by Unknown's avatar Unknown
Browse files

No commit message

No commit message
parent 228e53d1
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,13 @@ TransfertToResonance ...@@ -7,13 +7,13 @@ TransfertToResonance
Target= 2H Target= 2H
Light= 3He Light= 3He
Heavy= 10He Heavy= 10He
ExcitationEnergy= 5.0 ExcitationEnergy= 1.0
BeamEnergy= 550 BeamEnergy= 550
BeamEnergySpread= 0 BeamEnergySpread= 0
BeamFWHMX= 6.232 BeamFWHMX= 6.232
BeamFWHMY= 9.069 BeamFWHMY= 9.069
BeamEmmitanceTheta= 0.69 BeamEmmitanceTheta= 0.01208
BeamEmmitancePhi= 0 BeamEmmitancePhi= 0.01681
ResonanceDecayZ= 2 ResonanceDecayZ= 2
ResonanceDecayA= 8 ResonanceDecayA= 8
CrossSectionPath= 11Li(d,3He)10He.txt CrossSectionPath= 11Li(d,3He)10He.txt
......
No preview for this file type
...@@ -104,10 +104,11 @@ namespace ENERGYLOSS ...@@ -104,10 +104,11 @@ namespace ENERGYLOSS
{ {
// Declare your Energy loss here : // Declare your Energy loss here :
/* EnergyLoss ProtonTarget = EnergyLoss ( "CD2.txt" , EnergyLoss He3Target = EnergyLoss ( "3He_Mylar.txt" ,
100 , 100 ,
1 ); 1 ,
*/ 3 );
} }
using namespace ENERGYLOSS ; using namespace ENERGYLOSS ;
......
...@@ -39,8 +39,9 @@ int main(int argc,char** argv) ...@@ -39,8 +39,9 @@ int main(int argc,char** argv)
RootOutput::getInstance()->GetTree()->Branch("Y",&Y,"Y/D") ; RootOutput::getInstance()->GetTree()->Branch("Y",&Y,"Y/D") ;
// Open the ThinSi Branch // Open the ThinSi Branch
RootInput::getInstance() -> GetTree()->SetBranchStatus(ThinSi,true) ; RootInput::getInstance() -> GetChain()->SetBranchStatus("ThinSiEnergy",true) ;
RootInput::getInstance() -> GetTree()->SetBranchAddress(ThinSiEnergy,true) ; double ThinSi=-1 ;
RootInput::getInstance() -> GetChain()->SetBranchAddress("ThinSiEnergy",&ThinSi) ;
// Get Must2 Pointer: // Get Must2 Pointer:
MUST2Array* M2 = (MUST2Array*) myDetector -> m_Detector["MUST2"] ; MUST2Array* M2 = (MUST2Array*) myDetector -> m_Detector["MUST2"] ;
...@@ -58,7 +59,15 @@ int main(int argc,char** argv) ...@@ -58,7 +59,15 @@ int main(int argc,char** argv)
double E = M2 -> GetEnergyDeposit(); double E = M2 -> GetEnergyDeposit();
TVector3 A = M2 -> GetPositionOfInteraction(); TVector3 A = M2 -> GetPositionOfInteraction();
if(ThinSi > 0) E = E + ThinSi ;
double Theta = ThetaCalculation ( A , TVector3(0,0,1) ) ; double Theta = ThetaCalculation ( A , TVector3(0,0,1) ) ;
E= He3Target.EvaluateInitialEnergy( E , // Energy of the detected particle
15*micrometer , // Target Thickness at 0 degree
Theta );
if(E>-1000) Ex = myReaction -> ReconstructRelativistic( E , Theta ) ; if(E>-1000) Ex = myReaction -> ReconstructRelativistic( E , Theta ) ;
else Ex = -100 ; else Ex = -100 ;
EE = E ; TT = Theta/deg ; EE = E ; TT = Theta/deg ;
...@@ -68,6 +77,7 @@ int main(int argc,char** argv) ...@@ -68,6 +77,7 @@ int main(int argc,char** argv)
else{X = -1000 ; Y = -1000;} else{X = -1000 ; Y = -1000;}
RootOutput::getInstance()->GetTree()->Fill() ; RootOutput::getInstance()->GetTree()->Fill() ;
ThinSi = -1 ;
} }
cout << "A total of " << i << " event has been annalysed " << endl ; cout << "A total of " << i << " event has been annalysed " << endl ;
......
...@@ -31,8 +31,16 @@ EnergyLoss::~EnergyLoss() ...@@ -31,8 +31,16 @@ EnergyLoss::~EnergyLoss()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EnergyLoss::EnergyLoss(string Path , int NumberOfSlice=100 , int LiseColumn=0 , int NumberOfMass=1) EnergyLoss::EnergyLoss(string Path , int NumberOfSlice=100 , int LiseColumn=0 , int NumberOfMass=1)
{ {
fNumberOfSlice = NumberOfSlice ; fNumberOfSlice = NumberOfSlice ;
fNumberOfMass = NumberOfMass ; fNumberOfMass = NumberOfMass ;
string globalPath = getenv("NPTOOL");
Path = globalPath + "/Inputs/dEdX/" + Path;
cout << "///////////////////////////////// " << endl ;
cout << "Initialising an EnergyLoss object " << endl ;
//If LiseColumn is set to 0 File type is expected to be from SRIM //If LiseColumn is set to 0 File type is expected to be from SRIM
if (LiseColumn == 0) if (LiseColumn == 0)
{ {
...@@ -91,7 +99,9 @@ EnergyLoss::EnergyLoss(string Path , int NumberOfSlice=100 , int LiseColumn=0 , ...@@ -91,7 +99,9 @@ EnergyLoss::EnergyLoss(string Path , int NumberOfSlice=100 , int LiseColumn=0 ,
{ cout << "Reading Energy Loss File: " << Path << endl ; { cout << "Reading Energy Loss File: " << Path << endl ;
// Reading Data // Reading Data
double energy=0, energyloss=0; double energy=0, energyloss=0;
string dummy; string dummy;
// skipping comment first line
getline(TableFile,dummy);
while ( TableFile >> energy ) while ( TableFile >> energy )
{ {
...@@ -110,6 +120,8 @@ EnergyLoss::EnergyLoss(string Path , int NumberOfSlice=100 , int LiseColumn=0 , ...@@ -110,6 +120,8 @@ EnergyLoss::EnergyLoss(string Path , int NumberOfSlice=100 , int LiseColumn=0 ,
} }
cout << "///////////////////////////////// " << endl ;
} }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......
...@@ -265,8 +265,8 @@ void Reaction::ReadConfigurationFile(string Path) ...@@ -265,8 +265,8 @@ void Reaction::ReadConfigurationFile(string Path)
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
ifstream ReactionFile; ifstream ReactionFile;
string GlobalPath = getenv("NPTOOL"); string GlobalPath = getenv("NPTOOL");
Path = GlobalPath + "/Inputs/Reaction/" + Path; Path = GlobalPath + "/Inputs/Reaction/" + Path;
ReactionFile.open(Path.c_str()); ReactionFile.open(Path.c_str());
if (ReactionFile.is_open()) {cout << "Reading Reaction File " << Path << endl ;} if (ReactionFile.is_open()) {cout << "Reading Reaction File " << Path << endl ;}
......
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