Changeset 18009 for trunk/Mars
- Timestamp:
- 11/07/14 15:41:06 (10 years ago)
- Location:
- trunk/Mars
- Files:
-
- 7 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars
- Property svn:mergeinfo changed
/branches/MarsFixTimeOffsetBranch (added) merged: 18001-18008
- Property svn:mergeinfo changed
-
trunk/Mars/ceres.rc
r17913 r18009 233 233 # Does not trigger anyway 234 234 ContEmpty3.Condition: MPhotonEvent.GetNumPhotons<10 235 236 MFixTimeOffset.FileName: resmc/fact/pixel_delays_ALL_ZERO.csv 237 # MFixTimeOffset.FileName: resmc/fact/AllPhidoFiles_delays.csv 238 239 # last line comment -
trunk/Mars/mfileio/FileIOLinkDef.h
r14792 r18009 19 19 #pragma link C++ class MWriteRootFile+; 20 20 #pragma link C++ class MWriteFitsFile+; 21 #pragma link C++ class MMatrix+; 21 22 22 23 #endif -
trunk/Mars/mfileio/Makefile
r14792 r18009 33 33 MWriteFitsFile.cc \ 34 34 MTopFitsGroup.cc \ 35 MFitsArray.cc 35 MFitsArray.cc \ 36 MMatrix.cc 36 37 37 38 ############################################################ -
trunk/Mars/mjobs/MJSimulation.cc
r17866 r18009 113 113 #include "MParSpline.h" 114 114 #include "MGeomCam.h" 115 #include "MMatrix.h" 115 116 116 117 #include "MPedestalCam.h" … … 718 719 trigger.SetVal(0); 719 720 plist.AddToList(&trigger); 721 722 // ------------------------------------------------------------------- 723 // Dominik and Sebastian on: fix time offsets 724 MMatrix fix_time_offsets_between_pixels_in_ns( 725 "MFixTimeOffset","titel" 726 ); 727 plist.AddToList(&fix_time_offsets_between_pixels_in_ns); 720 728 721 729 // ------------------------------------------------------------------- -
trunk/Mars/msimcamera/MSimCamera.cc
r17844 r18009 122 122 return kFALSE; 123 123 } 124 // ------------------------------------------------------------------- 125 // Dominik Neise and Sebastian Mueller on fix time offsets: 126 // We obtain the fix temporal offsets for the FACT camera pixels out of 127 // a text file. The textfile must be mentioned in the ceres.rc file. 128 // There are no default offsets on purporse. The filename must be specified 129 // in ceres.rc and the file must be parsed without errors and it must 130 // provide exactly 1440 floating point numbers. 131 fFixTimeOffsetsBetweenPixelsInNs = 132 (MMatrix*)pList->FindObject("MFixTimeOffset"); 133 if (!fFixTimeOffsetsBetweenPixelsInNs) 134 { 135 // the key value pair providing the text file is not present in the 136 // environment env. 137 *fLog << err << "In Source: "<< __FILE__ <<" in line: "<< __LINE__; 138 *fLog << " in function: "<< __func__ <<"\n"; 139 *fLog << "MFixTimeOffset not found... aborting." << endl; 140 return kFALSE; 141 142 } 143 else if ( fFixTimeOffsetsBetweenPixelsInNs->fM.size() != 1440 ) 144 { 145 // The number of time offsets must match the number of pixels in the 146 // FACT camera. 147 *fLog << err << "In Source: "<< __FILE__ <<" in line: "<< __LINE__; 148 *fLog << " in function: "<< __func__ <<"\n"; 149 *fLog << "MFixTimeOffset has the wrong dimension! "; 150 *fLog << "There should be "<< 1440 <<" time offsets "; 151 *fLog << "(one for each pixel in FACT) but there are: "; 152 *fLog << fFixTimeOffsetsBetweenPixelsInNs->fM.size() << "! "; 153 *fLog << "... aborting." << endl; 154 return kFALSE; 155 } 156 // Check all entries for inf and nan. Those are not accepted here. 157 for( std::vector< double > row : fFixTimeOffsetsBetweenPixelsInNs->fM ){ 158 for( double number : row){ 159 160 if( std::isnan(number) || std::isinf(number) ){ 161 162 *fLog << err << "In Source: "<< __FILE__ <<" in line: "; 163 *fLog << __LINE__; 164 *fLog << " in function: "<< __func__ <<"\n"; 165 *fLog << "There is a non normal number in the fix temporal "; 166 *fLog << "pixel offsets. This is at least one number is "; 167 *fLog << "NaN or Inf. This here is >"<< number; 168 *fLog << "<... aborting." << endl; 169 return kFALSE; 170 } 171 } 172 } 173 // ------------------------------------------------------------------- 124 174 /* 125 175 fPulsePos = (MParameterD*)pList->FindObject("IntendedPulsePos", "MParameterD"); … … 353 403 } 354 404 405 //-------------------------------------------------------------------------- 406 355 407 // Simulate pulses 356 408 for (Int_t i=0; i<num; i++) … … 359 411 360 412 const UInt_t idx = ph.GetTag(); 361 const Double_t t = (ph.GetTime()-fStat->GetTimeFirst())*freq+rndm;// - fSpline->GetXmin(); 413 Double_t t = (ph.GetTime()-fStat->GetTimeFirst())*freq+rndm;// - fSpline->GetXmin(); 414 415 // Sebastian Mueller and Dominik Neise on fix time offsets: 416 // We add a fix temporal offset to the relative arrival time of the 417 // individual pixel. The offsets are stored in the 418 // fFixTimeOffsetsBetweenPixelsInNs -> fM matrix. We identify the first 419 // column to hold the offsets in ns. 420 t = t + freq*fFixTimeOffsetsBetweenPixelsInNs->fM[idx][0]; 362 421 363 422 // FIXME: Time jitter? -
trunk/Mars/msimcamera/MSimCamera.h
r17663 r18009 7 7 8 8 #include "MArrayF.h" 9 #include "MMatrix.h" 9 10 10 11 class MMcEvt; … … 35 36 36 37 MParameterD *fCrosstalkCoeffParam; 38 39 MMatrix *fFixTimeOffsetsBetweenPixelsInNs; //! Container to store the fix temporal offsets for each pixel in ns 40 37 41 MTruePhotonsPerPixelCont *fTruePhotons; //! Container to store the number of photons per pixel 38 42
Note:
See TracChangeset
for help on using the changeset viewer.