OOTResult

OOTSummary

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
#ifndef DPGAnalysis_SiStripTools_OOTMultiplicityPlotMacros_h
#define DPGAnalysis_SiStripTools_OOTMultiplicityPlotMacros_h

#include "TH1F.h"

class TH1F;
class TFile;
class OOTResult;
class OOTSummary;

OOTSummary* ComputeOOTFractionvsRun(TFile* ff,
                                    const char* itmodule,
                                    const char* ootmodule,
                                    const char* etmodule,
                                    const char* hname,
                                    OOTSummary* ootsumm = nullptr);
OOTSummary* ComputeOOTFractionvsFill(TFile* ff,
                                     const char* itmodule,
                                     const char* ootmodule,
                                     const char* etmodule,
                                     const char* hname,
                                     OOTSummary* ootsumm = nullptr);
OOTResult* ComputeOOTFraction(TFile* ff,
                              const char* itmodule,
                              const char* ootmodule,
                              const char* etmodule,
                              const int run,
                              const char* hname,
                              const bool& perFill = false);
std::vector<int> FillingScheme(TFile* ff, const char* path, const float thr = 0.);
std::vector<int> FillingSchemeFromProfile(TFile* ff, const char* path, const char* hname, const float thr = 0.);

class OOTResult {
public:
  TH1F* hratio;
  float ootfrac;
  float ootfracerr;
  float ootfracsum;
  float ootfracsumerr;
  int ngoodbx;
  int nfilledbx;
  OOTResult()
      : hratio(nullptr), ootfrac(-1.), ootfracerr(0.), ootfracsum(-1.), ootfracsumerr(0.), ngoodbx(0), nfilledbx(0) {}
  ~OOTResult() { delete hratio; }
};

class OOTSummary {
public:
  TH1F* hootfrac;
  TH1F* hootfracsum;
  TH1F* hngoodbx;
  OOTSummary() {
    hootfrac = new TH1F("ootfrac", "OOT fraction vs fill/run", 10, 0., 10.);
    hootfrac->SetCanExtend(TH1::kXaxis);

    hootfracsum = new TH1F("ootfracsum", "OOT summed fraction vs fill/run", 10, 0., 10.);
    hootfracsum->SetCanExtend(TH1::kXaxis);

    hngoodbx = new TH1F("ngoodbx", "Number of good BX pairs vs fill/run", 10, 0., 10.);
    hngoodbx->SetCanExtend(TH1::kXaxis);
  }
  ~OOTSummary() {
    delete hootfrac;
    delete hootfracsum;
    delete hngoodbx;
  }
};

#endif  // DPGAnalysis_SiStripTools_OOTMultiplicityPlotMacros_h