diff --git a/Inputs/DetectorConfiguration/MUST2.detector b/Inputs/DetectorConfiguration/MUST2.detector index 4a7ebad47d22ce1fd369b06a54b37fdfde88b633..bf64823e4fdb1b16bc850eff3c80161fb5d24c59 100644 --- a/Inputs/DetectorConfiguration/MUST2.detector +++ b/Inputs/DetectorConfiguration/MUST2.detector @@ -22,3 +22,13 @@ M2Telescope CSI= 0 VIS= all +%%%%%%% Telescope 2 %%%%%%% +M2Telescope + THETA= -40 + PHI= 0 + R= 150 + BETA= 0 0 0 + SI= 1 + SILI= 1 + CSI= 1 + VIS= all diff --git a/Inputs/DetectorConfiguration/Riken_65mm.detector b/Inputs/DetectorConfiguration/Riken_65mm.detector index 0c25c3e988018a4baad82e44162fc84aac8650e2..d1a0d9e01423475b28a7b1eb83c27821fa4120a1 100644 --- a/Inputs/DetectorConfiguration/Riken_65mm.detector +++ b/Inputs/DetectorConfiguration/Riken_65mm.detector @@ -144,5 +144,23 @@ B= 58.66 -56.29 70.79 C= 64.48 -9.85 85.31 D= 17.61 -9.85 104.11 - +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +ScintillatorPlastic +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Plastic + THETA= 0 + PHI= 0 + R= 303 + Thickness= 17 + Radius= 25 + LeadThickness= 0 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Plastic + THETA= 0 + PHI= 0 + R= 317 + Thickness= 8 + Radius= 25 + LeadThickness= 2 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/EventGenerator/10He.reaction b/Inputs/EventGenerator/10He.reaction index b305e585419bbdf367c5eb7d461e0a1e88b4cbd4..5a8c571e6cd4a35a5b2837065d8771edc18dec9b 100644 --- a/Inputs/EventGenerator/10He.reaction +++ b/Inputs/EventGenerator/10He.reaction @@ -7,18 +7,18 @@ TransfertToResonance Target= 2H Light= 3He Heavy= 10He - ExcitationEnergy= 1.0 + ExcitationEnergy= 2.0 BeamEnergy= 550 BeamEnergySpread= 0 SigmaThetaX= 0.6921330164 SigmaPhiY= 0.963142053 SigmaX= 6.232 SigmaY= 9.069 - ResonanceWidth= 1.3 + ResonanceWidth= 0 ResonanceDecayZ= 2 ResonanceDecayA= 8 CrossSectionPath= 11Li(d,3He)10He.txt - ShootLight= 1 - ShootHeavy= 0 + ShootLight= 0 + ShootHeavy= 1 ShootDecayProduct= 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/EventGenerator/10Li-dt.reaction b/Inputs/EventGenerator/10Li-dt.reaction deleted file mode 100644 index 59b82da1563099f23bebbcdde2e5492dbab50c90..0000000000000000000000000000000000000000 --- a/Inputs/EventGenerator/10Li-dt.reaction +++ /dev/null @@ -1,21 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Beam energy given in MeV ; Excitation in MeV ; SigmaXY in mm -% SigmaThetaX/PhiY in deg -Transfert - Beam= 11Li - Target= 2H - Light= 3H - Heavy= 10Li - ExcitationEnergy= 1.0 - BeamEnergy= 550 - BeamEnergySpread= 0 - SigmaThetaX= 0.6921330164 - SigmaPhiY= 0.963142053 - SigmaX= 6.232 - SigmaY= 9.069 - CrossSectionPath= flat.txt - ShootLight= 1 - ShootHeavy= 0 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Inputs/EventGenerator/11Li.beam b/Inputs/EventGenerator/11Li.beam index 9bc69caa7725561a700d467b617aced1d599c3eb..5a06c27989f836364fc4ee579144f4e531185245 100644 --- a/Inputs/EventGenerator/11Li.beam +++ b/Inputs/EventGenerator/11Li.beam @@ -7,7 +7,7 @@ Beam ParticleZ= 3 ParticleA= 11 BeamEnergy= 550 - BeamEnergySpread= 0 + BeamEnergySpread= 10 SigmaX= 6.232 SigmaY= 9.069 SigmaThetaX= 0.6921330164 diff --git a/Inputs/EventGenerator/3He.source b/Inputs/EventGenerator/3He.source index 956f62209494fd6442b3c0730c91168a69055f1d..c88c8c55af046da28a3150ba0afe9151a85a05e4 100644 --- a/Inputs/EventGenerator/3He.source +++ b/Inputs/EventGenerator/3He.source @@ -4,8 +4,8 @@ % Energy are given in MeV , Position in mm % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Isotropic - EnergyLow= 0 - EnergyHigh= 25 + EnergyLow= 8 + EnergyHigh= 8 HalfOpenAngleMin= 0 HalfOpenAngleMax= 180 x0= 0 diff --git a/Inputs/EventGenerator/alpha.source b/Inputs/EventGenerator/alpha.source index 1644876d917e0bd1c6ab0bbd4696893d881027b7..e3e16d1f53b4440df21b15603665ddc533196b9d 100644 --- a/Inputs/EventGenerator/alpha.source +++ b/Inputs/EventGenerator/alpha.source @@ -4,10 +4,10 @@ % Energy are given in MeV , Position in mm % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Isotropic - EnergyLow= 0 + EnergyLow= 0 EnergyHigh= 30 HalfOpenAngleMin= 0 - HalfOpenAngleMax= 90 + HalfOpenAngleMax= 45 x0= 0 y0= 0 z0= 0 diff --git a/NPAnalysis/10He_Riken/Analysis b/NPAnalysis/10He_Riken/Analysis index 7a15c0ec1ee2c7c99032279403bdbfc030232674..c071f2cc652182c892867e7892065363517d6008 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 8d2739151bf089ed4af970bb3bb3d7f29cc583e0..e86658f8646fe70a0d25ad879078f28c7c904133 100644 --- a/NPAnalysis/10He_Riken/include/ObjectManager.hh +++ b/NPAnalysis/10He_Riken/include/ObjectManager.hh @@ -28,6 +28,7 @@ // NPL #include "TMust2Data.h" #include "TMust2Physics.h" +#include "TPlasticData.h" #include "NPReaction.h" #include "RootInput.h" #include "RootOutput.h" diff --git a/NPAnalysis/10He_Riken/src/Analysis.cc b/NPAnalysis/10He_Riken/src/Analysis.cc index b51e713f1c3a6e1c1131ddf4364b57db83f84a74..2dc14a435425d4ae9349304075d5111a1e425153 100644 --- a/NPAnalysis/10He_Riken/src/Analysis.cc +++ b/NPAnalysis/10He_Riken/src/Analysis.cc @@ -31,8 +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 ResolThetaCM=0; - double ThetaCM=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 FullTheta = 0 ; + double ThetaCM=0; double EPl=0; double DEPl=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") ; @@ -41,6 +41,10 @@ int main(int argc,char** argv) 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") ; + RootOutput::getInstance()->GetTree()->Branch("FullTheta",&FullTheta,"FullTheta/D") ; + RootOutput::getInstance()->GetTree()->Branch("EPl",&EPl,"EPl/D") ; + RootOutput::getInstance()->GetTree()->Branch("DEPl",&DEPl,"DEPl/D") ; + // Get the formed Chained Tree and Treat it TChain* Chain = RootInput:: getInstance() -> GetChain() ; @@ -48,11 +52,14 @@ int main(int argc,char** argv) Chain->SetBranchStatus("ThinSiEnergy",true) ; Chain->SetBranchStatus("InitialConditions",true) ; Chain->SetBranchStatus("fIC_*",true) ; - - TInitialConditions* Init = new TInitialConditions(); + Chain->SetBranchStatus("fPlastic_*",true); + + TInitialConditions* Init = new TInitialConditions(); Chain->SetBranchAddress("ThinSiEnergy" ,&ThinSi ); Chain->SetBranchAddress("InitialConditions" ,&Init ); + TPlasticData* Plastic = new TPlasticData() ; + Chain->SetBranchAddress("Plastic",&Plastic ); double XTarget=0 ; double YTarget=0; double BeamTheta = 0 ; double BeamPhi = 0 ; double E=-1000; @@ -62,11 +69,26 @@ int main(int argc,char** argv) int i; for ( i = 0 ; i < Chain -> GetEntries() ; i ++ ) { - if( i%10000 == 0 && i!=0) cout << i << " Event annalysed " << endl ; + if( i%100000 == 0 && i!=0) {cout << i << " Event annalysed "<<endl; } Chain -> GetEntry(i); - myDetector -> ClearEventPhysics() ; - myDetector -> BuildPhysicalEvent() ; + // Plastic + if(Plastic->GetEnergySize()==2) + { + DEPl=Plastic->GetEnergy(0); + EPl=Plastic->GetEnergy(1); + } + + else + { + EPl =0 ; + DEPl =0 ; + } + + + /* myDetector -> ClearEventPhysics() ; + myDetector -> BuildPhysicalEvent() ; + FullTheta = Init->GetICEmittedAngleThetaLabWorldFrame(0); E = M2 -> GetEnergyDeposit(); XTarget = Init->GetICPositionX(0); YTarget = Init->GetICPositionY(0); @@ -126,9 +148,9 @@ int main(int argc,char** argv) { if(E>18)//CsI are inside a Mylar foil, plus rear alu strip { - // E= He3TargetWind.EvaluateInitialEnergy( E , // Energy of the detected particle - // 3*micrometer , // Target Thickness at 0 degree - // ThetaMM2Surface ); + E= He3TargetWind.EvaluateInitialEnergy( E , // Energy of the detected particle + 3*micrometer , // Target Thickness at 0 degree + ThetaMM2Surface ); E= He3StripAl.EvaluateInitialEnergy( E , // Energy of the detected particle 0.4*micrometer , // Target Thickness at 0 degree ThetaMM2Surface ); @@ -192,7 +214,7 @@ int main(int argc,char** argv) EE = E ; TT = Theta/deg ; - + */ RootOutput::getInstance()->GetTree()->Fill() ; ThinSi = -1 ; } diff --git a/NPAnalysis/10He_Riken/src/GNUmakefile b/NPAnalysis/10He_Riken/src/GNUmakefile index 15a9a7a10e9dc1d50489b0a14210d6697621466d..bf3890ce84f41ccf1398ac342084e30310d475f2 100644 --- a/NPAnalysis/10He_Riken/src/GNUmakefile +++ b/NPAnalysis/10He_Riken/src/GNUmakefile @@ -18,7 +18,7 @@ CXXFLAGS += -I$(NPLIB)/include LDFLAGS = `root-config --libs` -lMathMore LDFLAGS+= -L$(NPLIB)/lib -lVDetector -lIORoot -lReaction -lEnergyLoss \ -lMust2Data -lMust2Physics \ - -lAnnularS1Data -lGaspardData \ + -lAnnularS1Data -lGaspardData -lPlasticData\ -lInitialConditions -lInteractionCoordinates LDFLAGS+= -L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) diff --git a/NPAnalysis/macros/GeometricalEfficiency.C b/NPAnalysis/macros/GeometricalEfficiency.C index 5bbc6f5864000c292f58a2741c5f69160e0ed90f..fd727bd4e268fc7897b31194e89baa9d8f78f92a 100644 --- a/NPAnalysis/macros/GeometricalEfficiency.C +++ b/NPAnalysis/macros/GeometricalEfficiency.C @@ -36,8 +36,10 @@ #include "TBranch.h" #include "TH1F.h" -#include "TInitialConditions.h" -#include "TInteractionCoordinates.h" +#include "/home/Adrien/Desktop/NPTool/NPTool.dev/NPLib/include/TInitialConditions.h" +#include "/home/Adrien/Desktop/NPTool/NPTool.dev/NPLib/include/TInteractionCoordinates.h" + +using namespace std ; void GeometricalEfficiency(const char * fname = "Efficiency_10000") { @@ -65,9 +67,9 @@ void GeometricalEfficiency(const char * fname = "Efficiency_10000") // Read the TTree Int_t nentries = tree->GetEntries(); - cout << "TTree contains " << nentries << " events" << endl; + // cout << "TTree contains " << nentries << " events" << endl; for (Int_t i = 0; i < nentries; i++) { - if (i%1000 == 0) cout << "Entry " << i << endl; + //if (i%1000 == 0) cout << "Entry " << i << endl; tree->GetEntry(i); // Fill histos hEmittTheta->Fill(initCond->GetICEmittedAngleThetaLabWorldFrame(0)); diff --git a/NPLib/GASPARD/TGaspardTrackerPhysics.h b/NPLib/GASPARD/TGaspardTrackerPhysics.h index e23742bee88e73dcd8102bc39b627eecb6e0ec26..5f8426c0598c66e710ec4c90691d68f0d9ae057b 100644 --- a/NPLib/GASPARD/TGaspardTrackerPhysics.h +++ b/NPLib/GASPARD/TGaspardTrackerPhysics.h @@ -27,6 +27,7 @@ #include <vector> #include "TObject.h" #include "TGaspardTrackerData.h" +#include <cstdlib> using namespace std ; diff --git a/NPLib/Plastic/TPlasticData.cxx b/NPLib/Plastic/TPlasticData.cxx index 1221a2a4f6b5abed0ceb5f94d74fe56c3e8586b5..ac7ae2789f7dbc19afa275fa5a13ba9496561132 100644 --- a/NPLib/Plastic/TPlasticData.cxx +++ b/NPLib/Plastic/TPlasticData.cxx @@ -22,6 +22,7 @@ void TPlasticData::Clear() { fPlastic_Energy.clear(); fPlastic_Number.clear(); + fPlastic_Time.clear(); } diff --git a/NPLib/Plastic/TPlasticData.h b/NPLib/Plastic/TPlasticData.h index f11a97f572312123f19724077a334d1067f985ea..15b2a590139036d0cd6c468f35eeea92a36693b5 100644 --- a/NPLib/Plastic/TPlasticData.h +++ b/NPLib/Plastic/TPlasticData.h @@ -28,6 +28,15 @@ class TPlasticData : public TObject { double GetTime(int i) {return fPlastic_Time[i];} // (N) int GetPlasticNumber(int i) {return fPlastic_Number[i];} + + + double GetEnergySize() {return fPlastic_Energy.size();} + // (T) + double GetTimeSize() {return fPlastic_Time.size();} + // (N) + int GetPlasticNumberSize() {return fPlastic_Number.size();} + + ///////////////////// SETTERS //////////////////////// // (E) void SetEnergy(double E) {fPlastic_Energy.push_back(E);} diff --git a/NPSimulation/include/EventGeneratorTransfertToResonance.hh b/NPSimulation/include/EventGeneratorTransfertToResonance.hh index 51d85928d08111b82ffe676a71627b174f210a7d..762617531f3350cd6a38ee7ca46fc38c28b8b2dc 100644 --- a/NPSimulation/include/EventGeneratorTransfertToResonance.hh +++ b/NPSimulation/include/EventGeneratorTransfertToResonance.hh @@ -132,10 +132,6 @@ class EventGeneratorTransfertToResonance : public VEventGenerator G4Event* anEvent , G4ParticleGun* particleGun); - // This method return a random Vector of dimension N and magnitude R - // The return distribution populate uniformely the surface of the N-Sphere of radius R - vector<double> PhaseSpaceUniformGenerator( int N , double R); - void SetEverything(string name1 , //Beam nuclei string name2 , //Target nuclei string name3 , //Product of reaction diff --git a/NPSimulation/src/EventGeneratorBeam.cc b/NPSimulation/src/EventGeneratorBeam.cc index 80550358d291f08d73c13878c1eba3d97df55779..10f13e75f254b4e263e3e11c0990ff259b156ef7 100644 --- a/NPSimulation/src/EventGeneratorBeam.cc +++ b/NPSimulation/src/EventGeneratorBeam.cc @@ -172,7 +172,7 @@ void EventGeneratorBeam::GenerateEvent(G4Event* anEvent, G4ParticleGun* particle G4double y0 = 1000 * cm ; G4double Beam_thetaX = 0 ; G4double Beam_phiY = 0 ; - + //shoot inside the target with correlated angle if (m_TargetRadius != 0) { @@ -188,7 +188,6 @@ void EventGeneratorBeam::GenerateEvent(G4Event* anEvent, G4ParticleGun* particle RandomGaussian2D( 0 , 0 , 0 , m_SigmaThetaX , x0 , Beam_thetaX ); RandomGaussian2D( 0 , 0 , 0 , m_SigmaPhiY , y0 , Beam_phiY ); } - m_InitConditions->SetICIncidentEmittanceTheta(Beam_thetaX / deg); m_InitConditions->SetICIncidentEmittancePhi(Beam_phiY / deg); diff --git a/NPSimulation/src/EventGeneratorTransfertToResonance.cc b/NPSimulation/src/EventGeneratorTransfertToResonance.cc index 500f81a12976323bb12185a0ef53c0798dd98ea4..f130ce20ea440cffc6a33781e03fd7d764e5eb55 100644 --- a/NPSimulation/src/EventGeneratorTransfertToResonance.cc +++ b/NPSimulation/src/EventGeneratorTransfertToResonance.cc @@ -588,27 +588,17 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy G4double mn = neutron -> GetPDGMass() ; G4double mp = proton -> GetPDGMass() ; - G4double Q = M - md - mn * NumberOfNeutrons - mp * NumberOfProtons ; - - vector<G4double> DecayProductsMomentumCM ; - vector<G4double> DecayProductsMomentumXCM ; - vector<G4double> DecayProductsMomentumYCM ; - vector<G4double> DecayProductsMomentumZCM ; - vector<G4double> DecayProductsThetaCM ; - vector<G4double> DecayProductsPhiCM ; - // Initial Lab Momentum - G4double InitialE = sqrt(EnergyHeavy * EnergyHeavy + M * M) ; - G4double InitialMomentumX = EnergyHeavy * sin(ThetaHeavy) * cos(PhiHeavy) ; - G4double InitialMomentumY = EnergyHeavy * sin(ThetaHeavy) * sin(PhiHeavy) ; - G4double InitialMomentumZ = EnergyHeavy * cos(ThetaHeavy) ; + G4double InitialE = sqrt(EnergyHeavy * EnergyHeavy + M * M) ; + G4double InitialMomentumX = EnergyHeavy * sin(ThetaHeavy) * cos(PhiHeavy) ; + G4double InitialMomentumY = EnergyHeavy * sin(ThetaHeavy) * sin(PhiHeavy) ; + G4double InitialMomentumZ = EnergyHeavy * cos(ThetaHeavy) ; TLorentzVector Initial = TLorentzVector(InitialMomentumX/GeV, InitialMomentumY/GeV, InitialMomentumZ/GeV,InitialE/GeV); - + // Array of masses express in GeV/c2 double* masses = new double[NumberOfDecayProducts+1]; - - // Filling Array + // Filling Array masses[0] = md/GeV ; int ll = 1 ; @@ -617,21 +607,33 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy for(int i = 0 ; i < NumberOfProtons ; i++) {masses[ll] = mp/GeV ; ll++;} + // Instentiate a Phase Space Generator, with flat distrution - - TGenPhaseSpace TPhaseSpace ; - if( !TPhaseSpace.SetDecay(Initial, NumberOfDecayProducts+1, masses,"Fermi") ) cout << "Warning: Phase Space Decay forbiden by kinematic"; - TPhaseSpace.Generate() ; + if( !TPhaseSpace.SetDecay(Initial, NumberOfDecayProducts+1, masses) ) cout << "Warning: Phase Space Decay forbiden by kinematic, or more than 18 particles "<<endl; + + double MaxWt=TPhaseSpace.GetWtMax() ; + double Weight = 0 ; + double Rand = 1 ; + + while( Rand > Weight ) + { + Weight = TPhaseSpace.Generate() ; + Rand = CLHEP::RandFlat::shoot()*MaxWt ; + } + TLorentzVector* daugterLV = TPhaseSpace.GetDecay(0); + G4ThreeVector Momentum = G4ThreeVector( daugterLV->X()*GeV , daugterLV->Y()*GeV , daugterLV->Z()*GeV ); + double Energy = Momentum.mag() ; Momentum.unit() ; + //Set the gun to shoot particleGun->SetParticleDefinition(daughter) ; particleGun->SetParticleMomentumDirection(Momentum) ; @@ -639,6 +641,14 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy particleGun->SetParticlePosition(G4ThreeVector(x0, y0, z0)) ; // Shoot the Daugter particleGun->GeneratePrimaryVertex(anEvent) ; + + // get theta and phi in the world frame + G4double theta_world = Momentum.theta(); + G4double phi_world = Momentum.phi(); + if (phi_world < 1e-6) phi_world += 2*pi; + // write angles in ROOT file + m_InitConditions->SetICEmittedAngleThetaLabWorldFrame(theta_world / deg); + m_InitConditions->SetICEmittedAnglePhiWorldFrame(phi_world / deg); if (m_ShootDecayProduct) { @@ -653,7 +663,7 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy Energy = Momentum.mag() ; Momentum.unit() ; //Set the gun to shoot - particleGun->SetParticleDefinition(neutron) ; + particleGun->SetParticleDefinition(neutron) ; particleGun->SetParticleMomentumDirection(Momentum) ; particleGun->SetParticleEnergy(Energy) ; particleGun->SetParticlePosition(G4ThreeVector(x0, y0, z0)) ; @@ -681,33 +691,12 @@ void EventGeneratorTransfertToResonance::ResonanceDecay( G4double EnergyHeavy jj++; } - delete masses ; + } + delete masses ; } } -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -vector<double> EventGeneratorTransfertToResonance::PhaseSpaceUniformGenerator( int N , double R) - { - vector<double> V ; - V.reserve(N) ; - double Norme ; - double Buffer ; - - for(int i = 0 ; i< N ; i++) - { - V.push_back( Buffer = CLHEP::RandFlat::shoot() ); - Norme += Buffer*Buffer ; - } - - Norme = sqrt(Norme) ; - - for(int i = 0 ; i< N ; i++) - V[i] = V[i] / Norme ; - - return V; - } - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void EventGeneratorTransfertToResonance::SetEverything( string name1 , string name2 , diff --git a/NPSimulation/src/Plastic.cc b/NPSimulation/src/Plastic.cc index 1f95f4954904a6055597a8824e5b59dead0cba56..3c8142b5e66dbb3bac15a24e4b99e238b45ef51a 100644 --- a/NPSimulation/src/Plastic.cc +++ b/NPSimulation/src/Plastic.cc @@ -43,7 +43,7 @@ #include "Plastic.hh" #include "PlasticScorers.hh" #include "RootOutput.h" - +using namespace PLASTIC; // CLHEP header #include "CLHEP/Random/RandGauss.h" @@ -56,7 +56,7 @@ namespace PLASTIC { // Energy and time Resolution const G4double ResoTime = 4.2 ;// = 10ns of Resolution // Unit is MeV/2.35 - const G4double ResoEnergy = 0.42 ;// = 1MeV of Resolution // Unit is MeV/2.35 + const G4double ResoEnergy = 5.0 ;// Resolution in % } @@ -393,7 +393,7 @@ void Plastic::ReadSensitive(const G4Event* event) G4double E = *(Energy_itr->second) ; if (ETrackID == NTrackID) { - m_Event->SetEnergy(RandGauss::shoot(E, ResoEnergy)) ; + m_Event->SetEnergy(RandGauss::shoot(E, E*ResoEnergy/100./2.35)) ; } Energy_itr++; @@ -419,8 +419,10 @@ void Plastic::ReadSensitive(const G4Event* event) } // clear map for next event - DetectorNumberHitMap ->clear(); - EnergyHitMap ->clear() ; + TimeHitMap ->clear() ; + DetectorNumberHitMap ->clear() ; + EnergyHitMap ->clear() ; + } //////////////////////////////////////////////////////////////// @@ -449,10 +451,10 @@ void Plastic::InitializeMaterial() // Plastic - density = 1.243 * g / cm3; + density = 1.032 * g / cm3; m_MaterialPlastic = new G4Material("Plastic", density, ncomponents = 2); m_MaterialPlastic->AddElement(H , natoms = 10); - m_MaterialPlastic->AddElement(C , natoms = 14); + m_MaterialPlastic->AddElement(C , natoms = 9); } diff --git a/NPSimulation/src/PlasticScorer.cc b/NPSimulation/src/PlasticScorer.cc index 4cf0904c27753c54b33660127cab23fffdd5f5ec..a6de658bdf9e530c3e5aad3f48c296ec552ca085 100644 --- a/NPSimulation/src/PlasticScorer.cc +++ b/NPSimulation/src/PlasticScorer.cc @@ -12,7 +12,7 @@ * Last update : * *---------------------------------------------------------------------------* * Decription: * - * This class old some of the Platic Scorer, shared by different detector. * + * This class old some of the Platic Scorer. * *---------------------------------------------------------------------------* * Comment: * *****************************************************************************/