- Timestamp:
- 01/17/05 11:54:30 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5868 r5869 21 21 -*-*- END OF LINE -*-*- 22 22 23 2005/01/17 Thomas Bretz 24 25 * manalysis/MEnergyEstimate.[h,cc]: 26 - changed to be more general. Energy is now estimated from a rule 27 (MDataChain) The default behaviour is still the same as before 28 to copy the energy from MMcEvt 29 30 * mbase/MTask.cc: 31 - changed to write out the descriptor istead of the task-name only 32 in Pre/PostProcess 33 34 * mhbase/MH.cc: 35 - initialize fSerialNumber and fNumExecutions in constructor 36 37 * mhflux/MHFalseSource.cc: 38 - according to a suggestion by Markus Mayer I have changed 39 \\sigma_{max}=f to S_{max}=f\\sigma 40 41 * mjobs/MJCalibrateSignal.cc: 42 - as discussed with Markus and Abelardo fixed the MFTriggerPattern 43 call. 44 45 * mtrigger/MFTriggerPattern.cc, mtrigger/MTriggerPattern.cc, 46 mtrigger/MTriggerPatternDecode.cc: 47 - added some comment about file version 48 49 50 23 51 2005/01/17 Markus Gaug 24 52 25 * msignal/MExtractTimeAndChargeDigitalFilter.cc 26 - remove a situation where the high-gain signal can be 0. 27 28 * mtrigger/MTriggerPattern.h 29 - fixed a bug in defining the trigger bit pattern (Have to start 30 from 0 instead of 1) 53 * msignal/MExtractTimeAndChargeDigitalFilter.cc 54 - remove a situation where the high-gain signal can be 0. 55 56 * mtrigger/MTriggerPattern.h 57 - fixed a bug in defining the trigger bit pattern (Have to start 58 from 0 instead of 1) 59 31 60 32 61 33 62 2005/01/16 Markus Gaug 34 63 35 * mhcalib/MHCalibrationCam.[h,cc] 36 * mhcalib/MHCalibrationRelTimeCam.[h,cc] 37 * mhcalib/MHCalibrationChargeCam.[h,cc] 38 - put overflow management and results camera initialization into 39 base class 64 * mhcalib/MHCalibrationCam.[h,cc], mhcalib/MHCalibrationRelTimeCam.[h,cc], 65 mhcalib/MHCalibrationChargeCam.[h,cc] 66 - put overflow management and results camera initialization into 67 base class 40 68 41 * mcalib/MCalibrateData.[h,cc] 42 - added possibility to re-normalize signal to equiv. photo-electrons 43 ( SetSignalType(MCalibrateData::kPhe) ). 44 Default is old version in photons 45 - speed up Process by storing pre-calculated calibration constants 46 in arrays (needed 40% of CPU time of the eventloop before, now: 23%) 47 - added new pointer to different MCalibrationChargeCam used for 48 updates 49 - added possibility to update the conversion factors using the 50 MCalibrationChargeCam stored in fCalibUpdate. 51 - added Print() function 52 53 * mcalib/MCalibCalcFromPast.[h,cc] 54 - committed final version, now also in the Makefile 55 56 57 * mjobs/MJCalibrateSignalFromOutside.[h,cc] 58 * macros/calibration.C 59 - committed final version, now able to calibrate interlaced cal. 60 events. 69 * mcalib/MCalibrateData.[h,cc] 70 - added possibility to re-normalize signal to equiv. photo-electrons 71 ( SetSignalType(MCalibrateData::kPhe) ). 72 Default is old version in photons 73 - speed up Process by storing pre-calculated calibration constants 74 in arrays (needed 40% of CPU time of the eventloop before, now: 23%) 75 - added new pointer to different MCalibrationChargeCam used for 76 updates 77 - added possibility to update the conversion factors using the 78 MCalibrationChargeCam stored in fCalibUpdate. 79 - added Print() function 80 81 * mcalib/MCalibCalcFromPast.[h,cc] 82 - committed final version, now also in the Makefile 83 84 * mjobs/MJCalibrateSignalFromOutside.[h,cc], macros/calibration.C 85 - committed final version, now able to calibrate interlaced cal. 86 events. 87 61 88 62 89 63 90 2005/01/14 Hendrik Bartko 64 91 65 * msignal/calibration_weights_UV.dat 66 - fixed a small bug in the noise autocorrelation of the AB-noise 67 * msignal/calibration_weights_blue.dat 68 - new weights file for blue calibration pulses 69 * cosmics_weights.dat 70 - fixed a small bug in the noise autocorrelation of the AB-noise 92 * msignal/calibration_weights_UV.dat 93 - fixed a small bug in the noise autocorrelation of the AB-noise 94 95 * msignal/calibration_weights_blue.dat 96 - new weights file for blue calibration pulses 97 98 * cosmics_weights.dat 99 - fixed a small bug in the noise autocorrelation of the AB-noise 100 71 101 72 102 … … 89 119 - Use now the new class MTriggerPattern directly to recognize an 90 120 interlaced pedestal event. 121 91 122 92 123 -
trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.cc
r2206 r5869 25 25 26 26 ///////////////////////////////////////////////////////////////////////////// 27 // // 28 // MEnergyEstimate // 29 // // 30 // Task to estimate the energy // 31 // // 32 // // 27 // 28 // MEnergyEstimate 29 // 30 // Task to estimate the energy by a rule, eg: 31 // 32 // MEnergyEstimate est; 33 // est.SetRule("0.5 + (1.1*MHillas.fLength) + (2.2*MHillasSrc.fDist) + (3.3*MHillas.fSize) +" 34 // "(4.4*MHillas.fSize*MHillas.fLength) + (5.5*MHillasSrc.fDist*MHillas.fLength)"); 35 // 36 // For description of rules, see MDataChain. 37 // 38 // The default rule is "MMcEvt.fEnergy" 39 // 40 // Output: 41 // MEnergyEst 42 // 33 43 ///////////////////////////////////////////////////////////////////////////// 34 44 #include "MEnergyEstimate.h" … … 36 46 #include "MParList.h" 37 47 38 #include "MMcEvt.hxx" 39 #include "MHillas.h" 48 #include "MDataChain.h" 40 49 #include "MEnergyEst.h" 41 50 … … 47 56 using namespace std; 48 57 58 // -------------------------------------------------------------------------- 59 // 60 // Default constructor. Initialize fData with default rule "MMcEvt.fEnergy" 61 // 62 MEnergyEstimate::MEnergyEstimate(const char *name, const char *title) 63 : fData(0), fEnergy(0) 64 { 65 fName = name ? name : "MEnergyEstimate"; 66 fTitle = title ? title : "Task to estimate the energy by a rule"; 67 68 fData = new MDataChain("MMcEvt.fEnergy"); 69 } 49 70 50 71 // -------------------------------------------------------------------------- 51 72 // 52 // Default constructor.73 // delete fData 53 74 // 54 MEnergyEstimate:: MEnergyEstimate(const char *name, const char *title)75 MEnergyEstimate::~MEnergyEstimate() 55 76 { 56 fName = name ? name : "MEnergyEstimate"; 57 fTitle = title ? title : "Task to estimate the energy"; 58 59 AddToBranchList("MMcEvt.fEnergy"); 77 delete fData; 60 78 } 61 79 80 // -------------------------------------------------------------------------- 81 // 82 // Delete fData. Initialize a new MDataChain with rule. 83 // Returns if fData->IsValid() 84 // 85 Bool_t MEnergyEstimate::SetRule(const char *rule) 86 { 87 delete fData; 88 fData = new MDataChain(rule); 89 90 return fData->IsValid(); 91 } 92 93 // -------------------------------------------------------------------------- 94 // 95 // Forwards SetVariables to fData to allow optimizations. 96 // 97 void MEnergyEstimate::SetVariables(const TArrayD &arr) 98 { 99 fData->SetVariables(arr); 100 } 101 102 // -------------------------------------------------------------------------- 103 // 104 // FindCreate "MEnergyEst" 105 // PreProcess fData. 106 // 62 107 Int_t MEnergyEstimate::PreProcess(MParList *plist) 63 108 { 64 fHillas = (MHillas*)plist->FindObject("MHillas"); 65 if (!fHillas) 66 { 67 *fLog << err << dbginf << "MHillas not found... aborting." << endl; 68 return kFALSE; 69 } 109 fEnergy = (MEnergyEst*)plist->FindCreateObj("MEnergyEst"); 110 if (!fEnergy) 111 return kFALSE; 70 112 71 fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt"); 72 if (!fMcEvt) 73 { 74 *fLog << err << dbginf << "MMcEvt not found... aborting." << endl; 75 return kFALSE; 76 } 113 if (!fData->PreProcess(plist)) 114 return kFALSE; 77 115 78 fEnergy = (MEnergyEst*)plist->FindCreateObj("MEnergyEst"); 79 if (!fEnergy) 80 return kFALSE; 116 *fLog << inf << "Rule for energy estimation: " << fData->GetRule() << endl; 81 117 82 return kTRUE;118 return kTRUE; 83 119 } 84 120 121 // -------------------------------------------------------------------------- 122 // 123 // Get value from fData and set it to fEnergy. SetReadyToSave for fEnergy. 124 // Return kCONTINUE if value is NaN (Not a Number) 125 // 85 126 Int_t MEnergyEstimate::Process() 86 127 { 87 //fEnergy->SetEnergy(fHillas->GetSize()); 88 fEnergy->SetEnergy(fMcEvt->GetEnergy()); 89 return kTRUE; 128 const Double_t val = fData->GetValue(); 129 if (TMath::IsNaN(val)) 130 return kCONTINUE; 131 132 fEnergy->SetEnergy(val); 133 fEnergy->SetReadyToSave(); 134 return kTRUE; 90 135 } -
trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.h
r2206 r5869 6 6 #endif 7 7 8 class MMcEvt; 9 class MHillas; 8 class MData; 10 9 class MEnergyEst; 11 10 … … 13 12 { 14 13 private: 15 MMcEvt *fMcEvt; 16 MHillas *fHillas; 14 MData *fData; //-> 17 15 MEnergyEst *fEnergy; 18 16 19 17 public: 20 18 MEnergyEstimate(const char *name=NULL, const char *title=NULL); 19 ~MEnergyEstimate(); 20 21 Bool_t SetRule(const char *rule); 21 22 22 23 Int_t PreProcess(MParList *plist); 23 24 Int_t Process(); 24 25 25 ClassDef(MEnergyEstimate, 0) // Task to copy the MC energy (preliminary) 26 void SetVariables(const TArrayD &); 27 28 ClassDef(MEnergyEstimate, 0) // Task to estimate the energy by a rule 26 29 }; 27 30 -
trunk/MagicSoft/Mars/mbase/MTask.cc
r5713 r5869 207 207 fNumExec0 = GetNumExecutionsTotal(); 208 208 209 *fLog << all << fName<< "... " << flush;209 *fLog << all << GetDescriptor() << "... " << flush; 210 210 if (fDisplay) 211 211 fDisplay->SetStatusLine2(*this); … … 270 270 fIsPreprocessed = kFALSE; 271 271 272 *fLog << all << fName<< "... " << flush;272 *fLog << all << GetDescriptor() << "... " << flush; 273 273 if (fDisplay) 274 274 fDisplay->SetStatusLine2(*this); -
trunk/MagicSoft/Mars/mhbase/MH.cc
r5143 r5869 86 86 // 87 87 MH::MH(const char *name, const char *title) 88 : fSerialNumber(0), fNumExecutions(0) 89 88 90 { 89 91 // -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r5776 r5869 624 624 // Than for their projections 625 625 TH1 *h = fHist.ProjectionZ("Alpha_z", maxx, maxx, maxy, maxy); 626 h->SetTitle(Form("Distribution of \\alpha for x=%.2f y=%.2f ( \\sigma_{max}=%.1f)", x, y, s));626 h->SetTitle(Form("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s)); 627 627 628 628 TH1D *h0=0; … … 1104 1104 if (maxx>0 && maxy>0) 1105 1105 { 1106 const char *title = Form(" \\alpha for x=%.2f y=%.2f ( \\sigma_{max}=%.1f) ",1106 const char *title = Form(" \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma) ", 1107 1107 hist->GetXaxis()->GetBinCenter(maxx), 1108 1108 hist->GetYaxis()->GetBinCenter(maxy), maxs); … … 1211 1211 leg->SetBorderSize(1); 1212 1212 leg->SetTextSize(0.1); 1213 leg->AddText(Form(" \\sigma_{max}=%.1fat \\alpha_{max}=%d\\circ", maxsig, max));1213 leg->AddText(Form("S_{max}=%.1f\\sigma at \\alpha_{max}=%d\\circ", maxsig, max)); 1214 1214 leg->SetBit(kCanDelete); 1215 1215 leg->Draw(); -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r5841 r5869 335 335 336 336 MFTriggerPattern ftp; 337 ftp.DenyCalibration(); 338 ftp.DenyPedestal(); 339 ftp.DenyPinDiode(); 337 ftp.RequireCalibration(); 340 338 341 339 MContinue conttp(&ftp, "ContTrigPattern"); -
trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.cc
r5725 r5869 27 27 // MFTriggerPattern 28 28 // 29 // A Filter for testing the trigger performance using Trigger Pattern 29 // A Filter for testing the trigger performance using Trigger Pattern. 30 // 31 // For files before file version 5 the trigger pattern is set to 00000000. 30 32 // 31 33 ///////////////////////////////////////////////////////////////////////////// -
trunk/MagicSoft/Mars/mtrigger/MTriggerPattern.cc
r5725 r5869 38 38 // class version number (ClassDef) and document your change HERE. 39 39 // 40 // For files before file version 5 the trigger pattern is set to 00000000. 41 // 40 42 ///////////////////////////////////////////////////////////////////////////// 41 43 #include "MTriggerPattern.h" -
trunk/MagicSoft/Mars/mtrigger/MTriggerPatternDecode.cc
r5803 r5869 28 28 // 29 29 // Decodes the trigger pattern from MRawEvtData into MTriggerPattern. 30 // 31 // For files before file version 5 the trigger pattern is set to 00000000. 32 // This can be changed using the information about the file-type. 30 33 // 31 34 // Input: … … 91 94 // -------------------------------------------------------------------------- 92 95 // 96 // For files before file version 5 the trigger pattern is set to 00000000. 97 // This can be changed using the information about the file-type. 98 // 93 99 Int_t MTriggerPatternDecode::Process() 94 100 { 101 // No setting necessary because MTriggerPattern::reset() has 102 // been called just before 95 103 if (fRunHeader->GetFormatVersion()<5) 96 104 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.