Changeset 2358 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 09/24/03 15:02:05 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/macros
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/CT1Hillas.C
r1633 r2358 91 91 92 92 MCerPhotCalc ncalc; 93 //94 // Alternative photon calculation:95 // Example: use only 2nd to 6th FADC slices for photon calculation:96 //97 // MCerPhotCalc2 ncalc;98 // const Float_t x[15]={0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};99 // TArrayF w(15,x);100 // ncalc.SetWeights(w);101 //102 93 103 94 MCameraSmooth smooth; -
trunk/MagicSoft/Mars/macros/MagicHillas.C
r2026 r2358 96 96 // 97 97 // const Float_t x[15]={0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 98 // TArrayF w(15,x);98 // const TArrayF w(15,x); 99 99 // ncalc.SetWeights(w); 100 100 // -
trunk/MagicSoft/Mars/macros/star.C
r2124 r2358 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz ,5/2002 <mailto:tbretz@astro.uni-wuerzburg.de>19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 318 ! Author(s): Thomas Bretz 5/2002 <mailto:tbretz@astro.uni-wuerzburg.de> 19 ! 20 ! Copyright: MAGIC Software Development, 2000-2002 21 21 ! 22 22 ! … … 32 32 ///////////////////////////////////////////////////////////////////////////// 33 33 34 void star() 34 #include "MImgCleanStd.h" 35 36 void star(Float_t clean1=3., Float_t clean2=2.5) 35 37 { 36 38 // … … 45 47 46 48 MTaskList tlist; 49 47 50 plist.AddToList(&tlist); 48 51 … … 66 69 67 70 // ------------- user change ----------------- 68 read.AddFile("magictest/test/Gamma_z*.root"); 69 71 // read.AddFile("Pro*.root"); 72 // read.AddFile("Gamma_*_0_7_*.root"); 73 // read.AddFile("Gamma_*.root"); 74 75 gSystem->Exec("ls Gamma_*.root > files.txt"); 76 77 Float_t ratio = 1.; 78 79 ifstream list; 80 list.open("files.txt"); 81 while (1) 82 { 83 Char_t file[256]; 84 list >> file; 85 if (!list.good()) break; 86 TChain dummy("Events"); 87 dummy.Add(file); 88 Int_t maxevents = ratio*dummy.GetEntries(); 89 90 read.AddFile(file,maxevents); 91 } 92 list.close(); 93 gSystem->Exec("rm files.txt"); 94 70 95 MMcPedestalCopy pcopy; 71 96 MMcPedestalNSBAdd pnsb; 97 72 98 MCerPhotCalc ncalc; 99 100 const Float_t x[15]={0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 101 const TArrayF w(15,x); 102 ncalc.SetWeights(w); 73 103 74 104 MBlindPixelCalc blind; 75 105 blind.SetUseInterpolation(); 76 106 77 M SigmabarCalc sgcal;78 MImgCleanStd clean; 107 MImgCleanStd clean(clean1, clean2); 108 79 109 MHillasCalc hcalc; 80 110 MHillasSrcCalc scalc; // !!Preliminary!! Will be removed later! 81 111 112 113 MContinue filtersize300("MHillas.fSize<300"); 114 MContinue filtersize500("MHillas.fSize<500"); 115 MContinue filtersize1000("MHillas.fSize<1000"); 116 MContinue filtersize2000("MHillas.fSize<2000"); 117 118 MFEventSelector eventselector1; 119 eventselector1.SetNumSelectEvts(10000); 120 MFEventSelector eventselector2; 121 eventselector2.SetNumSelectEvts(17000); 122 MFEventSelector eventselector3; 123 eventselector3.SetNumSelectEvts(27000); 124 MFEventSelector eventselector4; 125 eventselector4.SetNumSelectEvts(63000); 126 MFEventSelector eventselector5; 127 eventselector5.SetNumSelectEvts(150000); 128 82 129 // ------------- user change ----------------- 83 MWriteRootFile write("starfile.root"); 84 write.AddContainer("MMcEvt", "Events"); 85 write.AddContainer("MSigmabar", "Events"); 86 write.AddContainer("MHillas", "Events"); 87 write.AddContainer("MHillasExt", "Events"); 88 write.AddContainer("MHillasSrc", "Events"); 89 write.AddContainer("MNewImagePar", "Events"); 90 write.AddContainer("MRawRunHeader", "RunHeaders"); 91 write.AddContainer("MMcRunHeader", "RunHeaders"); 92 write.AddContainer("MSrcPosCam", "RunHeaders"); 130 131 132 Char_t dir[256]; 133 // sprintf (dir, "Clean_%.1f_%.1f/", clean1, clean2); 134 TString out = dir; 135 136 out += "Sgt0/star_gammas.root"; 137 MWriteRootFile write1(out); 138 write1.SetFilter(&eventselector1); 139 write1.AddContainer("MRawRunHeader", "RunHeaders"); 140 write1.AddContainer("MMcRunHeader", "RunHeaders"); 141 write1.AddContainer("MSrcPosCam", "RunHeaders"); 142 write1.AddContainer("MMcEvt", "Events"); 143 write1.AddContainer("MHillas", "Events"); 144 write1.AddContainer("MHillasExt", "Events"); 145 write1.AddContainer("MHillasSrc", "Events"); 146 write1.AddContainer("MNewImagePar", "Events"); 147 148 out = dir; 149 out += "Sgt300/star_gammas.root"; 150 MWriteRootFile write2(out); 151 write2.SetFilter(&eventselector2); 152 write2.AddContainer("MRawRunHeader", "RunHeaders"); 153 write2.AddContainer("MMcRunHeader", "RunHeaders"); 154 write2.AddContainer("MSrcPosCam", "RunHeaders"); 155 write2.AddContainer("MMcEvt", "Events"); 156 write2.AddContainer("MHillas", "Events"); 157 write2.AddContainer("MHillasExt", "Events"); 158 write2.AddContainer("MHillasSrc", "Events"); 159 write2.AddContainer("MNewImagePar", "Events"); 160 161 // Extra ! 162 write2.AddContainer("MMcTrigHeader", "RunHeaders"); 163 write2.AddContainer("MMcCorsikaRunHeader", "RunHeaders"); 164 write2.AddContainer("MMcFadcHeader", "RunHeaders"); 165 write2.AddContainer("MMcTrig", "Events"); 166 write2.AddContainer("MRawEvtData", "Events"); 167 write2.AddContainer("MRawEvtHeader", "Events"); 168 169 out = dir; 170 out += "Sgt500/star_gammas.root"; 171 MWriteRootFile write3(out); 172 write3.SetFilter(&eventselector3); 173 write3.AddContainer("MRawRunHeader", "RunHeaders"); 174 write3.AddContainer("MMcRunHeader", "RunHeaders"); 175 write3.AddContainer("MSrcPosCam", "RunHeaders"); 176 write3.AddContainer("MMcEvt", "Events"); 177 write3.AddContainer("MHillas", "Events"); 178 write3.AddContainer("MHillasExt", "Events"); 179 write3.AddContainer("MHillasSrc", "Events"); 180 write3.AddContainer("MNewImagePar", "Events"); 181 182 out = dir; 183 out += "Sgt1000/star_gammas.root"; 184 MWriteRootFile write4(out); 185 write4.SetFilter(&eventselector4); 186 write4.AddContainer("MRawRunHeader", "RunHeaders"); 187 write4.AddContainer("MMcRunHeader", "RunHeaders"); 188 write4.AddContainer("MSrcPosCam", "RunHeaders"); 189 write4.AddContainer("MMcEvt", "Events"); 190 write4.AddContainer("MHillas", "Events"); 191 write4.AddContainer("MHillasExt", "Events"); 192 write4.AddContainer("MHillasSrc", "Events"); 193 write4.AddContainer("MNewImagePar", "Events"); 194 195 out = dir; 196 out += "Sgt2000/star_gammas.root"; 197 MWriteRootFile write5(out); 198 write5.SetFilter(&eventselector5); 199 write5.AddContainer("MRawRunHeader", "RunHeaders"); 200 write5.AddContainer("MMcRunHeader", "RunHeaders"); 201 write5.AddContainer("MSrcPosCam", "RunHeaders"); 202 write5.AddContainer("MMcEvt", "Events"); 203 write5.AddContainer("MHillas", "Events"); 204 write5.AddContainer("MHillasExt", "Events"); 205 write5.AddContainer("MHillasSrc", "Events"); 206 write5.AddContainer("MNewImagePar", "Events"); 93 207 94 208 tlist.AddToList(&read); … … 96 210 tlist.AddToList(&pnsb); 97 211 tlist.AddToList(&ncalc); 212 tlist.AddToList(&clean); 98 213 tlist.AddToList(&blind); 99 tlist.AddToList(&sgcal);100 tlist.AddToList(&clean);101 214 tlist.AddToList(&hcalc); 102 215 tlist.AddToList(&scalc); 103 tlist.AddToList(&write); 216 217 tlist.AddToList(&eventselector1); 218 tlist.AddToList(&write1); 219 tlist.AddToList(&filtersize300); //FILTER SIZE LINE 220 221 tlist.AddToList(&eventselector2); 222 tlist.AddToList(&write2); 223 tlist.AddToList(&filtersize500); //FILTER SIZE LINE 224 225 tlist.AddToList(&eventselector3); 226 tlist.AddToList(&write3); 227 tlist.AddToList(&filtersize1000); //FILTER SIZE LINE 228 229 tlist.AddToList(&eventselector4); 230 tlist.AddToList(&write4); 231 tlist.AddToList(&filtersize2000); //FILTER SIZE LINE 232 233 tlist.AddToList(&eventselector5); 234 tlist.AddToList(&write5); 104 235 105 236 // … … 114 245 // 115 246 // Execute your analysis 116 //247 // 117 248 if (!evtloop.Eventloop()) 118 249 return;
Note:
See TracChangeset
for help on using the changeset viewer.