diff --git a/NPAnalysis/10He_Riken/src/Analysis.cc b/NPAnalysis/10He_Riken/src/Analysis.cc index 8cbb0f434dcfe4c703a601b3a8d721e8e79af847..36770271ea35bf8ac2e3600813c6ea37f2eb8d21 100644 --- a/NPAnalysis/10He_Riken/src/Analysis.cc +++ b/NPAnalysis/10He_Riken/src/Analysis.cc @@ -108,14 +108,13 @@ RootOutput::getInstance()->GetList()->Add(myHist1D); cut3He_M2_SSSD->SetPoint(9,3.41954,1.40797); cut3He_M2_SSSD->SetPoint(10,7.44252,1.45432); - cout << " ///////// Starting Analysis ///////// "<< endl << endl ; int i ,N=Chain -> GetEntries(); cout << " Number of Event to be treated : " << N << endl ; clock_t begin=clock(); clock_t end=begin; - for ( i = 0 ; i < N ; i ++ ) + for ( i = 0 ; i < N ; i ++ ) { // Clear local branch for(int hh = 0 ; hh <2 ; hh++) @@ -198,7 +197,8 @@ RootOutput::getInstance()->GetList()->Add(myHist1D); ThetaN ); ThetaCM[hit] = He10Reaction -> EnergyLabToThetaCM( ELab[hit] ) /deg ; - ExcitationEnergy[hit] = He10Reaction -> ReconstructRelativistic( ELab[hit] , ThetaLab[hit] ) ; +// ExcitationEnergy[hit] = He10Reaction -> ReconstructRelativistic( ELab[hit] , ThetaLab[hit] ) ; + ExcitationEnergy[hit] = He10Reaction -> ReconstructRelativistic( Init->GetICEmittedEnergy(hit) , Init->GetICEmittedAngleThetaLabIncidentFrame(hit) ) ; if(ThinSi -> Energy.size() > 0 ) if(cut3He_M2_SSSD->IsInside(ThinSi -> Energy[hit], M2 -> Si_E[hit]) ) diff --git a/NPLib/Tools/NPReaction.cxx b/NPLib/Tools/NPReaction.cxx index ebe36ae3c810620e44906d291ee54a4d6609c99a..140776985584bc51f8edf0efd4e200a838f9108f 100644 --- a/NPLib/Tools/NPReaction.cxx +++ b/NPLib/Tools/NPReaction.cxx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2009 this file is part of the NPTool Project * + * Copyright (C) 2009-2010 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 * @@ -54,15 +54,15 @@ Reaction::Reaction() { //------------- Default Constructor ------------- - fNoy1 = new Nucleus(); - fNoy2 = new Nucleus(); - fNoy3 = new Nucleus(); - fNoy4 = new Nucleus(); - fBeamEnergy = 0; - fThetaCM = 0; - fExcitation = 0; - fQValue = 0; - initializePrecomputeVariable(); + fNuclei1 = new Nucleus() ; + fNuclei2 = new Nucleus() ; + fNuclei3 = new Nucleus() ; + fNuclei4 = new Nucleus() ; + fBeamEnergy = 0 ; + fThetaCM = 0 ; + fExcitation = 0 ; + fQValue = 0 ; + initializePrecomputeVariable() ; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -76,18 +76,18 @@ void Reaction::SetEveryThing(string name1, string name2, string name3, string na { //------------- Constructor with nuclei names and beam energy ------------ - fNoy1 = new Nucleus(name1); - fNoy2 = new Nucleus(name2); - fNoy3 = new Nucleus(name3); - fNoy4 = new Nucleus(name4); + fNuclei1 = new Nucleus(name1); + fNuclei2 = new Nucleus(name2); + fNuclei3 = new Nucleus(name3); + fNuclei4 = new Nucleus(name4); fBeamEnergy = BeamEnergy; fThetaCM = 0; fExcitation = ExcitationEnergy; - fQValue = ( fNoy1->GetMassExcess() + fNoy2->GetMassExcess() - - fNoy3->GetMassExcess() - fNoy4->GetMassExcess()) / 1000; + fQValue = ( fNuclei1->GetMassExcess() + fNuclei2->GetMassExcess() + - fNuclei3->GetMassExcess() - fNuclei4->GetMassExcess()) / 1000; - int masse = fNoy1->GetA() + fNoy2->GetA() - fNoy3->GetA() - fNoy4->GetA(); - int charge = fNoy1->GetZ() + fNoy2->GetZ() - fNoy3->GetZ() - fNoy4->GetZ(); + int masse = fNuclei1->GetA() + fNuclei2->GetA() - fNuclei3->GetA() - fNuclei4->GetA(); + int charge = fNuclei1->GetZ() + fNuclei2->GetZ() - fNuclei3->GetZ() - fNuclei4->GetZ(); if (masse || charge) cout << "Problem with charge or mass conservation" << endl; ///Read the differential cross section @@ -122,10 +122,10 @@ Reaction::~Reaction() { //------------- Default Destructor ------------ - delete fNoy1; - delete fNoy2; - delete fNoy3; - delete fNoy4; + delete fNuclei1; + delete fNuclei2; + delete fNuclei3; + delete fNuclei4; } @@ -155,7 +155,7 @@ void Reaction::KineRelativistic(double &ThetaLab3, double &EnergieLab3, // 2-body relativistic kinematics: direct + inverse // EnergieLab3,4 : lab energy in MeV of the 2 ejectiles // ThetaLab3,4 : angles in rad - + // case of inverse kinematics double theta = fThetaCM; if (m1 > m2) theta = M_PI - fThetaCM; @@ -185,13 +185,12 @@ double Reaction::ReconstructRelativistic(double EnergyLab, double ThetaLab) cons { // EnergyLab in MeV // ThetaLab in rad - double P1 = sqrt(2*m1*fBeamEnergy+(fBeamEnergy*fBeamEnergy)) ; double P3 = sqrt(2*m3*EnergyLab+(EnergyLab*EnergyLab)) ; double P4 = sqrt(P1*P1+P3*P3-(2*P1*P3*cos(ThetaLab))) ; double E4 = fBeamEnergy+m1+m2-(EnergyLab+m3) ; double m4e = sqrt((E4*E4)-(P4*P4)) ; - double Eex= m4e-m4 ; + double Eex= m4e-fNuclei4->Mass() ; return Eex; } @@ -231,8 +230,8 @@ void Reaction::Print() const { // Print informations concerning the reaction - cout << "Reaction : " << fNoy2->GetName() << "(" << fNoy1->GetName() - << "," << fNoy3->GetName() << ")" << fNoy4->GetName() << " @ " + cout << "Reaction : " << fNuclei2->GetName() << "(" << fNuclei1->GetName() + << "," << fNuclei3->GetName() << ")" << fNuclei4->GetName() << " @ " << fBeamEnergy << " MeV" << endl ; @@ -362,11 +361,11 @@ void Reaction::ReadConfigurationFile(string Path) void Reaction::initializePrecomputeVariable() - { - m1 = fNoy1->Mass(); - m2 = fNoy2->Mass(); - m3 = fNoy3->Mass(); - m4 = fNoy4->Mass() + fExcitation; + { + m1 = fNuclei1->Mass(); + m2 = fNuclei2->Mass(); + m3 = fNuclei3->Mass(); + m4 = fNuclei4->Mass() + fExcitation; // center-of-mass velocity WtotLab = (fBeamEnergy + m1) + m2; @@ -387,7 +386,6 @@ void Reaction::initializePrecomputeVariable() // Constants of the kinematics K3 = B / beta3cm; K4 = B / beta4cm; - } diff --git a/NPLib/Tools/NPReaction.h b/NPLib/Tools/NPReaction.h index a286644ae82fe44b24bef4628e66cd3e1ca26714..771aedbea5e67073f181fcc4fed4424199a0fede 100644 --- a/NPLib/Tools/NPReaction.h +++ b/NPLib/Tools/NPReaction.h @@ -54,10 +54,10 @@ namespace NPL void ReadConfigurationFile(string Path) ; private: - Nucleus *fNoy1 ; // Beam - Nucleus *fNoy2 ; // Target - Nucleus *fNoy3 ; // Light ejectile - Nucleus *fNoy4 ; // Heavy ejectile + Nucleus *fNuclei1 ; // Beam + Nucleus *fNuclei2 ; // Target + Nucleus *fNuclei3 ; // Light ejectile + Nucleus *fNuclei4 ; // Heavy ejectile double fQValue ; // Q-value in MeV double fBeamEnergy ; // Beam energy in MeV double fThetaCM ; // Center-of-mass angle in radian @@ -67,17 +67,17 @@ namespace NPL public: // Getters and Setters - void SetBeamEnergy (double efais) {fBeamEnergy = efais;initializePrecomputeVariable();} - void SetThetaCM (double angle) {fThetaCM = angle;} + void SetBeamEnergy (double eBeam) {fBeamEnergy = eBeam;initializePrecomputeVariable();} + void SetThetaCM (double angle) {fThetaCM = angle;initializePrecomputeVariable();} void SetExcitation (double exci) {fExcitation = exci;initializePrecomputeVariable();} double GetBeamEnergy() const {return fBeamEnergy;} double GetThetaCM() const {return fThetaCM;} double GetExcitation() const {return fExcitation;} double GetQValue() const {return fQValue;} - Nucleus* GetNucleus1() const {return fNoy1;} - Nucleus* GetNucleus2() const {return fNoy2;} - Nucleus* GetNucleus3() const {return fNoy3;} - Nucleus* GetNucleus4() const {return fNoy4;} + Nucleus* GetNucleus1() const {return fNuclei1;} + Nucleus* GetNucleus2() const {return fNuclei2;} + Nucleus* GetNucleus3() const {return fNuclei3;} + Nucleus* GetNucleus4() const {return fNuclei4;} double* GetCrossSection() const {return CrossSection;} int GetCrossSectionSize() const {return CrossSectionSize;} diff --git a/NPSimulation/src/EventGeneratorTransfertToResonance.cc b/NPSimulation/src/EventGeneratorTransfertToResonance.cc index ccde79458e0b37078e69135748326d9368a02836..85c151d5c4c6976a6dbe8a58aae16244894ec4de 100644 --- a/NPSimulation/src/EventGeneratorTransfertToResonance.cc +++ b/NPSimulation/src/EventGeneratorTransfertToResonance.cc @@ -368,7 +368,9 @@ while(ReadingStatus){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4ParticleGun* particleGun) { - + // Initialize event weight to one. + m_EventWeight = 1 ; + // If first time, write the DeDx table if(anEvent->GetEventID()==0) { @@ -402,8 +404,8 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part = G4ParticleTable::GetParticleTable()->GetIon(LightZ, LightA, 0.); // Recoil - G4int HeavyZ = m_Reaction->GetNucleus4()->GetZ() ; - G4int HeavyA = m_Reaction->GetNucleus4()->GetA() ; +// G4int HeavyZ = m_Reaction->GetNucleus4()->GetZ() ; +// G4int HeavyA = m_Reaction->GetNucleus4()->GetA() ; // Shoot the Resonance energy following the mean and width value