114void h1analysisProxy_Begin(
TTree *tree)
123 printf(
"Starting (begin) h1analysis with process option: %s\n",
option.Data());
128 if (fChain) fChain->SetEntryList(0);
129 delete gDirectory->GetList()->FindObject(
"elist");
132 if (
option.Contains(
"fillList")) {
134 elist =
new TEntryList(
"elist",
"H1 selection from Cut");
137 fInput->Add(
new TNamed(
"fillList",
""));
143 if (
option.Contains(
"useList")) {
146 tree->SetEntryList(elist);
152 Warning(
"Begin",
"option 'useList' not supported in PROOF - ignoring");
153 Warning(
"Begin",
"the entry list must be set on the chain *before* calling Process");
159void h1analysisProxy_SlaveBegin(
TTree *tree)
171 printf(
"Starting (slave) h1analysis with process option: %s\n",
option.Data());
174 hdmd =
new TH1F(
"hdmd",
"dm_d",40,0.13,0.17);
175 h2 =
new TH2F(
"h2",
"ptD0 vs dm_d",30,0.135,0.165,30,-3,6);
185 if (
option.Contains(
"fillList")) {
189 if ((elist = (
TEntryList *) fInput->FindObject(
"elist")))
200 if (
option.Contains(
"useList")) {
205 if (tree)
tree->SetEntryList(elist);
208 Warning(
"Begin",
"option 'useList' not supported in PROOF - ignoring");
209 Warning(
"Begin",
"the entry list must be set on the chain *before* calling Process");
229 float f2 = md0_d-1.8646;
231 if (
gDebug>0) fprintf(stderr,
"entry #%lld f1=%f f2=%f test=%d\n",
232 fChain->GetReadEntry(),
f1,f2,test);
235 if (ptds_d <= 2.5)
return kFALSE;
243 test = nhitrp[cik]*nhitrp[cipi] <= 1;
244 if (
gDebug>0) fprintf(stderr,
"entry #%lld f1=%f f2=%f test=%d\n",
245 fChain->GetReadEntry(),
f1,f2,test);
247 if (nhitrp[cik]*nhitrp[cipi] <= 1)
return kFALSE;
248 if (rend[cik] -rstart[cik] <= 22)
return kFALSE;
249 if (rend[cipi]-rstart[cipi] <= 22)
return kFALSE;
250 if (nlhk[cik] <= 0.1)
return kFALSE;
251 if (nlhpi[cipi] <= 0.1)
return kFALSE;
253 if (nlhpi[ipis-1] <= 0.1)
return kFALSE;
254 if (njets < 1)
return kFALSE;
258 if (fillList) elist->
Enter(entry);
262 h2->Fill(dm_d,rpd0_t/0.029979*1.8646/ptd0_d);
269void h1analysisProxy_SlaveTerminate()
272 printf(
"Terminate (slave) h1analysis\n");
276void h1analysisProxy_Terminate()
278 printf(
"Terminate (final) h1analysis\n");
282 hdmd =
dynamic_cast<TH1F*
>(fOutput->FindObject(
"hdmd"));
283 h2 =
dynamic_cast<TH2F*
>(fOutput->FindObject(
"h2"));
285 if (hdmd == 0 || h2 == 0) {
286 Error(
"Terminate",
"hdmd = %p , h2 = %p", hdmd, h2);
293 c1->SetBottomMargin(0.15);
300 hdmd->
Fit(
"f5",
"lr");
307 c2->SetBottomMargin(0.15);
315 h2->FitSlicesX(f2,0,-1,1,
"qln");
332 elist =
dynamic_cast<TEntryList*
>(fOutput->FindObject(
"elist"));
334 TFile efile(
"elist.root",
"recreate");
337 Error(
"Terminate",
"entry list requested but not found in output");
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TStyle * gStyle
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
A List of entry numbers in a TTree or TChain.
virtual bool Enter(Long64_t entry, TTree *tree=nullptr)
Add entry #entry to the list.
virtual void SetDirectory(TDirectory *dir)
Add reference to directory dir. dir can be 0.
virtual void SetParameters(const Double_t *params)
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
1-D histogram with a double per channel (see TH1 documentation)
1-D histogram with a float per channel (see TH1 documentation)
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
void Draw(Option_t *option="") override
Draw this histogram with options.
TList * GetListOfFunctions() const
2-D histogram with a float per channel (see TH1 documentation)
Use the TLine constructor to create a simple line.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
The TNamed class is the base class for all named ROOT classes.
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The histogram statistics painter class.
void SetOptStat(Int_t stat=1)
Set the stat option.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
A TTree represents a columnar dataset.
Double_t fdm5(Double_t *xx, Double_t *par)
Double_t fdm2(Double_t *xx, Double_t *par)
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.