Changeset 2489
- Timestamp:
- 11/08/03 09:20:10 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2488 r2489 1 1 -*-*- END OF LINE -*-*- 2 3 4 2003/11/08: Nicola Galante 5 6 * mhistmc/MHMcTriggerLvl2.[cc,h]: 7 - Changed binning of histograms fHistLutPseudoSize, fHistLutPseudoSizeNorm, 8 fHistSizeBiggerCell, fHistSizeBiggerCellNorm to fix an overflow bug 9 - In method GetHistByName(const TString name): changed the class of the returned object, 10 now it returns a (TObject *), no more a (TH1F *), in order to return 11 either (TH1 *) than (TH2 *); changed the order by which it checks the name of the 12 histogram in order to fix a bug in the lexing 13 14 * macros/triglvl2.C: 15 - Added some instruction to write all the MMcTriggerLvl2 histograms into 16 a TFile 17 2 18 3 19 2003/11/07: Thomas Bretz -
trunk/MagicSoft/Mars/macros/triglvl2.C
r2370 r2489 38 38 39 39 tasklist.AddToList(&reader); 40 41 40 MGeomCamMagic geocam; 42 41 parlist.AddToList(&geocam); … … 55 54 // Set the number of Next Neighbourhoods that define a compact pixel 56 55 // 57 cell.SetCompactNN( 2);56 cell.SetCompactNN(3); 58 57 // USER: --^ 59 58 … … 61 60 // A filter to select events using the L2T parameters is created 62 61 // 63 64 62 // MF lvl2filter("MMcTriggerLvl2.fPseudoSize > 25 && MMcTriggerLvl2.fPseudoSize < 31"); 65 MF lvl2filter("MMcTriggerLvl2.fPseudoSize > 15"); 63 // MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 34"); 64 MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 18"); 66 65 67 66 // … … 90 89 MFilterList flist; 91 90 //flist.AddToList(&energyfilter); 92 //flist.AddToList(&lvl2filter);91 flist.AddToList(&lvl2filter); 93 92 // flist.AddToList(&selector); 94 93 // flist.AddToList(&eslope); 95 94 // flist.AddToList(&fTrig); 96 95 97 98 99 96 // 100 97 // The task to calculate the L2T parameter is added to the task list … … 107 104 // 108 105 tasklist.AddToList(&flist); 106 107 108 MContinue L1offline ("MMcTriggerLvl2.fLutPseudoSize < 6"); 109 // tasklist.AddToList(&L1offline); 109 110 110 111 // … … 176 177 // filled and can be displayd 177 178 // 178 parlist.FindObject("MHMcCollectionArea")->DrawClone();179 180 parlist.FindObject("MHMcTriggerLvl2")->DrawClone("sbc");181 parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lps");182 parlist.FindObject("MHMcTriggerLvl2")->DrawClone();179 180 181 //parlist.FindObject("MHMcTriggerLvl2")->DrawClone("sbc"); 182 //parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lps"); 183 //parlist.FindObject("MHMcTriggerLvl2")->DrawClone(); 183 184 //parlist.FindObject("MHMcTriggerLvl2")->DrawClone("energy"); 184 parlist.FindObject("MHMcTriggerLvl2")->DrawClone("size-energy");185 185 //parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lut-energy"); 186 //parlist.FindObject("MHMcCollectionArea")->DrawClone(); 186 187 // Returns histogram of the class MHMcTriggerLvl2 187 188 188 189 MHMcTriggerLvl2 *htrig = (MHMcTriggerLvl2 *)parlist.FindObject("MHMcTriggerLvl2"); 189 TH1F *h1 = (TH1F *)htrig->GetHistByName("fHistPseudoSize"); 190 TH2D *h2 = htrig->GetHistSizeBiggerCellEnergy(); 191 TH2D *h3 = (TH2D *)htrig->GetHistByName("fHistLutPseudoSizeEnergy"); 192 //csbce = new TCanvas(); 193 //h2->DrawClone(); 194 195 hfile = new TFile("HistFileLUT.root", "RECREATE"); 196 h1->Write(); 197 h2->Write(); 198 h3->Write(); 190 MHMcCollectionArea *collarea = (MHMcCollectionArea *)parlist.FindObject("MHMcCollectionArea"); 191 TH1F *hps = (TH1F *)htrig->GetHistByName("fHistPseudoSize"); 192 TH1F *hlps = (TH1F *)htrig->GetHistByName("fHistLutPseudoSize"); 193 TH1F *hsbc = (TH1F *)htrig->GetHistSizeBiggerCell(); 194 TH1F *hpsn = (TH1F *)htrig->GetHistByName("fHistPseudoSizeNorm"); 195 TH1F *hlpsn = (TH1F *)htrig->GetHistByName("fHistLutPseudoSizeNorm"); 196 TH1F *hsbcn = (TH1F *)htrig->GetHistSizeBiggerCellNorm(); 197 TH2D *hlpse = (TH2D *)htrig->GetHistByName("fHistLutPseudoSizeEnergy"); 198 TH2D *hpse = (TH2D *)htrig->GetHistByName("fHistPseudoSizeEnergy"); 199 TH2D *hsbce = (TH2D *)htrig->GetHistSizeBiggerCellEnergy(); 200 TH1D *hcollarea = collarea->GetHist(); 201 202 // Please set rootfile as the directory where you want to store 203 // your file.root containing histograms 204 rootfile = new TString(filename); 205 if (rootfile->Index("/*.root",1)>=0){ 206 rootfile->Resize(rootfile->Index("/*.root",1)); 207 rootfile[0]+="_sbcmag18_CNN3.root"; 208 } 209 210 hfile = new TFile((char *)rootfile[0], "RECREATE"); 211 hlps->Write(); 212 hps->Write(); 213 hsbc->Write(); 214 hlpsn->Write(); 215 hpsn->Write(); 216 hsbcn->Write(); 217 hlpse->Write(); 218 hpse->Write(); 219 hsbce->Write(); 220 hcollarea->Write(); 199 221 hfile->Close(); 222 cout << "Histograms stored into " << rootfile[0] << endl; 223 200 224 201 225 } -
trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.cc
r2399 r2489 79 79 fTitle = title ? title : "Trigger L2 image parameters"; 80 80 81 fHistLutPseudoSize = new TH1F("fHistLutPseudoSize", "number of compact pixels in one lut", 1 2, 0, 12);81 fHistLutPseudoSize = new TH1F("fHistLutPseudoSize", "number of compact pixels in one lut", 13, 0, 13); 82 82 fHistPseudoSize = new TH1F("fHistPseudoSize", "Multiplicity of the cluster identified by the L2T", 397, 0, 397); 83 fHistSizeBiggerCell = new TH1F("fHistSizeBiggerCell", "Number of fired pixel in bigger cell", 3 6, 0, 36);84 85 fHistLutPseudoSizeNorm = new TH1F("fHistLutPseudoSizeNorm", "Normalized Number of compact pixels in one lut", 1 2, 0, 12);83 fHistSizeBiggerCell = new TH1F("fHistSizeBiggerCell", "Number of fired pixel in bigger cell", 37, 0, 37); 84 85 fHistLutPseudoSizeNorm = new TH1F("fHistLutPseudoSizeNorm", "Normalized Number of compact pixels in one lut", 13, 0, 13); 86 86 fHistPseudoSizeNorm = new TH1F("fHistPseudoSizeNorm", "Normalized Multiplicity of the cluster identified by the L2T", 397, 0, 397); 87 fHistSizeBiggerCellNorm = new TH1F("fHistSizeBiggerCellNorm", "Normalized Number of fired pixel in bigger cell", 3 6, 0, 36);87 fHistSizeBiggerCellNorm = new TH1F("fHistSizeBiggerCellNorm", "Normalized Number of fired pixel in bigger cell", 37, 0, 37); 88 88 89 89 fHistLutPseudoSize->SetDirectory(NULL); … … 329 329 // so remember to cast the returned object if you want to work with it. 330 330 // 331 TH1 *MHMcTriggerLvl2::GetHistByName(const TString name) 332 { 331 TObject *MHMcTriggerLvl2::GetHistByName(const TString name) const 332 { 333 334 if (name.Contains("fHistLutPseudoSizeEnergy", TString::kIgnoreCase)) 335 return fHistLutPseudoSizeEnergy; 336 if (name.Contains("fHistSizeBiggerCellEnergy", TString::kIgnoreCase)) 337 return fHistSizeBiggerCellEnergy; 338 if (name.Contains("fHistPseudoSizeEnergy", TString::kIgnoreCase)) 339 return fHistPseudoSizeEnergy; 340 333 341 if (name.Contains("fHistLutPseudoSize", TString::kIgnoreCase)) 334 342 return fHistLutPseudoSize; … … 344 352 if (name.Contains("fHistPseudoSizeNorm", TString::kIgnoreCase)) 345 353 return fHistPseudoSizeNorm; 346 347 if (name.Contains("fHistLutPseudoSizeEnergy", TString::kIgnoreCase))348 return fHistLutPseudoSizeEnergy;349 if (name.Contains("fHistSizeBiggerCellEnergy", TString::kIgnoreCase))350 return fHistSizeBiggerCellEnergy;351 if (name.Contains("fHistPseudoSizeEnergy", TString::kIgnoreCase))352 return fHistPseudoSizeEnergy;353 354 354 355 return NULL; -
trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.h
r2399 r2489 43 43 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 44 44 45 T H1 *GetHistByName(const TString name);45 TObject *GetHistByName(const TString name) const; 46 46 47 47 TH1F *GetHistLutPseudoSize() const { return fHistLutPseudoSize; }
Note:
See TracChangeset
for help on using the changeset viewer.