123 printf(
"Starting (begin) h1analysis with process option: %s\n",option.
Data());
128 if (fChain) fChain->SetEntryList(0);
129 delete gDirectory->GetList()->FindObject(
"elist");
134 elist =
new TEntryList(
"elist",
"H1 selection from Cut");
137 fInput->Add(
new TNamed(
"fillList",
""));
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);
189 if ((elist = (
TEntryList *) fInput->FindObject(
"elist")))
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);
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 void SetDirectory(TDirectory *dir)
Add reference to directory dir. dir can be 0.
virtual Bool_t Enter(Long64_t entry, TTree *tree=0)
Add entry #entry to the list.
virtual void SetParameters(const Double_t *params)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
1-D histogram with a double per channel (see TH1 documentation)}
1-D histogram with a float per channel (see TH1 documentation)}
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
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.
TList * GetListOfFunctions() const
virtual void Draw(Option_t *option="")
Draw this histogram with options.
2-D histogram with a float per channel (see TH1 documentation)}
Int_t Fill(Double_t)
Invalid Fill method.
virtual void FitSlicesX(TF1 *f1=0, Int_t firstybin=0, Int_t lastybin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=0)
Project slices along X in case of a 2-D histogram, then fit each slice with function f1 and make a hi...
Use the TLine constructor to create a simple line.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual Int_t Write(const char *name=0, 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.
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
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)