diff --git a/ChangeLog b/ChangeLog
index 699c4bfc..2239355f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
changes since 0.11.0
===================================
+NEW 2012-05-22 added spin rotation angle to the LEM MusrRoot file.
NEW 2012-05-12 added dump_header. This is a little program which dumps the
header information of a given muSR data file onto the standard
output. Since dump_header also includes the option of
diff --git a/src/classes/PMusr.cpp b/src/classes/PMusr.cpp
index 4fe1810b..d57c5569 100644
--- a/src/classes/PMusr.cpp
+++ b/src/classes/PMusr.cpp
@@ -519,6 +519,7 @@ PRawRunData::PRawRunData()
fMuonSource = TString("n/a");
fMuonSpecies = TString("n/a");
fMuonBeamMomentum = PMUSR_UNDEFINED;
+ fMuonSpinAngle = PMUSR_UNDEFINED;
fRunName = TString("n/a");
fRunNumber = -1;
fRunTitle = TString("n/a");
diff --git a/src/classes/PRunDataHandler.cpp b/src/classes/PRunDataHandler.cpp
index 55f888b3..792dd0d7 100644
--- a/src/classes/PRunDataHandler.cpp
+++ b/src/classes/PRunDataHandler.cpp
@@ -1472,6 +1472,11 @@ Bool_t PRunDataHandler::ReadRootFile()
if (ok)
runData.SetMuonSource(str);
+ header->Get("RunInfo/Muon Spin Angle", prop, ok);
+ if (ok) {
+ runData.SetMuonSpinAngle(prop.GetValue());
+ }
+
header->Get("RunInfo/Setup", str, ok);
if (ok)
runData.SetSetup(str);
diff --git a/src/dump_header.cpp b/src/dump_header.cpp
index 0f7cab91..b4c89418 100644
--- a/src/dump_header.cpp
+++ b/src/dump_header.cpp
@@ -190,6 +190,7 @@ int dump_header_root(const string fileName, const string fileFormat)
*/
int dump_header_nexus(const string fileName) {
+#ifdef PNEXUS_ENABLED
PNeXus *nxs_file = new PNeXus(fileName.c_str());
if (nxs_file->IsValid(false)) {
@@ -198,6 +199,9 @@ int dump_header_nexus(const string fileName) {
if (nxs_file)
delete nxs_file;
+#else
+ cout << endl << "NeXus not enabled, hence the header information cannot be dumped." << endl << endl;
+#endif
return 0;
}
diff --git a/src/external/MusrRoot/MusrRootLEM.xsd b/src/external/MusrRoot/MusrRootLEM.xsd
index a19822d7..6c3077c8 100644
--- a/src/external/MusrRoot/MusrRootLEM.xsd
+++ b/src/external/MusrRoot/MusrRootLEM.xsd
@@ -125,6 +125,7 @@
+
diff --git a/src/include/PMusr.h b/src/include/PMusr.h
index 98f91a81..e2e01cf4 100644
--- a/src/include/PMusr.h
+++ b/src/include/PMusr.h
@@ -358,6 +358,7 @@ class PRawRunData {
virtual const TString* GetMuonSource() { return &fMuonSource; }
virtual const TString* GetMuonSpecies() { return &fMuonSpecies; }
virtual const Double_t GetMuonBeamMomentum() { return fMuonBeamMomentum; }
+ virtual const Double_t GetMuonSpinAngle() { return fMuonSpinAngle; }
virtual const Int_t GetRunNumber() { return fRunNumber; }
virtual const TString* GetRunTitle() { return &fRunTitle; }
virtual const TString* GetSetup() { return &fSetup; }
@@ -404,6 +405,7 @@ class PRawRunData {
virtual void SetMuonSource(const TString &str) { fMuonSource = str; }
virtual void SetMuonSpecies(const TString &str) { fMuonSpecies = str; }
virtual void SetMuonBeamMomentum(const Double_t dval) { fMuonBeamMomentum = dval; }
+ virtual void SetMuonSpinAngle(const Double_t dval) { fMuonSpinAngle = dval; }
virtual void SetRunName(const TString &str) { fRunName = str; }
virtual void SetRunNumber(const Int_t &val) { fRunNumber = val; }
virtual void SetRunTitle(const TString str) { fRunTitle = str; }
@@ -444,6 +446,7 @@ class PRawRunData {
TString fMuonSource; ///< keeps the type of muon source, e.g. continous surface beam, pulsed beam, low energy muon beam
TString fMuonSpecies; ///< positive muon or negative muon
Double_t fMuonBeamMomentum; ///< given in MeV/c, for LEM this is the momentum of the secondary beamline and NOT the momentum of the low energy beam
+ Double_t fMuonSpinAngle; ///< gives the muon spin angle in degrees (reference frame depends on the instrument)
TString fRunName; ///< name of the run as found in the msr-file
Int_t fRunNumber; ///< run number
TString fRunTitle; ///< run title