Geant4  10.02.p03
advanced/microbeam/plot.C File Reference

Go to the source code of this file.

Functions

gStyle SetOptStat (0000)
 
gStyle SetOptFit ()
 
gStyle SetPalette (1)
 
gROOT SetStyle ("Plain")
 
c1 Divide (4, 3)
 
 while (1)
 
 fclose (fp)
 
c1 cd (1)
 
h1 Draw ()
 
h1 GetXaxis () -> SetLabelSize(0.025)
 
h1 GetYaxis () -> SetLabelSize(0.025)
 
h1 SetLineColor (3)
 
h1 SetFillColor (3)
 
h11 SetLineColor (8)
 
h11 SetFillColor (8)
 
h11 Draw ("same")
 
c1 cd (5)
 
h2 SetLineColor (2)
 
h2 SetFillColor (2)
 
h20 SetLineColor (5)
 
h20 SetFillColor (5)
 
c1 cd (7)
 
ntupleYX Draw ("Y:X>>hist","vox","colz")
 
gPad SetLogz ()
 
hist Draw ("colz")
 
hist GetZaxis () -> SetLabelSize(0.025)
 
hist SetTitle ("Cytoplasm intensity on transverse section")
 
c1 cd (3)
 
hist SetTitle ("Nucleus intensity on transverse section")
 
 system ("rm -rf microbeam.root")
 
 system ("hadd microbeam.root microbeam_*.root")
 
TFile f ("microbeam.root")
 
c1 cd (2)
 
ntuple3 Project ("h1","doseN")
 
h1 Scale (scale)
 
c1 cd (6)
 
ntuple3 Project ("h10","doseC")
 
c1 cd (9)
 
ntuple0 Project ("h2","sp")
 
h2 SetTitle ("dE/dx at cell entrance")
 
h2 SetFillColor (4)
 
h2 SetLineColor (4)
 
h2 Fit ("gaus")
 
gaus SetLineColor (6)
 
ntuple2 SetBranchAddress ("x",&x)
 
ntuple2 SetBranchAddress ("y",&y)
 
ntuple2 SetBranchAddress ("z",&z)
 
 for (Int_t i=0;i< nentries;i++)
 
c1 cd (10)
 
ntupleR Draw ("X2:Z2","abs(X2)<50","surf3")
 
c1 cd (11)
 
ntuple4 Draw ("y*0.359060:x*0.359060>>hist","doseV","contz")
 
hist Draw ("contz")
 
hist SetTitle ("Mean energy deposit -transverse- (z axis in eV)")
 
c1 cd (12)
 
ntuple4 Draw ("x*0.359060:(z+1500/0.162810+21)*0.162810>>hist","doseV","contz")
 
hist SetTitle ("Mean energy deposit -longitudinal- (z axis in eV)")
 
c1 cd (4)
 
ntuple1 Project ("hx","x")
 
h77 SetTitle ("Beam X position on cell")
 
c1 cd (8)
 
ntuple1 Project ("hy","y")
 
h88 SetTitle ("Beam Y position on cell")
 

Variables

Double_t scale = 1/h1->Integral()
 
 c1 = new TCanvas ("c1","",20,20,1200,900)
 
jump __pad0__
 
jump r
 
Float_t xVox
 
Float_t yVox
 
Float_t zVox
 
Float_t tmp
 
Float_t den
 
Float_t dose
 
Float_t X
 
Float_t Y
 
Float_t Z
 
Float_t vox = 0
 
Float_t mat = 0
 
Float_t voxelSizeX
 
Float_t voxelSizeY
 
Float_t voxelSizeZ
 
TH1F * h1 = new TH1F("h1","Nucleus marker intensity",100,1,300)
 
TH1F * h11 = new TH1F("h11 ","",100,1,300)
 
TH1F * h2 = new TH1F("h2","Cytoplasm marker intensity",100,1,300)
 
TH1F * h20 = new TH1F("h20 ","",100,1,300)
 
TNtuple * ntupleYXN = new TNtuple("NUCLEUS","ntuple","Y:X:vox")
 
