Add curve of back scattered fraction.
This commit is contained in:
parent
6eb8e183f1
commit
3d43dcb5ae
@ -24,8 +24,8 @@ void plotFrc(char *FileName)
|
||||
Int_t i = 0;
|
||||
Int_t nline=0;
|
||||
Ssiz_t pos;
|
||||
Double_t x[100],yl1[100],yl2[100],yl3[100],yl4[100],yl5[100],yl6[100],yl7[100];
|
||||
Int_t Flag[6]=0;
|
||||
Double_t x[100],yl1[100],yl2[100],yl3[100],yl4[100],yl5[100],yl6[100],yl7[100],bck[100];
|
||||
Int_t Flag[7]=0;
|
||||
|
||||
FILE *fp = fopen(FileName,"r");
|
||||
if ( fp == NULL ){
|
||||
@ -55,6 +55,11 @@ void plotFrc(char *FileName)
|
||||
// Plot all layers for now. Maybe stop when sum is zero in the future
|
||||
// Layers start from column # 10 up to 16.
|
||||
// for (col=10;col<17;col++) {
|
||||
strtoken = (TObjString*) token->At(6);
|
||||
label = strtoken->GetName();
|
||||
bck[i] = label.Atof();
|
||||
if (bck[i]>0) { Flag[7]=1;}
|
||||
|
||||
strtoken = (TObjString*) token->At(10);
|
||||
label = strtoken->GetName();
|
||||
yl1[i] = label.Atof();
|
||||
@ -168,6 +173,15 @@ void plotFrc(char *FileName)
|
||||
legend->AddEntry(gr7,"Layer 7");
|
||||
}
|
||||
|
||||
if (Flag[7]==1){
|
||||
TGraph *gr8 = new TGraph(i-1,x,bck);
|
||||
gr8->SetMarkerStyle(20);
|
||||
gr8->SetMarkerColor(TColor::kAzure+7);
|
||||
gr8->SetLineColor(TColor::kAzure+7);
|
||||
gr8->Draw("PC");
|
||||
legend->AddEntry(gr8,"Back Scat.");
|
||||
}
|
||||
|
||||
legend->Draw();
|
||||
|
||||
// I am not sure what this does, but it waits until canvas is closed
|
||||
|
Loading…
x
Reference in New Issue
Block a user