From e5d791b7ad3925e4fc092050fce39299b0738c18 Mon Sep 17 00:00:00 2001 From: matta <matta@npt> Date: Thu, 28 Feb 2013 15:04:57 +0000 Subject: [PATCH] * Fixing issue when target size value are 0: - The target was not created and thus the Material not register in the dE/dx table. So NPS crash when trying to write the table. The table is no longer written if the size of the target is 0 * Fixing issue when EventGeneratorIsotropic is used for gamma emission --- Inputs/DetectorConfiguration/e530.detector | 2 +- Inputs/EventGenerator/10He.reaction | 2 +- ...pair_const_string_NPA__VDetector______.cxx | 11 -- ...ir_const_string_NPA__VDetector_______cxx.d | 121 ------------------ .../pMakePhysicalTree/DataProcessor.cxx | 50 +++++++- NPAnalysis/pMakePhysicalTree/DataProcessor.h | 1 + .../pMakePhysicalTree/DataProcessor_cxx.d | 2 +- .../pMakePhysicalTree/MakePhysicalTree.cxx | 3 + .../pMakePhysicalTree/MakePhysicalTree_cxx.d | 2 +- NPAnalysis/pMakePhysicalTree/RunToTreat.txt | 2 +- NPSimulation/src/EventGeneratorBeam.cc | 1 - NPSimulation/src/EventGeneratorIsotropic.cc | 1 + .../src/EventGeneratorTwoBodyReaction.cc | 4 +- NPSimulation/src/PhysicsList.cc | 2 - NPSimulation/src/Target.cc | 70 +++++----- 15 files changed, 94 insertions(+), 180 deletions(-) delete mode 100644 NPAnalysis/pMakePhysicalTree/AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector______.cxx delete mode 100644 NPAnalysis/pMakePhysicalTree/AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.d diff --git a/Inputs/DetectorConfiguration/e530.detector b/Inputs/DetectorConfiguration/e530.detector index 162fc970b..eee18b077 100644 --- a/Inputs/DetectorConfiguration/e530.detector +++ b/Inputs/DetectorConfiguration/e530.detector @@ -20,7 +20,7 @@ GeneralTarget %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Target THICKNESS= 0 - RADIUS= 0.1 + RADIUS= 0.1 MATERIAL= CD2 ANGLE= 0 X= 0 diff --git a/Inputs/EventGenerator/10He.reaction b/Inputs/EventGenerator/10He.reaction index dee2a70a3..d453d5fa3 100644 --- a/Inputs/EventGenerator/10He.reaction +++ b/Inputs/EventGenerator/10He.reaction @@ -30,7 +30,7 @@ Beam %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%TwoBodyReaction +TwoBodyReaction Beam= 9Li Target= 2H Light= 3He diff --git a/NPAnalysis/pMakePhysicalTree/AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector______.cxx b/NPAnalysis/pMakePhysicalTree/AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector______.cxx deleted file mode 100644 index 9af97affd..000000000 --- a/NPAnalysis/pMakePhysicalTree/AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector______.cxx +++ /dev/null @@ -1,11 +0,0 @@ -#include "DataProcessor.h" -#include "string" -#ifdef __CINT__ -#pragma link C++ nestedclasses; -#pragma link C++ nestedtypedefs; -#pragma link C++ class map<string,NPA::VDetector*,less<string>,allocator<pair<const string,NPA::VDetector*> > >+; -#pragma link C++ class map<string,NPA::VDetector*,less<string>,allocator<pair<const string,NPA::VDetector*> > >::*; -#pragma link C++ operators map<string,NPA::VDetector*,less<string>,allocator<pair<const string,NPA::VDetector*> > >::iterator; -#pragma link C++ operators map<string,NPA::VDetector*,less<string>,allocator<pair<const string,NPA::VDetector*> > >::const_iterator; -#pragma link C++ operators map<string,NPA::VDetector*,less<string>,allocator<pair<const string,NPA::VDetector*> > >::reverse_iterator; -#endif diff --git a/NPAnalysis/pMakePhysicalTree/AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.d b/NPAnalysis/pMakePhysicalTree/AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.d deleted file mode 100644 index b144e619b..000000000 --- a/NPAnalysis/pMakePhysicalTree/AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.d +++ /dev/null @@ -1,121 +0,0 @@ - -# DO NOT DELETE - -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: DataProcessor.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/DetectorManager.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/VDetector.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPOptionManager.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TSelector.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TObject.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/Rtypes.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/RConfig.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/RVersion.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/DllImport.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/Rtypeinfo.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/snprintf.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/strlcpy.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TGenericClassInfo.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TSchemaHelper.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TStorage.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TVersionCheck.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/Riosfwd.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TBuffer.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TString.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMathBase.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TSelectorList.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TList.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TSeqCollection.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TCollection.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TIterator.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TROOT.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TDirectory.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TNamed.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TDatime.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TUUID.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TChain.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TTree.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TBranch.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TObjArray.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TAttFill.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TDataType.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TDictionary.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/Property.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TAttLine.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TAttMarker.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TArrayD.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TArray.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TArrayI.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TClass.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TObjString.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TVirtualTreePlayer.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TFile.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TDirectoryFile.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMap.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/THashTable.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TUrl.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TLeaf.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TVector3.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TError.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TVector2.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrix.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixF.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixT.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixTBase.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixFBasefwd.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixDBasefwd.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TVectorFfwd.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TVectorDfwd.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixTUtils.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixFfwd.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixFUtils.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMatrixFUtilsfwd.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TRandom.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TSystem.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TInetAddress.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TTimer.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TSysEvtHandler.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TQObject.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TTime.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TProofOutputFile.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/RootInput.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/RootOutput.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/TAsciiFile.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPReaction.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPNucleus.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TLorentzVector.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TMath.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TRotation.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPPhysicalConstants.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPSystemOfUnits.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPBeam.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TH1F.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TH1.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TAxis.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TAttAxis.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TArrayC.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TArrayS.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TArrayF.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/Foption.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TFitResultPtr.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TH2F.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TH2.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TLorentzRotation.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TGraph.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TCanvas.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TPad.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TVirtualPad.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TAttPad.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TVirtualX.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TAttText.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/GuiTypes.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/Buttons.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TAttCanvas.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/TCanvasImp.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/TInitialConditions.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/TSharcData.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/TSharcPhysics.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/CalibrationManager.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/VDetector.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPGlobalSystemOfUnits.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx.so: /usr/local/root-5.34.04/include/cintdictversion.h /usr/local/root-5.34.04/include/RVersion.h -AutoDict_map_string_NPA__VDetector__less_string__allocator_pair_const_string_NPA__VDetector_______cxx__ROOTBUILDVERSION= 5.34/04 diff --git a/NPAnalysis/pMakePhysicalTree/DataProcessor.cxx b/NPAnalysis/pMakePhysicalTree/DataProcessor.cxx index 93cd66f7f..89b2c24f8 100644 --- a/NPAnalysis/pMakePhysicalTree/DataProcessor.cxx +++ b/NPAnalysis/pMakePhysicalTree/DataProcessor.cxx @@ -5,6 +5,8 @@ ClassImp(DataProcessor); DataProcessor::DataProcessor(){ m_InputChain = 0 ; m_OutputTree = 0 ; + m_ProofFile = 0 ; + m_OutputFile = 0 ; } //_____________________________________________________________________________ @@ -13,6 +15,9 @@ DataProcessor::~DataProcessor(){ //_____________________________________________________________________________ void DataProcessor::SlaveBegin(TTree*){ + + + TString NPLPath = gSystem->Getenv("NPTOOL"); gROOT->ProcessLine(Form(".x %s/NPLib/scripts/NPToolLogon.C+", NPLPath.Data())); @@ -36,11 +41,22 @@ void DataProcessor::SlaveBegin(TTree*){ // Instantiate the detector using a file m_Detector = new DetectorManager(); m_Detector->ReadConfigurationFile(detectorfileName); - + m_InputChain = RootInput:: getInstance()->GetChain(); m_OutputTree = RootOutput::getInstance()->GetTree(); - GetInputList()->Add(m_InputChain); - GetOutputList()->Add(m_OutputTree); + + //Merging via file: + // Just create the object + UInt_t opt = TProofOutputFile::kRegister | TProofOutputFile::kOverwrite | TProofOutputFile::kVerify; + + m_ProofFile = new TProofOutputFile("Local.root",TProofOutputFile::kDataset, opt ); + m_OutputFile = m_ProofFile->OpenFile("RECREATE"); + + GetOutputList()->Add(m_ProofFile); + m_OutputTree->SetDirectory(m_OutputFile); + m_OutputTree->AutoSave(); + m_OutputFile->Flush(); + //GetOutputList()->Add(m_OutputTree); } //_____________________________________________________________________________ Bool_t DataProcessor::Process(Long64_t entry){ @@ -53,19 +69,43 @@ Bool_t DataProcessor::Process(Long64_t entry){ //_____________________________________________________________________________ void DataProcessor::Terminate(){ + cout << 1 << endl ; string OutputfileName = NPOptionManager::getInstance(GetOption())->GetOutputFile(); + cout << 2 << endl ; RootOutput::getInstance(OutputfileName, "S1107Physics"); - + cout << 3 << endl ; TFile* OutputFile = RootOutput::getInstance()->InitFile( NPOptionManager::getInstance(GetOption())->GetOutputFile()); + cout << 4 << endl ; + GetOutputList()->Print(); + m_ProofFile = dynamic_cast<TProofOutputFile*>(GetOutputList()->FindObject("Local.root")); + cout << 5 << endl ; + TString outputFile(m_ProofFile->GetOutputFileName()); + cout << 6 << endl ; + m_OutputFile = TFile::Open(outputFile); + cout << 7 << endl ; + m_OutputTree = (TTree*) m_OutputFile->Get("S1107Physics"); + cout << 8 << endl ; + m_OutputTree->SetDirectory(OutputFile);cout << 9 << endl ; + m_OutputTree->Write();cout << 10 << endl ; + OutputFile->Flush();cout << 11 << endl ; + m_OutputFile->Close();cout << 12 << endl ; + OutputFile->Close();cout << 13 << endl ; + RootOutput::getInstance()->Destroy();cout << 14 << endl ; + + +/* TFile* OutputFile = RootOutput::getInstance()->InitFile( NPOptionManager::getInstance(GetOption())->GetOutputFile()); m_OutputTree = (TTree*) GetOutputList()->FindObject("S1107Physics"); m_OutputTree->SetDirectory(OutputFile); m_OutputTree->Write(); OutputFile->Flush(); - RootOutput::getInstance()->Destroy(); + RootOutput::getInstance()->Destroy();*/ } //_____________________________________________________________________________ void DataProcessor::SlaveTerminate(){ + m_OutputFile->cd(); + m_OutputTree->Write(); + m_OutputFile->Close(); RootOutput::getInstance()->Destroy(); RootInput::getInstance()->Destroy(); NPOptionManager::getInstance()->Destroy(); diff --git a/NPAnalysis/pMakePhysicalTree/DataProcessor.h b/NPAnalysis/pMakePhysicalTree/DataProcessor.h index 892ab743c..3b8d8c029 100644 --- a/NPAnalysis/pMakePhysicalTree/DataProcessor.h +++ b/NPAnalysis/pMakePhysicalTree/DataProcessor.h @@ -44,6 +44,7 @@ class DataProcessor : public TSelector { NPA::DetectorManager* m_Detector ; // the detector TProofOutputFile* m_ProofFile; // For merging via file + TFile* m_OutputFile ; DataProcessor(); virtual ~DataProcessor(); diff --git a/NPAnalysis/pMakePhysicalTree/DataProcessor_cxx.d b/NPAnalysis/pMakePhysicalTree/DataProcessor_cxx.d index e661e319d..168d1bcac 100644 --- a/NPAnalysis/pMakePhysicalTree/DataProcessor_cxx.d +++ b/NPAnalysis/pMakePhysicalTree/DataProcessor_cxx.d @@ -85,6 +85,7 @@ ./DataProcessor_cxx.so: /usr/local/root-5.34.04/include/TLorentzVector.h ./DataProcessor_cxx.so: /usr/local/root-5.34.04/include/TMath.h ./DataProcessor_cxx.so: /usr/local/root-5.34.04/include/TRotation.h +./DataProcessor_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPGlobalSystemOfUnits.h ./DataProcessor_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPPhysicalConstants.h ./DataProcessor_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPSystemOfUnits.h ./DataProcessor_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPBeam.h @@ -116,6 +117,5 @@ ./DataProcessor_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/TSharcPhysics.h ./DataProcessor_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/CalibrationManager.h ./DataProcessor_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/VDetector.h -./DataProcessor_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPGlobalSystemOfUnits.h ./DataProcessor_cxx.so: /usr/local/root-5.34.04/include/cintdictversion.h /usr/local/root-5.34.04/include/RVersion.h DataProcessor_cxx__ROOTBUILDVERSION= 5.34/04 diff --git a/NPAnalysis/pMakePhysicalTree/MakePhysicalTree.cxx b/NPAnalysis/pMakePhysicalTree/MakePhysicalTree.cxx index dc535aca1..67cfa9f08 100644 --- a/NPAnalysis/pMakePhysicalTree/MakePhysicalTree.cxx +++ b/NPAnalysis/pMakePhysicalTree/MakePhysicalTree.cxx @@ -5,6 +5,9 @@ void MakePhysicalTree(string option){ + TFile* f = new TFile("Local.root","RECREATE"); + f->Close(); + string runToReadfileName = NPOptionManager::getInstance(option)->GetRunToReadFile(); TDSet* DSet = new TDSet( *(RootInput::getInstance(runToReadfileName)->GetChain()) ); TProof* plite; diff --git a/NPAnalysis/pMakePhysicalTree/MakePhysicalTree_cxx.d b/NPAnalysis/pMakePhysicalTree/MakePhysicalTree_cxx.d index c92d67165..8752ab9c4 100644 --- a/NPAnalysis/pMakePhysicalTree/MakePhysicalTree_cxx.d +++ b/NPAnalysis/pMakePhysicalTree/MakePhysicalTree_cxx.d @@ -85,6 +85,7 @@ ./MakePhysicalTree_cxx.so: /usr/local/root-5.34.04/include/TLorentzVector.h ./MakePhysicalTree_cxx.so: /usr/local/root-5.34.04/include/TMath.h ./MakePhysicalTree_cxx.so: /usr/local/root-5.34.04/include/TRotation.h +./MakePhysicalTree_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPGlobalSystemOfUnits.h ./MakePhysicalTree_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPPhysicalConstants.h ./MakePhysicalTree_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPSystemOfUnits.h ./MakePhysicalTree_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPBeam.h @@ -116,7 +117,6 @@ ./MakePhysicalTree_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/TSharcPhysics.h ./MakePhysicalTree_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/CalibrationManager.h ./MakePhysicalTree_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/VDetector.h -./MakePhysicalTree_cxx.so: /Users/adrienmatta/Desktop/NPTool.dev.prerelease/NPLib/include/NPGlobalSystemOfUnits.h ./MakePhysicalTree_cxx.so: /usr/local/root-5.34.04/include/TProof.h ./MakePhysicalTree_cxx.so: /usr/local/root-5.34.04/include/TProofMgr.h ./MakePhysicalTree_cxx.so: /usr/local/root-5.34.04/include/TProofDebug.h diff --git a/NPAnalysis/pMakePhysicalTree/RunToTreat.txt b/NPAnalysis/pMakePhysicalTree/RunToTreat.txt index a54d65b1c..15cf2a85a 100644 --- a/NPAnalysis/pMakePhysicalTree/RunToTreat.txt +++ b/NPAnalysis/pMakePhysicalTree/RunToTreat.txt @@ -1,4 +1,4 @@ TTreeName S1107Data RootFileName - /Users/adrienmatta/Desktop/S1107/data2251*.root + /Volumes/S1107/RootData/data225*.root diff --git a/NPSimulation/src/EventGeneratorBeam.cc b/NPSimulation/src/EventGeneratorBeam.cc index ac543c4ac..80788ae7e 100644 --- a/NPSimulation/src/EventGeneratorBeam.cc +++ b/NPSimulation/src/EventGeneratorBeam.cc @@ -78,7 +78,6 @@ void EventGeneratorBeam::GenerateEvent(G4Event* anEvent){ if( anEvent->GetEventID()==0){ // Define the particle to be shoot m_particle = G4ParticleTable::GetParticleTable()->GetIon(m_Beam->GetZ(), m_Beam->GetA() , 0.); - if(m_Target!=0 ){ m_Target->WriteDEDXTable(m_particle ,0, m_Beam->GetEnergy()+4*m_Beam->GetSigmaEnergy()); } diff --git a/NPSimulation/src/EventGeneratorIsotropic.cc b/NPSimulation/src/EventGeneratorIsotropic.cc index b6923225f..f13afb928 100644 --- a/NPSimulation/src/EventGeneratorIsotropic.cc +++ b/NPSimulation/src/EventGeneratorIsotropic.cc @@ -162,6 +162,7 @@ void EventGeneratorIsotropic::ReadConfiguration(string Path,int){ else if(m_particleName=="deuton"){ m_particleName="2H" ; check_ExcitationEnergy = true ;} else if(m_particleName=="triton"){ m_particleName="3H" ; check_ExcitationEnergy = true ;} else if(m_particleName=="alpha") { m_particleName="4He" ; check_ExcitationEnergy = true ;} + else if(m_particleName=="gamma") { check_ExcitationEnergy = true ;} } else if (DataBuffer=="ExcitationEnergy=") { diff --git a/NPSimulation/src/EventGeneratorTwoBodyReaction.cc b/NPSimulation/src/EventGeneratorTwoBodyReaction.cc index 0663f41f0..0a421521c 100644 --- a/NPSimulation/src/EventGeneratorTwoBodyReaction.cc +++ b/NPSimulation/src/EventGeneratorTwoBodyReaction.cc @@ -99,13 +99,13 @@ void EventGeneratorTwoBodyReaction::ReadConfiguration(string Path, int){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void EventGeneratorTwoBodyReaction::GenerateEvent(G4Event* anEvent){ - // If first time, write the DeDx table if (anEvent->GetEventID() == 0) { //-------------- Before living, wrtie the DeDx Table ------------------- G4int LightZx = m_Reaction->GetNucleus3()->GetZ(); G4int LightAx = m_Reaction->GetNucleus3()->GetA(); - + G4ParticleTable::GetParticleTable()->GetIon(LightZx,LightAx, 0.); + if (m_Target != 0) { m_Target->WriteDEDXTable(G4ParticleTable::GetParticleTable()->GetIon(LightZx,LightAx, 0.) ,0, 2*m_Reaction->GetBeamEnergy()); } diff --git a/NPSimulation/src/PhysicsList.cc b/NPSimulation/src/PhysicsList.cc index 3e59f42e6..db636506b 100644 --- a/NPSimulation/src/PhysicsList.cc +++ b/NPSimulation/src/PhysicsList.cc @@ -256,7 +256,6 @@ void PhysicsList::ConstructEM(){ else if (particleName == "GenericIon") { pmanager->AddProcess(new G4hMultipleScattering(), -1, 1, 1) ; G4ionIonisation* iI = new G4ionIonisation ; - // mod by Nicolas [07/05/09] iI->ActivateStoppingData(true) ; pmanager->AddProcess(iI , -1, 2, 2) ; } @@ -266,7 +265,6 @@ void PhysicsList::ConstructEM(){ (particleName != "chargedgeantino")) { G4hIonisation* hI = new G4hIonisation ; - // mod by Nicolas [07/05/09] pmanager->AddProcess(new G4hMultipleScattering , -1, 1, 1) ; pmanager->AddProcess(hI , -1, 2, 2) ; diff --git a/NPSimulation/src/Target.cc b/NPSimulation/src/Target.cc index 1122c38c5..b935a3742 100644 --- a/NPSimulation/src/Target.cc +++ b/NPSimulation/src/Target.cc @@ -460,7 +460,8 @@ void Target::ReadConfiguration(string Path) } } - + // if the target as a null radius then no target exist + if(m_TargetRadius==0) {m_TargetThickness=0;m_TargetRadius=0.1*um;} } @@ -468,6 +469,8 @@ void Target::ReadConfiguration(string Path) // Called After DetecorConstruction::AddDetector Method void Target::ConstructDetector(G4LogicalVolume* world) { + + if (m_TargetType) { // case of standard target if (m_TargetThickness > 0) { @@ -599,40 +602,41 @@ void Target::RandomGaussian2D(double MeanX, double MeanY, double SigmaX, double // Generate a DEDX file table using the material used in the target void Target::WriteDEDXTable(G4ParticleDefinition* Particle ,G4double Emin,G4double Emax){ - // Opening hte output file - G4String GlobalPath = getenv("NPTOOL"); - G4String Path = GlobalPath + "/Inputs/EnergyLoss/" + Particle->GetParticleName() + "_" + m_TargetMaterial->GetName() + ".G4table"; - ofstream File ; - File.open(Path) ; - - if(!File) return ; - - File << "Table from Geant4 generate using NPSimulation \t" - << "Particle: " << Particle->GetParticleName() << "\tMaterial: " << m_TargetMaterial->GetName() << endl ; - - G4EmCalculator emCalculator; - - for (G4double E=Emin; E < Emax; E+=(Emax-Emin)/10.){ - G4double dedx = emCalculator.ComputeTotalDEDX(E, Particle, m_TargetMaterial); - File << E/MeV << "\t" << dedx/(MeV/micrometer) << endl ; - } - - File.close(); - if(!m_TargetType){ - G4String Path = GlobalPath + "/Inputs/EnergyLoss/" + Particle->GetParticleName() + "_" + m_WindowsMaterial->GetName() + ".G4table"; - File.open(Path) ; - if(!File) return ; - File << "Table from Geant4 generate using NPSimulation \t " - << "Particle: " << Particle->GetParticleName() << "\tMaterial: " << m_WindowsMaterial->GetName() << endl ; - + if(m_TargetThickness>0){ + // Opening hte output file + G4String GlobalPath = getenv("NPTOOL"); + G4String Path = GlobalPath + "/Inputs/EnergyLoss/" + Particle->GetParticleName() + "_" + m_TargetMaterial->GetName() + ".G4table"; + ofstream File ; + File.open(Path) ; + + if(!File) return ; + + File << "Table from Geant4 generate using NPSimulation \t" + << "Particle: " << Particle->GetParticleName() << "\tMaterial: " << m_TargetMaterial->GetName() << endl ; + + G4EmCalculator emCalculator; + for (G4double E=Emin; E < Emax; E+=(Emax-Emin)/10.){ - // G4double dedx = emCalculator.ComputeTotalDEDX(E, Particle, m_WindowsMaterial); - G4double dedx = emCalculator.ComputeDEDX( E, Particle , - "ionIoni", m_WindowsMaterial); + G4double dedx = emCalculator.ComputeTotalDEDX(E, Particle, m_TargetMaterial); File << E/MeV << "\t" << dedx/(MeV/micrometer) << endl ; } + + File.close(); + if(!m_TargetType){ + G4String Path = GlobalPath + "/Inputs/EnergyLoss/" + Particle->GetParticleName() + "_" + m_WindowsMaterial->GetName() + ".G4table"; + File.open(Path) ; + if(!File) return ; + File << "Table from Geant4 generate using NPSimulation \t " + << "Particle: " << Particle->GetParticleName() << "\tMaterial: " << m_WindowsMaterial->GetName() << endl ; + + for (G4double E=Emin; E < Emax; E+=(Emax-Emin)/10.){ + // G4double dedx = emCalculator.ComputeTotalDEDX(E, Particle, m_WindowsMaterial); + G4double dedx = emCalculator.ComputeDEDX( E, Particle , + "ionIoni", m_WindowsMaterial); + File << E/MeV << "\t" << dedx/(MeV/micrometer) << endl ; + } + } + File.close(); + } - File.close(); - - } -- GitLab