Changeset 7099 for trunk/MagicSoft
- Timestamp:
- 05/27/05 16:33:19 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/NEWS
r7094 r7099 5 5 - general: MMcEvt now derived from MMcEvtBasic which should 6 6 have no influence on compatibility with older camera files 7 8 - callisto: changed default of fgFallTimeHiGain in 9 MExtractTimeAndChargeSpline from 1.5 to 0.5. 0.5 was 10 already set as default in callisto_Dec04Jan05.rc 11 12 - callisto: the digital filter (MExtractTimeAndChargeDigitalFilter) 13 now changes the filename for new weights automatically for 14 cosmics, MC and for different calibration colors. 15 16 - callisto: a problem with the order of some code cause the 17 name of the weights file in MPedestalY2 to be ignored. 18 Wrongly the calibration_UV weights were used instead 19 of the cosmics weights set in callisto.rc. 7 20 8 21 - sponde: The input MC spectrum can now be weighted to fake a … … 90 103 91 104 - callisto: new setup read from callisto.rc 92 + MCalibCalcFromPast.fNu MEventsDump105 + MCalibCalcFromPast.fNumEventsDump 93 106 + MHCalibrationChargeCam.NumHiGainSaturationLimit 94 107 + MHCalibrationChargeCam.NumLoGainSaturationLimit -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r7053 r7099 135 135 using namespace std; 136 136 137 const Float_t MCalibrateData::fgCalibConvMinLimit = 0.01; 138 const Float_t MCalibrateData::fgCalibConvMaxLimit = 5.; 137 const Float_t MCalibrateData::gkCalibConvMinLimit = 0.01; 138 const Float_t MCalibrateData::gkCalibConvMaxLimit = 5.; 139 140 const MCalibrateData::CalibrationMode_t MCalibrateData::gkDefault = kFfactor; 141 139 142 // -------------------------------------------------------------------------- 140 143 // … … 441 444 { 442 445 443 *fLog << inf << GetDescriptor() 444 << ": Updating Conversion Factors... " << endl; 446 *fLog << inf << GetDescriptor() << ": Updating Conversion Factors... " << endl; 445 447 446 448 fCalibConsts.Reset(); … … 495 497 if (updatecam) 496 498 { 497 MCalibrationChargePix &upix = (MCalibrationChargePix&)(*updatecam)[pixidx]; 499 const MCalibrationChargePix &upix = (MCalibrationChargePix&)(*updatecam)[pixidx]; 500 498 501 // 499 502 // Correct for the possible change in amplification of the individual pixels chain 500 503 // 501 504 const Float_t pixmean = upix.GetConvertedMean(); 502 calibUpdate = (pixmean == 0.) ? 1. : pix.GetConvertedMean() / pixmean; 505 calibUpdate = pixmean==0 ? 1 : pix.GetConvertedMean()/pixmean; 506 503 507 // 504 508 // Correct for global shifts in light emission 505 509 // 506 MCalibrationChargePix &ugpix = (MCalibrationChargePix&)updatecam->GetAverageArea(0);510 const MCalibrationChargePix &ugpix = (MCalibrationChargePix&)updatecam->GetAverageArea(0); 507 511 508 512 const Float_t globmean = avpix.GetConvertedMean(); 509 calibUpdate = (globmean == 0.) ? 1. : ugpix.GetConvertedMean() /globmean;510 511 MBadPixelsPix &ubad = (MBadPixelsPix&)updatecam->GetAverageBadArea(0);513 calibUpdate = globmean==0 ? 1 : ugpix.GetConvertedMean()/globmean; 514 515 MBadPixelsPix &ubad = (MBadPixelsPix&)updatecam->GetAverageBadArea(0); 512 516 if (ubad.IsUncalibrated(MBadPixelsPix::kChargeIsPedestal)) 513 517 { … … 581 585 calibUpdate = 1.; 582 586 break; 587 588 default: 589 break; 583 590 } /* switch calibration mode */ 584 591 } /* if(fCalibrationMode!=kNone) */ … … 755 762 out << " " << GetUniqueName() << ".EnablePedestalType(MCalibrateData::kRun)" << endl; 756 763 757 if (fCalibrationMode != kDefault)764 if (fCalibrationMode != gkDefault) 758 765 { 759 766 out << " " << GetUniqueName() << ".SetCalibrationMode(MCalibrateData::"; … … 865 872 { 866 873 *fLog << all 867 << Form("%s%3i","Pixel:",pixidx)868 << Form("%s%4.2f"," CalibConst:",fCalibConsts[pixidx])869 << Form("%s%4.2f"," F-Factor:",fCalibFFactors[pixidx])870 << Form("%s%4.2f"," HiLoConv:",fHiLoConv[pixidx])874 << "Pixel: " << Form("%3i",pixidx) 875 << " CalibConst: " << Form("%4.2f",fCalibConsts[pixidx]) 876 << " F-Factor: " << Form("%4.2f",fCalibFFactors[pixidx]) 877 << " HiLoConv: " << Form("%4.2f",fHiLoConv[pixidx]) 871 878 << endl; 872 879 } -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
r6855 r7099 23 23 class MCalibrateData : public MTask 24 24 { 25 public: 26 enum CalibrationMode_t 27 { 28 kSkip = 0, 29 kNone = 1, 30 kFlatCharge = 2, 31 kBlindPixel = 3, 32 kFfactor = 4, 33 kPinDiode = 5, 34 kCombined = 6, 35 kDummy = 7 36 }; 37 38 enum PedestalType_t 39 { 40 kNo = BIT(0), 41 kRun = BIT(1), 42 kEvent = BIT(2) 43 }; 44 45 enum SignalType_t 46 { 47 kPhe, 48 kPhot 49 }; 50 51 static const CalibrationMode_t gkDefault; 52 25 53 private: 26 27 static const Float_t fgCalibConvMinLimit; //! Minimum limit for conv. factor 28 static const Float_t fgCalibConvMaxLimit; //! Maximum limit for conv. factor 54 static const Float_t gkCalibConvMinLimit; //! Minimum limit for conv. factor 55 static const Float_t gkCalibConvMaxLimit; //! Maximum limit for conv. factor 29 56 30 57 Float_t fCalibConvMinLimit; // Minimum limit for conv. factor … … 39 66 MCalibConstCam *fCalibConstCam; //! Temporary calib consts storage 40 67 41 UShort_t fCalibrationMode;// Flag defining the calibration mode (CalibrationMode_t)68 CalibrationMode_t fCalibrationMode; // Flag defining the calibration mode (CalibrationMode_t) 42 69 Byte_t fPedestalFlag; // Flags defining to calibrate the pedestal each event or each run 43 70 Byte_t fSignalType; // Flag defining the signal type (kphot or kphe) … … 63 90 64 91 public: 65 66 enum CalibrationMode_t 67 { 68 kSkip = 0, 69 kNone = 1, 70 kFlatCharge = 2, 71 kBlindPixel = 3, 72 kFfactor = 4, 73 kPinDiode = 5, 74 kCombined = 6, 75 kDummy = 7 76 }; 77 78 static const CalibrationMode_t kDefault = kFfactor; 79 80 enum PedestalType_t 81 { 82 kNo = BIT(0), 83 kRun = BIT(1), 84 kEvent = BIT(2) 85 }; 86 87 enum SignalType_t 88 { 89 kPhe, 90 kPhot 91 }; 92 93 MCalibrateData(CalibrationMode_t calmode=kDefault, 94 const char *name=NULL, const char *title=NULL); 92 MCalibrateData(CalibrationMode_t calmode=gkDefault, 93 const char *name=NULL, const char *title=NULL); 95 94 96 95 void AddPedestal(const char *name="Cam"); … … 106 105 Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag&i ? kTRUE : kFALSE; } 107 106 108 void SetCalibrationMode ( CalibrationMode_t calmode= kDefault) { fCalibrationMode=calmode; }107 void SetCalibrationMode ( CalibrationMode_t calmode=gkDefault) { fCalibrationMode=calmode; } 109 108 void SetSignalType ( SignalType_t sigtype=kPhe ) { fSignalType =sigtype; } 110 109 111 void SetCalibConvMinLimit( const Float_t f= fgCalibConvMinLimit ) { fCalibConvMinLimit = f; }112 void SetCalibConvMaxLimit( const Float_t f= fgCalibConvMaxLimit ) { fCalibConvMaxLimit = f; }110 void SetCalibConvMinLimit( const Float_t f=gkCalibConvMinLimit ) { fCalibConvMinLimit = f; } 111 void SetCalibConvMaxLimit( const Float_t f=gkCalibConvMaxLimit ) { fCalibConvMaxLimit = f; } 113 112 114 113 Bool_t UpdateConversionFactors( const MCalibrationChargeCam *updatecam=NULL); … … 118 117 119 118 #endif /* MCalibrateData */ 120 121 122 123 124 125 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r7069 r7099 181 181 // ClassVersion 2: 182 182 // - Float_t fPheErrLimit; 183 // + Float_t fPheErrLowerLimit; // Lower limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 184 // + Float_t fPheErrUpperLimit; // Upper limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 183 // + Float_t fPheErrLowerLimit; // Lower limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 184 // + Float_t fPheErrUpperLimit; // Upper limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 185 // 186 // ClassVersion 3: 187 // + Bool_t fUseExtractorRes; // Include extractor resolution in F-Factor method 185 188 // 186 189 ////////////////////////////////////////////////////////////////////////////// … … 280 283 // 281 284 MCalibrationChargeCalc::MCalibrationChargeCalc(const char *name, const char *title) 282 : fGeom(NULL), fSignal(NULL), fCalibPattern(NULL) 285 : fUseExtractorRes(kFALSE), 286 fGeom(NULL), fSignal(NULL), fCalibPattern(NULL), fExtractor(NULL) 283 287 { 284 288 … … 661 665 return kTRUE; 662 666 } 663 667 664 668 if (fNumProcessed == 0) 665 669 return kTRUE; … … 1017 1021 << endl; 1018 1022 bad.SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes); 1023 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 1024 return kFALSE; 1025 } 1026 1027 if (cal.GetPheFFactorMethod() < 0.) 1028 { 1029 bad.SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes); 1030 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 1031 cal.SetFFactorMethodValid(kFALSE); 1032 return kFALSE; 1033 } 1034 1035 if (!cal.CalcConvFFactor()) 1036 { 1037 *fLog << warn << "Could not calculate the Conv. FADC counts to Phes in "; 1038 *fLog << what << ": " << Form("%4i", cal.GetPixId()) << endl; 1039 bad.SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes); 1040 return kFALSE; 1041 } 1042 1043 if (!fUseExtractorRes) 1044 return kTRUE; 1045 1046 if (!fExtractor) 1047 { 1048 *fLog << err << "Extractor resolution has been chosen, but not extractor is set. Cannot calibrate" << endl; 1049 return kFALSE; 1050 } 1051 1052 const Float_t resinphes = cal.IsHiGainSaturation() 1053 ? cal.GetPheFFactorMethod()*fExtractor->GetResolutionPerPheLoGain() 1054 : cal.GetPheFFactorMethod()*fExtractor->GetResolutionPerPheHiGain(); 1055 1056 Float_t resinfadc = cal.IsHiGainSaturation() 1057 ? resinphes/cal.GetMeanConvFADC2Phe()/cal.GetConversionHiLo() 1058 : resinphes/cal.GetMeanConvFADC2Phe(); 1059 1060 if (resinfadc > 1.5*cal.GetPedRms() ) 1061 { 1062 *fLog << warn << " Extractor Resolution: " << resinfadc << " bigger than Pedestal RMS " << cal.GetPedRms() << endl; 1063 resinfadc = cal.GetPedRms(); 1064 } 1065 1066 if (!cal.CalcReducedSigma(resinfadc)) 1067 { 1068 *fLog << warn << "Could not calculate the reduced sigma in " << what; 1069 *fLog << ": " << Form("%4i",cal.GetPixId()) << endl; 1070 bad.SetUncalibrated( MBadPixelsPix::kChargeSigmaNotValid ); 1071 return kFALSE; 1072 } 1073 1074 if (!cal.CalcFFactor()) 1075 { 1076 *fLog << warn << "Could not calculate the F-Factor in " << what; 1077 *fLog << ": " << Form("%4i",cal.GetPixId()) << endl; 1078 bad.SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes); 1079 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 1019 1080 return kFALSE; 1020 1081 } … … 2299 2360 rc = kTRUE; 2300 2361 } 2362 if (IsEnvDefined(env, prefix, "UseExtractorRes", print)) 2363 { 2364 SetUseExtractorRes(GetEnvValue(env, prefix, "UseExtractorRes", fUseExtractorRes)); 2365 rc = kTRUE; 2366 } 2301 2367 2302 2368 return rc; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r7028 r7099 2 2 #define MARS_MCalibrationChargeCalc 3 3 4 /////////////////////////////////////////////////////////////////////////////5 // //6 // MCalibrationChargeCalc //7 // //8 // Integrates the time slices of the all pixels of a calibration event //9 // and substract the pedestal value //10 // //11 /////////////////////////////////////////////////////////////////////////////12 13 4 #ifndef MARS_MTask 14 5 #include "MTask.h" 15 6 #endif 16 7 8 #ifndef ROOT_TArrayC 9 #include <TArrayC.h> 10 #endif 11 17 12 #ifndef MARS_MBadPixelsPix 18 13 #include "MBadPixelsPix.h" … … 21 16 #ifndef MARS_MCalibrationCam 22 17 #include "MCalibrationCam.h" 23 #endif24 25 #ifndef ROOT_TArrayC26 #include <TArrayC.h>27 18 #endif 28 19 … … 44 35 class MBadPixelsIntensityCam; 45 36 class MBadPixelsCam; 37 class MExtractor; 46 38 47 39 class MCalibrationChargeCalc : public MTask … … 91 83 92 84 Int_t fNumProcessed; // Number of processed events (for Intensity calibration) 85 Bool_t fUseExtractorRes; // Include extractor resolution in F-Factor method 93 86 94 87 // Pointers … … 108 101 MCalibrationPattern *fCalibPattern; //! Calibration DM pattern 109 102 MPedestalCam *fPedestals; //! Pedestals all pixels (calculated previously from ped.file) 103 MExtractor *fExtractor; //! Signal Extractor 110 104 111 105 // enums … … 211 205 : CLRBIT(fFlags, kDebug); } 212 206 207 void SetExtractor(MExtractor *ext) { fExtractor=ext; } 213 208 void SetPedestals(MPedestalCam *cam) { fPedestals=cam; } 214 209 … … 223 218 void SetPheErrUpperLimit ( const Float_t f=fgPheErrUpperLimit ) { fPheErrUpperLimit = f; } 224 219 void SetPulserColor ( const MCalibrationCam::PulserColor_t col ) { fPulserColor = col; } 225 226 ClassDef(MCalibrationChargeCalc, 2) // Task calculating Calibration Containers and Quantum Efficiencies 220 void SetUseExtractorRes(Bool_t b=kTRUE) { fUseExtractorRes = b; } 221 222 ClassDef(MCalibrationChargeCalc, 3) // Task calculating Calibration Containers and Quantum Efficiencies 227 223 }; 228 224 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
r7013 r7099 674 674 // in GetRSigma() and GetRSigmaErr() 675 675 // 676 Bool_t MCalibrationChargePix::CalcReducedSigma( )676 Bool_t MCalibrationChargePix::CalcReducedSigma(const Float_t extractorres) 677 677 { 678 678 … … 687 687 const Float_t pedRmsSquare = IsHiGainSaturation() ? fLoGainPedRmsSquare : fPedRms*fPedRms; 688 688 const Float_t pedRmsSquareVar = IsHiGainSaturation() ? fLoGainPedRmsSquareVar : 0.25*fPedVar*pedRmsSquare; 689 const Float_t extractorresVar = extractorres * extractorres; 689 690 690 691 if (IsDebug()) … … 696 697 << " PedRmsSquare: " << pedRmsSquare 697 698 << " pedRmsSquareVar: " << pedRmsSquareVar 699 << " extractorresVar: " << extractorresVar 698 700 << endl; 699 701 } … … 705 707 // Calculate the reduced sigmas 706 708 // 707 fRSigmaSquare = sigmaSquare - pedRmsSquare ;709 fRSigmaSquare = sigmaSquare - pedRmsSquare - extractorresVar; 708 710 709 711 if (IsDebug()) … … 764 766 Bool_t MCalibrationChargePix::CalcFFactor() 765 767 { 766 767 if (fRSigmaSquare < 0.) 768 return kFALSE; 768 SetFFactorMethodValid(kFALSE); 769 770 if (fRSigmaSquare < 0.) 771 return kFALSE; 769 772 770 773 // -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
r7013 r7099 53 53 54 54 MCalibrationChargePix(const char *name=NULL, const char *title=NULL); 55 ~MCalibrationChargePix() {}56 55 57 56 void Clear(Option_t *o=""); … … 111 110 112 111 // Calculations 113 void CalcLoGainPedestal (const Float_t logainsamples);114 Bool_t CalcReducedSigma ();115 Bool_t CalcFFactor ();116 Bool_t CalcConvFFactor ( );117 Bool_t CalcMeanFFactor ( const Float_t nphotons, const Float_t nphotonsrelvar);112 void CalcLoGainPedestal(const Float_t logainsamples); 113 Bool_t CalcReducedSigma(const Float_t extractorres=0); 114 Bool_t CalcFFactor(); 115 Bool_t CalcConvFFactor(); 116 Bool_t CalcMeanFFactor(const Float_t nphotons, const Float_t nphotonsrelvar); 118 117 119 118 ClassDef(MCalibrationChargePix, 3) // Container Charge Calibration Results Pixel -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r7071 r7099 777 777 SetNoStorage(GetEnv("DisableOutput", IsNoStorage())); 778 778 779 // Setup an environment task 779 780 MTaskEnv tenv("ExtractSignal"); 780 781 tenv.SetDefault(fExtractor); 781 782 782 if (tenv.ReadEnv(*GetEnv(), GetEnvPrefix()+".ExtractSignal", GetEnvDebug()>2)==kERROR) 783 // check the resource file for it 784 if (CheckEnv(tenv)==kERROR) 783 785 return kFALSE; 784 786 787 // if (tenv.ReadEnv(*GetEnv(), GetEnvPrefix()+".ExtractSignal", GetEnvDebug()>2)==kERROR) 788 // return kFALSE; 789 790 // If the resource file didn't change the default we are done 785 791 if (fExtractor==tenv.GetTask()) 786 792 return kTRUE; 787 793 794 // If it changed the default check its inheritance... 788 795 if (!tenv.GetTask()->InheritsFrom(MExtractor::Class())) 789 796 { … … 792 799 } 793 800 801 // ..and store it 794 802 SetExtractor((MExtractor*)tenv.GetTask()); 795 803 … … 973 981 } 974 982 975 *fLog << inf;976 fLog->Separator(GetDescriptor());977 *fLog << "Calculate pedestal from Sequence #";978 *fLog << fSequence.GetSequence() << endl << endl;979 980 if (!CheckEnv())981 return kFALSE;982 983 983 // -------------------------------------------------------------------------------- 984 984 … … 992 992 993 993 // -------------------------------------------------------------------------------- 994 995 if (!CheckEnv()) 996 return kFALSE; 994 997 995 998 MParList plist; … … 1087 1090 return kFALSE; 1088 1091 1092 // The requested setup might have been overwritten 1093 if (CheckEnv(*fExtractor)==kERROR) 1094 return kFALSE; 1095 1089 1096 *fLog << all; 1090 *fLog << underline << "Signal Extractor found in calibration file :" << endl;1097 *fLog << underline << "Signal Extractor found in calibration file and setup:" << endl; 1091 1098 fExtractor->Print(); 1092 1099 *fLog << endl; -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r7094 r7099 170 170 fLog->Separator("Initialize energy weighting"); 171 171 172 MParList l; 173 l.AddToList(&w); 174 if (!CheckEnv(l)) 172 if (!CheckEnv(w)) 175 173 { 176 174 *fLog << err << "ERROR - Reading resources for MMcSpectrumWeight failed." << endl; -
trunk/MagicSoft/Mars/mjobs/MJob.cc
r7096 r7099 47 47 #include "MLogManip.h" 48 48 49 #include "MParList.h" 49 50 #include "MEvtLoop.h" 50 51 … … 195 196 } 196 197 198 //------------------------------------------------------------------------ 199 // 200 // Returns the result of c.ReadEnv(*fEnv, fEnvPrefix, fEnvDebug>2) 201 // By adding the container first to a MParList it is ensured that 202 // all levels are checked. 203 // 197 204 Bool_t MJob::CheckEnv(MParContainer &c) const 198 205 { … … 200 207 return kTRUE; 201 208 202 return c.ReadEnv(*fEnv, fEnvPrefix, fEnvDebug>2); 209 // Make sure that all levels are checked 210 MParList l; 211 l.AddToList(&c); 212 return l.ReadEnv(*fEnv, fEnvPrefix+".", fEnvDebug>2); 203 213 } 204 214 -
trunk/MagicSoft/Mars/mjobs/Makefile
r6993 r7099 23 23 -I../mbadpixels -I../msignal -I../mraw -I../mpedestal -I../mtools \ 24 24 -I../mimage -I../mpointing -I../mastro -I../mfbase -I../mhvstime \ 25 -I../mtrigger -I../mmuon 25 -I../mtrigger -I../mmuon -I../mmc 26 26 27 27 SRCFILES = MSequence.cc \ -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc
r7098 r7099 635 635 { 636 636 SetNameWeightsFile(GetEnvValue(env, prefix, "WeightsFile", "")); 637 *fLog << all << "**********> " << fNameWeightsFile << endl;638 637 rc = kTRUE; 639 638 } -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.h
r6840 r7099 17 17 class TH2F; 18 18 class MPedestalPix; 19 class MCalibrationPattern; 20 19 21 class MExtractTimeAndChargeDigitalFilter : public MExtractTimeAndCharge 20 22 { 21 23 private: 22 23 24 static const Byte_t fgHiGainFirst; //! Default for fHiGainFirst (now set to: 0) 24 25 static const Byte_t fgHiGainLast; //! Default for fHiGainLast (now set to:14) … … 34 35 static const Float_t fgOffsetLoGain; //! Default for fOffsetLoGain (now set to 1.7) 35 36 static const Float_t fgLoGainStartShift; //! Default for fLoGainStartShift (now set to -1.8) 37 38 MCalibrationPattern *fCalibPattern; //! Calibration DM pattern 36 39 37 40 MArrayF fHiGainSignal; //! Need fast access to the signals in a float way … … 59 62 MArrayF fTimeWeightsLoGain; //! Time weights Low-Gain (from weights file) 60 63 61 TString fNameWeightsFile; // Name of the weights file 62 Bool_t fWeightsSet; //! Flag if weights have alreayd been set 64 TString fNameWeightsFile; // Name of the weights file 65 Bool_t fAutomaticWeights; // Flag whether weight should be determined automatically 66 TString fNameWeightsFileSet; //! Flag if weights have alreayd been set 63 67 Int_t fRandomIter; //! Counter used to randomize weights for noise calculation 64 68 65 Bool_t InitArrays(); 69 // MExtractTimeAndChargeDigitalFilter 70 void CalcBinningResArrays(); 71 Bool_t ReadAutomaticWeightsFile(); 66 72 67 void CalcBinningResArrays(); 73 // MExtractTimeAndCharge 74 Bool_t InitArrays(); 75 76 // MTask 77 Int_t PreProcess(MParList *pList); 68 78 69 79 protected: 70 71 Int_t 80 // MParContainer 81 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 72 82 73 83 public: 84 MExtractTimeAndChargeDigitalFilter(const char *name=NULL, const char *title=NULL); 85 ~MExtractTimeAndChargeDigitalFilter() { } 74 86 75 MExtractTimeAndChargeDigitalFilter(const char *name=NULL, const char *title=NULL); 76 ~MExtractTimeAndChargeDigitalFilter() { } 87 Bool_t ReadWeightsFile(TString filename); 77 88 78 89 Bool_t WriteWeightsFile(TString filename, … … 80 91 TH1F *shapelo=NULL, TH2F *autocorrlo=NULL ); 81 92 82 Bool_t ReadWeightsFile(TString filename);83 93 84 void SetNameWeightsFile( TString s = fgNameWeightsFile ) { fNameWeightsFile = s; } 94 void SetNameWeightsFile(TString s="") { fNameWeightsFile = s; fNameWeightsFileSet=""; } 95 void EnableAutomaticWeights(Bool_t b=kTRUE) { fAutomaticWeights = b; } 85 96 86 97 void SetBinningResolution(const Int_t rh=fgBinningResolutionHiGain, const Int_t rl=fgBinningResolutionLoGain) { … … 100 111 const char* GetNameWeightsFile() const { return fNameWeightsFile.Data(); } 101 112 102 void Print(Option_t *o="") const; 103 104 Bool_t IsWeightsSet() const { return fWeightsSet; } 113 void Print(Option_t *o="") const; //*MENU* 105 114 106 115 void FindTimeAndChargeHiGain(Byte_t *firstused, Byte_t *logain, Float_t &sum, Float_t &dsum, -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
r7061 r7099 157 157 const Float_t MExtractTimeAndChargeSpline::fgResolution = 0.05; 158 158 const Float_t MExtractTimeAndChargeSpline::fgRiseTimeHiGain = 0.5; 159 const Float_t MExtractTimeAndChargeSpline::fgFallTimeHiGain = 1.5;159 const Float_t MExtractTimeAndChargeSpline::fgFallTimeHiGain = 0.5; 160 160 const Float_t MExtractTimeAndChargeSpline::fgLoGainStretch = 1.5; 161 161 const Float_t MExtractTimeAndChargeSpline::fgOffsetLoGain = 1.7; // 5 ns -
trunk/MagicSoft/Mars/msignal/Makefile
r6856 r7099 20 20 # 21 21 INCLUDES = -I. -I../mbase -I../mgui -I../mraw -I../manalysis \ 22 -I../mgeom -I../mtools -I../mpedestal -I../mbadpixels 22 -I../mgeom -I../mtools -I../mpedestal -I../mbadpixels \ 23 -I../mcalib 23 24 24 25 # mgui (MCamEvent): MExtractSignalCam
Note:
See TracChangeset
for help on using the changeset viewer.