MINT2
DalitzHistoSet.cpp
Go to the documentation of this file.
1 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2 // status: Mon 9 Feb 2009 19:17:58 GMT
3 #include "Mint/DalitzHistoSet.h"
4 
5 #include "Mint/AllPossibleSij.h"
6 #include "Mint/IDalitzEvent.h"
7 #include "Mint/NamedParameter.h"
8 
9 #include "TTree.h"
10 #include "TFile.h"
11 #include "TLegend.h"
12 
13 #include <sys/types.h>
14 #include <sys/stat.h>
15 
16 #include <fstream>
17 
18 using namespace std;
19 using namespace MINT;
20 
22 {
23  //TH1::AddDirectory(kFALSE);
24  makeName();
25 }
26 
28  : PolymorphMap( other )
29 {
30  //TH1::AddDirectory(kFALSE);
31  makeName();
32 }
33 
35 
36 }
37 
39 
40  int nDaughters = pat.numDaughters();
41  AllPossibleSij sijList(nDaughters);
42 
43  for(namedVMap::const_iterator it = sijList.begin();
44  it != sijList.end(); it++){
45  DalitzHistogram h(it->second, pat);
46  (*this)[it->second] = h;
47  }
48 
49  return;
50 }
51 
52 void DalitzHistoSet::add(const DalitzHistogram& histo, double weight){
53  (*this)[histo.coord()].add(histo, weight);
54  return;
55 }
56 void DalitzHistoSet::add(const DalitzHistoSet& hL, double weight){
57  for(std::map< DalitzCoordSet, DalitzHistogram>::const_iterator it = hL.begin();
58  it != hL.end();
59  it++){
60  this->add(it->second, weight);
61  }
62  return;
63 }
65  (*this)[histo.coord()].multiply(histo);
66  return;
67 }
69  for(map< DalitzCoordSet, DalitzHistogram>::const_iterator it = hL.begin();
70  it != hL.end();
71  it++){
72  this->multiply(it->second);
73  }
74  return;
75 }
77  (*this)[histo.coord()].divide(histo);
78  return;
79 }
81  for(map< DalitzCoordSet, DalitzHistogram>::const_iterator it = hL.begin();
82  it != hL.end();
83  it++){
84  this->divide(it->second);
85  }
86  return;
87 }
88 
89 void DalitzHistoSet::addEvent(const IDalitzEvent& evt, double weight){
90  int ndgtr(evt.eventPattern().numDaughters());
91  if(this->empty() && ndgtr > 2) makeHistograms(evt.eventPattern());
92 
93  for(map< DalitzCoordSet, DalitzHistogram>::iterator
94  it = this->begin();
95  it != this->end();
96  it++){
97  it->second.addEvent(evt, weight);
98  }
99  return;
100 }
101 
102 void DalitzHistoSet::scale(double sf){
103  if(this->empty()) return;
104  for(map< DalitzCoordSet, DalitzHistogram>::iterator
105  it = this->begin();
106  it != this->end();
107  it++){
108  it->second.scale(sf);
109  }
110  return;
111 }
112 
114  if(this->empty()) return;
115  for(map< DalitzCoordSet, DalitzHistogram>::iterator
116  it = this->begin();
117  it != this->end();
118  it++){
119  it->second.setNormFactor(sf);
120  }
121  return;
122 }
123 
124 void DalitzHistoSet::setTitle(const std::string& title){
125  if(this->empty()) return;
126  for(map< DalitzCoordSet, DalitzHistogram>::iterator
127  it = this->begin();
128  it != this->end();
129  it++){
130  it->second.setTitle(title);
131  }
132  return;
133 }
134 void DalitzHistoSet::setFillColour(Color_t fcolor){
135  if(this->empty()) return;
136  for(map< DalitzCoordSet, DalitzHistogram>::iterator
137  it = this->begin();
138  it != this->end();
139  it++){
140  it->second.histo()->SetFillColor(fcolor);
141  }
142  return;
143 }
144 void DalitzHistoSet::setLineColour(Color_t fcolor){
145  if(this->empty()) return;
146  for(map< DalitzCoordSet, DalitzHistogram>::iterator
147  it = this->begin();
148  it != this->end();
149  it++){
150  it->second.histo()->SetLineColor(fcolor);
151  it->second.histo()->SetLineWidth(2);
152  }
153  return;
154 }
155 
156 
157 
159  if(this->empty()) return;
160  for(map< DalitzCoordSet, DalitzHistogram>::iterator
161  it = this->begin();
162  it != this->end();
163  it++){
164  it->second.clearHisto();
165  }
166  return;
167 }
168 
169 const std::string& DalitzHistoSet::makeName(){
170  _name = "DalitzHistoSet";
171  return _name;
172 }
173 
174 const std::string& DalitzHistoSet::name() const{
175  return _name;
176 }
177 
178 const std::string& DalitzHistoSet::dirName() const{
179  return _name;
180 }
181 
182 bool DalitzHistoSet::save(const std::string& filename) const{
183  TFile* f = TFile::Open(filename.c_str(), "RECREATE");
184  f->cd();
185  for(map< DalitzCoordSet, DalitzHistogram>::const_iterator
186  it = this->begin();
187  it != this->end();
188  it++){
189  if(0 == it->second.histo()) continue;
190  it->second.histo()->Write();
191  }
192  f->Close();
193  return true;
194 }
195 
196 bool DalitzHistoSet::makeDirectory(const std::string& asSubdirOf)const{
197  /*
198  A mode is created from or'd permission bit masks defined
199  in <sys/stat.h>:
200  #define S_IRWXU 0000700 RWX mask for owner
201  #define S_IRUSR 0000400 R for owner
202  #define S_IWUSR 0000200 W for owner
203  #define S_IXUSR 0000100 X for owner
204 
205  #define S_IRWXG 0000070 RWX mask for group
206  #define S_IRGRP 0000040 R for group
207  #define S_IWGRP 0000020 W for group
208  #define S_IXGRP 0000010 X for group
209 
210  #define S_IRWXO 0000007 RWX mask for other
211  #define S_IROTH 0000004 R for other
212  #define S_IWOTH 0000002 W for other
213  #define S_IXOTH 0000001 X for other
214 
215  #define S_ISUID 0004000 set user id on execution
216  #define S_ISGID 0002000 set group id on execution
217  #define S_ISVTX 0001000 save swapped text even after use
218  */
219 
220  mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO
221  | S_ISUID | S_ISGID;
222  // see above for meaning. I want everybody to be allowed to read/write/exec.
223  // Not sure about the last two bits.
224 
225  int zeroForSuccess = 0;
226  zeroForSuccess |= mkdir( (asSubdirOf ).c_str(), mode );
227  zeroForSuccess |= mkdir( (asSubdirOf + "/" + dirName() ).c_str(), mode );
228  return (0 == zeroForSuccess);
229 }
230 
231 std::string DalitzHistoSet::fullDirListFname(const std::string&
232  asSubdirOf) const{
233  return asSubdirOf + "/" + dirName() + "/" + "directoryList.txt";
234 }
235 bool DalitzHistoSet::saveAsDir(const std::string& asSubdirOf) const{
236  bool dbThis=true;
237 
238  bool sc=true;
239 
240  if(dbThis) cout << "DalitzHistoSet::saveAsDir: called with "
241  << "asSubdirOf = " << asSubdirOf << endl;
242 
243  makeDirectory(asSubdirOf);
244  std::string dir = asSubdirOf + "/" + dirName();
245 
246  std::vector<std::string> directoryList;
247  for(map< DalitzCoordSet, DalitzHistogram>::const_iterator
248  it = this->begin();
249  it != this->end();
250  it++){
251  if(dbThis) cout << "DalitzHistoSet::saveAsDir: saving DalitzHistogram" << endl;
252  sc &= it->second.saveAsDir(dir);
253  directoryList.push_back(it->second.dirName());
254  }
255 
256  NamedParameter<std::string> dirNames("DirectoryList"
257  , NamedParameterBase::QUIET);
258  dirNames = directoryList;
259 
260  ofstream os( fullDirListFname(asSubdirOf).c_str() );
261  if(os.bad()){
262  cout << "ERROR in DalitzHistoSet::saveAsDir of \n\t" << name()
263  << "\n\t unable to create file: "
264  << "\n\t" << fullDirListFname() << endl;
265  return false;
266  }
267  os << name()
268  << '\n' << dirNames
269  << endl;
270  os.close();
271 
272  if(dbThis){
273  cout << "I've just written this: "
274  << name()
275  << '\n' << dirNames
276  << endl;
277  cout << "to this file: " << fullDirListFname(asSubdirOf) << endl;
278  }
279  return sc;
280 }
281 
282 bool DalitzHistoSet::retrieveFromDir(const std::string& asSubdirOf){
283  bool dbThis=false;
284  bool sc=true;
285 
286  makeDirectory(asSubdirOf);
287  //path = asSubdirOf + "/" + dirName();
288  NamedParameter<std::string> dirNames("DirectoryList"
289  , fullDirListFname(asSubdirOf).c_str()
290  );
291  dirNames.reloadFile(fullDirListFname(asSubdirOf).c_str());
292  std::string path=asSubdirOf + "/" + dirName();
293  for(int i=0; i < dirNames.size(); i++){
294  DalitzHistogram hs;
295  hs.retrieveFromDir( path, dirNames.getVal(i).c_str() );
296  if(dbThis) cout << "hs.pattern()" << hs.pattern() << endl;
297  this->add(hs);
298  }
299  if(dbThis){
300  cout << "after adding:" << endl;
301  for(std::map< DalitzCoordSet, DalitzHistogram>::const_iterator it =
302  this->begin(); it != this->end(); it++){
303  cout << "\n" << it->second.pattern() << endl;
304  }
305 
306  }
307  return sc;
308 }
309 
310 bool DalitzHistoSet::draw(const std::string& baseName
311  , const std::string& drawOpt
312  , const std::string& format
313  ) const{
314  bool sc=true;
315  for(map< DalitzCoordSet, DalitzHistogram>::const_iterator
316  it = this->begin();
317  it != this->end();
318  it++){
319  sc &= it->second.draw(baseName, drawOpt, format);
320  }
321  return sc;
322 }
323 
325  , const std::string& baseName // =""
326  , const std::string& format // ="eps"
327  , const std::string& fitDrawOpt // ="HIST C SAME"
328  ) const{
329  bool sc=true;
330  for(map< DalitzCoordSet, DalitzHistogram>::const_iterator
331  it = this->begin();
332  it != this->end();
333  it++){
334  map< DalitzCoordSet, DalitzHistogram >::const_iterator jt
335  = fit.find(it->first);
336  if(jt == fit.end()) continue;
337  sc &= it->second.drawWithFit(jt->second, baseName, format, fitDrawOpt);
338  }
339  return sc;
340 }
341 
343  DalitzHistoSet& data
344  , DalitzHistoSet& fit
345  , std::vector<DalitzHistoSet>& amps
346  , const std::string& baseName // =""
347  , const std::string& // format // ="eps"
348  , const std::string& // fitDrawOpt // ="HIST C SAME"
349  ) const{
350  bool sc=true;
351  std::vector<DalitzHistoSet>::iterator amps_it;
352 
353  for(map< DalitzCoordSet, DalitzHistogram>::iterator it = data.begin();it != data.end();it++){
354 
355  int counter = 0;
356  TCanvas can;
357 
358  map< DalitzCoordSet, DalitzHistogram >::iterator jt= fit.find(it->first);
359  if(jt == fit.end()) continue;
360  MINT::counted_ptr<TH1> dataHisto = (it->second).getHisto();
361  std::cout << it->first << endl;
362  MINT::counted_ptr<TH1> FitHisto = jt->second.getHisto();
363 
364  TLegend* leg = new TLegend(0.5 //xmin
365  ,0.5 //y-min
366  ,0.98 //x-max
367  ,0.935
368  ,""); //y-max //coordinates are fractions
369 
370  leg->SetTextSize(0.03);
371  if ((it->first).name() == "sij(2,3,4)" ||
372  (it->first).name() == "sij(1,3,4)" ||
373  (it->first).name() == "sij(1,2,4)" ||
374  (it->first).name() == "sij(1,2,3)" )
375  {
376  leg->SetX1(0.1);
377  leg->SetX2(0.4);
378  }
379 
380  TLegend* leg2 = new TLegend(0.,0.,1.,1.,"");
381  leg2->SetLineStyle(0);
382  leg2->SetLineColor(0);
383 
384  (*dataHisto).Scale(1./(*dataHisto).Integral());
385  (*dataHisto).SetMinimum(0.0001);
386  double max = (*dataHisto).GetMaximum();
387  if((*FitHisto).GetMaximum()>max)max= (*FitHisto).GetMaximum();
388  (*dataHisto).SetMaximum(max*1.1);
389  (*dataHisto).SetLineColor(kBlack);
390  (*dataHisto).SetMarkerStyle(20);
391  (*dataHisto).SetMarkerSize(0.6);
392  (*dataHisto).Draw("E");
393 
394  (*FitHisto).SetLineColor(kBlack);
395  (*FitHisto).Draw("HIST C SAME");
396  //leg->AddEntry(&(*FitHisto),"Fit","l"); // "l" means line
397  //leg->AddEntry(&(*dataHisto),"data","lep"); // "l" means line
398 
399  // suppress warning double NEntries = (*FitHisto).GetEntries();
400  (*FitHisto).GetEntries();
401  // suppress warning double NormFactor = (*FitHisto).GetNormFactor();
402  (*FitHisto).GetNormFactor();
403 
405 
406  for (amps_it = amps.begin(); amps_it < amps.end(); amps_it++)
407  {
408  map< DalitzCoordSet, DalitzHistogram >::iterator it2 = (*amps_it).find(it->first);
409 
410  counter++;
411  histo = it2->second.getHisto();
412 
413  if (counter == 9) counter++; //Remove white colour
414  (*histo).SetLineColor(1+counter);
415 
416  const char* title = (*histo).GetTitle();
417  leg->AddEntry(&(*histo),title,"l"); // "l" means line
418  leg2->AddEntry(&(*histo),title,"l"); // "l" means line
419 
420  (*histo).Draw("HIST C SAME");
421  // suppress warning double NormFactorAmp =
422  (*histo).GetNormFactor();
423  }
424 
425  std::string SaveName = it->first.name();
426  TString SaveFull = baseName+SaveName+".eps";
427  TString SaveFullLeg = baseName+SaveName+"_leg.eps";
428  TString SaveFullLog = baseName+SaveName+"_log.eps";
429  TString SaveLeg = baseName+"_leg.eps";
430 
431  SaveFull.ReplaceAll("(","");
432  SaveFull.ReplaceAll(")","");
433  SaveFull.ReplaceAll(",","_");
434  SaveFullLeg.ReplaceAll("(","");
435  SaveFullLeg.ReplaceAll(")","");
436  SaveFullLeg.ReplaceAll(",","_");
437  SaveFullLog.ReplaceAll("(","");
438  SaveFullLog.ReplaceAll(")","");
439  SaveFullLog.ReplaceAll(",","_");
440  SaveLeg.ReplaceAll("(","");
441  SaveLeg.ReplaceAll(")","");
442  SaveLeg.ReplaceAll(",","_");
443 
444  can.Print(SaveFull);
445 
446  gPad->SetLogy(1);
447  can.Print(SaveFullLog);
448  gPad->SetLogy(0);
449 
450  leg->SetFillColor(4000);
451  leg->SetShadowColor(4000);
452  leg->Draw();
453  can.Print(SaveFullLeg);
454 
455  TCanvas c;
456  c.cd();
457  leg2->SetFillColor(4000);
458  leg2->SetShadowColor(4000);
459  leg2->Draw();
460  c.Print(SaveLeg);
461 
462  }
463  return sc;
464 }
465 
467  DalitzHistoSet& data
468  , DalitzHistoSet& fit, DalitzHistoSet& interference
469  , std::vector<DalitzHistoSet>& amps
470  , const std::string& baseName // =""
471  , const std::string& // format // ="eps"
472  , const std::string& // fitDrawOpt // ="HIST C SAME"
473  ) const{
474  bool sc=true;
475  std::vector<DalitzHistoSet>::iterator amps_it;
476 
477  for(map< DalitzCoordSet, DalitzHistogram>::iterator it = data.begin();it != data.end();it++){
478 
479  int counter = 0;
480  TCanvas can;
481 
482  map< DalitzCoordSet, DalitzHistogram >::iterator jt= fit.find(it->first);
483  if(jt == fit.end()) continue;
484  MINT::counted_ptr<TH1> dataHisto = (it->second).getHisto();
485  std::cout << it->first << endl;
486  MINT::counted_ptr<TH1> FitHisto = jt->second.getHisto();
487 
488  map< DalitzCoordSet, DalitzHistogram >::iterator jt_interference = interference.find(it->first);
489  if(jt_interference == interference.end()) continue;
490  MINT::counted_ptr<TH1> interferenceHisto = (jt_interference->second).getHisto();
491 
492 
493  TLegend* leg = new TLegend(0.5 //xmin
494  ,0.5 //y-min
495  ,0.98 //x-max
496  ,0.935
497  ,""); //y-max //coordinates are fractions
498 
499  leg->SetTextSize(0.01);
500  if ((it->first).name() == "sij(2,3,4)" ||
501  (it->first).name() == "sij(1,3,4)" ||
502  (it->first).name() == "sij(1,2,4)" ||
503  (it->first).name() == "sij(1,2,3)" )
504  {
505  leg->SetX1(0.1);
506  leg->SetX2(0.4);
507  }
508 
509  TLegend* leg2 = new TLegend(0.,0.,1.,1.,"");
510  leg2->SetLineStyle(0);
511  leg2->SetLineColor(0);
512 
513  (*dataHisto).Scale(1./(*dataHisto).Integral());
514  double max = (*dataHisto).GetMaximum();
515  if((*FitHisto).GetMaximum()>max)max= (*FitHisto).GetMaximum();
516  (*dataHisto).SetMaximum(max*1.1);
517  (*dataHisto).SetLineColor(kBlack);
518  (*dataHisto).SetMarkerStyle(20);
519  (*dataHisto).SetMarkerSize(0.6);
520  (*dataHisto).Draw("E");
521 
522  (*FitHisto).SetLineColor(kBlack);
523  (*FitHisto).Draw("HIST C SAME");
524  //leg->AddEntry(&(*FitHisto),"Fit","l"); // "l" means line
525  //leg->AddEntry(&(*dataHisto),"data","lep"); // "l" means line
526 
527  (*interferenceHisto).SetLineColor(kBlack);
528  (*interferenceHisto).SetLineStyle(kDashed);
529  (*interferenceHisto).Draw("HIST C SAME");
530  leg->AddEntry(&(*interferenceHisto),"Interference","l");
531  leg2->AddEntry(&(*interferenceHisto),"Interference","l");
532 
533  // suppress warning double NEntries = (*FitHisto).GetEntries();
534  (*FitHisto).GetEntries();
535  // suppress warning double NormFactor = (*FitHisto).GetNormFactor();
536  (*FitHisto).GetNormFactor();
537 
539 
540  for (amps_it = amps.begin(); amps_it < amps.end(); amps_it++)
541  {
542  map< DalitzCoordSet, DalitzHistogram >::iterator it2 = (*amps_it).find(it->first);
543 
544  counter++;
545  histo = it2->second.getHisto();
546 
547  if (counter == 9) counter++; //Remove white colour
548  (*histo).SetLineColor(1+counter);
549 
550  const char* title = (*histo).GetTitle();
551  leg->AddEntry(&(*histo),title,"l"); // "l" means line
552  leg2->AddEntry(&(*histo),title,"l"); // "l" means line
553 
554  (*histo).Draw("HIST C SAME");
555  // suppress warning double NormFactorAmp =
556  (*histo).GetNormFactor();
557  }
558 
559  std::string SaveName = it->first.name();
560  TString SaveFull = baseName+SaveName+".eps";
561  TString SaveFullLeg = baseName+SaveName+"_leg.eps";
562  TString SaveLeg = baseName+"_leg.eps";
563 
564  SaveFull.ReplaceAll("(","");
565  SaveFull.ReplaceAll(")","");
566  SaveFull.ReplaceAll(",","_");
567  SaveFullLeg.ReplaceAll("(","");
568  SaveFullLeg.ReplaceAll(")","");
569  SaveFullLeg.ReplaceAll(",","_");
570  SaveLeg.ReplaceAll("(","");
571  SaveLeg.ReplaceAll(")","");
572  SaveLeg.ReplaceAll(",","_");
573 
574  can.Print(SaveFull);
575 
576  leg->SetFillColor(4000);
577  leg->SetShadowColor(4000);
578  leg->Draw();
579  can.Print(SaveFullLeg);
580 
581  TCanvas c;
582  c.cd();
583  leg2->SetFillColor(4000);
584  leg2->SetShadowColor(4000);
585  leg2->Draw();
586  c.Print(SaveLeg);
587 
588  }
589  return sc;
590 }
591 
593  , const std::string& baseName // =""
594  , const std::string& format // ="eps"
595  , const std::string& fitDrawOpt // ="HIST C SAME"
596  ) const{
597  DalitzHistoSet me(*this);
598  DalitzHistoSet you(fit);
599  if(0 != me.integral()) me /= me.integral();
600  if(0 != you.integral()) you /= you.integral();
601  return me.drawWithFit(you, baseName, format, fitDrawOpt);
602 }
604  if(this->empty()) return 0;
605  return this->begin()->second.integral(); // should all be the same.
606 }
607 // operators
609  this->scale(sf);
610  return *this;
611 }
613  DalitzHistoSet newSet(*this);
614  newSet *= sf;
615  return newSet;
616 }
617 DalitzHistoSet operator*(double sf, const DalitzHistoSet& dhs){
618  DalitzHistoSet newSet(dhs);
619  newSet *= sf;
620  return newSet;
621 }
622 
624  this->scale(1./sf);
625  return *this;
626 }
628  DalitzHistoSet newSet(*this);
629  newSet /= sf;
630  return newSet;
631 }
632 
634  this->add(rhs);
635  return *this;
636 }
638  DalitzHistoSet newSet(*this);
639  newSet += rhs;
640  return newSet;
641 }
643  this->add(rhs, -1.0);
644  return *this;
645 }
647  DalitzHistoSet newSet(*this);
648  newSet -= rhs;
649  return newSet;
650 }
651 
653  this->multiply(rhs);
654  return *this;
655 }
657  DalitzHistoSet newSet(*this);
658  newSet *= rhs;
659  return newSet;
660 }
662  this->divide(rhs);
663  return *this;
664 }
666  DalitzHistoSet newSet(*this);
667  newSet /= rhs;
668  return newSet;
669 }
670 
671 //
virtual int size() const
DalitzHistoSet & operator *=(double sf)
void scale(double sf)
bool drawWithFitNorm(const DalitzHistoSet &fit, const std::string &baseName="", const std::string &format="eps", const std::string &fitDrawOpt="HIST C SAME") const
void setFillColour(Color_t fcolor)
DalitzHistoSet operator *(double sf, const DalitzHistoSet &dhs)
const std::string & name() const
std::string fullDirListFname(const std::string &asSubdirOf=".") const
DalitzHistoSet operator *(double sf) const
std::map< Key, Val >::iterator end()
Definition: PolymorphMap.h:29
void divide(const DalitzHistogram &hL)
void makeHistograms(const DalitzEventPattern &pat)
DalitzHistoSet operator+(const DalitzHistoSet &rhs) const
void multiply(const DalitzHistogram &hL)
std::string _name
bool drawWithFit(const DalitzHistoSet &fit, const std::string &baseName="", const std::string &format="eps", const std::string &fitDrawOpt="HIST C SAME") const
bool retrieveFromDir(const std::string &asSubDirOf=".")
DalitzHistoSet & operator+=(const DalitzHistoSet &rhs)
const DalitzEventPattern & pattern() const
DalitzHistoSet & operator-=(const DalitzHistoSet &rhs)
bool retrieveFromDir(const std::string &asSubdirOf=".", const char *theName=0)
bool draw(const std::string &baseName="", const std::string &drawOpt="", const std::string &format="eps") const
void setLineColour(Color_t fcolor)
void setTitle(const std::string &title)
DalitzHistoSet operator/(double sf) const
const DalitzCoordSet & coord() const
bool drawWithFitAndEachAmps(DalitzHistoSet &data, DalitzHistoSet &fit, std::vector< DalitzHistoSet > &amps, const std::string &baseName="", const std::string &format="eps", const std::string &fitDrawOpt="HIST C SAME") const
DalitzHistoSet operator-(const DalitzHistoSet &rhs) const
virtual const DalitzEventPattern & eventPattern() const =0
bool makeDirectory(const std::string &asSubdirOf) const
void addEvent(const IDalitzEvent &evt, double weight=1)
bool reloadFile(const std::string &id)
std::map< Key, Val >::iterator begin()
Definition: PolymorphMap.h:26
double integral() const
bool drawWithFitAndEachAmpsAndInterference(DalitzHistoSet &data, DalitzHistoSet &fit, DalitzHistoSet &interference, std::vector< DalitzHistoSet > &amps, const std::string &baseName="", const std::string &format="eps", const std::string &fitDrawOpt="HIST C SAME") const
void setNormFactor(double sf=1)
bool saveAsDir(const std::string &asSubdirOf=".") const
std::map< Key, Val >::iterator find(const Key &c)
Definition: PolymorphMap.h:32
virtual ~DalitzHistoSet()
virtual const T & getVal(int i=0) const
DalitzHistoSet & operator/=(double sf)
const std::string & dirName() const
bool save(const std::string &filename="DalitzHistos.root") const
void add(const DalitzHistogram &histo, double weight=1)
const std::string & makeName()