TNtuple * ntupleZX = new TNtuple("CYTOPLASM","ntuple","Z:X:vox")
 
TNtuple * ntupleYX = new TNtuple("CYTOPLASM","ntuple","Y:X:vox")
 
 nlines =0
 
 ncols =0
 
TH2F * hist = new TH2F("hist","hist",50,-20,20,50,-20,20)
 
TNtuple * ntuple0 = (TNtuple*)f->Get("ntuple0")
 
TNtuple * ntuple1 = (TNtuple*)f->Get("ntuple1")
 
TNtuple * ntuple2 = (TNtuple*)f->Get("ntuple2")
 
TNtuple * ntuple3 = (TNtuple*)f->Get("ntuple3")
 
TNtuple * ntuple4 = (TNtuple*)f->Get("ntuple4")
 
TH1F * h10 = new TH1F("h10","Dose distribution in Cytoplasm",100,0.001,.2)
 
Float_t d
 
Double_t Xc = -1295.59e3 - 955e3*sin(10*TMath::Pi()/180)
 
Double_t Zc = -1327e3 + 955e3*cos(10*TMath::Pi()/180)
 
Double_t X1
 
Double_t Y1
 
Double_t Z1
 
Double_t X2
 
Double_t Y2
 
Double_t Z2
 
TNtuple * ntupleR = new TNtuple("Rmax","ntuple","Z2:Y2:X2")
 
Double_t x
 
Double_t y
 
Double_t z
 
Double_t xx
 
Double_t zz
 
Int_t nentries = (Int_t)ntuple2->GetEntries()
 
TH1F * h77 = new TH1F("hx","h1",200,-10,10)
 
TH1F * h88 = new TH1F("hy","h1",200,-10,10)
 

Function Documentation

◆ cd() [1/12]

c1 cd ( )

◆ cd() [2/12]

c1 cd ( )

◆ cd() [3/12]

c1 cd ( )

◆ cd() [4/12]

c1 cd ( )

◆ cd() [5/12]

c1 cd ( )

◆ cd() [6/12]

c1 cd ( )

◆ cd() [7/12]

c1 cd ( )

◆ cd() [8/12]

c1 cd ( 10  )

◆ cd() [9/12]

c1 cd ( 11  )

◆ cd() [10/12]

c1 cd ( 12  )

◆ cd() [11/12]

c1 cd ( )

◆ cd() [12/12]

c1 cd ( )

◆ Divide()

c1 Divide ( ,
 
)

◆ Draw() [1/8]

h1 Draw ( )

◆ Draw() [2/8]

h11 Draw ( "same"  )

◆ Draw() [3/8]

ntupleYXN Draw ( "Y:X>>hist ,
"vox"  ,
"colz"   
)

◆ Draw() [4/8]

hist Draw ( "colz"  )

◆ Draw() [5/8]

ntupleR Draw ( "X2:Z2"  )

◆ Draw() [6/8]

ntuple4 Draw ( "y*0.359060:x*0.359060>>hist ,
"doseV"  ,
"contz"   
)

◆ Draw() [7/8]

hist Draw ( "contz"  )

◆ Draw() [8/8]

ntuple4 Draw ( "x*0.359060:(z+1500/0.162810+21)*0.162810>>hist ,
"doseV"  ,
"contz"   
)

◆ f()

TFile f ( "microbeam.root"  )

◆ fclose()

fclose ( fp  )
Here is the caller graph for this function:

◆ Fit()

h88 Fit ( "gaus"  )

◆ for()

for ( )

Definition at line 284 of file advanced/microbeam/plot.C.

285 {
286  ntuple2->GetEntry(i);
287  X1=x;
288  Y1=y;
289  Z1=z;
290  xx = X1-Xc;
291  zz = Z1-Zc;
292  Z2 = zz*cos(10*TMath::Pi()/180)-xx*sin(10*TMath::Pi()/180);
293  X2 = zz*sin(10*TMath::Pi()/180)+xx*cos(10*TMath::Pi()/180);
294  Y2 = Y1;
295  ntupleR->Fill(Z2,Y2,X2);
296 }
Double_t Z2
Double_t z
Double_t X1
TNtuple * ntuple2
Double_t Y2
Double_t X2
Double_t Zc
Double_t Xc
Double_t y
Double_t xx
Double_t Y1
Double_t x
Double_t zz
TNtuple * ntupleR
Double_t Z1

