Changeset 7005
- Timestamp:
- 05/10/05 12:13:12 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7003 r7005 21 21 22 22 -*-*- END OF LINE -*-*- 23 2005/05/10 Thomas Bretz 24 25 * mreport/MReportStarguider.cc: 26 - introduced the correct version which marked the fix of the 27 units of the nominal position 28 29 * callisto.rc: 30 - introduced a new line for new option in MCalibColorFromPast 31 32 * ganymed.cc: 33 - removed option "--full-display" -> now default 34 35 * manalysis/MEnergyEstimate.cc: 36 - print the rule a bit earlier in PreProcess 37 38 * mfilter/MFDeltaT.cc: 39 - fixed a typo in the output 40 41 * mhflux/MAlphaFitter.cc: 42 - some improvements to output 43 44 * mjobs/MJCut.cc: 45 - added ThetaSquared to output 46 47 * mjobs/MJStar.cc: 48 - fixed bug in copying of OriginalMC tree 49 50 * mmuon/MMuonCalibParCalc.cc: 51 - removed obsolete setting of ReadyToSave 52 53 54 55 2005/05/10 Markus Gaug (2005/05/09) 56 57 * mjobs/hilocalib_sp1.root 58 * mjobs/hilocalib_sp1_mc.root 59 - new hi-lo intercalibration files with the fixed spline extractor. 60 61 * mjobs/hilocalib_df46_mc.root 62 - new hi-lo intercalibration files from MC with the left out -O5 63 option. (The real data files had already the correct executable). 64 65 66 67 2005/05/10 Hendrik Bartko (2005/05/09) 68 69 * msignal/MC_weights46.dat 70 - NEW weights file for digital filter with dedicated MC weights 71 with 4 slices for the high gain and 6 slices for the low gain 72 73 74 75 2005/05/10 Markus Gaug (2005/05/08) 76 77 * mhcalib/MHCalibrationCam.[h,cc] 78 - introduce parameters fLowerFitLimit and fHigherFitLimit to 79 tell explicitly from outside to fit functions in a certain 80 range. If both are 0. (default), the histogram limits define 81 the fit limits (as before). 82 83 84 85 2005/05/10 Abelardo Moralejo (2005/05/07) 86 87 * mcalib/MMcCalibrationCalc.cc 88 - in Process, fixed wrong estimate of true number of "equivalent 89 photoelectrons" (correctedphotel). This worked roughly OK as long 90 as the file used for calibration was a (noiselesss) gamma file, 91 because most light is contained in the inner camera and the 92 problem was related to the light going into the outer pixels. So 93 results are not much affected, unless one uses for calibration 94 a file with events having a lot of light in the outer camera. 95 Thomas Hengstebeck noticed this problem when he used a file of MC 96 calibration pulses in mccalibrate.C 97 98 * manalysis/MMcCalibrationUpdate.[h,cc] 99 - Added possibility to set the hi to lo gain conversion factor. 100 Until now the factor was simply the ratio of pulse areas as read 101 from MMcFadcHeader. This of course is not the factor to be applied 102 to the extracted signals unless the extractor integrates the full 103 pulse in both high and low gain. The factor depends then on the 104 extractor, and the user has to find out what its value is. 105 Set as default calibration type kPhe. 106 107 * macros/mccalibrate.C, starmc.C 108 - Added the setting of the hi to lo gain conversion factor (see 109 above). For now it has to be calculated by the user. However, it 110 is strongly recommended from now on to use always callisto for the 111 calibration of real data, and not these macros. These are kept 112 just for checking purposes, mostly by "experts". 113 114 115 116 2005/05/10 Robert Wagner (2005/05/06) 117 118 * mreport/MReportStarguider.[h,cc]: 119 - Bugfix: Sequence of extracting fDevZd and fDevAz (switched) 120 121 122 123 2005/05/10 Markus Gaug (2005/05/05) 124 125 * mcalib/MCalibCalcFromPast.[h,cc] 126 - introduce flag "fUpdateWithFFactorMethod" which allows to use the 127 entire results obtained with the F-Factor method (including a new 128 number of mean photo-electrons). This possibility is switched on 129 (only) if somewhere in the callisto.rc file the following line is 130 written: 131 MJCalibrateSignal.MCalibCalcFromPast.UpdateWithFFactorMethod: yes 132 (Default is still the old way of adjusting the relative extracted 133 charges w.r.t. the mean charge over the inner camera). 134 135 136 137 2005/05/10 Markus Gaug (2005/05/02) 138 139 * mcalib/MCalibrationChargeCam.[h,cc] 140 - added new function MergeHiLoConversionFactors 141 142 * mcalib/MCalibColorSteer.[h,cc] 143 - introduce copying of hi-lo calibration factors from one cam to 144 the next in intensity calibration. 145 - added storage of averageing histograms of flag fHistStorage is 146 set 147 148 * mcalib/MCalibrationIntensityCam.[h,cc] 149 - introduce place for storage of averageing histograms (if wanted). 150 151 152 23 153 2005/05/09 Markus Meyer 24 154 … … 27 157 - changed the start parameter for the gaussian fit for the 28 158 calculation of ArcWidth 159 29 160 30 161 -
trunk/MagicSoft/Mars/Makefile.conf.darwin
r4029 r7005 20 20 # ----->>> settings for compilation 21 21 # 22 OPTIM = -O 5 -Wall -fno-exceptions -fPIC-Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual22 OPTIM = -O -Wall -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual 23 23 # ggc 3.2: removed -fnonnull-objects -Wtraditional -Wnested-externs 24 24 DEBUG = -
trunk/MagicSoft/Mars/macros/mccalibrate.C
r6496 r7005 63 63 64 64 // 65 // Set signal extractor65 // USER CHANGE: Set signal extractor 66 66 // 67 67 // MExtractFixedWindowPeakSearch sigextract; 68 68 // sigextract.SetWindows(6, 6, 4); 69 69 // 70 MExtractTimeAndChargeDigitalFilter sigextract; 71 sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat"); 72 sigextract.SetRange(1, 14, 3, 14); 73 70 71 // MExtractTimeAndChargeDigitalFilter sigextract; 72 // sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat"); 73 // sigextract.SetRange(1, 14, 3, 14); 74 75 MExtractTimeAndChargeSpline sigextract; 76 sigextract.SetRiseTimeHiGain(0.5); 77 sigextract.SetFallTimeHiGain(0.5); 78 79 80 // USER CHANGE: high to low gain ratio. DEPENDS on EXTRACTOR!! 81 // One should calculate somewhere else what this factor is for each extractor! 82 Float_t hi2low = 12.; // tentative value for spline with risetime 0.5, fall time 0.5 74 83 75 84 MMcCalibrationUpdate mccalibupdate; 85 mccalibupdate.SetUserLow2HiGainFactor(hi2low); 76 86 ///// User change: calibrate in photons or phe- : 77 87 mccalibupdate.SetSignalType(MCalibrateData::kPhe); -
trunk/MagicSoft/Mars/macros/starmc.C
r6403 r7005 52 52 // differences in gain of outer pixels) 53 53 // 54 CalibrationFilename = new TString("/ users/emc/moralejo/mcdata/Period021_0.73_mirror/gammas_nonoise/Gamma_zbin0_*.root");54 CalibrationFilename = new TString("/data1/magic/mc_data/root/Period025/gammas_nonoise/Gamma_zbin0_*.root"); 55 55 // File to be used in the calibration (must be a camera file without added noise) 56 56 57 57 58 Char_t* AnalysisFilename = "Gamma_ *w0.root"; // File to be analyzed58 Char_t* AnalysisFilename = "Gamma_zbin1_0_*.root"; // File to be analyzed 59 59 60 60 … … 74 74 Float_t accepted_fraction = 1.; 75 75 76 Float_t CleanLev[2] = {5., 4.};77 // User change: tail cuts for image analysis 78 76 // USER CHANGE: tail cuts for image analysis 77 78 Float_t CleanLev[2] = {7., 5.}; 79 79 MImgCleanStd clean(CleanLev[0], CleanLev[1]); // Applies tail cuts to image. 80 81 82 // User change: signal extraction 80 clean.SetMethod(MImgCleanStd::kAbsolute); // In absolute units (phot or phe- as chosen below) 81 82 83 // USER CHANGE: signal extraction 83 84 // 84 85 // MExtractFixedWindowPeakSearch sigextract; 85 86 // sigextract.SetWindows(6, 6, 4); 86 87 87 MExtractTimeAndChargeDigitalFilter sigextract; 88 sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat"); 89 sigextract.SetRange(1, 14, 3, 14); 88 // MExtractTimeAndChargeDigitalFilter sigextract; 89 // sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat"); 90 // sigextract.SetRange(1, 14, 3, 14); 91 92 MExtractTimeAndChargeSpline sigextract; 93 sigextract.SetRiseTimeHiGain(0.5); 94 sigextract.SetFallTimeHiGain(0.5); 95 96 // USER CHANGE: high to low gain ratio. DEPENDS on EXTRACTOR!! 97 // One should calculate somewhere else what this factor is for each extractor! 98 Float_t hi2low = 12.; // tentative value for spline with risetime 0.5, fall time 0.5 99 90 100 91 101 ////////// Calibration ////////// 92 93 102 MMcCalibrationUpdate mccalibupdate; 94 ///// User change: calibrate in photons or phe- : 103 mccalibupdate.SetUserLow2HiGainFactor(hi2low); 104 105 ///// USER CHANGE: calibrate in photons or phe- : 95 106 mccalibupdate.SetSignalType(MCalibrateData::kPhe); 96 107 // mccalibupdate.SetSignalType(MCalibrateData::kPhot); … … 233 244 // 234 245 235 //MProgressBar bar;236 //bar.SetWindowName("Calibrating...");246 MProgressBar bar; 247 bar.SetWindowName("Calibrating..."); 237 248 238 249 MEvtLoop evtloop; 239 //evtloop.SetProgressBar(&bar);250 evtloop.SetProgressBar(&bar); 240 251 evtloop.SetParList(&plist); 241 252 … … 271 282 tlist.AddToListBefore(&skip, &sigextract); 272 283 273 //bar.SetWindowName("Analyzing...");284 bar.SetWindowName("Analyzing..."); 274 285 275 286 tlist.RemoveFromList(&mccalibcalc); // Removes calibration task from list. -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
r6342 r7005 79 79 80 80 MMcCalibrationUpdate::MMcCalibrationUpdate(const char *name, const char *title) 81 : fFillCalibrationCam(kTRUE), fOuterPixelsGainScaling(kTRUE), fAmplitude(-1.), 82 fAmplitudeOuter(-1.), fConversionHiLo(-1.), fUserLow2HiGainFactor(-1.), 83 fSignalType(MCalibrateData::kPhe) 81 84 { 82 85 fName = name ? name : "MMcCalibrationUpdate"; 83 86 fTitle = title ? title : "Write MC pedestals and conversion factors into MCalibration Container"; 84 85 86 fAmplitude = -1.;87 fAmplitudeOuter = -1.;88 fConversionHiLo = -1.;89 90 fSignalType = MCalibrateData::kPhot;91 92 fFillCalibrationCam = kTRUE;93 fOuterPixelsGainScaling = kTRUE;94 87 } 95 88 … … 194 187 { 195 188 fAmplitudeOuter = fHeaderFadc->GetAmplitudOuter(); 196 fConversionHiLo = fHeaderFadc->GetLow2HighGain(); 189 190 fHeaderLow2HiGainFactor = fHeaderFadc->GetLow2HighGain(); 191 192 // The high to low gain ratio is stored in MMcFadcHeader.Low2HighGain. 193 // However, this is just the ratio of total pulse integrals. Since the 194 // shape of the low gain pulse is different from that of the high gain, 195 // the factor to be applied to signals extracted from low gain depends 196 // on the type of signal extractor (for instance if we extract the pulse 197 // height, the factor is larger than Low2HighGain, because the low gain 198 // pulse shape is wider and hence lower than the high gain pulse. So the 199 // user can set manually the value of the factor to be applied. If such 200 // value has not been set by the user, then we takes as default Low2HighGain. 201 202 if (fUserLow2HiGainFactor < 0.) 203 fConversionHiLo = fHeaderLow2HiGainFactor; 204 else 205 fConversionHiLo = fUserLow2HiGainFactor; 206 197 207 } 198 208 else // old MC files, camera < v0.7 … … 203 213 204 214 } 205 else // Check that following files have all the same FADC parameters215 else // Check that the following files have all the same FADC parameters as the first 206 216 { 207 217 if ( fabs(fHeaderFadc->GetAmplitud()-fAmplitude) > 1.e-6 ) … … 211 221 } 212 222 213 if (mcrunh->GetCamVersion() > 60) // old MC files, camera < v0.7223 if (mcrunh->GetCamVersion() > 60) // files from camera 0.7 or newer 214 224 { 215 225 if( fabs(fHeaderFadc->GetAmplitudOuter()-fAmplitudeOuter) > 1.e-6 || 216 fabs(f ConversionHiLo-fHeaderFadc->GetLow2HighGain())> 1.e-6 )226 fabs(fHeaderLow2HiGainFactor-fHeaderFadc->GetLow2HighGain()) > 1.e-6 ) 217 227 { 218 228 *fLog << err << "Parameters of MMcFadcHeader are not the same for all files... aborting." << endl; -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.h
r6342 r7005 42 42 Float_t fAmplitude; // FADC parameters from camera simulation (see camera manual) 43 43 Float_t fAmplitudeOuter; // to be read from the MMcFadcHeader. 44 Float_t fConversionHiLo; // Ratio of high to low gain. 44 Float_t fConversionHiLo; // Ratio of high to low gain to be used for low gain signal calibration. 45 46 Float_t fHeaderLow2HiGainFactor; // Ratio of high to low gain, as read from the MMcFadcHeader 47 Float_t fUserLow2HiGainFactor; // Ratio of high to low gain, as set manually by the user 48 45 49 46 50 Float_t fOuterPixelsLightCollection; … … 58 62 { fOuterPixelsGainScaling = tf; } 59 63 64 void SetUserLow2HiGainFactor(Float_t x) { fUserLow2HiGainFactor = x; } 65 60 66 void SetSignalType (MCalibrateData::SignalType_t x) { fSignalType = x; } 61 67 MCalibrateData::SignalType_t GetSignalType () const { return fSignalType; } -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r6963 r7005 79 79 fIntensCharge(NULL), fIntensBlind(NULL), fIntensRelTime(NULL), fIntensBad(NULL), 80 80 fChargeCalc(NULL), fRelTimeCalc(NULL), fCalibrate(NULL), 81 fNumEvents(0), fNumCam(0) 81 fNumEvents(0), fNumCam(0), fUpdateWithFFactorMethod(kFALSE) 82 82 { 83 83 … … 249 249 fRelTimeCalc->Finalize(); 250 250 if (fCalibrate) 251 fCalibrate->UpdateConversionFactors((MCalibrationChargeCam*)fIntensCharge->GetCam()); 251 fCalibrate->UpdateConversionFactors(fUpdateWithFFactorMethod ? NULL : 252 (MCalibrationChargeCam*)fIntensCharge->GetCam()); 252 253 253 254 ReInitialize(); … … 324 325 Int_t MCalibCalcFromPast::PostProcess() 325 326 { 326 *fLog << "Number of Calibration Cams: " << fNumCam << endl;327 *fLog << inf << "Number of Calibration Cams: " << fNumCam << endl; 327 328 return kTRUE; 328 329 329 330 } 330 331 332 // -------------------------------------------------------------------------- 333 // 334 // Read the setup from a TEnv, eg: 335 // MCalibCalcFromPast.UpdateWithFFactorMethod: Off, On 336 // 337 Int_t MCalibCalcFromPast::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 338 { 339 Bool_t rc = kFALSE; 340 if (IsEnvDefined(env, prefix, "UpdateWithFFactorMethod", print)) 341 { 342 rc = kTRUE; 343 SetUpdateWithFFactorMethod(GetEnvValue(env, prefix, "UpdateWithFFactorMethod", fUpdateWithFFactorMethod)); 344 } 345 346 return rc; 347 } -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.h
r6963 r7005 41 41 UInt_t fNumEvents; //! Event counter only for calibration events 42 42 UInt_t fNumCam; //! Number of currently used Calibration Cam 43 43 44 Bool_t fUpdateWithFFactorMethod; // Update the interlaced calib events with the full F-Factor method 45 44 46 Int_t PreProcess(MParList *pList); 45 47 Int_t Process(); … … 48 50 Bool_t ReInitialize(); 49 51 Bool_t Finalize(const char* name); 52 53 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 50 54 51 55 public: … … 61 65 void SetChargeCalc ( MCalibrationChargeCalc *c ) { fChargeCalc = c; } 62 66 void SetRelTimeCalc ( MCalibrationRelTimeCalc *c ) { fRelTimeCalc = c; } 67 68 void SetUpdateWithFFactorMethod(const Bool_t b=kTRUE){ fUpdateWithFFactorMethod = b; } 63 69 64 70 ClassDef(MCalibCalcFromPast, 1) // Task to steer the processing of interlace calibration events -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc
r6963 r7005 22 22 ! 23 23 \* ======================================================================== */ 24 24 25 ////////////////////////////////////////////////////////////////////////////// 25 26 // … … 81 82 : fCalibPattern(NULL), fGeom(NULL), fParList(NULL), 82 83 fIntensCharge(NULL), fIntensRelTime(NULL), fIntensBad(NULL), 83 fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL) 84 fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL), fHistCopy(kFALSE) 84 85 { 85 86 … … 285 286 } 286 287 288 // -------------------------------------------------------------------------- 289 // 290 // Reads the pattern from MCalibrationPattern and initializes new containers in the 291 // Intensity Cams, if the pattern has changed. Executes Finalize of the 292 // MCalibration*Calc classes in that case. 293 // 294 Int_t MCalibColorSteer::PostProcess() 295 { 296 // 297 // Finalize Possible calibration histogram classes... 298 // 299 *fLog << inf << "Finalize calibration histograms..." << flush; 300 if (Finalize("MHCalibrationChargeCam")) *fLog << inf << "MHCalibrationChargeCam..." << flush; 301 if (Finalize("MHCalibrationChargeBlindCam")) *fLog << inf << "MHCalibrationChargeBlindCam..." << flush; 302 if (Finalize("MHCalibrationRelTimeCam")) *fLog << inf << "MHCalibrationRelTimeCam..." << flush; 303 if (Finalize("MHCalibrationTestCam")) *fLog << inf << "MHCalibrationChargeCam..." << flush; 304 if (Finalize("MHCalibrationTestTimeCam")) *fLog << inf << "MHCalibrationChargeCam..." << flush; 305 *fLog << inf << "done." << endl; 306 307 return kTRUE; 308 } 287 309 288 310 // -------------------------------------------------------------------------- … … 300 322 301 323 hist->Finalize(); 324 CopyHist(name); 302 325 hist->ResetHists(); 303 326 hist->SetColor( fCalibPattern->GetPulserColor()); … … 331 354 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)fIntensCharge->GetCam(); 332 355 cam->SetPulserColor(fCalibPattern->GetPulserColor()); 333 if (!cam-> CopyHiLoConversionFactors(*oldcam))334 return kFALSE;356 if (!cam->MergeHiLoConversionFactors(*oldcam)) 357 return kFALSE; 335 358 *fLog << inf << "New MCalibrationChargeCam with name: " << cam->GetName() << endl; 336 359 } … … 388 411 return result; 389 412 } 413 414 // -------------------------------------------------------------------------- 415 // 416 // Copies the histogram classes into the intensity cams 417 // 418 void MCalibColorSteer::CopyHist(const char* name) 419 { 420 MHCalibrationCam *hcam = (MHCalibrationCam*)fParList->FindObject(name); 421 TString n(name); 422 if (n.Contains("ChargeCam")) 423 { 424 if (fIntensCharge) 425 fIntensCharge->AddHist((MHCalibrationCam*)hcam->Clone()); 426 } 427 if (n.Contains("Blind")) 428 if (fIntensBlind) 429 fIntensBlind->AddHist((MHCalibrationCam*)hcam->Clone()); 430 431 if (n.Contains("RelTime")) 432 if (fIntensRelTime) 433 fIntensRelTime->AddHist((MHCalibrationCam*)hcam->Clone()); 434 } 435 436 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h
r6963 r7005 27 27 { 28 28 private: 29 30 31 29 MCalibrationPattern *fCalibPattern; //! 32 30 MRawRunHeader *fRunHeader; //! … … 45 43 MCalibrationCam::PulserColor_t fColor; 46 44 Float_t fStrength; 45 46 Bool_t fHistCopy; // Decide whether MHCalibrationCams will get copied 47 47 48 48 Int_t PreProcess(MParList *pList); 49 49 Int_t Process(); 50 Int_t PostProcess(); 50 51 51 52 Bool_t ReInitialize(); 52 53 Bool_t Finalize(const char* name); 54 55 void CopyHist(const char* name); 53 56 TString GetNamePattern(); 54 57 55 58 public: 59 MCalibColorSteer(const char *name=NULL, const char *title=NULL); 56 60 57 MCalibColorSteer(const char *name=NULL, const char *title=NULL); 58 ~MCalibColorSteer() {} 61 void SetHistCopy(const Bool_t b=kTRUE) { fHistCopy = b; } 59 62 60 63 ClassDef(MCalibColorSteer, 1) // Task to steer the processing of multiple calibration colours -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r6963 r7005 252 252 // Copy High-gain vs. low-gain conversion factors from cam to this. 253 253 // 254 Bool_t MCalibrationChargeCam:: CopyHiLoConversionFactors(const MCalibrationChargeCam &cam) const254 Bool_t MCalibrationChargeCam::MergeHiLoConversionFactors(const MCalibrationChargeCam &cam) const 255 255 { 256 256 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h
r6963 r7005 59 59 const UInt_t sec=0, MBadPixelsCam *bad=NULL); 60 60 61 Bool_t CopyHiLoConversionFactors(const MCalibrationChargeCam &cam) const;61 Bool_t MergeHiLoConversionFactors(const MCalibrationChargeCam &cam) const; 62 62 63 63 // Prints -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc
r5651 r7005 30 30 // Contains TOrdCollections for the following objects: 31 31 // - fCams: Array of classes derived from MCalibrationCam, one entry 32 // per calibration camera result. Has to be created 32 // per calibration camera result. 33 // - fHists: Array of classes derived from MHCalibrationPix, one entry 34 // per calibration camera result and area index 33 35 // 34 36 // See also: MCalibrationIntensityChargeCam, MCalibrationIntensityQECam, … … 39 41 // MCalibrationChargeBlindPix, MCalibrationChargePINDiode 40 42 // 43 // ClassVersion 2: 44 // + fHists 41 45 // 42 46 ///////////////////////////////////////////////////////////////////////////// … … 45 49 #include <TOrdCollection.h> 46 50 51 #include "MLog.h" 52 #include "MLogManip.h" 53 47 54 #include "MGeomCam.h" 55 #include "MHCalibrationCam.h" 48 56 49 57 ClassImp(MCalibrationIntensityCam); … … 57 65 // Set the following pointer to NULL: 58 66 // - fCams 67 // - fHists 59 68 // 60 69 MCalibrationIntensityCam::MCalibrationIntensityCam(const char *name, const char *title) … … 66 75 fCams = new TOrdCollection; 67 76 fCams->SetOwner(); 68 77 78 fHists = new TOrdCollection; 79 fHists->SetOwner(); 69 80 } 70 81 … … 76 87 MCalibrationIntensityCam::~MCalibrationIntensityCam() 77 88 { 78 if (fCams)79 89 delete fCams; 90 delete fHists; 91 } 92 93 // -------------------------------------------------------------------------- 94 // 95 // Add a new MHCalibrationCam to fHists 96 // 97 void MCalibrationIntensityCam::AddHist( const MHCalibrationCam *cam) 98 { 99 const Int_t size = fHists->GetSize(); 100 fHists->AddAt((TObject*)cam,size); 101 102 if (size != GetSize()-1) 103 *fLog << warn << "Histogram Cams and Calibration Cams size mismatch! " << endl; 80 104 } 81 105 … … 100 124 void MCalibrationIntensityCam::Copy(TObject& object) const 101 125 { 102 103 MCalibrationIntensityCam &calib = (MCalibrationIntensityCam&)object; 104 105 MParContainer::Copy(calib); 106 107 calib.fOffsets = fOffsets; 108 calib.fSlopes = fSlopes; 109 110 const UInt_t n = GetSize(); 111 if (n != 0) 126 MCalibrationIntensityCam &calib = (MCalibrationIntensityCam&)object; 127 128 MParContainer::Copy(calib); 129 130 calib.fOffsets = fOffsets; 131 calib.fSlopes = fSlopes; 132 133 const UInt_t n = GetSize(); 134 if (n != 0) 112 135 { 113 calib.InitSize(n); 114 for (UInt_t i=0; i<n; i++) 115 GetCam(i)->Copy(*(calib.GetCam(i))); 136 calib.InitSize(n); 137 for (UInt_t i=0; i<n; i++) 138 { 139 GetCam(i)->Copy(*(calib.GetCam(i))); 140 GetHist(i)->Copy(*(calib.GetHist(i))); 141 } 116 142 } 117 118 143 } 119 144 … … 124 149 void MCalibrationIntensityCam::Clear(Option_t *o) 125 150 { 126 127 fCams->ForEach(MCalibrationCam, Clear)(); 128 129 return; 151 fCams->ForEach(MCalibrationCam, Clear)(); 152 fHists->ForEach(MHCalibrationCam, Clear)(); 130 153 } 131 154 … … 136 159 void MCalibrationIntensityCam::Print(Option_t *o) const 137 160 { 138 fCams->ForEach(MCalibrationCam, Print)(o); 161 fCams->ForEach(MCalibrationCam, Print)(o); 162 fHists->ForEach(MHCalibrationCam, Print)(o); 139 163 } 140 164 … … 424 448 return size; 425 449 } 450 451 // -------------------------------------------------------------------------- 452 // 453 // Get i-th histogram class 454 // 455 MHCalibrationCam *MCalibrationIntensityCam::GetHist(Int_t i) 456 { 457 return static_cast<MHCalibrationCam*>(i==-1 ? fHists->Last() : fHists->At(i)); 458 } 459 460 // -------------------------------------------------------------------------- 461 // 462 // Get i-th histogram class 463 // 464 const MHCalibrationCam *MCalibrationIntensityCam::GetHist(Int_t i) const 465 { 466 return static_cast<MHCalibrationCam*>(i==-1 ? fHists->Last() : fHists->At(i)); 467 } 468 469 // -------------------------------------------------------------------------- 470 // 471 // Get histogram class with name 'name' 472 // 473 MHCalibrationCam *MCalibrationIntensityCam::GetHist(const char *name ) 474 { 475 return static_cast<MHCalibrationCam*>(fHists->FindObject(name)); 476 } 477 478 // -------------------------------------------------------------------------- 479 // 480 // Get histogram class with name 'name' 481 // 482 const MHCalibrationCam *MCalibrationIntensityCam::GetHist(const char *name ) const 483 { 484 return static_cast<MHCalibrationCam*>(fHists->FindObject(name)); 485 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.h
r5651 r7005 18 18 class MBadPixelsPix; 19 19 class MGeomCam; 20 class MHCalibrationCam; 21 20 22 class MCalibrationIntensityCam : public MParContainer, public MCamEvent 21 23 { 22 24 private: 23 24 MArrayD fOffsets; //! Arrays of Higain-vs-LoGain fit result Offsets 25 MArrayD fSlopes; //! Arrays of Higain-vs-LoGain fit result Slopes 25 MArrayD fOffsets; //! Arrays of Higain-vs-LoGain fit result Offsets 26 MArrayD fSlopes; //! Arrays of Higain-vs-LoGain fit result Slopes 26 27 27 28 protected: 28 29 TOrdCollection *f Cams; // Array of MCalibrationCams, one per pulse colour and intensity29 TOrdCollection *fCams; // Array of MCalibrationCams, one per pulse colour and intensity 30 TOrdCollection *fHists; // Array of MHCalibrationCam's, containing the mean charges per area histograms 30 31 31 32 virtual void Add(const UInt_t from, const UInt_t to); … … 33 34 34 35 public: 35 36 36 MCalibrationIntensityCam(const char *name=NULL, const char *title=NULL); 37 37 ~MCalibrationIntensityCam(); … … 40 40 void Copy(TObject& object) const; 41 41 42 void AddToList( const char* name, const MGeomCam &geom ); 42 void AddToList(const char* name, const MGeomCam &geom); 43 void AddHist(const MHCalibrationCam *cam); 43 44 44 45 Int_t CountNumEntries(const MCalibrationCam::PulserColor_t col) const; … … 69 70 const MCalibrationCam *GetCam ( const char *name ) const; 70 71 72 MHCalibrationCam *GetHist ( Int_t i=-1); 73 const MHCalibrationCam *GetHist ( Int_t i=-1) const; 74 75 MHCalibrationCam *GetHist ( const char *name ); 76 const MHCalibrationCam *GetHist ( const char *name ) const; 77 71 78 MCalibrationPix &operator[] ( UInt_t i ); 72 79 const MCalibrationPix &operator[] ( UInt_t i ) const; … … 91 98 GetCam()->SetPulserColor(col); } 92 99 93 ClassDef(MCalibrationIntensityCam, 1) // Base Container Intensity Calibration Results100 ClassDef(MCalibrationIntensityCam, 2) // Base Container Intensity Calibration Results 94 101 }; 95 102 -
trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc
r4710 r7005 242 242 { 243 243 // 244 // Exclude events with some saturated pixel244 // Exclude events with some high-gain saturated pixel 245 245 // 246 246 if (fPar->GetNumSatPixelsHG()>0) … … 266 266 // 267 267 268 const Float_t inner_photel = (Float_t) fMcEvt->GetPhotElfromShower() * innersize / size; 269 const Float_t outer_photel = (Float_t) fMcEvt->GetPhotElfromShower() - inner_photel; 270 271 const Float_t corrected_photel = inner_photel + outer_photel / fOuterPixelsLightCollection; 272 273 274 // fHistADC2PhotEl->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size)); 268 const Float_t corrected_photel = (Float_t) fMcEvt->GetPhotElfromShower() / 269 (fOuterPixelsLightCollection + innersize / size * (1. - fOuterPixelsLightCollection)); 275 270 276 271 fHistADC2PhotEl->Fill(TMath::Log10(corrected_photel/size)); -
trunk/MagicSoft/Mars/mfilter/MFDeltaT.cc
r5061 r7005 110 110 // -------------------------------------------------------------------------- 111 111 // 112 // Calculate the con sition. The consition is true if the time difference112 // Calculate the condition. The condition is true if the time difference 113 113 // between two consecutive events are >0 or <= upper limit. 114 114 // … … 158 158 PrintSkipped(fErrors[5], "MTime not initialized"); 159 159 *fLog << " " << (int)fErrors[0] << " ("; 160 *fLog << Form(" 5.1f", 100.*fErrors[0]/GetNumExecutions());160 *fLog << Form("%5.1f", 100.*fErrors[0]/GetNumExecutions()); 161 161 *fLog << "%) Evts fullfilled filter condition!" << endl; 162 162 *fLog << endl; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r6926 r7005 52 52 // The flag kAverageing steers if the event-by-event averages are treated at all. 53 53 // 54 // Class Version 5: 55 // + Double_t fLowerFitLimitHiGain; // Lower limit for the fit range for the hi-gain hist 56 // + Double_t fUpperFitLimitHiGain; // Upper limit for the fit range for the hi-gain hist 57 // + Double_t fLowerFitLimitLoGain; // Lower limit for the fit range for the lo-gain hist 58 // + Double_t fUpperFitLimitLoGain; // Upper limit for the fit range for the lo-gain hist 59 // + Bool_t fIsHiGainFitRanges; // Are high-gain fit ranges defined? 60 // + Bool_t fIsLoGainFitRanges; // Are low-gain fit ranges defined? 61 // 62 // 54 63 ///////////////////////////////////////////////////////////////////////////// 55 64 #include "MHCalibrationCam.h" … … 86 95 using namespace std; 87 96 97 const Double_t MHCalibrationCam::fgLowerFitLimitHiGain = 0; 98 const Double_t MHCalibrationCam::fgUpperFitLimitHiGain = 0; 99 const Double_t MHCalibrationCam::fgLowerFitLimitLoGain = 0; 100 const Double_t MHCalibrationCam::fgUpperFitLimitLoGain = 0; 101 88 102 const Int_t MHCalibrationCam::fgPulserFrequency = 500; 89 103 const Float_t MHCalibrationCam::fgProbLimit = 0.0001; 90 104 const Float_t MHCalibrationCam::fgOverflowLimit = 0.005; 105 91 106 const TString MHCalibrationCam::gsHistName = "Hist"; 92 107 const TString MHCalibrationCam::gsHistTitle = ""; 93 108 const TString MHCalibrationCam::gsHistXTitle = ""; 94 109 const TString MHCalibrationCam::gsHistYTitle = "Nr. events"; 110 95 111 // -------------------------------------------------------------------------- 96 112 // … … 116 132 //- SetSizeCheck (kTRUE); 117 133 //- SetInterlaced (kFALSE); 134 //- SetLowerFitLimitHiGain(); 135 //- SetUpperFitLimitHiGain(); 136 //- SetLowerFitLimitLoGain(); 137 //- SetUpperFitLimitLoGain(); 118 138 // 119 139 MHCalibrationCam::MHCalibrationCam(const char *name, const char *title) 120 : fHistName(gsHistName),fHistTitle(gsHistTitle), 121 fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle), 122 fColor(MCalibrationCam::kNONE), fIntensBad(NULL), 123 fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL), 124 fRunHeader(NULL) 140 : fIsHiGainFitRanges(kFALSE), fIsLoGainFitRanges(kFALSE), 141 fHistName(gsHistName),fHistTitle(gsHistTitle), 142 fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle), 143 fColor(MCalibrationCam::kNONE), fIntensBad(NULL), 144 fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL), 145 fRunHeader(NULL) 125 146 { 126 147 … … 152 173 SetOscillations(kTRUE); 153 174 SetSizeCheck (kTRUE); 175 176 SetLowerFitLimitHiGain(); 177 SetUpperFitLimitHiGain(); 178 SetLowerFitLimitLoGain(); 179 SetUpperFitLimitLoGain(); 154 180 } 155 181 … … 1048 1074 MBadPixelsPix::UncalibratedType_t osctyp) 1049 1075 { 1050 1076 fIsHiGainFitRanges = TMath::Abs(fUpperFitLimitHiGain - fLowerFitLimitHiGain) > 1E-5; 1077 1051 1078 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) 1052 1079 { … … 1097 1124 MBadPixelsPix::UncalibratedType_t osctyp) 1098 1125 { 1099 1126 fIsLoGainFitRanges = TMath::Abs(fUpperFitLimitLoGain - fLowerFitLimitLoGain) > 1E-5; 1127 1100 1128 if (!IsLoGain()) 1101 1129 return; … … 1207 1235 // 2) Fit the Hi Gain histograms with a Gaussian 1208 1236 // 1209 if (!hist.FitGaus()) 1210 // 1211 // 3) In case of failure set the bit Fitted to false and take histogram means and RMS 1212 // 1213 if (!hist.RepeatFit()) 1214 { 1215 hist.BypassFit(); 1216 bad.SetUncalibrated( fittyp ); 1217 } 1237 if (fIsHiGainFitRanges) 1238 { 1239 if (!hist.FitGaus("R",fLowerFitLimitHiGain,fUpperFitLimitHiGain)) 1240 bad.SetUncalibrated( fittyp ); 1241 } 1242 else 1243 if (!hist.FitGaus()) 1244 // 1245 // 3) In case of failure set the bit Fitted to false and take histogram means and RMS 1246 // 1247 if (!hist.RepeatFit()) 1248 { 1249 hist.BypassFit(); 1250 bad.SetUncalibrated( fittyp ); 1251 } 1252 1218 1253 1219 1254 // … … 1291 1326 // 2) Fit the Hi Gain histograms with a Gaussian 1292 1327 // 1293 if (!hist.FitGaus()) 1294 // 1295 // 3) In case of failure set the bit Fitted to false and take histogram means and RMS 1296 // 1297 if (!hist.RepeatFit()) 1298 { 1299 hist.BypassFit(); 1300 if (pix.IsHiGainSaturation()) 1328 if (fIsLoGainFitRanges) 1329 { 1330 if (!hist.FitGaus("R",fLowerFitLimitLoGain,fUpperFitLimitLoGain)) 1301 1331 bad.SetUncalibrated( fittyp ); 1302 } 1303 1332 } 1333 else 1334 if (!hist.FitGaus()) 1335 // 1336 // 3) In case of failure set the bit Fitted to false and take histogram means and RMS 1337 // 1338 if (!hist.RepeatFit()) 1339 { 1340 hist.BypassFit(); 1341 if (pix.IsHiGainSaturation()) 1342 bad.SetUncalibrated( fittyp ); 1343 } 1344 1304 1345 // 1305 1346 // 4) Check for oscillations … … 1429 1470 } 1430 1471 1472 // ----------------------------------------------------------------------------- 1473 // 1474 // Available options 1475 // Debug 1476 // LoGain 1477 // Oscillations 1478 // SizeCheck 1479 // Averageing 1480 // Nbins 1481 // First 1482 // Last 1483 // ProbLimit 1484 // OverflowLimit 1485 // PulserFrequency 1486 // LowerFitLimitHiGain 1487 // UpperFitLimitHiGain 1488 // LowerFitLimitLoGain 1489 // UpperFitLimitLoGain 1490 // 1431 1491 Int_t MHCalibrationCam::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 1432 1492 { … … 1493 1553 rc = kTRUE; 1494 1554 } 1555 1556 if (IsEnvDefined(env, prefix, "LowerFitLimitHiGain", print)) 1557 { 1558 SetLowerFitLimitHiGain(GetEnvValue(env, prefix, "LowerFitLimitHiGain", fLowerFitLimitHiGain)); 1559 rc = kTRUE; 1560 } 1561 1562 if (IsEnvDefined(env, prefix, "UpperFitLimitHiGain", print)) 1563 { 1564 SetUpperFitLimitHiGain(GetEnvValue(env, prefix, "UpperFitLimitHiGain", fUpperFitLimitHiGain)); 1565 rc = kTRUE; 1566 } 1567 1568 if (IsEnvDefined(env, prefix, "LowerFitLimitLoGain", print)) 1569 { 1570 SetLowerFitLimitLoGain(GetEnvValue(env, prefix, "LowerFitLimitLoGain", fLowerFitLimitLoGain)); 1571 rc = kTRUE; 1572 } 1573 1574 if (IsEnvDefined(env, prefix, "UpperFitLimitLoGain", print)) 1575 { 1576 SetUpperFitLimitLoGain(GetEnvValue(env, prefix, "UpperFitLimitLoGain", fUpperFitLimitLoGain)); 1577 rc = kTRUE; 1578 } 1579 1495 1580 1496 1581 return rc; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
r6771 r7005 40 40 41 41 private: 42 static const Double_t fgLowerFitLimitHiGain; //! The default for fLowerFitLimitHiGain (now at: 0) 43 static const Double_t fgUpperFitLimitHiGain; //! The default for fUpperFitLimitHiGain (now at: 0) 44 static const Double_t fgLowerFitLimitLoGain; //! The default for fLowerFitLimitLoGain (now at: 0) 45 static const Double_t fgUpperFitLimitLoGain; //! The default for fUpperFitLimitLoGain (now at: 0) 42 46 43 47 static const Int_t fgPulserFrequency; //! The default for fPulserFrequency (now set to: 500) … … 58 62 Float_t fProbLimit; // Limit for acceptance of probability of Gauss-Fit 59 63 Float_t fOverflowLimit; // Part of maximum allowed overflow events 64 65 Double_t fLowerFitLimitHiGain; // Lower limit for the fit range for the hi-gain hist 66 Double_t fUpperFitLimitHiGain; // Upper limit for the fit range for the hi-gain hist 67 Double_t fLowerFitLimitLoGain; // Lower limit for the fit range for the lo-gain hist 68 Double_t fUpperFitLimitLoGain; // Upper limit for the fit range for the lo-gain hist 69 70 Bool_t fIsHiGainFitRanges; // Are high-gain fit ranges defined? 71 Bool_t fIsLoGainFitRanges; // Are low-gain fit ranges defined? 60 72 61 73 TString fHistName; //! Histogram names … … 211 223 void SetHistXTitle( const char *name ) { fHistXTitle = name; } 212 224 void SetHistYTitle( const char *name ) { fHistYTitle = name; } 225 226 void SetLowerFitLimitHiGain( const Double_t d=fgLowerFitLimitHiGain) { fLowerFitLimitHiGain = d; } 227 void SetUpperFitLimitHiGain( const Double_t d=fgUpperFitLimitHiGain) { fUpperFitLimitHiGain = d; } 228 void SetLowerFitLimitLoGain( const Double_t d=fgLowerFitLimitLoGain) { fLowerFitLimitLoGain = d; } 229 void SetUpperFitLimitLoGain( const Double_t d=fgUpperFitLimitLoGain) { fUpperFitLimitLoGain = d; } 213 230 214 231 void SetNbins ( const Int_t i ) { fNbins = i; } … … 223 240 void SetPulserFrequency ( const Int_t i=fgPulserFrequency ) { fPulserFrequency = i; } 224 241 225 ClassDef(MHCalibrationCam, 4) // Base Histogram class for Calibration Camera242 ClassDef(MHCalibrationCam, 5) // Base Histogram class for Calibration Camera 226 243 }; 227 244 -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r6965 r7005 292 292 void MAlphaFitter::PaintResult(Float_t x, Float_t y, Float_t size) const 293 293 { 294 TLatex text(x, y, Form("\\sigma_{Li/Ma}=%.1f \\omega=%.1f\\circ E=%d (\\alpha<%.1f\\circ) (\\chi_{b}^{2}/ndf=%.1f \\chi_{s}^{2}/ndf=%.1f c_{0}=%.1f)", 295 fSignificance, GetGausSigma(), 296 (int)fEventsExcess, fIntegralMax, 297 fChiSqBg, fChiSqSignal, fCoefficients[3])); 294 const Double_t w = GetGausSigma(); 295 const Int_t l = w<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(w)); 296 const TString fmt = Form("\\sigma_{Li/Ma}=%%.1f \\omega=%%.%df\\circ E=%%d (\\alpha<%%.1f\\circ) (\\chi_{b}^{2}/ndf=%%.1f \\chi_{s}^{2}/ndf=%%.1f c_{0}=%%.1f)", 297 l<1?1:l); 298 299 TLatex text(x, y, Form(fmt.Data(), fSignificance, w, (int)fEventsExcess, 300 fIntegralMax, fChiSqBg, fChiSqSignal, 301 fCoefficients[3])); 298 302 299 303 text.SetBit(TLatex::kTextNDC); -
trunk/MagicSoft/Mars/mjobs/MJCalibTest.cc
r6979 r7005 390 390 391 391 // Check for interleaved events 392 // This will make that for data with version less than 5, where trigger 393 // patterns were not yet correct, all the events in the file will be 394 // processed. For those data there are no interleaved calibration events, 395 // so it makes no sense to run this test on a _D_ file. So we assume it 396 // will be a _C_ file, and accept all events. 392 397 MTriggerPatternDecode decode; 393 398 MFTriggerPattern fcalib; 394 399 fcalib.DenyCalibration(); 400 fcalib.SetDefault(kFALSE); 395 401 MContinue conttp(&fcalib, "ContTrigPattern"); 396 402 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6979 r7005 460 460 MTriggerPatternDecode decode; 461 461 462 // This will make that for data with version less than 5, where 463 // trigger patterns were not yet correct, all the events in the real 464 // data file will be processed. In any case there are no interleaved 465 // calibration events in such data, so this is fine. 462 466 MFTriggerPattern ftp; 463 467 ftp.SetDefault(kTRUE); … … 467 471 // ftp.DenyPinDiode(); 468 472 ftp.SetInverted(); 473 474 // This will skip interleaved calibration events and pedestal events (if any) 475 // --> tlist2 469 476 MContinue conttp(&ftp, "ContTrigPattern"); 470 // --> tlist2471 477 472 478 // Do signal and pedestal calculation -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r6998 r7005 1799 1799 // Other Tasks 1800 1800 // 1801 1802 // Set the default for data version earlier than 5, where no valid 1803 // trigger pattern exists. There should not be pin diode or other 1804 // types of events inside the calibration files which should be skipped, 1805 // anyway. So we set the default such that the MContinue ccalib 1806 // will never be executed. 1801 1807 MTriggerPatternDecode trgpat; 1802 1808 MFTriggerPattern fcalib("CalibFilter"); -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r7001 r7005 77 77 MJCut::MJCut(const char *name, const char *title) 78 78 : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE), 79 fIsWobble(kFALSE), fIsMonteCarlo(kFALSE), fFullDisplay(k FALSE),79 fIsWobble(kFALSE), fIsMonteCarlo(kFALSE), fFullDisplay(kTRUE), 80 80 fNameHist("MHThetaSq"), fCalcHadronness(0) 81 81 { … … 334 334 write->AddContainer("MHadronness", "Events", kFALSE); 335 335 write->AddContainer("MEnergyEst", "Events", kFALSE); 336 write->AddContainer("ThetaSquared", "Events", kFALSE); 336 337 write->AddContainer("MMcEvt", "Events", kFALSE); 337 338 write->AddContainer("DataType", "Events"); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6998 r7005 940 940 } 941 941 942 // This will make that for data with version less than 5, where 943 // trigger patterns were not yet correct, all the events in the real 944 // data file will be processed. In any case there are no interleaved 945 // calibration events in such data, so this is fine. 942 946 MFTriggerPattern fcalib("CalibFilter"); 947 fcalib.SetDefault(kFALSE); 943 948 fcalib.RequireCalibration(); 944 949 fcalib.SetInverted(); -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r7001 r7005 178 178 return -1; 179 179 180 TObject *hist = arr.FindObjectInCanvas("Hist", "MHAlpha", "Hist");181 cout << "HIST: " << hist << endl;182 if (hist)183 cout << "TYPE: " << hist->ClassName() << endl;184 arr.Print();185 186 180 vstime->Copy(h1); 187 181 size->Copy(h2); … … 335 329 Bool_t MJSpectrum::Refill(MParList &plist, TH1D &h2) const 336 330 { 331 // Try to find the class used to determin the signal! 332 TString cls("MHAlpha"); 333 if (fDisplay) 334 { 335 TCanvas *c = fDisplay->GetCanvas("Hist"); 336 if (c) 337 { 338 TIter Next(c->GetListOfPrimitives()); 339 TObject *obj=0; 340 while ((obj=Next())) 341 if (obj->InheritsFrom(MHAlpha::Class())) 342 break; 343 if (obj) 344 cls = obj->ClassName(); 345 } 346 } 347 348 cout << "FOUND: "<< cls << endl; 349 350 // Now fill the histogram 337 351 *fLog << endl; 338 352 fLog->Separator("Refill Excess"); … … 350 364 taskenv1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est); 351 365 352 MFillH fill1( "HistEOff [MHAlpha]", "MHillasSrc", "FillHistEOff");353 MFillH fill2( "HistE [MHAlpha]", "MHillasSrc", "FillHistE");366 MFillH fill1(Form("HistEOff [%s]", cls.Data()), "", "FillHistEOff"); 367 MFillH fill2(Form("HistE [%s]", cls.Data()), "", "FillHistE"); 354 368 355 369 MFDataMember f0("DataType.fVal", '<', 0.5, "FilterOffData"); -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r6997 r7005 325 325 write.AddContainer("MMcConfigRunHeader", "RunHeaders"); 326 326 write.AddContainer("MMcCorsikaRunHeader", "RunHeaders"); 327 write.AddCopySource("OriginalMC");328 327 } 329 328 else … … 354 353 writem.AddContainer("MMcTrig", "Muons"); 355 354 } 355 356 if (ismc) 357 if (fMuonAnalysis) 358 writem.AddCopySource("OriginalMC"); 359 else 360 write.AddCopySource("OriginalMC"); 356 361 357 362 MTaskList tlist2("Events"); -
trunk/MagicSoft/Mars/mmuon/MMuonCalibParCalc.cc
r6986 r7005 213 213 fMuonCalibPar->SetArcWidth(width); 214 214 215 // Check if this is a 'Write-Out' candidate216 if (fMuonCalibPar->GetArcPhi()>160 && fMuonSearchPar->GetRadius()<400 &&217 fMuonSearchPar->GetDeviation()<50 && fMuonSearchPar->GetRadius()>170)218 fMuonCalibPar->SetReadyToSave();219 220 215 return kTRUE; 221 216 } -
trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc
r6325 r7005 220 220 fTrigPattern = (MTriggerPattern*)pList->FindObject("MTriggerPattern"); 221 221 if (!fTrigPattern) 222 *fLog << warn<< "MTriggerPattern not found... Cannot use interlaced pedestal events." << endl;222 *fLog << inf << "MTriggerPattern not found... Cannot use interlaced pedestal events." << endl; 223 223 224 224 return MExtractPedestal::PreProcess(pList); -
trunk/MagicSoft/Mars/mreport/MReportStarguider.cc
r6922 r7005 84 84 { 85 85 Int_t len; 86 Int_t n=sscanf(str.Data(), "%lf %lf %n", &fDev Az, &fDevZd, &len);86 Int_t n=sscanf(str.Data(), "%lf %lf %n", &fDevZd, &fDevAz, &len); 87 87 if (n!=2) 88 88 { … … 105 105 MAstro::String2Angle(str, fNominalAz); // Nom Az 106 106 107 if (ver < 999999999)107 if (ver < 200503220) 108 108 { 109 109 // Until a fix in the software the written position was nonsense -
trunk/MagicSoft/Mars/msignal/MC_weights.dat
r6545 r7005 63 63 # Low Gain Weights: 6 10 64 64 # (Amplitude) (Time) 65 0.0 138311 -0.016591966 0.0 117372 -0.035400567 0.0 0232654 -0.058101868 -0.00791094 -0.0631271 69 -0.0131845 -0.0558022 70 -0.0154786 -0.048077271 -0.0171358 -0.0420274 72 -0.0199068 -0.0340744 73 -0.02688 -0.0117278 74 -0.0404328 0.0754397 75 -0.0357035 0.342673 76 0. 00409834 0.84927477 0. 248584 1.5218178 0. 528673 1.6797479 0. 67261 1.4706880 0. 735023 1.2496581 0. 778865 1.1039582 0.832049 1.02856 83 0.907609 1.00924 84 1. 07304 1.0920885 1. 25051 1.1490686 1.3 7475 1.025387 1.5 2056 0.65311288 1.5 3175 0.16307689 1. 49683 -0.1527390 1.47 188 -0.34425291 1.45 258 -0.5012992 1.4 2348 -0.67021893 1.3 673 -0.8775694 1. 19832 -1.2055795 0.99973 -1.5324896 0.808836 -1.68211 97 0.533208 -1.45238 98 0.446023 -0.900265 99 0.459037 -0.529769 100 0. 470945 -0.368053101 0. 465845 -0.313525102 0. 446981 -0.311926103 0. 415815 -0.342317104 0. 348688 -0.425439105 0. 271752 -0.495437106 0. 211195 -0.503879107 0. 131582 -0.413276108 0. 109187 -0.245156109 0. 114005 -0.139006110 0. 117671 -0.0939116111 0. 116527 -0.078572112 0. 11177 -0.0772896113 0. 103901 -0.0840098114 0. 0871027 -0.102357115 0. 0758618 -0.119019116 0. 0611863 -0.118991117 0. 0430436 -0.0930814118 0. 0390695 -0.0517162119 0. 0409257 -0.027711120 0. 0420581 -0.0186558121 0. 0419035 -0.0164813122 0. 0408279 -0.0174564123 0. 0389147 -0.0202082124 0. 0345678 -0.02523265 0.0446612 -0.385273 66 0.038191 -0.00418687 67 0.0386966 0.0212324 68 0.0402881 0.0744799 69 0.0415794 0.229615 70 0.0598731 0.44332 71 0.0758477 0.661518 72 0.101509 1.10641 73 0.159323 1.64997 74 0.497256 2.83685 75 0.245087 3.27499 76 0.140546 2.46177 77 0.58086 2.2849 78 0.632721 2.45587 79 0.72819 2.52835 80 0.889583 2.48099 81 0.980812 2.50031 82 1.09885 2.55892 83 1.21374 2.78769 84 1.61928 3.08069 85 1.38544 1.95583 86 1.31998 1.1792 87 1.50633 0.591226 88 1.50916 0.0793899 89 1.5008 -0.33188 90 1.47339 -0.575386 91 1.45362 -0.915309 92 1.40214 -1.31593 93 1.34175 -1.77904 94 1.0661 -2.05471 95 1.31087 -1.49798 96 1.33793 -1.34758 97 1.10172 -1.21719 98 1.08133 -1.09356 99 1.04007 -0.981455 100 0.976745 -1.08299 101 0.930979 -1.14774 102 0.874203 -1.18348 103 0.816708 -1.20126 104 0.587354 -1.92869 105 0.783078 -1.89621 106 0.792771 -1.03439 107 0.622278 -0.781807 108 0.61184 -0.745831 109 0.578792 -0.683741 110 0.537336 -0.596328 111 0.51443 -0.592858 112 0.482294 -0.560586 113 0.462351 -0.827587 114 0.317989 -1.05649 115 0.459672 -0.775035 116 0.468287 -0.619961 117 0.374182 -0.31635 118 0.376946 -0.225242 119 0.367075 -0.347444 120 0.340737 -0.393231 121 0.321054 -0.187384 122 0.320654 -0.225558 123 0.302148 -0.399499 124 0.232954 -0.607578 -
trunk/MagicSoft/Mars/msignal/MC_weights4.dat
r6545 r7005 43 43 # Low Gain Weights: 4 10 44 44 # (Amplitude) (Time) 45 -0.0150435 -0.0456535 46 -0.0167019 -0.0398625 47 -0.0194073 -0.032228 48 -0.0261603 -0.0107884 49 -0.0393003 0.072764 50 -0.0383678 0.323756 51 0. 000454566 0.80773152 0.23557 1.45054 53 0.504239 1.60174 54 0.641895 1.40233 55 0.696427 1.19531 56 0.740101 1.0546 57 0.791986 0.981974 58 0.86479 0.963146 59 1. 02308 1.0418660 1. 19338 1.0961761 1.31 232 0.97782462 1. 45116 0.62214963 1. 4609 0.15438464 1.42695 -0.14665 65 1. 4151 -0.33694166 1. 39615 -0.48503467 1. 36751 -0.64575668 1. 31284 -0.84378469 1.14997 -1.15775 70 0.9 56626 -1.469371 0. 772909 -1.6117372 0. 5089 -1.3903173 0. 426731 -0.86060874 0.44 0367 -0.50587675 0. 459554 -0.3590576 0. 453541 -0.30506677 0. 434575 -0.30305778 0. 403893 -0.33223879 0. 338482 -0.41251980 0. 268138 -0.48269381 0. 208943 -0.49163882 0. 131208 -0.40393683 0. 109532 -0.24028284 0. 114424 -0.13691345 0.178287 2.98244 46 0.0799794 2.25048 47 0.501997 2.04566 48 0.559993 2.18952 49 0.636334 2.28558 50 0.784832 2.29757 51 0.894393 2.36602 52 1.01571 2.62578 53 1.14191 3.14701 54 1.70405 4.27635 55 1.25503 1.69442 56 1.19843 1.00804 57 1.36974 0.493838 58 1.37759 0.0452029 59 1.37174 -0.336051 60 1.34423 -0.563321 61 1.31669 -0.852661 62 1.26602 -1.28826 63 1.20062 -1.85625 64 0.874127 -2.44773 65 1.2433 -1.47361 66 1.27171 -1.3052 67 1.03025 -1.1211 68 1.00417 -0.992811 69 0.968251 -0.911359 70 0.907626 -1.02038 71 0.852293 -1.06813 72 0.797164 -1.16276 73 0.739386 -1.25445 74 0.447754 -2.34757 75 0.777349 -1.83155 76 0.779564 -1.01577 77 0.600426 -0.733238 78 0.5863 -0.688006 79 0.557156 -0.650488 80 0.514926 -0.584649 81 0.485323 -0.569089 82 0.454047 -0.573249 83 0.429026 -0.907077 84 0.245526 -1.35434
Note:
See TracChangeset
for help on using the changeset viewer.