115void h1analysisProxy_Begin(
TTree *tree)
124 printf(
"Starting (begin) h1analysis with process option: %s\n",option.
Data());
129 if (fChain) fChain->SetEntryList(0);
130 delete gDirectory->GetList()->FindObject(
"elist");
135 elist =
new TEntryList(
"elist",
"H1 selection from Cut");
138 fInput->Add(
new TNamed(
"fillList",
""));
153 Warning(
"Begin",
"option 'useList' not supported in PROOF - ignoring");
154 Warning(
"Begin",
"the entry list must be set on the chain *before* calling Process");
160void h1analysisProxy_SlaveBegin(
TTree *tree)
172 printf(
"Starting (slave) h1analysis with process option: %s\n",option.
Data());
175 hdmd =
new TH1F(
"hdmd",
"dm_d",40,0.13,0.17);
176 h2 =
new TH2F(
"h2",
"ptD0 vs dm_d",30,0.135,0.165,30,-3,6);
190 if ((elist = (
TEntryList *) fInput->FindObject(
"elist")))
209 Warning(
"Begin",
"option 'useList' not supported in PROOF - ignoring");
210 Warning(
"Begin",
"the entry list must be set on the chain *before* calling Process");
230 float f2 = md0_d-1.8646;
232 if (
gDebug>0) fprintf(stderr,
"entry #%lld f1=%f f2=%f test=%d\n",
233 fChain->GetReadEntry(),
f1,f2,test);
236 if (ptds_d <= 2.5)
return kFALSE;
244 test = nhitrp[cik]*nhitrp[cipi] <= 1;
245 if (
gDebug>0) fprintf(stderr,
"entry #%lld f1=%f f2=%f test=%d\n",
246 fChain->GetReadEntry(),
f1,f2,test);
248 if (nhitrp[cik]*nhitrp[cipi] <= 1)
return kFALSE;
249 if (rend[cik] -rstart[cik] <= 22)
return kFALSE;
250 if (rend[cipi]-rstart[cipi] <= 22)
return kFALSE;
251 if (nlhk[cik] <= 0.1)
return kFALSE;
252 if (nlhpi[cipi] <= 0.1)
return kFALSE;
254 if (nlhpi[ipis-1] <= 0.1)
return kFALSE;
255 if (njets < 1)
return kFALSE;
259 if (fillList) elist->
Enter(entry);
263 h2->
Fill(dm_d,rpd0_t/0.029979*1.8646/ptd0_d);
270void h1analysisProxy_SlaveTerminate()
273 printf(
"Terminate (slave) h1analysis\n");
277void h1analysisProxy_Terminate()
279 printf(
"Terminate (final) h1analysis\n");
283 hdmd =
dynamic_cast<TH1F*
>(fOutput->FindObject(
"hdmd"));
284 h2 =
dynamic_cast<TH2F*
>(fOutput->FindObject(
"h2"));
286 if (hdmd == 0 || h2 == 0) {
287 Error(
"Terminate",
"hdmd = %p , h2 = %p", hdmd, h2);
294 c1->SetBottomMargin(0.15);
301 hdmd->
Fit(
"f5",
"lr");
308 c2->SetBottomMargin(0.15);
333 elist =
dynamic_cast<TEntryList*
>(fOutput->FindObject(
"elist"));
335 TFile efile(
"elist.root",
"recreate");
338 Error(
"Terminate",
"entry list requested but not found in output");
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
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.
virtual bool Enter(Long64_t entry, TTree *tree=nullptr)
virtual void SetDirectory(TDirectory *dir)
virtual void SetParameters(const Double_t *params)
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
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)
Int_t Fill(Double_t) override
Invalid Fill method.
virtual void FitSlicesX(TF1 *f1=nullptr, Int_t firstybin=0, Int_t lastybin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=nullptr)
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.
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.
void SetOptStat(Int_t stat=1)
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A TTree represents a columnar dataset.
virtual void SetEntryList(TEntryList *list, Option_t *opt="")
Set an EntryList.
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.