94 TFile f(
"tree106.root",
"recreate");
95 TTree t2(
"t2",
"a Tree with data from a fake Geant3");
97 t2.Branch(
"track", &
gstep, 8000, 1);
112 for (
Int_t i=0;i <10000; i++) {
157 if (
gstep->gekin < 0.001)
179 t2->SetBranchAddress(
"track", &
gstep);
183 auto hdestep =
new TH1F(
"hdestep",
"destep in Mev", 100, 1
e-5, 3
e-5);
195 auto c1 =
new TCanvas(
"c1",
"c1", 600, 800);
196 c1->SetFillColor(42);
202 gPad->SetFillColor(37);
204 t2->Draw(
"vect[0]:vect[1]:vect[2]");
205 if (
gROOT->IsBatch())
209 gPad->GetViewer3D(
"ogl");
#define ClassDefOverride(name, id)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
R__EXTERN TRandom * gRandom
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
1-D histogram with a float per channel (see TH1 documentation)
Mother of all ROOT objects.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
Double_t Rndm() override
Machine independent random number generator.
A TTree represents a columnar dataset.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.