- Timestamp:
- 05/15/08 19:37:27 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8890 r8891 23 23 * mfilter/MFMagicCuts.[h,cc]: 24 24 - fixed a few typos in comments and in the output 25 - added an option kAreaLin with a linear cut in area for special studies 25 - added an option kAreaLin with a linear cut in area for special 26 studies 27 28 * mbase/MStatusDisplay.cc: 29 - if no MStatusArray is found, keys which store a TCanvas object 30 are displayed instead if available 31 32 * mhcalib/MHCalibrationPulseTimeCam.[h,cc]: 33 - the extraction range to get the maximum is now determined 34 automatically from the MExtractedSignalCam 35 36 * mpedestal/MPedestalSubtract.cc, msignal/MExtractTimeAndCharge.cc: 37 - raise an error if there is a mismatch in the number of samples 38 26 39 27 40 … … 40 53 * mjtrain/MJTrainEnergy.cc 41 54 - write the dataset to the output file 42 - added new plots to show the resolution versus several different parameters 55 - added new plots to show the resolution versus several different 56 parameters 43 57 44 58 * mpedestal/MPedestalSubtract.[h,cc]: 45 - added an additional check to compate the number of hi-/lo-gain slices46 in the run- and event-header59 - added an additional check to compate the number of hi-/lo-gain 60 slices in the run- and event-header 47 61 48 62 * mpointing/MPointingDevCalc.cc: -
trunk/MagicSoft/Mars/NEWS
r8890 r8891 64 64 Since pedestal and calibration constants are continously recalculated 65 65 this only effected the very first events of every sequence. 66 67 * For the extraction of the position of the maximum sample now the 68 extraction range is set automatically to the extraction window, 69 before the whole accessible range was used. 70 71 * If the number of samples in the events and the number of samples 72 in the run-header disagrees now an error is raised (this can 73 happen in not well simulated Monte Carlo files) 66 74 67 75 ;star -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r8795 r8891 2157 2157 if (n==0) 2158 2158 { 2159 *fLog << warn << "MStatusDisplay::Read: No objects read." << endl; 2159 const Bool_t store = TH1::AddDirectoryStatus(); 2160 TH1::AddDirectory(kFALSE); 2161 2162 TIter Next(gFile->GetListOfKeys()); 2163 TObject *key = 0; 2164 while ((key=Next())) 2165 { 2166 TCanvas *c=0; 2167 gFile->GetObject(key->GetName(), c); 2168 if (!c) 2169 break; 2170 2171 if (list.GetEntries()==0) 2172 list.Add(new TNamed(GetName(), GetTitle())); 2173 2174 list.Add(c); 2175 } 2176 2177 TH1::AddDirectory(store); 2178 2179 if (list.GetEntries()==0) 2180 { 2181 *fLog << warn << "MStatusDisplay::Read: No objects read." << endl; 2182 return 0; 2183 } 2184 2185 *fLog << inf << "MStatusDisplay: " << list.GetEntries() << " canvases directly read from file." << endl; 2186 } 2187 2188 2189 if (!Display(list, tab)) 2190 { 2191 *fLog << err << "MStatusDisplay::Display: No entries found." << endl; 2160 2192 return 0; 2161 2193 } 2162 2194 2163 if (!Display(list, tab)) 2164 {2165 *fLog << err << "MStatusDisplay::Display: No entry in " << name << "." << endl; 2166 return 0;2167 }2195 2196 cout << "Display done." << endl; 2197 2198 if (n==0) 2199 return list.GetEntries(); 2168 2200 2169 2201 *fLog << inf << "MStatusDisplay: Key " << name << " with " << n << " keys read from file." << endl; 2170 2171 2202 return n; 2172 2203 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc
r8582 r8891 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.4 1 2007-06-19 09:25:38tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.42 2008-05-15 18:37:26 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 175 175 // 176 176 MHCalibrationPulseTimeCam::MHCalibrationPulseTimeCam(const char *name, const char *title) 177 : f BadPixels(NULL)177 : fSignalCam(NULL), fBadPixels(NULL) 178 178 { 179 179 … … 277 277 Bool_t MHCalibrationPulseTimeCam::ReInitHists(MParList *pList) 278 278 { 279 280 MExtractedSignalCam *signal = 281 (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 282 if (!signal) 279 fSignalCam = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 280 if (!fSignalCam) 283 281 { 284 282 *fLog << err << "MExtractedSignalCam not found... abort." << endl; … … 397 395 continue; 398 396 399 // Get position of maximum (FIXME: Extraction range?)397 // Get position of maximum 400 398 Float_t max; 401 const Int_t pos = evt->GetMaxPos(idx, max); 399 const Int_t pos = evt->GetMax(idx, fSignalCam->GetFirstUsedSliceHiGain(), 400 fSignalCam->GetLastUsedSliceHiGain(), max); 402 401 403 402 // check if maximum is high enough -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.h
r8554 r8891 8 8 class TH1F; 9 9 class MRawEvtData; 10 class MExtractedSignalCam; 10 11 class MHCalibrationChargePix; 11 12 … … 39 40 Float_t fOuterRefTime; // The reference mean arrival time outer pixels 40 41 41 MBadPixelsCam *fBadPixels; //! Bad Pixels 42 MExtractedSignalCam *fSignalCam; //! Signal cam for extraction range 43 MBadPixelsCam *fBadPixels; //! Bad Pixels 42 44 43 45 void InitHiGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors ); -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc
r8888 r8891 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.1 0 2008-05-14 11:03:24tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.11 2008-05-15 18:37:26 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 158 158 Int_t MPedestalSubtract::Process() 159 159 { 160 // Please note: 161 // - for data with only hi-gain samples numl is 0 162 // - for data with hi- and lo-gain samples 163 // numl is 0 if read from a raw-data file or a new MC root-file(?) 164 // numl is not 0 if read from an old MC root-file 165 160 166 // Total number of samples 161 167 const Int_t numh = fRawEvt->GetNumHiGainSamples(); … … 167 173 168 174 // Check for consistency (our simulation can do weird things!) 169 if (numh !=fRunHeader->GetNumSamplesHiGain())170 { 171 *fLog << warn << "WARNING - Number of hi-gain samples (" << numh << ")";172 *fLog << " doesn't match run-header (" << fRunHeader->GetNumSamplesHiGain() << ")." << endl;173 }174 if (numl!=fRunHeader->GetNumSamplesLoGain())175 {176 *fLog << warn << "WARNING - Number of lo-gain samples (" << numl << ") ";177 *fLog << " doesn't match run-header (" << fRunHeader->GetNumSamplesLoGain() << ")." << endl;175 if (numh+numl!=fRunHeader->GetNumSamplesHiGain()+fRunHeader->GetNumSamplesLoGain()) 176 { 177 *fLog << err << "MPedestalSubtract::Process: ERROR - Number of samples in event "; 178 *fLog << "(hi+lo=" << numh+numl << ")" << endl << " doesn't match number in run-header "; 179 *fLog << "(" << fRunHeader->GetNumSamplesHiGain()+fRunHeader->GetNumSamplesLoGain() << ")" << endl; 180 *fLog << " In case you are processing real data you have just found a bug." << endl; 181 *fLog << " If you process Monte Carlo data, it means probably that the length" << endl; 182 *fLog << " of the arrays in MRawEvtData are inconsistent with the run-header." << endl; 183 return kERROR; 178 184 } 179 185 -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
r8661 r8891 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.6 8 2007-08-10 11:21:21tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.69 2008-05-15 18:37:27 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 219 219 Int_t MExtractTimeAndCharge::Process() 220 220 { 221 const Int_t nums = fSignal->GetNumSamples(); 222 221 223 const Int_t numh = fRunHeader->GetNumSamplesHiGain(); 222 224 const Int_t numl = fRunHeader->GetNumSamplesLoGain(); 223 225 226 // Some sanity checks to get rid of some weird behaviour of the simulation 227 if (nums!=numh+numl) 228 { 229 *fLog << err << "MExtractTimeAndCharge::Process: ERROR - Number of samples in event "; 230 *fLog << "(" << nums << ")" << endl << " doesn't match number in run-header "; 231 *fLog << "(" << numh+numl << ")" << endl; 232 *fLog << " In case you are processing real data you have just found a bug." << endl; 233 *fLog << " If you process Monte Carlo data, it means probably that the length" << endl; 234 *fLog << " of the arrays in MRawEvtData are inconsistent with the run-header." << endl; 235 return kERROR; 236 } 237 238 // Start extraction 224 239 const UInt_t satlim = fSaturationLimit*fRunHeader->GetScale(); 225 240
Note:
See TracChangeset
for help on using the changeset viewer.