Changeset 2272
- Timestamp:
- 07/10/03 12:34:10 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/CT1EgyEst.C
r2262 r2272 33 33 #include "MHMatrix.h" 34 34 #include "MEnergyEstParam.h" 35 #include "MEnergyEstParamDanielMkn421.h" 35 36 #include "MMatrixLoop.h" 36 37 #include "MChisqEval.h" … … 138 139 Optimize.SetOutFile(paramout); 139 140 140 /*141 141 142 MFCT1SelFinal filterhadrons; 142 143 filterhadrons.SetHadronnessName(hadronnessName); … … 144 145 filterhadrons.SetInverted(); 145 146 Optimize.SetEventFilter(&filterhadrons); 146 */147 147 148 148 149 Optimize.SetNevents(howMany); … … 205 206 // 206 207 207 MEnergyEstParam eest2(hilName); 208 //MEnergyEstParam eest2(hilName); 209 //eest2.Add(hilSrcName); 210 211 //eest2.SetCoeffA(parA); 212 //eest2.SetCoeffB(parB); 213 214 // estimate energy using Daniel's parameters 215 MEnergyEstParamDanielMkn421 eest2(hilName); 208 216 eest2.Add(hilSrcName); 209 210 eest2.SetCoeffA(parA);211 eest2.SetCoeffB(parB);212 217 213 218 … … 238 243 // Select events 239 244 // 240 241 /* 245 242 246 cout << "Select events with hadronness < " << maxhadronness 243 247 << " and |alpha| < " << maxalpha << endl; … … 247 251 248 252 MContinue cont(&hcut2); 249 */ 250 251 parlist2.AddToList(&tlist2); 252 253 //******************************** 254 // Entries in MTaskList 255 256 tlist2.AddToList(&read2); 257 // tlist2.AddToList(&cont); 258 tlist2.AddToList(&eest2); 259 260 // 253 254 //----------------------------------------------- 261 255 // Create Object MHMcEnergyMigration containing useful histograms, 262 256 // and task MHMcEnergyMigration to fill them: 263 257 // 264 258 265 MHMcEnergyMigration mighist; 266 267 parlist2.AddToList(&mighist); 268 269 MFillH migfill(&mighist, "MMcEvt"); 270 271 tlist2.AddToList(&migfill); 272 273 parlist2.AddToList(binsE); 274 parlist2.AddToList(binsTheta); 259 //MHMcEnergyMigration mighist; 260 261 MFillH migfill("MHMcEnergyMigration", "MMcEvt"); 275 262 276 263 MBinning BinningDE("BinningDE"); … … 279 266 BinningDE.SetEdges(60, -1.2, 1.2); 280 267 BinningImpact.SetEdges(50, 0., 400.); 268 269 //******************************** 270 // Entries in MParList 271 272 parlist2.AddToList(&tlist2); 273 //parlist2.AddToList(&mighist); 274 parlist2.AddToList(binsE); 275 parlist2.AddToList(binsTheta); 281 276 parlist2.AddToList(&BinningDE); 282 277 parlist2.AddToList(&BinningImpact); 283 278 279 //******************************** 280 // Entries in MTaskList 281 282 tlist2.AddToList(&read2); 283 tlist2.AddToList(&cont); 284 tlist2.AddToList(&eest2); 285 tlist2.AddToList(&migfill); 286 287 //----------------------------------------------- 284 288 cout << "Event loop was setup" << endl; 285 289 MProgressBar bar; … … 291 295 if (!evtloop2.Eventloop()) 292 296 return; 297 298 tlist2.PrintStatistics(0, kTRUE); 299 300 MHMcEnergyMigration &mighist = 301 *(MHMcEnergyMigration*)parlist2->FindObject("MHMcEnergyMigration"); 302 if (!&mighist) 303 { 304 cout << "CT1EgyEst.C : object 'MHMcEnergyMigration' not found ... aborting" 305 << endl; 306 return; 307 } 293 308 294 309 TString paramout(outPath); -
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r2216 r2272 30 30 #pragma link C++ class MEnergyEstimate+; 31 31 #pragma link C++ class MEnergyEstParam+; 32 #pragma link C++ class MEnergyEstParamDanielMkn421+; 32 33 33 34 #pragma link C++ class MMatrixLoop+; -
trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.cc
r2225 r2272 144 144 fAlphaUp[7] = 0.; 145 145 //--------------------------------- 146 } 147 148 // -------------------------------------------------------------------------- 149 // 150 // Set the parameter values from vector 'par' 151 // 152 // Attention : it is assumed that there are (9*ncutpar) values 153 // 154 void MCT1SupercutsCalc::SetParams(Double_t *par) 155 { 156 UInt_t ncutpar = fLengthUp.GetSize(); 157 UInt_t k0 = 0; 158 159 TArrayD lup(ncutpar, par + k0); 160 SetLengthUp(lup); 161 k0 += ncutpar; 162 163 TArrayD wup(ncutpar, par + k0); 164 SetWidthUp(wup); 165 k0 += ncutpar; 166 167 TArrayD dup(ncutpar, par + k0); 168 SetDistUp(dup); 169 k0 += ncutpar; 170 171 TArrayD llo(ncutpar, par + k0); 172 SetLengthLo(llo); 173 k0 += ncutpar; 174 175 TArrayD wlo(ncutpar, par + k0); 176 SetWidthLo(wlo); 177 k0 += ncutpar; 178 179 TArrayD dlo(ncutpar, par + k0); 180 SetDistLo(dlo); 181 k0 += ncutpar; 182 183 TArrayD aup(ncutpar, par + k0); 184 SetAsymUp(aup); 185 k0 += ncutpar; 186 187 TArrayD alo(ncutpar, par + k0); 188 SetAsymLo(alo); 189 k0 += ncutpar; 190 191 TArrayD alphaup(ncutpar, par + k0); 192 SetAlphaUp(alphaup); 193 } 194 195 // -------------------------------------------------------------------------- 196 // 197 // Get the parameter values 198 // 199 // Attention : it is assumed that there are (9*ncutpar) values 200 // 201 void MCT1SupercutsCalc::GetParams(Double_t *par) 202 { 203 UInt_t ncutpar = fLengthUp.GetSize(); 204 UInt_t k0 = 0; 205 206 for (UInt_t j=0; j<ncutpar; j++) 207 { 208 UInt_t k = k0 + j; 209 par[k] = fLengthUp[j]; 210 } 211 k0 += ncutpar; 212 213 for (UInt_t j=0; j<ncutpar; j++) 214 { 215 UInt_t k = k0 + j; 216 par[k] = fWidthUp[j]; 217 } 218 k0 += ncutpar; 219 220 for (UInt_t j=0; j<ncutpar; j++) 221 { 222 UInt_t k = k0 + j; 223 par[k] = fDistUp[j]; 224 } 225 k0 += ncutpar; 226 227 for (UInt_t j=0; j<ncutpar; j++) 228 { 229 UInt_t k = k0 + j; 230 par[k] = fLengthLo[j]; 231 } 232 k0 += ncutpar; 233 234 for (UInt_t j=0; j<ncutpar; j++) 235 { 236 UInt_t k = k0 + j; 237 par[k] = fWidthLo[j]; 238 } 239 k0 += ncutpar; 240 241 for (UInt_t j=0; j<ncutpar; j++) 242 { 243 UInt_t k = k0 + j; 244 par[k] = fDistLo[j]; 245 } 246 k0 += ncutpar; 247 248 for (UInt_t j=0; j<ncutpar; j++) 249 { 250 UInt_t k = k0 + j; 251 par[k] = fAsymUp[j]; 252 } 253 k0 += ncutpar; 254 255 for (UInt_t j=0; j<ncutpar; j++) 256 { 257 UInt_t k = k0 + j; 258 par[k] = fAsymLo[j]; 259 } 260 k0 += ncutpar; 261 262 for (UInt_t j=0; j<ncutpar; j++) 263 { 264 UInt_t k = k0 + j; 265 par[k] = fAlphaUp[j]; 266 } 146 267 } 147 268 … … 275 396 fMap[5] = fMatrix->AddColumn("MHillas.fMeanY"); 276 397 fMap[6] = fMatrix->AddColumn("MHillasSrc.fDist"); 398 fMap[7] = fMatrix->AddColumn("MHillasSrc.fAlpha"); 277 399 } 278 400 … … 332 454 return kTRUE; 333 455 } 334 335 336 337 338 339 340 341 342 343 344 345 346 456 //========================================================================== -
trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.h
r2225 r2272 34 34 Double_t fMm2Deg; 35 35 36 Int_t fMap[ 7];36 Int_t fMap[8]; 37 37 MHMatrix *fMatrix; 38 38 … … 70 70 const char *name=NULL, const char *title=NULL); 71 71 72 void SetParams(Double_t *par); 73 void GetParams(Double_t *par); 74 72 75 void SetHadronnessName(const TString name) { fHadronnessName = name; } 73 76 TString GetHadronnessName() const { return fHadronnessName; } … … 100 103 101 104 #endif 105 106 107 108 109 110 111 112 -
trunk/MagicSoft/Mars/manalysis/Makefile
r2216 r2272 39 39 MEnergyEstimate.cc \ 40 40 MEnergyEstParam.cc \ 41 MEnergyEstParamDanielMkn421.cc \ 41 42 MSrcPosCam.cc \ 42 43 MHadronness.cc \
Note:
See TracChangeset
for help on using the changeset viewer.