◆ GetXaxis()

h2 GetXaxis ( ) -> SetLabelSize(0.025)
Here is the caller graph for this function:

◆ GetYaxis()

h2 GetYaxis ( ) -> SetLabelSize(0.025)
Here is the caller graph for this function:

◆ GetZaxis()

hist GetZaxis ( ) -> SetLabelSize(0.025)

◆ Project() [1/5]

ntuple3 Project ( "h1"  ,
"doseN"   
)

◆ Project() [2/5]

ntuple3 Project ( "h10"  ,
"doseC"   
)

◆ Project() [3/5]

ntuple0 Project ( "h2"  ,
"sp"   
)

◆ Project() [4/5]

ntuple1 Project ( "hx"  ,
"x"   
)

◆ Project() [5/5]

ntuple1 Project ( "hy"  ,
"y"   
)

◆ Scale()

h88 Scale ( scale  )

◆ SetBranchAddress() [1/3]

ntuple2 SetBranchAddress ( "x"  ,
x 
)

◆ SetBranchAddress() [2/3]

ntuple2 SetBranchAddress ( "y"  ,
y 
)

◆ SetBranchAddress() [3/3]

ntuple2 SetBranchAddress ( "z"  ,
z 
)

◆ SetFillColor() [1/5]

h1 SetFillColor ( )

◆ SetFillColor() [2/5]

h11 SetFillColor ( )

◆ SetFillColor() [3/5]

h10 SetFillColor ( )

◆ SetFillColor() [4/5]

h20 SetFillColor ( )

◆ SetFillColor() [5/5]

h88 SetFillColor ( )

◆ SetLineColor() [1/6]

h1 SetLineColor ( )

◆ SetLineColor() [2/6]

h11 SetLineColor ( )

◆ SetLineColor() [3/6]

hist13 SetLineColor ( )

◆ SetLineColor() [4/6]

h20 SetLineColor ( )

◆ SetLineColor() [5/6]

h88 SetLineColor ( )

◆ SetLineColor() [6/6]

gaus SetLineColor ( )

◆ SetLogz()

gPad SetLogz ( )

◆ SetOptFit()

gStyle SetOptFit ( )

◆ SetOptStat()

gStyle SetOptStat ( 0000  )

◆ SetPalette()

gStyle SetPalette ( )

◆ SetStyle()

gROOT SetStyle ( "Plain"  )

◆ SetTitle() [1/7]

hist SetTitle ( "Cytoplasm intensity on transverse section"  )
Here is the caller graph for this function:

◆ SetTitle() [2/7]

hist SetTitle ( "Nucleus intensity on transverse section"  )

◆ SetTitle() [3/7]

h2 SetTitle ( "dE/dx at cell entrance"  )

◆ SetTitle() [4/7]

hist SetTitle ( "Mean energy deposit -transverse- (z axis in eV)"  )

◆ SetTitle() [5/7]

hist SetTitle ( "Mean energy deposit -longitudinal- (z axis in eV)"  )

◆ SetTitle() [6/7]

h77 SetTitle ( "Beam X position on cell"  )

◆ SetTitle() [7/7]

h88 SetTitle ( "Beam Y position on cell"  )

◆ system() [1/2]

system ( "rm -rf microbeam.root"  )
Here is the caller graph for this function:

◆ system() [2/2]

system ( "hadd microbeam.root microbeam_*.root"  )

◆ while()

while ( )

Definition at line 56 of file advanced/microbeam/plot.C.

