Selector to process tree friends. 
 
#define ProofFriends_cxx
 
 
ProofFriends::ProofFriends()
{
   
 
   fXY = 0;
   fZ = 0;
   fR = 0;
   fRZ = 0;
}
 
void ProofFriends::Begin(
TTree * )
 
{
   
   
   
 
 
}
 
void ProofFriends::SlaveBegin(
TTree * )
 
{
   
   
   
 
 
 
   
   fXY = 
new TH2F(
"histo1", 
"y:x", 50, 5., 15., 50, 10., 30.);
 
   fZ = 
new TH1F(
"histo2", 
"z , sqrt(dx*dx+dy*dy) < 1", 50, 0., 5.);
 
   fOutput->Add(fXY);
   fOutput->Add(fZ);
   if (fDoFriends) {
      fR = 
new TH1F(
"histo3", 
"Tfrnd.r , sqrt(dx*dx+dy*dy) < 1, z < 1", 50, 5., 15.);
 
      fRZ = 
new TH2F(
"histo4", 
"Tfrnd.r:z , sqrt(dx*dx+dy*dy) < 1, z < 1", 50, 0., 1., 50, 5., 15.);
 
      fOutput->Add(fR);
      fOutput->Add(fRZ);
   }
}
 
{
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 
   
   b_x->GetEntry(entry);
   b_y->GetEntry(entry);
 
   
   b_z->GetEntry(entry);
   fZ->Fill(z, 1.);
 
   
   if (fDoFriends) {
      b_r->GetEntry(entry);
   }
 
}
 
void ProofFriends::SlaveTerminate()
{
   
   
   
 
}
 
void ProofFriends::Terminate()
{
   
   
   
 
   if (!fPlot) return;
 
   
   
   
 
   if ((fXY = 
dynamic_cast<TH2F *
>(fOutput->FindObject(
"histo1")))) {
 
      fXY->GetXaxis()->SetTitle("x");
      fXY->GetYaxis()->SetTitle("y");
      fXY->Draw("");
   }
 
   if ((fZ = 
dynamic_cast<TH1F *
>(fOutput->FindObject(
"histo2")))) {
 
      fZ->GetXaxis()->SetTitle("z");
      fZ->GetYaxis()->SetTitle("N / 0.1");
      fZ->Draw("");
   }
 
   if (fDoFriends) {
 
      if ((fR = 
dynamic_cast<TH1F *
>(fOutput->FindObject(
"histo3")))) {
 
         fR->GetXaxis()->SetTitle("Tfrnd.r");
         fR->GetYaxis()->SetTitle("N / 0.2");
         fR->Draw();
      }
 
      if ((fRZ = 
dynamic_cast<TH2F *
>(fOutput->FindObject(
"histo4")))) {
 
         fRZ->GetXaxis()->SetTitle("z");
         fRZ->GetXaxis()->CenterTitle(1);
         fRZ->GetXaxis()->SetTitleOffset(1.5);
         fRZ->GetYaxis()->SetTitle("Tfrnd.r");
         fRZ->GetYaxis()->CenterTitle(1);
         fRZ->GetYaxis()->SetTitleOffset(1.75);
         fRZ->GetZaxis()->SetTitle("N / 0.1 / 0.2");
         fRZ->GetZaxis()->SetTitleOffset(1.25);
         fRZ->Draw("lego");
      }
 
   }
 
   
}
Selector to process tree friends.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
R__EXTERN TStyle * gStyle
 
void SetFrameFillColor(Color_t color=1)
 
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
 
1-D histogram with a float per channel (see TH1 documentation)}
 
2-D histogram with a float per channel (see TH1 documentation)}
 
The TNamed class is the base class for all named ROOT classes.
 
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
 
The most important graphics class in the ROOT system.
 
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
 
void SetBorderMode(Short_t bordermode) override
 
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
 
A TTree represents a columnar dataset.
 
Double_t Sqrt(Double_t x)
Returns the square root of x.