26 #include "TStopwatch.h"
29 #include "TLorentzVector.h"
30 #include "TDatabasePDG.h"
47 gem.
Import(lsname,lstitle);
50 TFile rf(treefilename,
"RECREATE"); TTree *tree_primary =
new TTree(
"GWLS_to_SToGS",
"Primaries from GW");
53 tree_primary->Branch(
"Pr.",&pr_event);
55 Gw::Cascade cas; TObjArray directions;
Gw::GammaLink *gam; Int_t gPDG = TDatabasePDG::Instance()->GetParticle(
"gamma")->PdgCode();
57 for (Int_t i = 0; i < nbcas; i++ ) {
62 Double_t ESUM = 0.0, MULTTOT = 0; pr_event.
Clear(
"");
64 MULTTOT = cas.GetSize();
65 for (Int_t j = 0; j < MULTTOT; j++ ) {
76 TLorentzVector *lv = (TLorentzVector *)directions.At(j);
77 stogshit->
fPX = lv->X();
78 stogshit->
fPY = lv->Y();
79 stogshit->
fPZ = lv->Z();
80 stogshit->
fT = lv->T();
82 stogshit->
fPDG = gPDG;
94 tree_primary->Print();
95 tree_primary->Write();
98 cout <<
"Monte-Carlo time " <<
endl; watch.Print();
A cascade is a list of links.
SToGS Base Root Polarized Hit.
SBRPHit * AddHit()
add a hit to the current event
Class to get randomly cascades of gammas on the basis of a level scheme.
header file for a NuclearLevel
header file for a GammaLink
virtual Data_T Get() const
get the value, can be overloaded
virtual Measure< Float_t > & GetEnergy()
to get/modify the gamma-ray energy and its error
virtual void Clear(Option_t *opt)
clear the collection of hits, set H, K to 0
virtual Int_t DoCascade(TSeqCollection &cascade, Option_t *opt="")
cascade simulation
ADF::LogMessage & endl(ADF::LogMessage &log)
void OneLSWithAngularDistributions(const char *lsname, const char *lstitle, Int_t nbcas=100000, const char *treefilename="PrimariesFromGW.root")
static Random * Instance()
to access the unique instance
virtual Int_t Import(const Char_t *, Option_t *opt="152DY")
Load the level scheme and init the Monte-Carlo.
A GammaLink binds two nuclear levels.
Bool_t SetParameter(const char *name, Int_t value)
to set some parameters that modify the way the simulation is performed. return false is the parameter...
void SetEMult(Double_t h, Int_t k)
void SetCurrent(const char *name="basic")
to set the current TRandomom object
header file for a BaseGEM (gamma-rays generator)
header file for a spin quantum number