Changeset 1997 for trunk/MagicSoft/Mars/mhistmc
- Timestamp:
- 04/24/03 08:49:09 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhistmc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.cc
r1992 r1997 93 93 fTitle = title ? title : "Trigger L2 image parameters"; 94 94 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 f 1= 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); 125 125 } 126 126 … … 131 131 MHMcTriggerLvl2::~MHMcTriggerLvl2() 132 132 { 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; 136 141 } 137 142 … … 145 150 const MMcTriggerLvl2 &h = *(MMcTriggerLvl2 *)par; 146 151 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()); 150 155 151 156 return kTRUE; … … 212 217 } 213 218 214 TH1 *hist=NormalizeHist( hfLutPseudoSizeNorm, hfLutPseudoSize);219 TH1 *hist=NormalizeHist(fHistLutPseudoSizeNorm, fHistLutPseudoSize); 215 220 216 221 if (!hist) … … 218 223 219 224 if (str.Contains("lps",TString::kIgnoreCase)) 220 return DrawHist(* hfLutPseudoSize, *hist, "CanvasLPS", fColorLps);225 return DrawHist(*fHistLutPseudoSize, *hist, "CanvasLPS", fColorLps); 221 226 222 227 if (str.Contains("sbc",TString::kIgnoreCase)) 223 return DrawHist(* hfSizeBiggerCell, *hist, "CanvasSBC", fColorSbc);228 return DrawHist(*fHistSizeBiggerCell, *hist, "CanvasSBC", fColorSbc); 224 229 225 230 if (str.Contains("ps",TString::kIgnoreCase)) 226 return DrawHist(* hfPseudoSize, *hist, "CanvasPS", fColorPs);231 return DrawHist(*fHistPseudoSize, *hist, "CanvasPS", fColorPs); 227 232 228 233 return NULL; … … 249 254 250 255 pad1->cd(); 251 hfLutPseudoSize->Draw();256 fHistLutPseudoSize->Draw(); 252 257 253 258 pad2->cd(); 254 hfSizeBiggerCell->Draw();259 fHistSizeBiggerCell->Draw(); 255 260 256 261 pad3->cd(); 257 hfPseudoSize->Draw();262 fHistPseudoSize->Draw(); 258 263 } 259 264 … … 266 271 TH1 *MHMcTriggerLvl2::GetHistByName(const TString name) 267 272 { 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; 281 286 282 287 return NULL; … … 306 311 histNorm->Reset("ICE"); 307 312 histNorm->Add(hist, 1); 308 histNorm->Divide(f 1, (Double_t)(hist->Integral()));313 histNorm->Divide(fFNorm, (Double_t)(hist->Integral())); 309 314 310 315 return histNorm; -
trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.h
r1992 r1997 17 17 private: 18 18 19 TH1F * hfLutPseudoSize; // Histogram of fLutPseudoSize20 TH1F * hfLutPseudoSizeNorm; // Histogram of fLutPseudoSize normalized on integral of distribution21 TH1F * hfPseudoSize; // Histogram of fPseudoSize22 TH1F * hfPseudoSizeNorm; // Histogram of fPseudoSize normalized on integral of distribution23 TH1F * hfSizeBiggerCell; // Histogram of fSizeBiggerCell24 TH1F * hfSizeBiggerCellNorm; // Histogram of fSizeBiggerCell normalized on integral of distribution19 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 25 25 26 TF1* f 1; // Function used to normalize histograms26 TF1* fFNorm; // Function used to normalize histograms 27 27 28 28 static Int_t fColorLps; … … 38 38 TH1 *GetHistByName(const TString name); 39 39 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; } 46 46 47 47 void Draw(Option_t *opt=NULL);
Note:
See TracChangeset
for help on using the changeset viewer.