diff --git a/doc/musrSimAna.tex b/doc/musrSimAna.tex index 42b05d2..aaa4189 100644 --- a/doc/musrSimAna.tex +++ b/doc/musrSimAna.tex @@ -334,6 +334,12 @@ All events should/have to be (?) saved in the Root tree \item[wght] \ldots weight of the event. \item[det\_m0edep] \ldots energy deposited in the M-counter that gives the muon signal. \item[det\_posEdep] \ldots energy deposited in the P-counter that gives the positron signal. + \item[muIniPosR] \ldots $\sqrt{ {\rm muIniPosX}^2 + {\rm muIniPosY}^2}$. + \item[muIniMomTrans] \ldots $\sqrt{ {\rm muIniMomX}^2 + {\rm muIniMomY}^2}$. + \item[muTargetPol\_Theta] \ldots theta angle of the muon spin when muon enters target (-180,180 deg). + \item[muTargetPol\_Theta360]\ldots theta angle of the muon spin when muon enters target (0,360 deg). + \item[muTargetPol\_Phi] \ldots phi angle of the muon spin when muon enters target (-180,180 deg). + \item[muTargetPol\_Phi360] \ldots phi angle of the muon spin when muon enters target (0,360 deg). \item[pos\_Momentum] \ldots magnitude of the momentum of the decay positron (``generated'', not measurable variable). \item[pos\_Trans\_Momentum] \ldots transverse momentum of the decay positron. \item[pos\_Radius] \ldots positron radius calculated from the decay positron momentum and magnetic diff --git a/musrSimAna/musrAnalysis.cxx b/musrSimAna/musrAnalysis.cxx index f471eaf..a061f61 100644 --- a/musrSimAna/musrAnalysis.cxx +++ b/musrSimAna/musrAnalysis.cxx @@ -575,12 +575,20 @@ void musrAnalysis::ReadInInputParameters(char* charV1190FileName) { funct -> SetParameter(1,p1); funct -> SetParameter(2,p2); } + else if (strcmp(functionName,"gaus")==0) { + std::cout<<"Gausssssssss"< SetParameter(0,p0); + funct -> SetParameter(1,p1); + funct -> SetParameter(2,p2); + std::cout<<"GausssssssssGausssssssss"< S T O P"<::const_iterator it = listOfAllHistograms1D.begin(); it != listOfAllHistograms1D.end(); ++it) { if ((*it)->IsThisHistoNamed(histoName)) { tmpHistograms = *it; @@ -1005,6 +1013,13 @@ void musrAnalysis::FillHistograms(Int_t iiiEntry) { // } // CALCULATE VARIABLES + // Initial muon + muIniPosR = sqrt(muIniPosX*muIniPosX+muIniPosY*muIniPosY); + muIniMomTrans = sqrt(muIniMomX*muIniMomX+muIniMomY*muIniMomY); + muTargetPol_Theta = myAtan2(sqrt(muTargetPolX*muTargetPolX+muTargetPolY*muTargetPolY),muTargetPolZ) * 180./pi; + muTargetPol_Theta360 = (muTargetPol_Theta<0) ? muTargetPol_Theta+360. : muTargetPol_Theta; + muTargetPol_Phi = myAtan2(muTargetPolY,muTargetPolX) * 180./pi; + muTargetPol_Phi360= (muTargetPol_Phi<0) ? muTargetPol_Phi+360. : muTargetPol_Phi; // Initial positron pos_Trans_Momentum = sqrt(posIniMomX*posIniMomX+posIniMomY*posIniMomY); pos_Momentum = sqrt(pos_Trans_Momentum*pos_Trans_Momentum+posIniMomZ*posIniMomZ); diff --git a/musrSimAna/musrAnalysis.hh b/musrSimAna/musrAnalysis.hh index dad5f5c..1a847d1 100644 --- a/musrSimAna/musrAnalysis.hh +++ b/musrSimAna/musrAnalysis.hh @@ -193,6 +193,12 @@ public : Double_t wght; Double_t det_m0edep; Double_t det_posEdep; + Double_t muIniPosR; + Double_t muIniMomTrans; + Double_t muTargetPol_Theta; + Double_t muTargetPol_Theta360; + Double_t muTargetPol_Phi; + Double_t muTargetPol_Phi360; Double_t pos_Trans_Momentum; Double_t pos_Momentum; Double_t pos_Radius; @@ -440,6 +446,12 @@ musrAnalysis::musrAnalysis(TTree *tree) variableMap["wght"]=&wght; variableMap["det_m0edep"]=&det_m0edep; variableMap["det_posEdep"]=&det_posEdep; + variableMap["muIniPosR"]=&muIniPosR; + variableMap["muIniMomTrans"]=&muIniMomTrans; + variableMap["muTargetPol_Theta"]=&muTargetPol_Theta; + variableMap["muTargetPol_Theta360"]=&muTargetPol_Theta360; + variableMap["muTargetPol_Phi"]=&muTargetPol_Phi; + variableMap["muTargetPol_Phi360"]=&muTargetPol_Phi360; variableMap["pos_Trans_Momentum"]=&pos_Trans_Momentum; variableMap["pos_Momentum"]=&pos_Momentum; variableMap["pos_Radius"]=&pos_Radius; diff --git a/musrSimAna/musrTH.cxx b/musrSimAna/musrTH.cxx index 7d9f628..fcbbafe 100644 --- a/musrSimAna/musrTH.cxx +++ b/musrSimAna/musrTH.cxx @@ -234,7 +234,8 @@ void musrTH::FitHistogramsIfRequired(Double_t omega) { Double_t ppp[100]; std::cout<<" Initial parameter setting: "; - Int_t n_ppp = funct->GetNumberFreeParameters(); + // Int_t n_ppp = funct->GetNumberFreeParameters(); + Int_t n_ppp = funct->GetNpar(); for (Int_t i=0; iGetParameter(i); std::cout<