Changeset 2036
- Timestamp:
- 04/29/03 09:18:03 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2035 r2036 1 1 -*-*- END OF LINE -*-*- 2 2003/04/29: Abelardo Moralej0 3 4 * mmontecarlo/MMcCollectionareaCalc.[h,cc] 5 - Now the energy limits and spectral slope used in Corsika are 6 read from the run header. Warning: impact parameter is still 7 fixed (I changed it from 400 m to 300 m, our present MC 8 production default). Added warning message about this. 9 Collection areas calculated up to now with the new MC library 10 are overestimated by a ~77% ! This class will be removed in 11 the future and replaced by MFillH. 12 13 * mhistmc/MHMcCollectionArea.[h,cc] 14 - Adapted to the change of MMcCollectionAreaCalc. Added arguments 15 to CalcEfficiency. 16 2 17 2003/04/28: Nadia Tonello 3 18 4 * mimage/MImgCleanStd.[h,cc]19 * mimage/MImgCleanStd.[h,cc] 5 20 - added the option kDemocratic using sigmabar of the 6 21 inner pixels … … 9 24 - added documentation 10 25 11 * manalysis/MCerPhotPix.[h,cc]26 * manalysis/MCerPhotPix.[h,cc] 12 27 - added fRing and Get-Set functions 13 28 14 29 2003/04/28: Oscar Blanch 15 30 16 * mgeom/MGeomCamECO1000.[h,cc]17 - New files for ECO 1000 camera geometry.18 19 * mgeom/GeomLinkDef.h20 - Added class MGeomCamECO100021 22 * mgeom/Makefile23 - Added class MGeomCamECO100031 * mgeom/MGeomCamECO1000.[h,cc] 32 - New files for ECO 1000 camera geometry. 33 34 * mgeom/GeomLinkDef.h 35 - Added class MGeomCamECO1000 36 37 * mgeom/Makefile 38 - Added class MGeomCamECO1000 24 39 25 40 2003/04/28: Abelardo Moralejo -
trunk/MagicSoft/Mars/mhistmc/MHMcCollectionArea.cc
r2015 r2036 40 40 #include "MHMcEnergyImpact.h" 41 41 42 #include "MLog.h" 43 #include "MLogManip.h" 44 42 45 ClassImp(MHMcCollectionArea); 43 46 … … 223 226 // flag 224 227 // 225 void MHMcCollectionArea::CalcEfficiency(UInt_t numevts, Float_t angle)228 void MHMcCollectionArea::CalcEfficiency(UInt_t numevts, Float_t emin, Float_t emax, Float_t index) 226 229 { 227 230 // Here we estimate the total number of showers in each energy bin … … 238 241 MH::SetBinning(fHistCol, &xaxis); 239 242 240 // TO BE FIXED! In forthcoming camera versions emin, emax and index 241 // will be available in a run header, and should be read from it. 242 243 const Float_t emin = 10.; 244 const Float_t emax = 30000.; // Energies in GeV. 245 const Float_t index = 2.6; // Differential spectral Index. 246 247 const Float_t expo = 1.-index; 243 const Float_t expo = 1+index; 248 244 249 245 const Float_t k = (Float_t)numevts / (pow(emax,expo) - pow(emin,expo)); … … 267 263 268 264 // ----------------------------------------------------------- 269 270 // Impact parameter range: 265 // 266 // Impact parameter range: TO BE FIXED! Impact parameter shoud be 267 // read from run header, but it is not yet in!! 268 // 271 269 const Float_t r1 = 0; 272 const Float_t r2 = 400; 273 274 const Float_t dr = TMath::Pi() * (r2*r2 - r1*r1); 275 276 angle *= TMath::Pi()/180; 270 const Float_t r2 = 300; 271 272 *fLog << warn << endl << dbginf << "WARNING! I will assume a maximum impact parameter of 300 meters for the MC events. Check that this is the true one!" <<endl<<endl; 273 const Float_t area = TMath::Pi() * (r2*r2 - r1*r1); 277 274 278 275 for (Int_t ix=1; ix<=nbinx; ix++) … … 294 291 const Double_t eff = Ns/Na; 295 292 296 const Double_t err = sqrt((1.-eff)*Ns)/Na; 297 298 const Float_t area = dr * cos(angle); 293 const Double_t efferr = sqrt((1.-eff)*Ns)/Na; 299 294 300 295 fHistCol->SetBinContent(ix, eff*area); 301 fHistCol->SetBinError(ix, e rr*area);296 fHistCol->SetBinError(ix, efferr*area); 302 297 } 303 298 … … 340 335 341 336 const Double_t eff = h.GetCellContent(ix, iy); 342 const Double_t e rr = h.GetCellError(ix, iy);337 const Double_t efferr = h.GetCellError(ix, iy); 343 338 344 339 colA += eff*A; 345 errA += A*A * e rr*err;340 errA += A*A * efferr*efferr; 346 341 } 347 342 -
trunk/MagicSoft/Mars/mhistmc/MHMcCollectionArea.h
r2015 r2036 38 38 39 39 void CalcEfficiency(); 40 void CalcEfficiency(UInt_t allevts, Float_t theta);40 void CalcEfficiency(UInt_t allevts, Float_t emin, Float_t emax, Float_t index); 41 41 42 42 void Calc(const MHMcEnergyImpact &mcsel, const MHMcEnergyImpact &mcall); -
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
r1715 r2036 28 28 // MHMcCollectionAreaCalc 29 29 // 30 // Remark: The initialization is mai ly done in the ReInit function.30 // Remark: The initialization is mainly done in the ReInit function. 31 31 // Please make sure, that you don't use MReadTree when processing 32 32 // a file. Use a 'ReInit'-calling task like MReadMarsFile … … 44 44 #include "MMcTrig.hxx" 45 45 #include "MMcRunHeader.hxx" 46 #include "MMcCorsikaRunHeader.h" 46 47 47 48 #include "MHMcCollectionArea.h" … … 77 78 return kFALSE; 78 79 79 fTheta = -1; 80 fTheta = -1; 81 fEmin = -1; 82 fEmax = -1; 83 fSlope = 0; 80 84 fTotalNumSimulatedShowers = 0; 81 85 fCorsikaVersion = 0; … … 91 95 { 92 96 *fLog << err << dbginf << "Error - MMcRunHeader not found... exit." << endl; 97 return kFALSE; 98 } 99 100 MMcCorsikaRunHeader *corrunheader = (MMcCorsikaRunHeader*)plist->FindObject("MMcCorsikaRunHeader"); 101 if (!corrunheader) 102 { 103 *fLog << err << dbginf << "Error - MMcCorsikaRunHeader not found... exit." << endl; 93 104 return kFALSE; 94 105 } … … 110 121 111 122 fCorsikaVersion = runheader->GetCorsikaVersion(); 123 124 if ( fEmin > 0 && 125 (fEmin != corrunheader->GetELowLim() || 126 fEmax != corrunheader->GetEUppLim() || 127 fSlope != corrunheader->GetSlopeSpec()) ) 128 *fLog << warn << dbginf << "Warning - Read files have different energy distribution..." << endl; 129 130 fEmin = corrunheader->GetELowLim(); 131 fEmax = corrunheader->GetEUppLim(); 132 fSlope = corrunheader->GetSlopeSpec(); 112 133 113 134 fAllEvtsTriggered |= runheader->GetAllEvtsTriggered(); … … 167 188 { 168 189 *fLog << inf << "Total number of showers: " << fTotalNumSimulatedShowers << endl; 169 fCollArea->CalcEfficiency(fTotalNumSimulatedShowers, 170 fCorsikaVersion == 5200 ? fTheta : 0); 190 fCollArea->CalcEfficiency(fTotalNumSimulatedShowers, fEmin, fEmax, fSlope); 171 191 } 172 192 -
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h
r1300 r2036 24 24 UInt_t fCorsikaVersion; 25 25 Float_t fTheta; 26 Float_t fEmin; 27 Float_t fEmax; 28 Float_t fSlope; 26 29 27 30 Bool_t fAllEvtsTriggered;
Note:
See TracChangeset
for help on using the changeset viewer.