Resolve conflict with Andreas' musrfit
This commit is contained in:
commit
92d1f0145c
@ -28,7 +28,7 @@ endif()
|
||||
|
||||
#--- perform some checks and generate the config.h ----------------------------
|
||||
|
||||
#--- the next two lines are needed that the math functions are found ----------
|
||||
#--- the next three lines are needed that the math functions are found --------
|
||||
set(CMAKE_REQUIRED_INCLUDES math.h)
|
||||
set(CMAKE_REQUIRED_LIBRARIES m)
|
||||
|
||||
|
@ -49,6 +49,7 @@ add_executable(any2many git-revision.h any2many.cpp)
|
||||
target_compile_options(any2many BEFORE PRIVATE "-DHAVE_CONFIG_H")
|
||||
target_include_directories(any2many
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
@ -93,6 +94,7 @@ add_executable(musrfit git-revision.h musrfit.cpp)
|
||||
target_compile_options(musrfit BEFORE PRIVATE "-DHAVE_CONFIG_H")
|
||||
target_include_directories(musrfit
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
@ -104,6 +106,7 @@ add_executable(musrFT git-revision.h musrFT.cpp)
|
||||
target_compile_options(musrFT BEFORE PRIVATE "-DHAVE_CONFIG_H")
|
||||
target_include_directories(musrFT
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
@ -127,6 +130,7 @@ add_executable(musrt0 git-revision.h musrt0.cpp)
|
||||
target_compile_options(musrt0 BEFORE PRIVATE "-DHAVE_CONFIG_H")
|
||||
target_include_directories(musrt0
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
@ -138,6 +142,7 @@ add_executable(musrview git-revision.h musrview.cpp)
|
||||
target_compile_options(musrview BEFORE PRIVATE "-DHAVE_CONFIG_H")
|
||||
target_include_directories(musrview
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
|
@ -11,13 +11,13 @@ root_generate_dictionary(
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMusrCanvasDict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrCanvas.h
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrCanvas.h
|
||||
LINKDEF ${MUSRFIT_INC}/PMusrCanvasLinkDef.h
|
||||
MODULE PMusrCanvas
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMusrT0Dict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrT0.h
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrT0.h
|
||||
LINKDEF ${MUSRFIT_INC}/PMusrT0LinkDef.h
|
||||
MODULE PMusrT0
|
||||
)
|
||||
@ -80,6 +80,7 @@ add_library(PMusr SHARED
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PMusr BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${NEXUS_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
|
43
src/external/MuSRFitGUI/MSR.pm
vendored
43
src/external/MuSRFitGUI/MSR.pm
vendored
@ -27,10 +27,11 @@ my $SUMM_DIR="/afs/psi.ch/project/nemu/data/summ/";
|
||||
my %DBDIR=("LEM","/afs/psi.ch/project/nemu/data/log/",
|
||||
"GPS","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"Dolly","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"GPD","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"ALC","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"HAL","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"LTF","/afs/psi.ch/project/bulkmusr/olddata/list/");
|
||||
"GPD","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"ALC","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"HAL","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"LTF","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||
"ALL","/afs/psi.ch/project/bulkmusr/olddata/list/");
|
||||
|
||||
# Information available since
|
||||
my %MinYears=("LEM","2001",
|
||||
@ -662,12 +663,13 @@ sub CreateTheory {
|
||||
|
||||
# Start from this theory line for the different fitting functions
|
||||
my %THEORY = (
|
||||
"asymmetry", "Asy",
|
||||
"simplExpo", "Lam",
|
||||
"generExpo", "Lam Bet",
|
||||
"simpleGss", "Sgm",
|
||||
"statGssKT", "Sgm",
|
||||
"statGssKTLF", "Frqg Sgm",
|
||||
"asymmetry", "Asy",
|
||||
"simplExpo", "Lam",
|
||||
"generExpo", "Lam Bet",
|
||||
"abragam", "Del Lam",
|
||||
"simpleGss", "Sgm",
|
||||
"statGssKT", "Sgm",
|
||||
"statGssKTLF", "Frqg Sgm",
|
||||
"dynGssKTLF", "Frql Sgm Lam",
|
||||
"statExpKT", "Lam",
|
||||
"statExpKTLF", "Frq Aa",
|
||||
@ -752,6 +754,14 @@ sub CreateTheory {
|
||||
$Parameters = join( $SPACE, $Parameters, $THEORY{'TFieldCos'} );
|
||||
}
|
||||
|
||||
# Oscillationg Abragam function
|
||||
elsif ( $FitType eq "AbragamCos" ) {
|
||||
$T_Block = $T_Block . "\n" . "abragam " . $THEORY{'abragam'};
|
||||
$Parameters = join( $SPACE, $Parameters, $THEORY{'abragam'} );
|
||||
$T_Block = $T_Block . "\n" . "TFieldCos " . $THEORY{'TFieldCos'};
|
||||
$Parameters = join( $SPACE, $Parameters, $THEORY{'TFieldCos'} );
|
||||
}
|
||||
|
||||
# Oscillationg Bessel Gaussian
|
||||
elsif ( $FitType eq "GaussianBessel" ) {
|
||||
$T_Block = $T_Block . "\n" . "simpleGss " . $THEORY{'simpleGss'};
|
||||
@ -1015,8 +1025,16 @@ sub T0BgData {
|
||||
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
||||
}
|
||||
elsif ($BeamLine eq "GPS") {
|
||||
my $HistParams=$GPS{$Hists[0]};
|
||||
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
||||
my $HistParams=$GPS{$Hists[0]};
|
||||
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
||||
}
|
||||
elsif ($BeamLine eq "GPD") {
|
||||
my $HistParams=$GPD{$Hists[0]};
|
||||
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
||||
}
|
||||
else {
|
||||
my $HistParams=$GPS{$Hists[0]};
|
||||
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
||||
}
|
||||
return $RV{$Name};
|
||||
|
||||
@ -1262,6 +1280,7 @@ sub ExportParams {
|
||||
push( @FitTypes, $All{"FitType$i"} );
|
||||
}
|
||||
}
|
||||
|
||||
# Get theory block to determine the size of the table
|
||||
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes);
|
||||
# For now the line below does not work. Why?
|
||||
|
@ -21,6 +21,9 @@ set(CMAKE_AUTOUIC OFF)
|
||||
# add qt/rcc
|
||||
qt5_add_resources(musrStep_rcc musrStep.qrc)
|
||||
|
||||
# remove generated files from automoc and autouic
|
||||
set_property(SOURCE qrc_musrStep.cpp PROPERTY SKIP_AUTOMOC ON)
|
||||
|
||||
set(macosx_icon icons/musrStep.icns)
|
||||
if (APPLE)
|
||||
add_executable(musrStep MACOSX_BUNDLE
|
||||
|
@ -25,6 +25,9 @@ set(CMAKE_AUTOUIC OFF)
|
||||
# add qt/rcc
|
||||
qt5_add_resources(musrWiz_rcc musrWiz.qrc)
|
||||
|
||||
# remove generated files from automoc and autouic
|
||||
set_property(SOURCE qrc_musrWiz.cpp PROPERTY SKIP_AUTOMOC ON)
|
||||
|
||||
set(macosx_icon icons/musrWiz.icns)
|
||||
if (APPLE)
|
||||
add_executable(musrWiz MACOSX_BUNDLE
|
||||
|
@ -80,6 +80,26 @@ qt5_wrap_ui(out_ui ${musredit_ui})
|
||||
# add qt/rcc
|
||||
qt5_add_resources(musredit_rcc musredit.qrc)
|
||||
|
||||
# remove generated files from automoc and autouic
|
||||
set_property(SOURCE ui_PFindDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PReplaceDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PReplaceConfirmationDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PMusrEditAbout.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PPrefsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetMusrFTOptionsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetTitleBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetParameterBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetTheoryBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetFunctionsBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetAsymmetryRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetSingleHistoRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetNonMusrRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetFourierBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PGetPlotBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PMsr2DataDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE ui_PChangeDefaultPathsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE qrc_musredit.cpp PROPERTY SKIP_AUTOMOC ON)
|
||||
|
||||
set(macosx_icon icons/musredit.icns)
|
||||
if (APPLE)
|
||||
add_executable(musredit MACOSX_BUNDLE
|
||||
|
@ -100,10 +100,13 @@ PSimulateMuTransition::PSimulateMuTransition(UInt_t seed)
|
||||
}
|
||||
|
||||
fNmuons = 100; // number of muons to simulate
|
||||
fNshowProgress = 100; // print progress on screen every fNshowProgress events
|
||||
fMuPrecFreq34 = 4463.; // vacuum Mu hyperfine coupling constant
|
||||
fMuPrecFreq12 = 0.; // Mu precession frequency of a 12 transition
|
||||
fMuPrecFreq23 = 0.; // Mu precession frequency of a 23 transition
|
||||
fMuPrecFreq14 = 0.; // Mu precession frequency of a 14 transition
|
||||
fMuPrecFreq13 = 0.; // Mu precession frequency of a 13 transition
|
||||
fMuPrecFreq24 = 0.; // Mu precession frequency of a 24 transition
|
||||
fMuonPrecFreq = 0.; // muon precession frequency
|
||||
fBfield = 0.01; // magnetic field (T)
|
||||
fCaptureRate = 0.01; // Mu+ capture rate (MHz)
|
||||
@ -118,6 +121,9 @@ PSimulateMuTransition::PSimulateMuTransition(UInt_t seed)
|
||||
fMuFractionState34 = 0.25;
|
||||
fMuFractionState23 = 0.25;
|
||||
fMuFractionState14 = 0.25;
|
||||
fMuFractionState13 = 0.;
|
||||
fMuFractionState24 = 0.;
|
||||
|
||||
fDebugFlag = kFALSE;
|
||||
}
|
||||
|
||||
@ -147,6 +153,8 @@ void PSimulateMuTransition::PrintSettings() const
|
||||
cout << endl << "Mu0 precession frequency 34 (MHz) = " << fMuPrecFreq34;
|
||||
cout << endl << "Mu0 precession frequency 23 (MHz) = " << fMuPrecFreq23;
|
||||
cout << endl << "Mu0 precession frequency 14 (MHz) = " << fMuPrecFreq14;
|
||||
cout << endl << "Mu0 precession frequency 13 (MHz) = " << fMuPrecFreq13;
|
||||
cout << endl << "Mu0 precession frequency 24 (MHz) = " << fMuPrecFreq24;
|
||||
cout << endl << "Mu+ precession frequency (MHz) = " << fMuonGyroRatio * fBfield;
|
||||
cout << endl << "B field (T) = " << fBfield;
|
||||
cout << endl << "Mu+ electron capture rate (MHz) = " << fCaptureRate;
|
||||
@ -164,7 +172,10 @@ void PSimulateMuTransition::PrintSettings() const
|
||||
cout << endl << "Muonium fraction state34 = " << fMuFractionState34;
|
||||
cout << endl << "Muonium fraction state23 = " << fMuFractionState23;
|
||||
cout << endl << "Muonium fraction state14 = " << fMuFractionState14;
|
||||
cout << endl << "Muonium fraction state13 = " << fMuFractionState13;
|
||||
cout << endl << "Muonium fraction state24 = " << fMuFractionState24;
|
||||
cout << endl << "Number of particles to simulate = " << fNmuons;
|
||||
cout << endl << "Print progress on screen frequency = " << fNshowProgress;
|
||||
cout << endl << "Initial muon spin phase (degree) = " << fInitialPhase;
|
||||
cout << endl << "Debug flag = " << fDebugFlag;
|
||||
cout << endl << endl;
|
||||
@ -224,7 +235,7 @@ void PSimulateMuTransition::Run(TH1F *histoForward, TH1F *histoBackward)
|
||||
else
|
||||
histoBackward->Fill(fMuonDecayTime*1000., 1. - fAsymmetry*TMath::Cos(fMuonPhase));
|
||||
|
||||
if ( (i%100000) == 0) cout << "number of events processed: " << i << endl;
|
||||
if ( (i%fNshowProgress) == 0) cout << "number of events processed: " << i << endl;
|
||||
}
|
||||
cout << "number of events processed: " << i << endl;
|
||||
return;
|
||||
@ -291,11 +302,14 @@ TComplex PSimulateMuTransition::GTFunction(const Double_t &time, const TString c
|
||||
complexPol = TComplex::Exp(-TComplex::I()*twoPi*fMuonPrecFreq*time);
|
||||
else{
|
||||
complexPol =
|
||||
(fMuFractionState12 * TComplex::Exp(TComplex::I()*twoPi*fMuPrecFreq12*time) +
|
||||
(fMuFractionState12 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq12*time) +
|
||||
fMuFractionState34 * TComplex::Exp(-TComplex::I()*twoPi*fMuPrecFreq34*time))
|
||||
+
|
||||
(fMuFractionState23 * TComplex::Exp(TComplex::I()*twoPi*fMuPrecFreq23*time) +
|
||||
fMuFractionState14 * TComplex::Exp(TComplex::I()*twoPi*fMuPrecFreq14*time));
|
||||
(fMuFractionState23 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq23*time) +
|
||||
fMuFractionState14 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq14*time))
|
||||
+
|
||||
(fMuFractionState13 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq13*time) +
|
||||
fMuFractionState24 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq24*time));
|
||||
}
|
||||
|
||||
return complexPol;
|
||||
@ -354,9 +368,6 @@ Double_t PSimulateMuTransition::GTSpinFlip(const Double_t &time)
|
||||
* after ionization process is given by Px(t_i+1)*Px(t_i).
|
||||
* 4) get the next electron capture time, continue until t_d is reached.
|
||||
*
|
||||
* <p> For isotropic muonium, TF:
|
||||
* nu_12 and nu_34 with equal probabilities, probability for both states fMuFractionState12
|
||||
* ni_23 and nu_14 with equal probabilities, probability for both states fMuFractionState23
|
||||
*
|
||||
* <p>Calculates Mu0 polarization in x direction during cyclic charge exchange.
|
||||
* See M. Senba, J.Phys. B23, 1545 (1990), equations (9), (11)
|
||||
|
@ -47,13 +47,16 @@ class PSimulateMuTransition : public TObject
|
||||
virtual ~PSimulateMuTransition();
|
||||
|
||||
virtual void PrintSettings() const;
|
||||
virtual void SetNmuons(Int_t value) { fNmuons = value; } //!< number of muons
|
||||
virtual void SetDebugFlag(Bool_t value) { fDebugFlag = value; } //!< debug flag
|
||||
virtual void SetBfield(Double_t value) { fBfield = value; } //!< sets magnetic field (T)
|
||||
virtual void SetNmuons(Int_t value) { fNmuons = value; } //!< number of muons
|
||||
virtual void SetNshowProgress(Int_t value) { fNshowProgress = value; } //!< frequency of output on screen how many muons have been processed
|
||||
virtual void SetDebugFlag(Bool_t value) { fDebugFlag = value; } //!< debug flag
|
||||
virtual void SetBfield(Double_t value) { fBfield = value; } //!< sets magnetic field (T)
|
||||
virtual void SetMuPrecFreq12(Double_t value) { fMuPrecFreq12 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq34(Double_t value) { fMuPrecFreq34 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq23(Double_t value) { fMuPrecFreq23 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq14(Double_t value) { fMuPrecFreq14 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq13(Double_t value) { fMuPrecFreq13 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq24(Double_t value) { fMuPrecFreq24 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetCaptureRate(Double_t value){ fCaptureRate = value; } //!< sets Mu+ electron capture rate (MHz)
|
||||
virtual void SetIonizationRate(Double_t value){ fIonizationRate = value; } //!< sets Mu0 ionization rate (MHz)
|
||||
virtual void SetSpinFlipRate(Double_t value){ fSpinFlipRate = value; } //!< sets Mu0 spin flip rate (MHz)
|
||||
@ -63,6 +66,8 @@ class PSimulateMuTransition : public TObject
|
||||
virtual void SetMuFractionState34(Double_t value){ fMuFractionState34 = value; }
|
||||
virtual void SetMuFractionState23(Double_t value){ fMuFractionState23 = value; }
|
||||
virtual void SetMuFractionState14(Double_t value){ fMuFractionState14 = value; }
|
||||
virtual void SetMuFractionState13(Double_t value){ fMuFractionState13 = value; }
|
||||
virtual void SetMuFractionState24(Double_t value){ fMuFractionState24 = value; }
|
||||
|
||||
virtual Bool_t IsValid() { return fValid; }
|
||||
virtual void SetSeed(UInt_t seed);
|
||||
@ -81,6 +86,8 @@ class PSimulateMuTransition : public TObject
|
||||
Double_t fMuPrecFreq34; //!< Mu transition frequency 34 (MHz)
|
||||
Double_t fMuPrecFreq23; //!< Mu transition frequency 23 (MHz)
|
||||
Double_t fMuPrecFreq14; //!< Mu transition frequency 14 (MHz)
|
||||
Double_t fMuPrecFreq13; //!< Mu transition frequency 13 (MHz)
|
||||
Double_t fMuPrecFreq24; //!< Mu transition frequency 24 (MHz)
|
||||
Double_t fMuonPrecFreq; //!< muon precession frequency (MHz)
|
||||
Double_t fCaptureRate; //!< Mu+ electron capture rate (MHz)
|
||||
Double_t fIonizationRate; //!< Mu0 ionization rate (MHz)
|
||||
@ -94,8 +101,11 @@ class PSimulateMuTransition : public TObject
|
||||
Double_t fMuFractionState34; //!< fraction of Mu in state 34
|
||||
Double_t fMuFractionState23; //!< fraction of Mu in state 23
|
||||
Double_t fMuFractionState14; //!< fraction of Mu in state 14
|
||||
Int_t fNmuons; //!< number of muons to simulate
|
||||
Bool_t fDebugFlag; //!< debug flag
|
||||
Double_t fMuFractionState13; //!< fraction of Mu in state 13
|
||||
Double_t fMuFractionState24; //!< fraction of Mu in state 24
|
||||
Int_t fNmuons; //!< number of muons to simulate
|
||||
Int_t fNshowProgress; //!< output on screen how many muons have been processed
|
||||
Bool_t fDebugFlag; //!< debug flag
|
||||
|
||||
virtual Double_t NextEventTime(const Double_t &EventRate);
|
||||
// virtual Double_t PrecessionPhase(const Double_t &time, const TString chargeState);
|
||||
|
@ -63,33 +63,48 @@ void runMuSimulation()
|
||||
Double_t T = 300.; //temperature
|
||||
Double_t EA = 100; //activation energy (meV)
|
||||
Double_t spinFlipRate = 0.01; //if spinFlipRate > 0.001 only spin-flip processes will be simulated
|
||||
Double_t capRate = 0.0001;//*sqrt(T/200.); //assume that capture rate varies as sqrt(T), capRate = sigma*v*p , v ~ sqrt(T)
|
||||
Double_t capRate = 0.001;//*sqrt(T/200.); //assume that capture rate varies as sqrt(T), capRate = sigma*v*p , v ~ sqrt(T)
|
||||
Double_t preFac = 6.7e7;
|
||||
Double_t ionRate; //assume Arrhenius behaviour ionRate = preFac*exp(-EA/kT)
|
||||
ionRate = 0.1; //2.9e7 * exp(-EA/(0.08625*T)); // Ge: 2.9*10^7MHz "attempt" frequency; 1K = 0.08625 meV
|
||||
Double_t B = 106.5; //field in G
|
||||
Double_t Bvar = 0.; //field variance
|
||||
Double_t Freq12 = 40.433; //Mu freq of the 12 transition
|
||||
Double_t Freq34 = 59.567; //Mu freq of the 34 transition
|
||||
Double_t Freq23 = 256.245; //Mu freq of the 23 transition
|
||||
Double_t Freq14 = 356.245; //Mu freq of the 14 transition
|
||||
Double_t MuFrac = 1.0; //total Mu fraction
|
||||
Double_t MuFrac12 = 0.487; //weight of transition 12
|
||||
Double_t MuFrac34 = 0.487; //weight of transition 34
|
||||
Double_t MuFrac23 = 0.013; //weight of transition 23
|
||||
Double_t MuFrac14 = 0.013; //weight of transition 14
|
||||
Int_t Nmuons = 5e6; //number of muons
|
||||
Double_t Asym = 0.27; //muon decay asymmetry
|
||||
Int_t debugFlag = 0; //print debug information on screen
|
||||
ionRate = 0.001; //preFac * exp(-EA/(0.08625*T)); // Ge: 2.9*10^7MHz "attempt" frequency; 1K = 0.08625 meV
|
||||
Double_t B = 100.0; //field in G
|
||||
Double_t Bvar = 0.; //field variance
|
||||
Double_t Freq12 = 40.023; //Mu freq of the 12 transition
|
||||
Double_t Freq34 = 59.977; //Mu freq of the 34 transition
|
||||
Double_t Freq23 = 238.549; //Mu freq of the 23 transition
|
||||
Double_t Freq14 = 338.549; //Mu freq of the 14 transition
|
||||
Double_t Freq13 = 278.571; //Mu freq of the 23 transition
|
||||
Double_t Freq24 = 325.165; //Mu freq of the 14 transition
|
||||
|
||||
Double_t MuFrac = 1.0; //total Mu fraction
|
||||
Double_t MuFrac12 = 0.486; //weight of transition 12
|
||||
Double_t MuFrac34 = 0.486; //weight of transition 34
|
||||
Double_t MuFrac23 = 0.014; //weight of transition 23
|
||||
Double_t MuFrac14 = 0.014; //weight of transition 14
|
||||
Double_t MuFrac13 = 0.0; //weight of transition 13
|
||||
Double_t MuFrac24 = 0.0; //weight of transition 24
|
||||
|
||||
Int_t Nmuons = 5e6; //number of muons
|
||||
Int_t NshowProgress = 1e4; //frequency to show progress on screen
|
||||
Double_t Asym = 0.27; //muon decay asymmetry
|
||||
Int_t debugFlag = 0; //print debug information on screen
|
||||
|
||||
TTimeStamp *timeStampStart = new TTimeStamp();
|
||||
cout << endl << "Simulation started on:" << endl;
|
||||
timeStampStart->Print("l);
|
||||
cout << endl;
|
||||
|
||||
histogramFileName = TString("0");
|
||||
histogramFileName += runNo;
|
||||
histogramFileName += TString(".root");
|
||||
|
||||
sprintf(titleStr,"- complexMuPol, A0 100MHz, Mu-frac %3.2f, Mu12 %6.2f MHz(%3.2f), Mu23 %6.2f MHz(%3.2f), ionRate %8.3f MHz, capRate %6.3f MHz, SF rate %6.3f MHz, %5.1f G", MuFrac, Freq12, MuFrac12/2, Freq23, MuFrac23/2, ionRate, capRate, spinFlipRate, B);
|
||||
sprintf(titleStr,"- complexMuPol, A0 100MHz, Mu-frac %3.2f, Mu12 %6.2f MHz(%3.2f), Mu23 %6.2f MHz(%3.2f), ionRate %8.3f MHz, capRate %6.3f MHz, SF rate %6.3f MHz, %5.1f G", MuFrac, Freq12, MuFrac12, Freq23, MuFrac23, ionRate, capRate, spinFlipRate, B);
|
||||
runTitle = TString("0");
|
||||
runTitle += runNo;
|
||||
runTitle += TString(titleStr);
|
||||
|
||||
cout << runTitle << endl << endl;
|
||||
|
||||
PSimulateMuTransition *simulateMuTransition = new PSimulateMuTransition();
|
||||
if (!simulateMuTransition->IsValid()){
|
||||
cerr << endl << "**ERROR** while invoking PSimulateTransition" << endl;
|
||||
@ -99,15 +114,20 @@ void runMuSimulation()
|
||||
simulateMuTransition->SetMuPrecFreq34(Freq34); // MHz
|
||||
simulateMuTransition->SetMuPrecFreq23(Freq23); // MHz
|
||||
simulateMuTransition->SetMuPrecFreq14(Freq14); // MHz
|
||||
simulateMuTransition->SetMuPrecFreq13(Freq13); // MHz
|
||||
simulateMuTransition->SetMuPrecFreq24(Freq24); // MHz
|
||||
simulateMuTransition->SetMuFraction(MuFrac); // initial Mu fraction
|
||||
simulateMuTransition->SetMuFractionState12(MuFrac12);
|
||||
simulateMuTransition->SetMuFractionState34(MuFrac34);
|
||||
simulateMuTransition->SetMuFractionState23(MuFrac23);
|
||||
simulateMuTransition->SetMuFractionState14(MuFrac14);
|
||||
simulateMuTransition->SetMuFractionState13(MuFrac13);
|
||||
simulateMuTransition->SetMuFractionState24(MuFrac24);
|
||||
simulateMuTransition->SetBfield(B/10000.); // Tesla
|
||||
simulateMuTransition->SetCaptureRate(capRate); // MHz
|
||||
simulateMuTransition->SetIonizationRate(ionRate); // MHz
|
||||
simulateMuTransition->SetSpinFlipRate(spinFlipRate); // MHz
|
||||
simulateMuTransition->SetNshowProgress(NshowProgress);
|
||||
simulateMuTransition->SetNmuons(Nmuons);
|
||||
simulateMuTransition->SetDecayAsymmetry(Asym);
|
||||
simulateMuTransition->SetDebugFlag(debugFlag); // to print time and phase during charge-changing cycle
|
||||
@ -179,12 +199,18 @@ void runMuSimulation()
|
||||
header->Set("Simulation/Mu0 Precession frequency 34", Freq34);
|
||||
header->Set("Simulation/Mu0 Precession frequency 23", Freq23);
|
||||
header->Set("Simulation/Mu0 Precession frequency 14", Freq14);
|
||||
header->Set("Simulation/Mu0 Precession frequency 13", Freq13);
|
||||
header->Set("Simulation/Mu0 Precession frequency 24", Freq24);
|
||||
header->Set("Simulation/Mu0 Fraction", MuFrac);
|
||||
header->Set("Simulation/Mu0 Fraction 12", MuFrac12);
|
||||
header->Set("Simulation/Mu0 Fraction 34", MuFrac34);
|
||||
header->Set("Simulation/Mu0 Fraction 23", MuFrac23);
|
||||
header->Set("Simulation/Mu0 Fraction 14", MuFrac14);
|
||||
header->Set("Simulation/muon Capture Rate", capRate);
|
||||
header->Set("Simulation/Mu0 Fraction 13", MuFrac13);
|
||||
header->Set("Simulation/Mu0 Fraction 24", MuFrac24);
|
||||
header->Set("Simulation/Mu0 Activation Energy", EA);
|
||||
header->Set("Simulation/Mu0 Activation PreFactor", preFac);
|
||||
header->Set("Simulation/Mux Capture Rate", capRate);
|
||||
header->Set("Simulation/Mu0 Ionization Rate", ionRate);
|
||||
header->Set("Simulation/Mu0 Spin Flip Rate", spinFlipRate);
|
||||
header->Set("Simulation/Number of Muons", Nmuons);
|
||||
@ -206,7 +232,7 @@ void runMuSimulation()
|
||||
histo[i] = new TH1F(str, str, 18001, -0.5, 18000.5);
|
||||
}
|
||||
|
||||
for (i=0; i<NDECAYHISTS; i++)
|
||||
for (UInt_t i=0; i<NDECAYHISTS; i++)
|
||||
decayAnaModule->Add(histo[i]);
|
||||
|
||||
// run simulation
|
||||
@ -231,6 +257,11 @@ void runMuSimulation()
|
||||
fout->Close();
|
||||
cout << "Histograms written to " << histogramFileName.Data() << endl;
|
||||
|
||||
cout << endl << "Simulation stopped on:" << endl;
|
||||
TTimeStamp *timeStampEnd = new TTimeStamp();
|
||||
timeStampEnd->Print("l");
|
||||
cout << endl;
|
||||
|
||||
// delete fout;
|
||||
// delete header;
|
||||
// delete histo[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user