57  {
58  if ( nlines == 0 ) ncols = fscanf(fp,"%f %f %f",&tmp,&tmp,&tmp);
59  if ( nlines == 1 ) ncols = fscanf(fp,"%f %f %f",&voxelSizeX,&voxelSizeY,&voxelSizeZ);
60  if ( nlines == 2 ) ncols = fscanf(fp,"%f %f %f",&tmp,&tmp,&tmp);
61  if ( nlines >= 3 ) ncols = fscanf(fp,"%f %f %f %f %f %f", &X, &Y, &Z, &mat, &den, &vox);
62  if (ncols < 0) break;
63 
64  X= X*voxelSizeX;
65  Y= Y*voxelSizeY;
66  Z= Z*voxelSizeZ;
67 
68  if ( mat == 2 ) // noyau
69  {
70  if (den==1) h1->Fill( vox );
71  if (den==2) h11->Fill( vox );
72  ntupleYXN->Fill(Y,X,vox);
73  }
74  if ( mat == 1 ) // cytoplasm
75  {
76  if (den==1) h2->Fill( vox );
77  if (den==2) h20->Fill( vox );
78  ntupleZX->Fill(Z,X,vox);
79  ntupleYX->Fill(Y,X,vox);
80  }
81  nlines++;
82 
83  }
Float_t den
Float_t tmp
TNtuple * ntupleYX
TH1F * h1
Float_t voxelSizeY
Float_t Y
Float_t X
Float_t mat
TH1F * h11
Float_t Z
TH1F * h2
Float_t voxelSizeZ
TH1F * h20
Float_t vox
TNtuple * ntupleZX
Float_t voxelSizeX
TNtuple * ntupleYXN
Here is the call graph for this function:

Variable Documentation

◆ __pad0__

jump __pad0__

Definition at line 36 of file advanced/microbeam/plot.C.

◆ c1

c1 = new TCanvas ("c1","",20,20,1200,900)

Definition at line 28 of file advanced/microbeam/plot.C.

◆ d

Float_t d

Definition at line 237 of file advanced/microbeam/plot.C.

◆ den

Float_t den

Definition at line 37 of file advanced/microbeam/plot.C.

◆ dose

Float_t dose

Definition at line 37 of file advanced/microbeam/plot.C.

◆ h1

TH1F * h1 = new TH1F("h1","Nucleus marker intensity",100,1,300)

Definition at line 43 of file advanced/microbeam/plot.C.

◆ h10

TH1F* h10 = new TH1F("h10","Dose distribution in Cytoplasm",100,0.001,.2)

Definition at line 189 of file advanced/microbeam/plot.C.

◆ h11

TH1F* h11 = new TH1F("h11 ","",100,1,300)

Definition at line 44 of file advanced/microbeam/plot.C.

◆ h2

TH1F * h2 = new TH1F("h2","Cytoplasm marker intensity",100,1,300)

Definition at line 46 of file advanced/microbeam/plot.C.

◆ h20

TH1F* h20 = new TH1F("h20 ","",100,1,300)

Definition at line 47 of file advanced/microbeam/plot.C.

◆ h77

TH1F* h77 = new TH1F("hx","h1",200,-10,10)

Definition at line 366 of file advanced/microbeam/plot.C.

◆ h88

TH1F* h88 = new TH1F("hy","h1",200,-10,10)

Definition at line 367 of file advanced/microbeam/plot.C.

◆ hist

TH2F * hist = new TH2F("hist","hist",50,-20,20,50,-20,20)

Definition at line 136 of file advanced/microbeam/plot.C.

◆ mat

Float_t mat = 0

Definition at line 40 of file advanced/microbeam/plot.C.

◆ ncols

ncols =0

Definition at line 54 of file advanced/microbeam/plot.C.

◆ nentries

Int_t nentries = (Int_t)ntuple2->GetEntries()

Definition at line 283 of file advanced/microbeam/plot.C.

◆ nlines

nlines =0

Definition at line 53 of file advanced/microbeam/plot.C.

◆ ntuple0

ntuple0 = (TNtuple*)f->Get("ntuple0")

Definition at line 176 of file advanced/microbeam/plot.C.

◆ ntuple1

ntuple1 = (TNtuple*)f->Get("ntuple1")

