33 #ifndef ROOT_TObjArray
34 #include <TObjArray.h>
60 #ifndef Gw_LevelScheme
64 #ifndef GW_NUCLEARLEVEL_H
68 #ifndef GW_XGAMMALINK_H
89 fName.SetTextAlign(22);
90 fName.SetTextColor(1);
106 fName.SetTextAlign(22);
107 fName.SetTextColor(1);
117 map<Int_t, TBits*>::iterator im;
118 for (im = fCoincMap.begin() ; im != fCoincMap.end() ; ++im )
delete im->second;
128 TString options(opt);
129 if ( options.Contains(
"Graphical") )
146 level->SetUniqueID(
fLevels.GetEntries());
153 link->SetUniqueID(
fLinks.GetEntries());
168 for (Int_t i = 0; i <
fLinks.GetEntries(); ++i) {
170 bitMap =
new TBits(
fLinks.GetEntries());
172 for (Int_t j = 0; j <
fLinks.GetEntries(); ++j) {
173 if (j == i)
continue;
176 bitMap->SetBitNumber(link2->GetUniqueID(),
true);
178 fCoincMap[i] = bitMap;
190 fLog <<
warning <<
"Method not fully implemented, results not reliable for all cases" <<
nline;
192 static Bool_t first =
true;
199 TBits* bitMap = fCoincMap[link->GetUniqueID()];
200 TBits* bitMapC = fCoincMap[link->GetUniqueID()];
201 TBits* bitMapT = 0x0;
205 if ( !bitMapC->CountBits() )
return bitMap;
207 for (UInt_t i = 0; i < bitMapC->GetNbits(); ++i) {
208 if ( bitMapC->TestBitNumber(i) ) {
211 bitMap->operator|=(*bitMapT);
256 TLatex* text =
new TLatex(0., 0., msg);
264 TArrow* arrow =
new TArrow(x1, y1, x2, y2);
272 if ( b ) this->
Draw();
303 TString options(opt);
306 if (options.Contains(
"ground")) {
309 }
else if (
fLevels.GetEntries() == 0) {
323 Int_t d =
fName.DistancetoPrimitive(px, py);
330 fName.ExecuteEvent(event, px, py);
336 TList* list =
new TList();
337 list->SetOwner(
false);
339 for (Int_t i = 0; i <
fCascades.GetEntries(); ++i) {
341 if (cas->FindObject(link))
362 TList* list =
new TList();
363 list->SetOwner(
false);
366 while ( (link = (
Link *)next()) ){
367 if (link->
GetIL() == level || link->
GetFL() == level)
378 if ( opt.Contains(
"all") ) {
379 cout <<
"Level Scheme: " <<
endl;
381 cout <<
"Links/Levels List: " <<
endl;
383 while ( (link = (
Link *)iter()) ){
384 cout <<
" "; link->
ls();
385 if ( link->
GetIL() ) {
386 cout <<
" From "; link->
GetIL()->ls(o);
388 else cout <<
" Not linked " <<
endl;
389 if ( link->
GetFL() ) {
390 cout <<
" To "; link->
GetFL()->ls(o);
392 else cout <<
" Not linked " <<
endl;
395 if ( opt.Contains(
"level") ) {
396 cout <<
"Level Scheme: " <<
endl;
398 cout <<
"Levels List: " <<
endl;
401 if ( opt.Contains(
"gamma") ) {
402 cout <<
"Level Scheme: " <<
endl;
404 cout <<
"Links List: " <<
endl;
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance to object.
virtual void ls(Option_t *option="all") const
list levels/links
virtual TList * FindCLinkInCascade() const
Find the cascades that own the currengt link.
A cascade is a list of links.
virtual void Browse(TBrowser *b)
virtual Int_t InitAGS(const Char_t *filename, Option_t *opt="152Dy")
BETTER TO USE Import - To init this level scheme with a Radford AGS file.
interface to ENSDF Evaluated Nuclear Structure Data File
virtual void Draw(Option_t *opt="")
to draw this level scheme
LogMessage & error(LogMessage &)
Level * NewLevel(const char *name)
create new level
LogMessage & warning(LogMessage &)
virtual TList * FindLinkInCascade(Link *link) const
Find the cascades that own that link.
virtual Int_t Import(const Char_t *, Option_t *)
to init this level scheme from an existing formatted file (ENSDF, Radware ..)
header file for a NuclearLevel
virtual Level * GetIL()
to get the initial level
LogMessage & nline(LogMessage &)
virtual void ls(Option_t *="") const
ls on link
virtual const char * GetName() const
virtual Level * GetFL()
to get the final level
virtual Int_t ReadAGS(const Char_t *filename, Option_t *opt="152Dy")
for backward compatibility
virtual Int_t ImportLevelScheme(const Char_t *, Option_t *)
to init this level scheme from an existing formatted file (ENSDF, Radware ..)
Most of the methods relies on graphical approach for level scheme.
virtual void Clear(Option_t *opt="")
A link between two levels.
virtual const Char_t * GetReference() const
TArrow * NewArrow(Float_t x1, Float_t y1, Float_t x2, Float_t y2)
create new arrow
virtual Int_t InitENSDF(const Char_t *, Option_t *)
BETTER TO USE Import - To init this level scheme with a ENSDF file.
Bool_t Disconnect(TCanvas *c=0x0)
Connect the Canvas to this to collect events.
LogMessage & dolog(LogMessage &)
void AddLevel(Level *level)
level scheme player pointer
void AddText(TLatex *latex)
Add text.
Bool_t Connect(TCanvas *c=0x0)
Connect the Canvas to this to collect events.
header file for a LevelScheme
void AddLink(Link *link)
Add link.
Cascade * NewCascade(const char *name)
create new cascade
ADF::LogMessage & endl(ADF::LogMessage &log)
Link * NewLink(const char *name)
create new level
void AddCascade(Cascade *Cascade)
Add cascade.
void AddArrow(TArrow *arrow)
Add arrow.
virtual void SetProcessMethod(const char *)
To set the current method.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
to execute an event for this level scheme
virtual TBits * GetBitMap(Link *link)
get bit map coincidence above a given link
header file for a XGammaLink
BaseLSPlayer * GetPlayer(Option_t *opt="Graphical")
Get player.
virtual const TList * FindLink(Level *level) const
Find links attached to level.
TLatex * NewText(const char *msg)
create new text
virtual Int_t ReadENSDF(const Char_t *, Option_t *)
for backward compatibility
virtual void FillMap()
Fill map of coincidence.
virtual void Draw(Option_t *opt="")
to draw this level scheme
BaseLSPlayer to work on level scheme.
Base class describing a general level.