- Timestamp:
- 02/18/09 12:07:41 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9345 r9347 18 18 19 19 -*-*- END OF LINE -*-*- 20 2009/02/18 Thomas Bretz 21 22 * datacenter/scripts/runcorsika: 23 - added a comment 24 25 * mbase/MParList.cc: 26 - when adding a TCollectionn only add MParContainers 27 28 * mcorsika/MCorsikaRunHeader.[h,cc]: 29 - added reading of Atmospheric coefficients 30 - added reading of Cherenkov Flag 31 - added corsika's Earth Radius 32 33 * melectronics/MDigitalSignal.[h,cc]: 34 - added and initialized an index to allow to "connect" 35 the digital signal to a channel 36 37 * mjtrain/MJTrainSeparation.cc: 38 - replaced kGreen by kBlue 39 40 * mmain/MEventDisplay.cc: 41 - added a type==3 which is for ceres-reflector files 42 43 * mmain/Makefile: 44 - added -I../mcorsika 45 - added -I../msim 46 - added -I../msimcamera 47 48 * msim/MHPhotonEvent.[h,cc]: 49 - set the binning more automatically from the run-headers 50 where possible 51 - added RadEnv 52 - added Clear function for external access 53 54 * msim/MSimAbsorption.cc: 55 - addec const-qualifier for photon 56 57 * msimcamera/MSimGeomCam.cc: 58 - allow usage also without pulse and pulse position (for display) 59 60 * msimcamera/MSimSignalCam.cc: 61 - allow usage also without TriggerPos 62 - added a check whether MSignalCam was correctly initialized 63 64 65 20 66 2009/02/16 Thomas Bretz 21 67 … … 44 90 - now read the ganymed.rc and write it to the output 45 91 92 * mhflux/MHEffectiveOnTime.h: 93 - increased class version by 1 94 95 * mhflux/MHAlpha.cc: 96 - removed erronornously comittet SetSumw2 97 - don't output the numbe rof excess events vs time 98 46 99 47 100 … … 71 124 * mfileio/MWriteRootFile.cc: 72 125 - don't output title if empty 73 74 * mhflux/MHAlpha.cc:75 - removed erronornously comittet SetSumw276 - don't output the numbe rof excess events vs time77 126 78 127 * mhflux/MHEffectiveOnTime.[h,cc]: -
trunk/MagicSoft/Mars/NEWS
r9345 r9347 36 36 37 37 * The display now also displays the trigger pattern 38 39 * The display can now display ceres reflector (_R_) files 38 40 39 41 ;ceres -
trunk/MagicSoft/Mars/datacenter/scripts/runcorsika
r9343 r9347 68 68 # positive if array x-direction points to the west 69 69 echo "ARRANG -7.0" 70 # Atmosphere 70 # Atmosphere (model, true/false for atmospheric refraction of cer-photons) 71 # Atmosphere read from atmprof11.dat 72 # My current understanding is that only refraction (bending of light 73 # but no absorption of photons is taken into account) setting T. 71 74 echo "ATMOSPHERE 11 T" 72 75 # Other parameters -
trunk/MagicSoft/Mars/mbase/MParList.cc
r9345 r9347 261 261 while ((cont=Next())) 262 262 { 263 if (!dynamic_cast<MParContainer*>(cont)) 264 continue; 265 266 cont->SetBit(kMustCleanup); 267 AddToList(cont); 263 MParContainer *par = dynamic_cast<MParContainer*>(cont); 264 if (par) 265 AddToList(par); 268 266 } 269 267 } -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc
r9336 r9347 37 37 // + Float_t fMagneticFieldZ 38 38 // + Float_t fMagneticFieldAz 39 // + Float_t fAtmosphericCoeffA[5] 40 // + Float_t fAtmosphericCoeffB[5] 41 // + Float_t fAtmosphericCoeffC[5] 42 // + UInt_t fCerenkovFlag 39 43 // 40 44 //////////////////////////////////////////////////////////////////////////// … … 53 57 54 58 using namespace std; 59 60 const Double_t MCorsikaRunHeader::fgEarthRadius = 637131500; // [cm] Earth radius as defined in CORSIKA 55 61 56 62 // -------------------------------------------------------------------------- … … 81 87 } 82 88 83 Float_t f[ 68];84 fin.read((char*)f, 68);89 Float_t f[272*4]; 90 fin.read((char*)f, 272*4); 85 91 86 92 fRunNumber = TMath::Nint(f[0]); … … 105 111 fEnergyMax = f[16]; 106 112 107 fin.seekg(1020, ios::cur); // skip the remaining data of this block 113 // 0/10 not supported? 114 115 memcpy(fAtmosphericCoeffA, f+253, 5*4); 116 memcpy(fAtmosphericCoeffB, f+258, 5*4); 117 memcpy(fAtmosphericCoeffC, f+263, 5*4); 108 118 109 119 // -------------------- Read first event header ------------------- … … 157 167 fMagneticFieldAz = g[91]; // Azimuth angle of magnetic north expressed in telescope coordinates 158 168 169 // WITH rounding: unbelievable! 170 fCerenkovFlag = TMath::Nint(g[75]); 171 159 172 fZdMin = g[79]; // lower edge of theta in ° 160 173 fZdMax = g[80]; // upper edge of theta in ° … … 173 186 fImpactMax = g[86]; 174 187 175 fWavelengthMin = g[9 5]; // Cherenkov bandwidth lower end in nm176 fWavelengthMax = g[9 6]; // Cherenkov bandwidth upper end in nm188 fWavelengthMin = g[94]; // Cherenkov bandwidth lower end in nm 189 fWavelengthMax = g[95]; // Cherenkov bandwidth upper end in nm 177 190 178 191 fViewConeInnerAngle = g[151]; // inner angle of view cone (°) … … 251 264 252 265 *fLog << "Spectrum: Slope=" << fSlopeSpectrum << " (" << fEnergyMin << "GeV-" << fEnergyMax << "GeV)" << endl; 266 *fLog << "Wavelength: " << fWavelengthMin << "nm - " << fWavelengthMax << "nm" << endl; 253 267 254 268 if (fViewConeOuterAngle>0) … … 269 283 *fLog << endl; 270 284 } 271 } 272 285 286 *fLog << "Atm.Coeff A: "; 287 for (int i=0; i<5; i++) 288 *fLog << " " << fAtmosphericCoeffA[i]; 289 *fLog << endl; 290 *fLog << "Atm.Coeff B: "; 291 for (int i=0; i<5; i++) 292 *fLog << " " << fAtmosphericCoeffB[i]; 293 *fLog << endl; 294 *fLog << "Atm.Coeff C: "; 295 for (int i=0; i<5; i++) 296 *fLog << " " << fAtmosphericCoeffC[i]; 297 *fLog << endl; 298 } 299 -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h
r9336 r9347 14 14 { 15 15 friend class MCorsikaEvtHeader; 16 public: 17 enum CerenkovFlag_t 18 { 19 kCerenkov = BIT(0), 20 kIact = BIT(1), 21 kCeffic = BIT(2), 22 kAtmext = BIT(3), 23 kRefraction = BIT(4), 24 kVolumedet = BIT(5), 25 kCurved = BIT(6), 26 kSlant = BIT(8) 27 }; 16 28 17 29 private: 30 static const Double_t fgEarthRadius; // Take same Earth radius as in CORSIKA (cm) 31 18 32 UInt_t fRunNumber; // Run number 19 33 UInt_t fParticleID; // Particle ID (see MMcEvtBasic or CORSIKA manual) … … 45 59 Float_t fViewConeInnerAngle; // [deg] 46 60 Float_t fViewConeOuterAngle; // [deg] 61 62 Float_t fAtmosphericCoeffA[5]; // [g/cm²] AATM (see Corsika Manual for details) 63 Float_t fAtmosphericCoeffB[5]; // [g/cm²] BATM (see Corsika Manual for details) 64 Float_t fAtmosphericCoeffC[5]; // [cm] CATM (see Corsika Manual for details) 65 66 UInt_t fCerenkovFlag; 47 67 48 68 public: … … 80 100 Bool_t HasViewCone() const { return fViewConeOuterAngle>0; } 81 101 102 Float_t GetObsLevel(UInt_t i=0) const { return i>9 ? -1 : fObsLevel[i]; } 103 104 Bool_t Has(CerenkovFlag_t opt) { return fCerenkovFlag&opt ? 1 : 0; } 105 106 static Double_t EarthRadius() { return fgEarthRadius; } 107 108 // Preliminary! 109 const Float_t *GetAtmosphericCoeffA() const { return fAtmosphericCoeffA; } 110 const Float_t *GetAtmosphericCoeffB() const { return fAtmosphericCoeffB; } 111 const Float_t *GetAtmosphericCoeffC() const { return fAtmosphericCoeffC; } 112 113 UInt_t GetNumAtmosphericModel() const { return (fCerenkovFlag>>10)&0x3ff; } 114 82 115 // I/O 83 116 Bool_t ReadEvt(istream& fin); -
trunk/MagicSoft/Mars/melectronics/MDigitalSignal.cc
r9243 r9347 46 46 // signals. 47 47 // 48 MDigitalSignal::MDigitalSignal(const MDigitalSignal &ttl1, const MDigitalSignal &ttl2) 48 MDigitalSignal::MDigitalSignal(const MDigitalSignal &ttl1, const MDigitalSignal &ttl2) : fIndex(-1) 49 49 { 50 50 const Double_t new0 = TMath::Max(ttl1.fStart, ttl2.fStart); -
trunk/MagicSoft/Mars/melectronics/MDigitalSignal.h
r9242 r9347 13 13 Double_t fLength; 14 14 15 Int_t fIndex; 16 15 17 public: 16 MDigitalSignal(Double_t start=0, Double_t len=1e12/*FLT_MAX*/) : fStart(start), fLength(len) 18 MDigitalSignal(Double_t start=0, Double_t len=1e12/*FLT_MAX*/) : fStart(start), fLength(len), fIndex(-1) 17 19 { 18 20 } 19 21 20 MDigitalSignal(const MDigitalSignal &ttl) : TObject(ttl), fStart(ttl.fStart), fLength(ttl.fLength) 22 MDigitalSignal(const MDigitalSignal &ttl) : TObject(ttl), fStart(ttl.fStart), fLength(ttl.fLength), fIndex(ttl.fIndex) 21 23 { 22 24 } 23 25 24 26 MDigitalSignal(const MDigitalSignal &ttl1, const MDigitalSignal &ttl2); 27 28 // Setter 29 void SetIndex(Int_t idx=-1) { fIndex=idx; } 25 30 26 31 // Getter … … 30 35 Double_t GetEnd() const { return fStart+fLength; } 31 36 Double_t GetLength() const { return fLength; } 37 38 Int_t GetIndex() const { return fIndex; } 39 Bool_t IsConnected() const { return fIndex>=0; } 32 40 33 41 // TObject -
trunk/MagicSoft/Mars/mjtrain/MJTrainSeparation.cc
r8957 r9347 98 98 99 99 h.SetMarkerColor(kRed); 100 g.SetMarkerColor(k Green);100 g.SetMarkerColor(kBlue); 101 101 102 102 TH2D res1(g); -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r9328 r9347 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1. 69 2009-02-12 20:05:06tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.70 2009-02-18 12:06:39 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 92 92 #include "MContinue.h" // MContinue 93 93 #include "MTriggerPatternDecode.h" // MTriggerPatternDecode 94 #include "MSimSignalCam.h" // MSimSignalCam 95 #include "MSimGeomCam.h" // MSimGeomCam 94 96 //#include "MMcTriggerLvl2Calc.h" // MMcTriggerLvl2Calc 95 97 … … 112 114 #include "MCalibrationChargeCam.h" // MCalibrationChargeCam 113 115 #include "MMuonSearchPar.h" // MMuonCalibPar 116 #include "MHPhotonEvent.h" // MHPhotonEvent 114 117 //#include "MMcTriggerLvl2.h" // MMcTriggerLvl2 115 118 … … 180 183 return 2; 181 184 185 if (t->FindBranch("MPhotonEvent.")) 186 return 3; 187 182 188 return -2; 183 189 } … … 197 203 case 1: gLog << all << "Calibrated Data File detected..." << endl; break; 198 204 case 2: gLog << all << "Raw Data File detected..." << endl; break; 205 case 3: gLog << all << "Ceres reflector file detected..." << endl; break; 199 206 case -2: gLog << err << "File type unknown... abort." << endl; return; 200 207 case -1: gLog << err << "Tree " << tname << " not found... abort." << endl; return; … … 237 244 tlist->AddToList(read); 238 245 246 MGeomApply *apl = new MGeomApply; 247 tlist->AddToList(apl); 248 249 if (type==3) 250 { 251 MHPhotonEvent *phevt = new MHPhotonEvent; 252 phevt->PermanentReset(); 253 plist->AddToList(phevt); 254 255 MFillH *fillh = new MFillH(phevt, "MPhotonEvent"); 256 fillh->SetNameTab("Detector"); 257 tlist->AddToList(fillh); 258 259 MSimGeomCam *simgeom = new MSimGeomCam; 260 tlist->AddToList(simgeom); 261 262 MSimSignalCam *sim = new MSimSignalCam; 263 tlist->AddToList(sim); 264 } 265 239 266 MContinue *mcevts = new MContinue("MRawEvtData.GetNumPixels==0", "ContEmpty"); 240 267 if (type==2) … … 247 274 contevt->SetInverted(); 248 275 tlist->AddToList(contevt); 249 250 MGeomApply *apl = new MGeomApply;251 tlist->AddToList(apl);252 276 253 277 MTriggerPatternDecode *decode = new MTriggerPatternDecode; … … 297 321 plist->AddToList(evt10); 298 322 299 MExtractTimeAndChargeDigitalFilter *digf = new MExtractTimeAndChargeDigitalFilter;300 digf->SetNameWeightsFile("msignal/cosmics_weights46.dat");301 302 MTaskEnv *taskenv1=new MTaskEnv("ExtractSignal");303 taskenv1->SetDefault(digf);304 taskenv1->SetOwner();305 306 MSignalCalc *nanal = new MSignalCalc;307 323 MFillH *fill01 = new MFillH(evt01, "MSignalCam", "MFillH01"); 308 324 MImgCleanStd *clean = new MImgCleanStd; … … 317 333 MFillH *fill10 = new MFillH(evt10, "MSignalCam", "MFillH10"); 318 334 335 MExtractTimeAndChargeDigitalFilter *digf = new MExtractTimeAndChargeDigitalFilter; 336 digf->SetNameWeightsFile("msignal/cosmics_weights46.dat"); 337 338 MTaskEnv *taskenv1=new MTaskEnv("ExtractSignal"); 339 taskenv1->SetDefault(digf); 340 taskenv1->SetOwner(); 341 342 MSignalCalc *nanal = new MSignalCalc; 343 319 344 MBadPixelsCalc *bcalc = new MBadPixelsCalc; 320 345 MBadPixelsTreat *btreat = new MBadPixelsTreat; … … 379 404 if (type==2) 380 405 tlist->AddToList(fill03); 381 tlist->AddToList(fill04); 406 if (type!=3) 407 tlist->AddToList(fill04); 382 408 tlist->AddToList(fill06a); 383 409 tlist->AddToList(fill06b); … … 393 419 //tlist->AddToList(fill09); 394 420 } 395 if (type==1 )421 if (type==1 || type==3) 396 422 { 397 423 MFillH *fill08 = new MFillH(evt08, "MSignalCam", "MFillH8"); … … 662 688 *fLog << all; 663 689 fLog->Separator(MString::Format("Entry %d", reader->GetNumEntry()+1)); 690 664 691 ((MHillas*) plist->FindObject("MHillas"))->Print(*geom); 665 692 ((MHillasExt*) plist->FindObject("MHillasExt"))->Print(*geom); … … 716 743 }; 717 744 745 const Int_t ismc = plist->FindObject("MHPhotonEvent") ? 1 : 0; 718 746 719 747 for (int i=1; i<7; i++) 720 748 { 721 TCanvas *c = GetCanvas(i); 749 TCanvas *c = GetCanvas(i+ismc); 750 if (!c) 751 continue; 752 722 753 c->cd(1); 723 754 -
trunk/MagicSoft/Mars/mmain/Makefile
r9328 r9347 24 24 -I../mdata -I../msignal -I../mcalib -I../mbadpixels \ 25 25 -I../mpointing -I../mpedestal -I../mmuon -I../mfilter -I../mjobs \ 26 -I../mtrigger 26 -I../mtrigger -I../mcorsika -I../msimcamera -I../msim 27 27 28 28 SRCFILES = MBrowser.cc \ -
trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc
r9328 r9347 115 115 fHistWL.SetName("Spectrum"); 116 116 fHistWL.SetTitle("Wavelength distribution"); 117 fHistWL.SetXTitle("\\lamb a [nm]");117 fHistWL.SetXTitle("\\lambda [nm]"); 118 118 fHistWL.SetYTitle("Counts"); 119 119 fHistWL.SetDirectory(NULL); … … 124 124 fHistH.SetYTitle("Counts"); 125 125 fHistH.SetDirectory(NULL); 126 127 // FIXME: Get this information from the corsika run-header128 MBinning(70, 275, 625).Apply(fHistWL);129 MBinning(100, 0, 25).Apply(fHistH);130 126 } 131 127 … … 169 165 // -------------------------------------------------------------------------- 170 166 // 167 // Find good limits for a binning num x [-max;max] 168 // and apply it to fHistXY and fHistT. 169 // 170 void MHPhotonEvent::SetBinningXY(Int_t num, Double_t max) 171 { 172 Double_t min = -max; 173 174 MH::FindGoodLimits(num, num, min, max, kFALSE); 175 176 MBinning binsd, binsa, binsz; 177 binsd.SetEdges(num, min, max); 178 179 SetBinning(&fHistXY, &binsd, &binsd); 180 SetBinning(&fHistT, &binsd, &binsd); 181 } 182 183 // -------------------------------------------------------------------------- 184 // 171 185 // Search for MRflEvtData, MRflEvtHeader and MGeomCam 172 186 // … … 175 189 Double_t xmax = -1; 176 190 Int_t num = 100; 191 192 const Int_t f = fPermanentReset ? 2 : 1; 193 MBinning(100/f, 0, 25).Apply(fHistH); 194 MBinning(70, 275, 625).Apply(fHistWL); 177 195 178 196 switch (fType) … … 182 200 // case0: Take a value defined by the user 183 201 case 1: 184 { 185 MCorsikaRunHeader *h = (MCorsikaRunHeader*)pList->FindObject("MCorsikaRunHeader"); 186 if (!h) 187 { 188 *fLog << err << "MCorsikaRunHeader not found... aborting." << endl; 189 return kFALSE; 190 } 191 xmax = 25000;//h->GetImpactMax()*1.25; // Estimate scattering in the atmosphere 192 break; 193 } 202 xmax = 25000; 203 break; 194 204 case 2: 195 205 { … … 222 232 } 223 233 224 Double_t xmin = -xmax; 234 SetBinningXY(num, xmax); 235 236 return kTRUE; 237 } 238 239 // -------------------------------------------------------------------------- 240 // 241 // ReInit overwrites the binning of the Wavelength histogram 242 // by the wavlenegth band from MCorsikaRunHeader. 243 // The bin-width is 5nm (fPermanentReset==kTRUE) or 10nm (kFALSE). 244 // 245 Bool_t MHPhotonEvent::ReInit(MParList *pList) 246 { 247 MCorsikaRunHeader *h = (MCorsikaRunHeader*)pList->FindObject("MCorsikaRunHeader"); 248 if (!h) 249 { 250 *fLog << err << "MCorsikaRunHeader not found... aborting." << endl; 251 return kFALSE; 252 } 253 254 /* 255 // What is the size of the light pool onm the ground? 256 if (fType==1) 257 SetBinningXY(100, h->GetImpactMax()); 258 */ 259 260 const Int_t f = fPermanentReset ? 2 : 1; 261 262 Double_t xmin = h->GetWavelengthMin(); 263 Double_t xmax = h->GetWavelengthMax(); 264 Int_t num = TMath::CeilNint((xmax-xmin)/(5*f)); 225 265 226 266 MH::FindGoodLimits(num, num, xmin, xmax, kFALSE); 227 267 228 MBinning binsd, binsa, binsz; 229 binsd.SetEdges(num, xmin, xmax); 230 231 SetBinning(&fHistXY, &binsd, &binsd); 232 SetBinning(&fHistT, &binsd, &binsd); 268 MBinning(abs(num), xmin, xmax).Apply(fHistWL); 233 269 234 270 return kTRUE; … … 250 286 // Check if we want to use this class as a single event display 251 287 if (fPermanentReset && evt->GetNumPhotons()>0) 252 { 253 fHistXY.Reset(); 254 fHistUV.Reset(); 255 fHistT.Reset(); 256 } 288 Clear(); 257 289 258 290 // Get number of photons … … 365 397 fHistH.Draw(); 366 398 } 399 400 // -------------------------------------------------------------------------- 401 // 402 // PermanentReset: Off 403 // 404 Int_t MHPhotonEvent::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 405 { 406 Bool_t rc = kFALSE; 407 if (IsEnvDefined(env, prefix, "PermanentReset", print)) 408 { 409 rc = kTRUE; 410 fPermanentReset = GetEnvValue(env, prefix, "PermanentReset", fPermanentReset); 411 } 412 413 return rc; 414 } -
trunk/MagicSoft/Mars/msim/MHPhotonEvent.h
r9308 r9347 28 28 Bool_t fPermanentReset; 29 29 30 // MHPhotonEvent 30 31 void Init(const char *name, const char *title); 32 void SetBinningXY(Int_t num, Double_t max); 31 33 34 // MParContainer 35 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 36 37 // MH 32 38 Bool_t SetupFill(const MParList *pList); 39 Bool_t ReInit(MParList *pList); 33 40 Int_t Fill(const MParContainer *par, const Stat_t weight=1); 34 41 //Bool_t Finalize(); 35 42 36 43 public: 37 MHPhotonEvent(Double_t max =0, const char *name=0, const char *title=0);38 MHPhotonEvent(Int_t type ,const char *name=0, const char *title=0);44 MHPhotonEvent(Double_t max, const char *name=0, const char *title=0); 45 MHPhotonEvent(Int_t type=3, const char *name=0, const char *title=0); 39 46 47 void PermanentReset(Bool_t b=kTRUE) { fPermanentReset=b; } 48 49 // TObject 40 50 void Draw(Option_t *o=""); 41 51 void Paint(Option_t *o=""); 52 53 void Clear(Option_t *o="") 54 { 55 fHistXY.Reset(); 56 fHistUV.Reset(); 57 fHistT.Reset(); 58 fHistWL.Reset(); 59 fHistH.Reset(); 60 } 42 61 43 62 ClassDef(MHPhotonEvent, 2) // Histogram to display the information of MPhotonEvents -
trunk/MagicSoft/Mars/msim/MSimAbsorption.cc
r9328 r9347 296 296 { 297 297 // Get i-th photon from the list 298 MPhotonData &ph = (*fEvt)[i];298 const MPhotonData &ph = (*fEvt)[i]; 299 299 300 300 // Depending on fUseTheta get the incident angle of the wavelength -
trunk/MagicSoft/Mars/msimcamera/MSimGeomCam.cc
r9342 r9347 37 37 // MPhotonEvent 38 38 // fNameGeomCam [MGeomCam] 39 // IntendedTrigPos [MParameterD]40 39 // MRawRunHeader 40 // [IntendedPulsePos [MParameterD]] 41 // [MPulseShape] 41 42 // 42 43 // Output Containers: … … 103 104 104 105 fPulse = (MPulseShape*)pList->FindObject("MPulseShape"); 106 /* 105 107 if (!fPulse) 106 108 { … … 108 110 return kFALSE; 109 111 } 110 112 */ 111 113 fPulsePos = (MParameterD*)pList->FindObject("IntendedPulsePos", "MParameterD"); 114 /* 112 115 if (!fPulsePos) 113 116 { … … 115 118 return kFALSE; 116 119 } 117 120 */ 118 121 fHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 119 122 if (!fHeader) … … 168 171 169 172 // ------ FIXME: Move somewhere else? MSimCalibrationSignal ------ 170 173 /* 171 174 if (!fEvt->IsSorted()) 172 175 { 173 *fLog << err << "ERROR - M PhotonEvent must be sorted!" << endl;176 *fLog << err << "ERROR - MSimGeomCam: MPhotonEvent must be sorted!" << endl; 174 177 return kERROR; 175 178 } 176 179 */ 177 180 const Float_t freq = fHeader->GetFreqSampling()/1000.; 178 181 … … 185 188 186 189 // Length (ns), Pulse position (Units ns) 187 const Float_t pp = fPulsePos ->GetVal();188 const Float_t pw = fPulse ->GetPulseWidth();190 const Float_t pp = fPulsePos ? fPulsePos->GetVal() : 0; 191 const Float_t pw = fPulse ? fPulse->GetPulseWidth() : 0; 189 192 190 193 fStat->SetTimeMedDev(fEvt->GetTimeMedianDev()); -
trunk/MagicSoft/Mars/msimcamera/MSimSignalCam.cc
r9274 r9347 35 35 // MPhotonEvent 36 36 // MPhotonStatistics 37 // [TriggerPos [MParameterD]] 37 38 // 38 39 // Output Containers: … … 90 91 91 92 fTrigger = (MParameterD*)pList->FindObject("TriggerPos", "MParameterD"); 93 /* 92 94 if (!fTrigger) 93 95 { … … 95 97 return kFALSE; 96 98 } 97 99 */ 98 100 fSignal = (MSignalCam*)pList->FindCreateObj("MSignalCam"); 99 101 if (!fSignal) … … 111 113 { 112 114 const UInt_t npix = fSignal->GetNumPixels(); 115 116 if (npix==0) 117 { 118 *fLog << err << "ERROR - MSignalCam has 0 entries. Presumably MGeomApply::ReInit not done." << endl; 119 return kFALSE; 120 } 113 121 114 122 if (fCont.GetSize()!=npix) … … 163 171 // What about events with trigger<0? 164 172 const Float_t trig = fTrigger && fTrigger->GetVal()>=0 ? fTrigger->GetVal() : 0; 165 const Float_t first = fStat->GetTimeFirst()+trig /*+50+40*/;173 const Float_t first = fStat->GetTimeFirst()+trig; 166 174 167 175 // Loop over all pixels and set signal and arrival time.
Note:
See TracChangeset
for help on using the changeset viewer.