Definition at line 177 of file advanced/microbeam/plot.C.

◆ ntuple2

ntuple2 = (TNtuple*)f->Get("ntuple2")

Definition at line 178 of file advanced/microbeam/plot.C.

◆ ntuple3

ntuple3 = (TNtuple*)f->Get("ntuple3")

Definition at line 179 of file advanced/microbeam/plot.C.

◆ ntuple4

ntuple4 = (TNtuple*)f->Get("ntuple4")

Definition at line 180 of file advanced/microbeam/plot.C.

◆ ntupleR

TNtuple* ntupleR = new TNtuple("Rmax","ntuple","Z2:Y2:X2")

Definition at line 278 of file advanced/microbeam/plot.C.

◆ ntupleYX

TNtuple* ntupleYX = new TNtuple("CYTOPLASM","ntuple","Y:X:vox")

Definition at line 51 of file advanced/microbeam/plot.C.

◆ ntupleYXN

TNtuple* ntupleYXN = new TNtuple("NUCLEUS","ntuple","Y:X:vox")

Definition at line 49 of file advanced/microbeam/plot.C.

◆ ntupleZX

TNtuple* ntupleZX = new TNtuple("CYTOPLASM","ntuple","Z:X:vox")

Definition at line 50 of file advanced/microbeam/plot.C.

◆ r

jump r

Definition at line 36 of file advanced/microbeam/plot.C.

◆ scale

scale = 1/h1->Integral()

Definition at line 25 of file advanced/microbeam/plot.C.

◆ tmp

Float_t tmp

Definition at line 37 of file advanced/microbeam/plot.C.

◆ vox

Float_t vox = 0

Definition at line 40 of file advanced/microbeam/plot.C.

◆ voxelSizeX

Float_t voxelSizeX

Definition at line 41 of file advanced/microbeam/plot.C.

◆ voxelSizeY

Float_t voxelSizeY

Definition at line 41 of file advanced/microbeam/plot.C.

◆ voxelSizeZ

Float_t voxelSizeZ

Definition at line 41 of file advanced/microbeam/plot.C.

◆ X

Float_t X

Definition at line 39 of file advanced/microbeam/plot.C.

◆ x

Double_t x

Definition at line 279 of file advanced/microbeam/plot.C.

◆ X1

Double_t X1

Definition at line 266 of file advanced/microbeam/plot.C.

◆ X2

Double_t X2

Definition at line 266 of file advanced/microbeam/plot.C.

◆ Xc

Xc = -1295.59e3 - 955e3*sin(10*TMath::Pi()/180)

Definition at line 266 of file advanced/microbeam/plot.C.

◆ xVox

Float_t xVox

Definition at line 37 of file advanced/microbeam/plot.C.

◆ xx

Double_t xx

Definition at line 279 of file advanced/microbeam/plot.C.

◆ Y

Float_t Y

Definition at line 39 of file advanced/microbeam/plot.C.

◆ y

Double_t y

Definition at line 279 of file advanced/microbeam/plot.C.

◆ Y1

Double_t Y1

Definition at line 266 of file advanced/microbeam/plot.C.

◆ Y2

Double_t Y2

Definition at line 266 of file advanced/microbeam/plot.C.

◆ yVox

Float_t yVox

Definition at line 37 of file advanced/microbeam/plot.C.

◆ Z

Float_t Z

Definition at line 39 of file advanced/microbeam/plot.C.

◆ z

Double_t z

Definition at line 279 of file advanced/microbeam/plot.C.

◆ Z1

Double_t Z1

Definition at line 266 of file advanced/microbeam/plot.C.

◆ Z2

Double_t Z2

Definition at line 266 of file advanced/microbeam/plot.C.

◆ Zc

Zc = -1327e3 + 955e3*cos(10*TMath::Pi()/180)

Definition at line 266 of file advanced/microbeam/plot.C.

◆ zVox

Float_t zVox

Definition at line 37 of file advanced/microbeam/plot.C.

◆ zz

Double_t zz

Definition at line 279 of file advanced/microbeam/plot.C.