Ignore:
Timestamp:
07/27/04 19:21:54 (20 years ago)
Author:
stamerra
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mpisa/macros/test_findstar.C

    r4426 r4427  
    99  MParList plist;
    1010  MTaskList tlist;
    11  
     11
     12  //  cout << "0" <<endl; 
    1213  plist.AddToList(&tlist);
    1314
    14   MCerPhotEvt DCEvt;
     15  MCerPhotEvt *DCEvt;
    1516
    1617  MGeomCamMagic *geom;
     
    1819  const Int_t gsNpix = 577;
    1920
    20   Int_t startpixs[gsNpix];
     21  TArrayF *startpixs(gsNpix);
    2122  Int_t cluster[gsNpix];
    2223  memset(cluster,-1,gsNpix*sizeof(Int_t));
    2324  memset(startpixs,-1,gsNpix*sizeof(Int_t));
    2425
     26  // fill a fake MCerPhotEvt
    2527
    26   MCerPhotPix DCpix;
    27   for (int t=0;i<gsNpix;i++)
    28     DCpix = DCevt.AddPixel(i,0.,0.);
     28// loop over all pixels
    2929 
    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
    3157 
     58  if (!(FindStartPixels(DCEvt, startpixs, geom)))
     59    cout << "Error calling the FindStartPixels function!!" << endl;
     60 
     61  return;
     62}; 
    3263
    33 
    34 }
    35 
    36 Int_t FindStartPixels(MCerPhotEvt *evt, Int_t startpixs, MGeomCam *geom)
     64Int_t FindStartPixels(MCerPhotEvt *evt, TArrayF *startpixs, MGeomCam *geom)
    3765{
    3866  // look for all the pixels with a DC higher than the DC of neighbour pixels
    3967
    4068  // loop over all pixels
    41   MCerPhotEvtIter Next(fEvt, kFALSE);
     69  MCerPhotEvtIter Next(evt, kFALSE);
    4270 
    43   while ((dcpix=static_cast<MCerPhotPix*>(Next())))
     71  for (Int_t pixid=0; pixid<gsNPix; pixid++)
    4472    {
    45       const Int_t pixid = dcpix->GetPixId();  //pixid  of current pixel
     73      MCerPhotPix dcpix =  DCEvt[pixid]; // curren pix with DC
    4674
    4775      const MGeomPix &pix = (*geom)[pixid]; // MGeomCam pixel
     
    6088        *(startpixs++) = currDC;
    6189    }
     90
     91  return 1;
    6292}
    6393
    6494Int_t FindCluster(Int_t startpix, Int_t cluster, MGeomCam *geom)
    6595{
     96  return 1;
    6697
    67 
    68 }
     98} ;
Note: See TracChangeset for help on using the changeset viewer.