Commit 5eb9568e authored by Antoine Lemasson's avatar Antoine Lemasson
Browse files

Add LifeTime in the gamma search

Put Cubix in a TRint instead of TApplicataion to get access to the prompt
parent 2112d8ba
......@@ -305,9 +305,11 @@ void CXFileList::DisplayObject(const TString& fname,const TString& name)
else if(o->InheritsFrom(TGraph::Class_Name()))
o->Draw("PL");
}
}
canvas_out->ls();
gPad->Modified();
gPad->Update();
gPad->GetFrame()->SetBit(TObject::kCannotPick);
}
fMainWindow->RefreshPad();
}
......
......@@ -15,7 +15,9 @@
#include "TGLabel.h"
#include "TGButton.h"
#include "TList.h"
#include "TGResourcePool.h"
#include "GwConfig.h"
#include "LevelScheme.h"
#include "GammaLink.h"
......@@ -282,17 +284,34 @@ void CXGammaSearch::FindGammaRays(Bool_t Bash)
Float_t ELevF = NucLevF->GetEnergy().GetValue();
TString spinF = GetSpinFromLev(NucLevF);
Float_t LifeTime = NucLevI->GetT().GetValue();
TString LifeTimeText="";
if(LifeTime != 0) {
if(LifeTime<1e-12)
LifeTimeText = Form(" ; T1/2 = %.1f fs",LifeTime*1e15);
if(LifeTime>1e-12 && LifeTime<1e-9)
LifeTimeText = Form(" ; T1/2 = %.1f ps",LifeTime*1e12);
if(LifeTime>1e-9 && LifeTime<1e-6)
LifeTimeText = Form(" ; T1/2 = %.1f ns",LifeTime*1e9);
if(LifeTime>1e-6 && LifeTime<1e-3)
LifeTimeText = Form(" ; T1/2 = %.1f us",LifeTime*1e6);
if(LifeTime>1e-3 && LifeTime<1e-0)
LifeTimeText = Form(" ; T1/2 = %.1f ms",LifeTime*1e3);
if(LifeTime>1e-0)
LifeTimeText = Form(" ; T1/2 = %.1f s",LifeTime);
}
agammatrans.NucName = Nuc.GetSymbol();
agammatrans.EGamma = Energy;
agammatrans.EI = ELevI;
agammatrans.EF = ELevF;
agammatrans.SpinI = spinI;
agammatrans.SpinF = spinF;
agammatrans.LifeTime = LifeTimeText;
avect.push_back(agammatrans);
TString GammaTitle = Form(" => %6.1f keV : %5s (%6.1f keV) --> %5s (%6.1f keV)",Energy,spinI.Data(),ELevI,spinF.Data(),ELevF);
// cout<<GammaTitle<<endl;
TString GammaTitle = Form(" => %6.1f keV : %5s (%6.1f keV) --> %5s (%6.1f keV)%s",Energy,spinI.Data(),ELevI,spinF.Data(),ELevF, LifeTimeText.Data());
if(!Bash) PrintInListBox(GammaTitle.Data(),kPrint);
}
......@@ -371,7 +390,7 @@ void CXGammaSearch::FindInDoubleCoincidence(Bool_t Bash)
if(GT.EGamma == Mat_E[ig][0])
{
Flag[ig] = Mat_E[ig][0];
TransitionName[ig] = Form(" %6.1f keV : %5s (%6.1f keV) --> %5s (%6.1f keV) ",GT.EGamma,GT.SpinI.Data(),GT.EI,GT.SpinF.Data(),GT.EF);
TransitionName[ig] = Form(" %6.1f keV : %5s (%6.1f keV) --> %5s (%6.1f keV)%s ",GT.EGamma,GT.SpinI.Data(),GT.EI,GT.SpinF.Data(),GT.EF,GT.LifeTime.Data());
ETrans[ig] = GT.EGamma;
EI[ig] = GT.EI;
EF[ig] = GT.EF;
......@@ -517,7 +536,7 @@ void CXGammaSearch::FindInTripleCoincidence()
if(GT.EGamma == Mat_E[ig][0])
{
Flag[ig] = Mat_E[ig][0];
TransitionName[ig] = Form(" %6.1f keV : %5s (%6.1f keV) --> %5s (%6.1f keV) ",GT.EGamma,GT.SpinI.Data(),GT.EI,GT.SpinF.Data(),GT.EF);
TransitionName[ig] = Form(" %6.1f keV : %5s (%6.1f keV) --> %5s (%6.1f keV)%s ",GT.EGamma,GT.SpinI.Data(),GT.EI,GT.SpinF.Data(),GT.EF,GT.LifeTime.Data());
ETrans[ig] = GT.EGamma;
EI[ig] = GT.EI;
EF[ig] = GT.EF;
......@@ -655,7 +674,26 @@ std::vector<int> CXGammaSearch::Sort_Index(std::vector<int> Index_Nuclei, std::v
void CXGammaSearch::PrintInListBox(TString mess, Int_t Type)
{
#if (OS_TYPE == OS_LINUX)
const TGFont *ufont; // will reflect user font changes
ufont = gClient->GetFont("-adobe-courier-medium-r-*-*-14-*-*-*-*-*-iso8859-1");
// ufont = gClient->GetFont("-adobe-times-medium-r-*-*-12-*-*-*-*-*-iso8859-1");
if (!ufont)
ufont = fClient->GetResourcePool()->GetDefaultFont();
TGGC *uGC; // will reflect user GC changes
// graphics context changes
GCValues_t val;
val.fMask = kGCFont;
val.fFont = ufont->GetFontHandle();
uGC = gClient->GetGC(&val, kTRUE);
TGTextLBEntry *entry = new TGTextLBEntry(fResultsBox->GetContainer(), new TGString(mess), fResultsBox->GetNumberOfEntries()+1, uGC->GetGC(), ufont->GetFontStruct());
#else
TGTextLBEntry *entry = new TGTextLBEntry(fResultsBox->GetContainer(), new TGString(mess), fResultsBox->GetNumberOfEntries()+1);
#endif
if(Type == kError)
entry->SetBackgroundColor((Pixel_t)0xff0000);
else if(Type == kInfo)
......
......@@ -685,7 +685,7 @@ TH1 *CXMainWindow::GetHisto(TVirtualPad *pad)
void CXMainWindow::UpdateContextMenus()
{
/// TH1 ///
/// TH1F ///
TClass *cl = gROOT->GetClass("TH1F");
cl->MakeCustomMenuList();
TList * ml = cl->GetMenuList();
......@@ -724,7 +724,7 @@ void CXMainWindow::UpdateContextMenus()
n = new TClassMenuItem(TClassMenuItem::kPopupUserFunction,cl,"Scale","HistScale",this,"Float_t,TObject*", 1);
ml->AddAt(n,5);
/// TH1 ///
/// TH1D///
cl = gROOT->GetClass("TH1D");
cl->MakeCustomMenuList();
ml = cl->GetMenuList();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment