newly added: a library related to spin valve physics
This commit is contained in:
71
src/external/libSpinValve/include/PSkewedLorentzian.h
vendored
Normal file
71
src/external/libSpinValve/include/PSkewedLorentzian.h
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/***************************************************************************
|
||||
|
||||
PSkewedLorentzian.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
$Id$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _PSKEWEDLORENTZIAN_H_
|
||||
#define _PSKEWEDLORENTZIAN_H_
|
||||
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
#include "PUserFcnBase.h"
|
||||
#include "PStartupHandler_SV.h"
|
||||
|
||||
class PSkewedLorentzian : public PUserFcnBase
|
||||
{
|
||||
public:
|
||||
PSkewedLorentzian();
|
||||
virtual ~PSkewedLorentzian();
|
||||
|
||||
virtual Bool_t IsValid() { return fValid; }
|
||||
|
||||
// global user-function-access functions, here without any functionality
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
void SetGlobalPart(vector<void*> &globalPart, UInt_t idx) { }
|
||||
Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
// function operator
|
||||
Double_t operator()(Double_t, const vector<Double_t>&) const;
|
||||
|
||||
private:
|
||||
PStartupHandler_SV *fStartupHandler;
|
||||
|
||||
Bool_t fValid; ///< flag indicating if initialization went through smoothly
|
||||
UInt_t fNoOfFields; ///< number of sampling points in field around the Lorentzian peak
|
||||
Double_t fRange; ///< range in which the sampling points are placed, given in units of \beta(1\pm\Delta)
|
||||
|
||||
static const Double_t fDegToRad = 0.0174532925199432955;
|
||||
static const Double_t fTwoPi = 6.28318530717958623;
|
||||
|
||||
// definition of the class for the ROOT dictionary
|
||||
ClassDef(PSkewedLorentzian, 1)
|
||||
};
|
||||
|
||||
#endif // _PSKEWEDLORENTZIAN_H_
|
||||
40
src/external/libSpinValve/include/PSkewedLorentzianLinkDef.h
vendored
Normal file
40
src/external/libSpinValve/include/PSkewedLorentzianLinkDef.h
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/***************************************************************************
|
||||
|
||||
PSkewedLorentzianLinkDef.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
$Id$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __CINT__
|
||||
|
||||
#pragma link off all globals;
|
||||
#pragma link off all classes;
|
||||
#pragma link off all functions;
|
||||
|
||||
#pragma link C++ class PSkewedLorentzian+;
|
||||
|
||||
#endif
|
||||
80
src/external/libSpinValve/include/PStartupHandler_SV.h
vendored
Normal file
80
src/external/libSpinValve/include/PStartupHandler_SV.h
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
/***************************************************************************
|
||||
|
||||
PStartupHandler_SV.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
$Id$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _PSTARTUPHANDLER_SV_H_
|
||||
#define _PSTARTUPHANDLER_SV_H_
|
||||
|
||||
#include <TObject.h>
|
||||
#include <TQObject.h>
|
||||
#include <TString.h>
|
||||
|
||||
class PStartupHandler_SV : public TObject
|
||||
{
|
||||
public:
|
||||
PStartupHandler_SV();
|
||||
virtual ~PStartupHandler_SV() {}
|
||||
|
||||
virtual void OnStartDocument(); // SLOT
|
||||
virtual void OnEndDocument(); // SLOT
|
||||
virtual void OnStartElement(const char*, const TList*); // SLOT
|
||||
virtual void OnEndElement(const char*); // SLOT
|
||||
virtual void OnCharacters(const char*); // SLOT
|
||||
virtual void OnComment(const char*); // SLOT
|
||||
virtual void OnWarning(const char*); // SLOT
|
||||
virtual void OnError(const char*); // SLOT
|
||||
virtual void OnFatalError(const char*); // SLOT
|
||||
virtual void OnCdataBlock(const char*, Int_t); // SLOT
|
||||
|
||||
virtual bool IsValid() { return fIsValid; }
|
||||
virtual TString GetStartupFilePath() { return fStartupFilePath; }
|
||||
virtual UInt_t GetNoOfFields() { return fNoOfFields; }
|
||||
virtual Double_t GetRange() { return fRange; }
|
||||
|
||||
virtual bool StartupFileFound() { return fStartupFileFound; }
|
||||
|
||||
private:
|
||||
enum EKeyWords {eEmpty, eComment, eNoOfFields, eRange};
|
||||
EKeyWords fKey;
|
||||
|
||||
bool fIsValid;
|
||||
|
||||
bool fStartupFileFound;
|
||||
TString fStartupFilePath;
|
||||
|
||||
UInt_t fNoOfFields;
|
||||
Double_t fRange;
|
||||
|
||||
bool StartupFileExists(char *fln);
|
||||
|
||||
ClassDef(PStartupHandler_SV, 1)
|
||||
};
|
||||
|
||||
#endif // _PSTARTUPHANDLER_SV_H_
|
||||
40
src/external/libSpinValve/include/PStartupHandler_SVLinkDef.h
vendored
Normal file
40
src/external/libSpinValve/include/PStartupHandler_SVLinkDef.h
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/***************************************************************************
|
||||
|
||||
PStartupHandler_SVLinkDef.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
$Id$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __CINT__
|
||||
|
||||
#pragma link off all globals;
|
||||
#pragma link off all classes;
|
||||
#pragma link off all functions;
|
||||
|
||||
#pragma link C++ class PStartupHandler_SV+;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user