Changeset 4056 for trunk/MagicSoft/Mars/mtemp/mifae
- Timestamp:
- 05/12/04 18:50:10 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mtemp/mifae
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mifae/Changelog
r4050 r4056 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 22 23 2004/05/12: Javier Rico 24 * macros/alpha.C, macros/plotOptimal.C 25 - added 26 27 * library/MSrcRotate.[cc.h] 28 - correct bug in computation of run time for rotation 29 30 * programs/srcPos.cc 31 - change mjdpos type to Double_t 32 33 34 20 35 2004/05/11: Javier Rico 21 36 * programs/optimizeCuts.cc, programs/optimizecuts.datacard -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcRotate.cc
r4050 r4056 149 149 // save the number of events, initial and final times 150 150 fNEvts = fRunHeader->GetNumEvents(); 151 fFirstEvt = fEvtHeader->GetDAQEvtNumber();152 151 fIniTime = fRunHeader->GetRunStart(); 153 152 fFinTime = fRunHeader->GetRunEnd(); … … 164 163 cout << "Run number: " << fRunHeader->GetRunNumber() << endl; 165 164 cout << "Number of events: " << fNEvts << endl; 166 cout << "First event: " << fFirstEvt << endl;167 165 cout << "Initial MJD date: " << fIniTime.GetMjd() << endl; 168 166 cout << "Final MJD date: " << fFinTime.GetMjd() << endl; … … 175 173 // FIXME: for the time being, this is computed by assuming constant event rate 176 174 MTime eventTime; 177 Double_t newMJD = fIniTime.GetMjd() + (fFinTime.GetMjd()-fIniTime.GetMjd())*(fEvtHeader->GetDAQEvtNumber()-fFirstEvt)/fNEvts; 178 eventTime.SetMjd(newMJD); 179 175 Double_t newMJD = fIniTime.GetMjd() + (fFinTime.GetMjd()-fIniTime.GetMjd())*fEvtHeader->GetDAQEvtNumber()/fNEvts; 176 eventTime.SetMjd(newMJD); 177 MTime refTime; 178 refTime.SetMjd(fRefMJD); 179 180 180 // de-rotate the source position 181 181 const MAstroSky2Local Observation(eventTime, *fObservatory); 182 const MAstroSky2Local RefObservation(fRefMJD, *fObservatory); 182 const MAstroSky2Local RefObservation(refTime, *fObservatory); 183 184 #ifdef DEBUG 185 printf("Run:%d, Event:%d, iniMJD=%15.5f, finMJD=%15.5f, fDeltaT=%15.5f, newMJD=%15.5f, fRefMJD=%15.5f, rotation=%15.5f, ref=%15.5f\n", 186 fRunHeader->GetRunNumber(),fEvtHeader->GetDAQEvtNumber(), 187 fIniTime.GetMjd(),fFinTime.GetMjd(),fDeltaT, 188 newMJD,fRefMJD,Observation.RotationAngle(fRA,fDEC), 189 RefObservation.RotationAngle(fRA,fDEC)); 190 // cout << "newMJD=" << newMJD << ", fRefMJD="<<fRefMJD<<", rotation="<<Observation.RotationAngle(fRA,fDEC)<<", ref="<<RefObservation.RotationAngle(fRA,fDEC)<< endl; 191 #endif 192 183 193 Double_t rotationAngle = Observation.RotationAngle(fRA,fDEC)-RefObservation.RotationAngle(fRA,fDEC); 184 194 … … 186 196 Float_t s = TMath::Sin(rotationAngle); 187 197 // perform a rotation of -rotationAngle to move the source back to the "initial" position 188 Float_t newX = c*fSrcPos->GetX() +s*fSrcPos->GetY();189 Float_t newY = -s*fSrcPos->GetX()+c*fSrcPos->GetY();198 Float_t newX = c*fSrcPos->GetX()-s*fSrcPos->GetY(); 199 Float_t newY = s*fSrcPos->GetX()+c*fSrcPos->GetY(); 190 200 191 201 #ifdef DEBUG -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcRotate.h
r4050 r4056 18 18 { 19 19 private: 20 MSrcPosCam* fSrcPos; // !Pointer to the source position21 MDCA* fDCA; // !Pointer to the MDCA object22 MRawEvtHeader* fEvtHeader; // !Pointer to the event header23 MRawRunHeader* fRunHeader; // !Pointer to the run header24 MObservatory* fObservatory; // !Pointer to the MObservatory20 MSrcPosCam* fSrcPos; // Pointer to the source position 21 MDCA* fDCA; // Pointer to the MDCA object 22 MRawEvtHeader* fEvtHeader; // Pointer to the event header 23 MRawRunHeader* fRunHeader; // Pointer to the run header 24 MObservatory* fObservatory; // Pointer to the MObservatory 25 25 26 26 TString fSrcPosName; … … 31 31 Double_t fRefMJD; // [MJ date] reference time for rotation 32 32 UInt_t fNEvts; // Number of events in file 33 UInt_t fFirstEvt; // Event index for first event in file34 33 MTime fIniTime; // Run initial time 35 34 MTime fFinTime; // Run final time -
trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc
r4044 r4056 141 141 return; 142 142 143 // MPedestalCam pedcam = pedloop.GetPedestalCam();144 145 143 /*****************************/ 146 144 /* SECOND LOOP: CALIBRATION */ … … 155 153 if (!calloop.Process(pedloop.GetPedestalCam())) 156 154 return; 157 158 // MCalibrationChargeCam calcam = calloop.GetCalibrationCam();159 155 160 156 /************************************************************************/ -
trunk/MagicSoft/Mars/mtemp/mifae/programs/optimizeCuts.cc
r4050 r4056 131 131 sprintf(evecut,"event%%%d==0",onRate); 132 132 sprintf(gencut,"size>%f && dist>%f && dist<%f",sizecut,lowdistcut,uppdistcut); 133 cout << "General cut " << gencut << " (" << evecut << ") for on-data" << endl;133 cout << "General cut " << gencut << " (" << evecut << " for on-data)" << endl; 134 134 135 135 // loop on widht and length cuts -
trunk/MagicSoft/Mars/mtemp/mifae/programs/optimizecuts.datacard
r4050 r4056 7 7 8 8 // Input file name pattern (On data) 9 ONFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OnRotate B.root9 ONFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OnRotateNoCalB.root 10 10 11 11 // Input file name pattern (Off data) 12 OFFFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OffRotate A-C.root12 OFFFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OffRotateNoCalA-C.root 13 13 14 14 // output file name 15 OUTFILE ./optimize Prueba.root15 OUTFILE ./optimize_fine.out 16 16 17 // Pre viouscuts (size in size units, distance in deg)18 SIZECUT 180017 // Preliminar cuts (size in size units, distance in deg) 18 SIZECUT 2000 19 19 DISTCUTS 0.2 1.1 20 20 21 21 // Length initial, final and step values 22 LENGTHCUTS 0. 01 0.30.00522 LENGTHCUTS 0.1 0.4 0.005 23 23 24 24 // Width initial, final and step values 25 WIDTHCUTS 0.0 10.3 0.00525 WIDTHCUTS 0.0 0.3 0.005 26 26 27 27 -
trunk/MagicSoft/Mars/mtemp/mifae/programs/srcPos.cc
r4050 r4056 44 44 Float_t xsrcpos=0.; 45 45 Float_t ysrcpos=0.; 46 Float_tmjdpos=53050;46 Double_t mjdpos=53050; 47 47 Bool_t kRotate=1; 48 48 Bool_t kSrcPolicy=kTRUE; -
trunk/MagicSoft/Mars/mtemp/mifae/programs/srcpos.datacard
r4050 r4056 1 1 2 2 // Maximun number of on and off events to be processed) 3 NEVENTS 99999993 NEVENTS 20000 4 4 5 5 // Input file name pattern 6 INPUTFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OnB.root6 INPUTFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OnNoCalB.root 7 7 8 8 // output file name
Note:
See TracChangeset
for help on using the changeset viewer.