Changeset 2489 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 11/08/03 09:20:10 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.