Ignore:
Timestamp:
04/24/03 08:49:09 (22 years ago)
Author:
stamerra
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhistmc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.cc

    r1992 r1997  
    9393    fTitle = title ? title : "Trigger L2 image parameters";
    9494
    95     hfLutPseudoSize  = new TH1F("hfLutPseudoSize",  "number of compact pixels in one lut",                13,   0, 12);
    96     hfPseudoSize     = new TH1F("hfPseudoSize",   "Multiplicity of the cluster identified by the L2T",    13,   0, 12);
    97     hfSizeBiggerCell  = new TH1F("hfSizeBiggerCell",   "Number of fired pixel in bigger cell",            37,   0, 36);
    98 
    99     hfLutPseudoSizeNorm  = new TH1F("hfLutPseudoSizeNorm",  "Normalized Number of compact pixels in one lut",                13,   0, 12);
    100     hfPseudoSizeNorm     = new TH1F("hfPseudoSizeNorm",   "Normalized Multiplicity of the cluster identified by the L2T",    13,   0, 12);
    101     hfSizeBiggerCellNorm  = new TH1F("hfSizeBiggerCellNorm",   "Normalized Number of fired pixel in bigger cell",            37,   0, 36);
    102 
    103     hfLutPseudoSize->SetDirectory(NULL);
    104     hfLutPseudoSizeNorm->SetDirectory(NULL);
    105     hfPseudoSize->SetDirectory(NULL);
    106     hfPseudoSizeNorm->SetDirectory(NULL);
    107     hfSizeBiggerCell->SetDirectory(NULL);
    108     hfSizeBiggerCellNorm->SetDirectory(NULL);
    109 
    110     hfLutPseudoSize->SetXTitle("Number of Pixels");
    111     hfLutPseudoSizeNorm->SetXTitle("Number of Pixels");
    112     hfPseudoSize->SetXTitle("Number of Pixels");
    113     hfPseudoSizeNorm->SetXTitle("Number of Pixels");
    114     hfSizeBiggerCell->SetXTitle("Number of Pixels");
    115     hfSizeBiggerCellNorm->SetXTitle("Number of Pixels");
    116 
    117     hfLutPseudoSize->SetYTitle("Counts");
    118     hfLutPseudoSizeNorm->SetYTitle("Counts/Total Counts");
    119     hfPseudoSize->SetYTitle("Counts");
    120     hfPseudoSizeNorm->SetYTitle("Counts/Total Counts");
    121     hfSizeBiggerCell->SetYTitle("Counts");
    122     hfSizeBiggerCellNorm->SetYTitle("Counts/Total Counts");
    123 
    124     f1 = new TF1("FNorm", "1", -1, 40);
     95    fHistLutPseudoSize  = new TH1F("fHistLutPseudoSize",  "number of compact pixels in one lut",                13,   0, 12);
     96    fHistPseudoSize     = new TH1F("fHistPseudoSize",   "Multiplicity of the cluster identified by the L2T",    41,   0, 40);
     97    fHistSizeBiggerCell  = new TH1F("fHistSizeBiggerCell",   "Number of fired pixel in bigger cell",            37,   0, 36);
     98
     99    fHistLutPseudoSizeNorm  = new TH1F("fHistLutPseudoSizeNorm",  "Normalized Number of compact pixels in one lut",                13,   0, 12);
     100    fHistPseudoSizeNorm     = new TH1F("fHistPseudoSizeNorm",   "Normalized Multiplicity of the cluster identified by the L2T",    41,   0, 40);
     101    fHistSizeBiggerCellNorm  = new TH1F("fHistSizeBiggerCellNorm",   "Normalized Number of fired pixel in bigger cell",            37,   0, 36);
     102
     103    fHistLutPseudoSize->SetDirectory(NULL);
     104    fHistLutPseudoSizeNorm->SetDirectory(NULL);
     105    fHistPseudoSize->SetDirectory(NULL);
     106    fHistPseudoSizeNorm->SetDirectory(NULL);
     107    fHistSizeBiggerCell->SetDirectory(NULL);
     108    fHistSizeBiggerCellNorm->SetDirectory(NULL);
     109
     110    fHistLutPseudoSize->SetXTitle("Number of Pixels");
     111    fHistLutPseudoSizeNorm->SetXTitle("Number of Pixels");
     112    fHistPseudoSize->SetXTitle("Number of Pixels");
     113    fHistPseudoSizeNorm->SetXTitle("Number of Pixels");
     114    fHistSizeBiggerCell->SetXTitle("Number of Pixels");
     115    fHistSizeBiggerCellNorm->SetXTitle("Number of Pixels");
     116
     117    fHistLutPseudoSize->SetYTitle("Counts");
     118    fHistLutPseudoSizeNorm->SetYTitle("Counts/Total Counts");
     119    fHistPseudoSize->SetYTitle("Counts");
     120    fHistPseudoSizeNorm->SetYTitle("Counts/Total Counts");
     121    fHistSizeBiggerCell->SetYTitle("Counts");
     122    fHistSizeBiggerCellNorm->SetYTitle("Counts/Total Counts");
     123
     124    fFNorm = new TF1("FNorm", "1", -1, 40);
    125125}
    126126
     
    131131MHMcTriggerLvl2::~MHMcTriggerLvl2()
    132132{
    133     delete hfLutPseudoSize;
    134     delete hfPseudoSize;
    135     delete hfSizeBiggerCell;
     133    delete fHistLutPseudoSize;
     134    delete fHistPseudoSize;
     135    delete fHistSizeBiggerCell;
     136    delete fHistLutPseudoSizeNorm;
     137    delete fHistPseudoSizeNorm;
     138    delete fHistSizeBiggerCellNorm;
     139
     140    delete fFNorm;
    136141}
    137142
     
    145150  const MMcTriggerLvl2 &h = *(MMcTriggerLvl2 *)par;
    146151 
    147   hfLutPseudoSize->Fill(h.GetLutPseudoSize());
    148   hfPseudoSize->Fill(h.GetPseudoSize());
    149   hfSizeBiggerCell->Fill(h.GetSizeBiggerCell());
     152  fHistLutPseudoSize->Fill(h.GetLutPseudoSize());
     153  fHistPseudoSize->Fill(h.GetPseudoSize());
     154  fHistSizeBiggerCell->Fill(h.GetSizeBiggerCell());
    150155
    151156  return kTRUE;
     
    212217    }
    213218
    214     TH1 *hist=NormalizeHist(hfLutPseudoSizeNorm, hfLutPseudoSize);
     219    TH1 *hist=NormalizeHist(fHistLutPseudoSizeNorm, fHistLutPseudoSize);
    215220
    216221    if (!hist)
     
    218223
    219224    if (str.Contains("lps",TString::kIgnoreCase))
    220         return DrawHist(*hfLutPseudoSize, *hist, "CanvasLPS", fColorLps);
     225        return DrawHist(*fHistLutPseudoSize, *hist, "CanvasLPS", fColorLps);
    221226
    222227    if (str.Contains("sbc",TString::kIgnoreCase))
    223         return DrawHist(*hfSizeBiggerCell, *hist, "CanvasSBC", fColorSbc);
     228        return DrawHist(*fHistSizeBiggerCell, *hist, "CanvasSBC", fColorSbc);
    224229
    225230    if (str.Contains("ps",TString::kIgnoreCase))
    226         return DrawHist(*hfPseudoSize, *hist, "CanvasPS", fColorPs);
     231        return DrawHist(*fHistPseudoSize, *hist, "CanvasPS", fColorPs);
    227232
    228233    return NULL;
     
    249254 
    250255  pad1->cd();
    251   hfLutPseudoSize->Draw();
     256  fHistLutPseudoSize->Draw();
    252257 
    253258  pad2->cd();
    254   hfSizeBiggerCell->Draw();
     259  fHistSizeBiggerCell->Draw();
    255260 
    256261  pad3->cd();
    257   hfPseudoSize->Draw();
     262  fHistPseudoSize->Draw();
    258263}
    259264
     
    266271TH1 *MHMcTriggerLvl2::GetHistByName(const TString name)
    267272{
    268     if (name.Contains("hfLutPseudoSize", TString::kIgnoreCase))
    269       return hfLutPseudoSize;
    270     if (name.Contains("hfSizeBiggerCell", TString::kIgnoreCase))
    271         return hfSizeBiggerCell;
    272     if (name.Contains("hfPseudoSize", TString::kIgnoreCase))
    273         return hfPseudoSize;
    274 
    275     if (name.Contains("hfLutPseudoSizeNorm", TString::kIgnoreCase))
    276       return hfLutPseudoSizeNorm;
    277     if (name.Contains("hfSizeBiggerCellNorm", TString::kIgnoreCase))
    278         return hfSizeBiggerCellNorm;
    279     if (name.Contains("hfPseudoSizeNorm", TString::kIgnoreCase))
    280         return hfPseudoSizeNorm;
     273    if (name.Contains("fHistLutPseudoSize", TString::kIgnoreCase))
     274      return fHistLutPseudoSize;
     275    if (name.Contains("fHistSizeBiggerCell", TString::kIgnoreCase))
     276        return fHistSizeBiggerCell;
     277    if (name.Contains("fHistPseudoSize", TString::kIgnoreCase))
     278        return fHistPseudoSize;
     279
     280    if (name.Contains("fHistLutPseudoSizeNorm", TString::kIgnoreCase))
     281      return fHistLutPseudoSizeNorm;
     282    if (name.Contains("fHistSizeBiggerCellNorm", TString::kIgnoreCase))
     283        return fHistSizeBiggerCellNorm;
     284    if (name.Contains("fHistPseudoSizeNorm", TString::kIgnoreCase))
     285        return fHistPseudoSizeNorm;
    281286
    282287    return NULL;
     
    306311  histNorm->Reset("ICE");
    307312  histNorm->Add(hist, 1);
    308   histNorm->Divide(f1, (Double_t)(hist->Integral()));
     313  histNorm->Divide(fFNorm, (Double_t)(hist->Integral()));
    309314
    310315  return histNorm;
  • trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.h

    r1992 r1997  
    1717private:
    1818
    19     TH1F *hfLutPseudoSize;        // Histogram of fLutPseudoSize
    20     TH1F *hfLutPseudoSizeNorm;    // Histogram of fLutPseudoSize normalized on integral of distribution
    21     TH1F *hfPseudoSize;           // Histogram of fPseudoSize
    22     TH1F *hfPseudoSizeNorm;       // Histogram of fPseudoSize normalized on integral of distribution
    23     TH1F *hfSizeBiggerCell;       // Histogram of fSizeBiggerCell
    24     TH1F *hfSizeBiggerCellNorm;   // Histogram of fSizeBiggerCell normalized on integral of distribution
     19    TH1F *fHistLutPseudoSize;        // Histogram of fLutPseudoSize
     20    TH1F *fHistLutPseudoSizeNorm;    // Histogram of fLutPseudoSize normalized on integral of distribution
     21    TH1F *fHistPseudoSize;           // Histogram of fPseudoSize
     22    TH1F *fHistPseudoSizeNorm;       // Histogram of fPseudoSize normalized on integral of distribution
     23    TH1F *fHistSizeBiggerCell;       // Histogram of fSizeBiggerCell
     24    TH1F *fHistSizeBiggerCellNorm;   // Histogram of fSizeBiggerCell normalized on integral of distribution
    2525
    26     TF1* f1;                      // Function used to normalize histograms
     26    TF1* fFNorm;                      // Function used to normalize histograms
    2727
    2828    static Int_t fColorLps;
     
    3838    TH1 *GetHistByName(const TString name);
    3939
    40     TH1F *GetHistfLutPseudoSize() const { return hfLutPseudoSize; }
    41     TH1F *GetHistfLutPseudoSizeNorm() const { return hfLutPseudoSizeNorm; }
    42     TH1F *GetHistfPseudoSize()  const { return hfPseudoSize; }
    43     TH1F *GetHistfPseudoSizeNorm()  const { return hfPseudoSizeNorm; }
    44     TH1F *GetHistfSizeBiggerCell()  const { return hfSizeBiggerCell; }
    45     TH1F *GetHistfSizeBiggerCellNorm()  const { return hfSizeBiggerCellNorm; }
     40    TH1F *GetHistfLutPseudoSize() const { return fHistLutPseudoSize; }
     41    TH1F *GetHistfLutPseudoSizeNorm() const { return fHistLutPseudoSizeNorm; }
     42    TH1F *GetHistfPseudoSize()  const { return fHistPseudoSize; }
     43    TH1F *GetHistfPseudoSizeNorm()  const { return fHistPseudoSizeNorm; }
     44    TH1F *GetHistfSizeBiggerCell()  const { return fHistSizeBiggerCell; }
     45    TH1F *GetHistfSizeBiggerCellNorm()  const { return fHistSizeBiggerCellNorm; }
    4646
    4747    void Draw(Option_t *opt=NULL);
Note: See TracChangeset for help on using the changeset viewer.