GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ensdfdemo.C
Go to the documentation of this file.
1 
9 using namespace Gw;
10 
30 void oneLS(const Char_t *filename, const Char_t *nucleus, Int_t nbcas = 100)
31 {
32  // load the AGS file
33  BaseGEM random;
34  if ( random.Import(filename,nucleus) == 0 ) {
35  cout << " Level Scheme not correctly loaded " << endl; return;
36  }
37 
38  // some spectra to be filled
39  TH1F *K = new TH1F("K","K",100,0,100);
40  TH1F *h = new TH1F("ProjTot","ProjTot",8192,0,4096);
41 
42  // start the Monte-Carlo
43  Cascade cas; GammaLink *gam;
44  for (Int_t i = 0; i < nbcas; i++ ) {
45 
46  random.DoCascade(cas);
47 
48  K->Fill(cas.GetSize()) ;
49  for (Int_t j = 0; j < cas.GetSize(); j++ ) {
50  gam = (GammaLink *)cas.At(j); h->Fill(gam->GetEnergy().Get());
51  } // j
52  } //i
53  h->Draw();
54 }
55 
62 void testfeeding(const Char_t *filename, const Char_t *nucleus, Int_t nbcas = 100)
63 {
64  // load the level scheme from an external file
65  GEM random;
66  if ( random.Import(filename,nucleus) == 0 ) {
67  cout << " Level Scheme not correctly loaded " << endl; return;
68  }
69  // Adds a feeding to the GEM process
70  random.SetFeeding("TestFeeding"); random.SetExI(80000,60); // entry point 50 MeV, spin 60
71 
72  // some spectra to be filled
73  TH1F *K = new TH1F("K","K",100,0,100);
74  TH1F *h = new TH1F("ProjTot","ProjTot",8192,0,4096);
75 
76  // start the Monte-Carlo
77  Cascade cas; GammaLink *gam;
78  for (Int_t i = 0; i < nbcas; i++ ) {
79 
80  random.DoCascade(cas);
81 
82  K->Fill(cas.GetSize()) ;
83  for (Int_t j = 0; j < cas.GetSize(); j++ ) {
84  gam = (GammaLink *)cas.At(j); h->Fill(gam->GetEnergy().Get());
85  } // j
86  } //i
87  h->Draw();
88 }
89 
void SetExI(Float_t E, Float_t I)
starting point in the ExI plan from which starts the gamma-ray emission
Definition: GEM.cpp:59
A cascade is a list of links.
Definition: Cascade.h:51
virtual Int_t DoCascade(TSeqCollection &, Option_t *opt="")
starting point in the ExI plan from which starts the gamma-ray emission
Definition: GEM.cpp:73
Class to get randomly cascades (with lateral feeding) of gammas on the basis of a level scheme...
Definition: GEM.h:55
Class to get randomly cascades of gammas on the basis of a level scheme.
Definition: BaseGEM.h:107
Link * SetFeeding(const char *feedingtype="TestFeeding")
Definition: GEM.cpp:47
void oneLS(const Char_t *filename, const Char_t *nucleus, Int_t nbcas=100)
Function to make a monte carlo on any AGS/or ENSDF file.
Definition: ensdfdemo.C:30
virtual Data_T Get() const
get the value, can be overloaded
Definition: Data.h:70
void testfeeding(const Char_t *filename, const Char_t *nucleus, Int_t nbcas=100)
Function to make a monte carlo on any AGS/or ENSDF file.
Definition: ensdfdemo.C:62
virtual void Draw(Option_t *opt="")
Definition: Cascade.cpp:116
virtual Int_t DoCascade(TSeqCollection &cascade, Option_t *opt="")
cascade simulation
Definition: BaseGEM.cpp:523
ADF::LogMessage & endl(ADF::LogMessage &log)
virtual Int_t Import(const Char_t *, Option_t *opt="152DY")
Load the level scheme and init the Monte-Carlo.
Definition: BaseGEM.cpp:194