- Timestamp:
- 07/27/04 19:21:54 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mpisa/macros/test_findstar.C
r4426 r4427 9 9 MParList plist; 10 10 MTaskList tlist; 11 11 12 // cout << "0" <<endl; 12 13 plist.AddToList(&tlist); 13 14 14 MCerPhotEvt DCEvt;15 MCerPhotEvt *DCEvt; 15 16 16 17 MGeomCamMagic *geom; … … 18 19 const Int_t gsNpix = 577; 19 20 20 Int_t startpixs[gsNpix];21 TArrayF *startpixs(gsNpix); 21 22 Int_t cluster[gsNpix]; 22 23 memset(cluster,-1,gsNpix*sizeof(Int_t)); 23 24 memset(startpixs,-1,gsNpix*sizeof(Int_t)); 24 25 26 // fill a fake MCerPhotEvt 25 27 26 MCerPhotPix DCpix; 27 for (int t=0;i<gsNpix;i++) 28 DCpix = DCevt.AddPixel(i,0.,0.); 28 // loop over all pixels 29 29 30 // a fake cluster: 30 for (Int_t pixid = 0; pixid <gsNpix ; pixid++) 31 { 32 MCerPhotPix dcpix = DCEvt[pixid]; 33 34 cout << "1" <<endl; 35 // a fake cluster: 36 dcpix->SetNumPhotons(0.); 37 38 switch (pixid) 39 { 40 case 10: 41 dcpix->SetNumPhotons(1.5); 42 case 3: 43 dcpix->SetNumPhotons(1.1); 44 case 9: 45 dcpix->SetNumPhotons(1.1); 46 case 22: 47 dcpix->SetNumPhotons(1.1); 48 case 23: 49 dcpix->SetNumPhotons(1.1); 50 case 24: 51 dcpix->SetNumPhotons(1.1); 52 case 11: 53 dcpix->SetNumPhotons(1.1); 54 }; 55 }; // end loop over pixels 56 31 57 58 if (!(FindStartPixels(DCEvt, startpixs, geom))) 59 cout << "Error calling the FindStartPixels function!!" << endl; 60 61 return; 62 }; 32 63 33 34 } 35 36 Int_t FindStartPixels(MCerPhotEvt *evt, Int_t startpixs, MGeomCam *geom) 64 Int_t FindStartPixels(MCerPhotEvt *evt, TArrayF *startpixs, MGeomCam *geom) 37 65 { 38 66 // look for all the pixels with a DC higher than the DC of neighbour pixels 39 67 40 68 // loop over all pixels 41 MCerPhotEvtIter Next( fEvt, kFALSE);69 MCerPhotEvtIter Next(evt, kFALSE); 42 70 43 while ((dcpix=static_cast<MCerPhotPix*>(Next())))71 for (Int_t pixid=0; pixid<gsNPix; pixid++) 44 72 { 45 const Int_t pixid = dcpix->GetPixId(); //pixid of current pixel73 MCerPhotPix dcpix = DCEvt[pixid]; // curren pix with DC 46 74 47 75 const MGeomPix &pix = (*geom)[pixid]; // MGeomCam pixel … … 60 88 *(startpixs++) = currDC; 61 89 } 90 91 return 1; 62 92 } 63 93 64 94 Int_t FindCluster(Int_t startpix, Int_t cluster, MGeomCam *geom) 65 95 { 96 return 1; 66 97 67 68 } 98 } ;
Note:
See TracChangeset
for help on using the changeset viewer.