10 #define ProofFriends_cxx
23 ProofFriends::ProofFriends()
36 void ProofFriends::Begin(TTree * )
42 TString option = GetOption();
44 TNamed *out = (TNamed *) fInput->FindObject(
"PROOF_DONT_PLOT");
45 if (out) fPlot = kFALSE;
46 out = (TNamed *) fInput->FindObject(
"PROOF_NO_FRIENDS");
47 if (out) fDoFriends = kFALSE;
51 void ProofFriends::SlaveBegin(TTree * )
57 TString option = GetOption();
59 TNamed *out = (TNamed *) fInput->FindObject(
"PROOF_NO_FRIENDS");
60 if (out) fDoFriends = kFALSE;
63 fXY =
new TH2F(
"histo1",
"y:x", 50, 5., 15., 50, 10., 30.);
64 fZ =
new TH1F(
"histo2",
"z , sqrt(dx*dx+dy*dy) < 1", 50, 0., 5.);
65 fZ->SetFillColor(kBlue);
69 fR =
new TH1F(
"histo3",
"Tfrnd.r , sqrt(dx*dx+dy*dy) < 1, z < 1", 50, 5., 15.);
70 fRZ =
new TH2F(
"histo4",
"Tfrnd.r:z , sqrt(dx*dx+dy*dy) < 1, z < 1", 50, 0., 1., 50, 5., 15.);
71 fR->SetFillColor(kRed);
78 Bool_t ProofFriends::Process(Long64_t entry)
100 b_y->GetEntry(entry);
104 Double_t xpy = TMath::Sqrt(dx*dx + dy*dy);
105 if (xpy > 1.)
return kFALSE;
108 b_z->GetEntry(entry);
110 if (z > 1.)
return kFALSE;
114 b_r->GetEntry(entry);
123 void ProofFriends::SlaveTerminate()
132 void ProofFriends::Terminate()
140 gStyle->SetOptStat(1110);
142 TCanvas *c1 =
new TCanvas(
"c1",
"Proof ProofFriends canvas",200,10,700,700);
144 Int_t cb = TColor::GetColor(
"#ccffff");
145 c1->SetFillColor(cb);
146 c1->SetBorderMode(0);
150 Int_t cf = TColor::GetColor(
"#99cccc");
152 if ((fXY = dynamic_cast<TH2F *>(fOutput->FindObject(
"histo1")))) {
153 p1 = (TPad *) c1->cd(1);
154 p1->SetBorderMode(0);
155 p1->SetFrameFillColor(cf);
156 fXY->GetXaxis()->SetTitle(
"x");
157 fXY->GetYaxis()->SetTitle(
"y");
161 if ((fZ = dynamic_cast<TH1F *>(fOutput->FindObject(
"histo2")))) {
162 p1 = (TPad *) c1->cd(2);
163 p1->SetBorderMode(0);
164 p1->SetFrameFillColor(cf);
165 fZ->GetXaxis()->SetTitle(
"z");
166 fZ->GetYaxis()->SetTitle(
"N / 0.1");
172 if ((fR = dynamic_cast<TH1F *>(fOutput->FindObject(
"histo3")))) {
173 p1 = (TPad *) c1->cd(3);
174 p1->SetBorderMode(0);
175 p1->SetFrameFillColor(cf);
176 fR->GetXaxis()->SetTitle(
"Tfrnd.r");
177 fR->GetYaxis()->SetTitle(
"N / 0.2");
181 if ((fRZ = dynamic_cast<TH2F *>(fOutput->FindObject(
"histo4")))) {
182 p1 = (TPad *) c1->cd(4);
183 p1->SetBorderMode(0);
184 p1->SetFrameFillColor(cf);
185 fRZ->GetXaxis()->SetTitle(
"z");
186 fRZ->GetXaxis()->CenterTitle(1);
187 fRZ->GetXaxis()->SetTitleOffset(1.5);
188 fRZ->GetYaxis()->SetTitle(
"Tfrnd.r");
189 fRZ->GetYaxis()->CenterTitle(1);
190 fRZ->GetYaxis()->SetTitleOffset(1.75);
191 fRZ->GetZaxis()->SetTitle(
"N / 0.1 / 0.2");
192 fRZ->GetZaxis()->SetTitleOffset(1.25);