22 #if !defined(__CINT__) || defined(__MAKECINT__)
24 #include "Riostream.h"
28 #include "TEveManager.h"
48 Float_t metricConv = 10.;
60 random->
Import(
"../../ndb/198Pb.ags");
65 for (Int_t i = 0; i < nEvents; ++i) {
70 for (Int_t j = 0; j < cas.GetSize(); j++ ) {
76 Double_t theta, phi, rho, drho;
77 theta = gRandom->Uniform(TMath::Pi()/4.);
78 phi = gRandom->Uniform(2*TMath::Pi());
79 rho = gRandom->Uniform(235, 329);
80 drho = gRandom->Uniform(94);
81 x = rho*TMath::Sin(theta)*TMath::Cos(phi);
82 y = rho*TMath::Sin(theta)*TMath::Sin(phi);
83 z = drho*TMath::Cos(theta) + 235;
87 hit->
SetX(x/metricConv);
88 hit->
SetY(y/metricConv);
89 hit->
SetZ(z/metricConv);
94 shit->
SetX(x/metricConv);
95 shit->
SetY(y/metricConv);
96 shit->
SetZ(z/metricConv);
99 Int_t ndiff = Int_t(gRandom->Uniform(0, 1) + 0.5);
100 for (Int_t k = 0; k < ndiff; ++k) {
102 theta = gRandom->Uniform(TMath::Pi()/2.);
103 phi = gRandom->Uniform(2*TMath::Pi());
104 rho = gRandom->Uniform(-30, 30);
105 x += rho*TMath::Sin(theta)*TMath::Cos(phi);
106 y += rho*TMath::Sin(theta)*TMath::Sin(phi);
107 z += rho*TMath::Cos(theta);
108 shit->
SetXYZ(x/metricConv,y/metricConv,z/metricConv);
109 shit->
SetE(e*0.4/(ndiff+1) );
AgataEventContainer class that contains agata event to be displayed.
virtual void SetE(Float_t e)
void AgataTrackDisplay(Int_t nEvents=100)
Macro that generates gamma rays from a given level scheme and generated randomly associated positions...
StdHit * NewHit()
Add a new hit to the track (filling mode). The Stack is emptied by calling Reset. ...
AgataEventDisplay a class to work on a specific event display.
Class to get randomly cascades (with lateral feeding) of gammas on the basis of a level scheme...
virtual void SetZ(Float_t z)
Class to get randomly cascades of gammas on the basis of a level scheme.
void FillTracks(Option_t *type="Agata")
AgataEventContainer * GetEventContainer() const
header file for a GammaLink
virtual void SetY(Float_t y)
virtual void SetX(Float_t x)
Setter position & energy.
virtual Data_T Get() const
get the value, can be overloaded
virtual void SetE(Float_t e)
virtual void SetY(Float_t y)
header file for a GEM (gamma-rays generator)
virtual void SetZ(Float_t z)
virtual void SetX(Float_t x)
Setter position & energy.
virtual Measure< Float_t > & GetEnergy()
to get/modify the gamma-ray energy and its error
TrackHit * NewTrackHit(Option_t *type="Agata")
add current track hit (added to current track hit list)
virtual void AddGeometry(TGeoVolume *volume, TGeoMatrix *matrix=gGeoIdentity)
virtual Int_t DoCascade(TSeqCollection &cascade, Option_t *opt="")
cascade simulation
void SetTrackStyle(const Char_t *s, Option_t *type="Agata")
Set track style (rec/cone)
virtual void SetXYZ(Float_t x, Float_t y, Float_t z)
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.
static AgataEventDisplay * Instance()