Changeset 3334 for trunk/MagicSoft


Ignore:
Timestamp:
02/26/04 16:42:03 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3332 r3334  
    1313         MF filter1("{MMcEvt;1.fEvtNumber%2}<0.5");
    1414         MF filter2("{MMcEvt;1.fEvtNumber%2}>0.5");
    15 
     15     - cleaned up a bit the way the CT coordinates are fed to the task
     16       MStereoCalc.
     17     - Changed default FADC integration range (center range to adapt to
     18       new camera).
    1619
    1720
  • trunk/MagicSoft/Mars/macros/starmcstereo.C

    r3332 r3334  
    3333/////////////////////////////////////////////////////////////////////////////
    3434
    35 void starmcstereo(Int_t ct1 = 2, Int_t ct2 = 3)
     35//
     36// User change.
     37//
     38
     39Float_t ctx[7] = {0., 0., 0., 0., 0., 0., 0.};
     40Float_t cty[7] = {-70., -40., -30., 30., 50., 60., 70.}; // in meters
     41//
     42// FIXME: unfortunately present version of reflector was not prepared for
     43// stereo configurations and keeps no track of CT position. So the positions
     44// must be set above by the user, making sure that they correspond to the
     45// files one is analysing.
     46//
     47
     48void starmcstereo(Int_t ct1 = 1, Int_t ct2 = 2)
    3649{
    37   Int_t CT[2] = {ct1, ct2};
    38 
     50  if (ct1 > sizeof(ctx)/sizeof(ctx[0]) ||
     51      ct2 > sizeof(ctx)/sizeof(ctx[0]) )
     52    {
     53      cout << endl << "Wrong CT id number!" << endl;
     54      return;
     55    }
     56
     57  Int_t CT[2] = {ct1, ct2};  // Only 2-telescope analysis for the moment
    3958  Int_t NCTs = sizeof(CT)/sizeof(CT[0]);
    4059
     
    4766  Float_t CleanLev[2] = {4., 3.}; // Tail cuts for image analysis
    4867
    49   Int_t BinsHigh[2] = {0, 5}; // First and last FADC bin of the range to be integrated,
    50   Int_t BinsLow[2]  = {0, 5}; // for high and low gain respectively.
     68  Int_t BinsHigh[2] = {5, 9}; // First and last FADC bin of the range to be integrated,
     69  Int_t BinsLow[2]  = {5, 9}; // for high and low gain respectively.
    5170
    5271  // -------------------------------------------
     
    204223  //
    205224
    206   if (CT[0] == 1)
    207     stereocalc.SetCT1coor(0.,0.);
    208   else if (CT[0] == 2)
    209     stereocalc.SetCT1coor(0.,0.);
    210   else if (CT[0] == 3)
    211     stereocalc.SetCT1coor(60.,60.);  // in meters
    212   else if (CT[0] == 4)
    213     stereocalc.SetCT1coor(60.,-60.);
    214   else if (CT[0] == 5)
    215     stereocalc.SetCT1coor(-60.,60.);
    216   else if (CT[0] == 6)
    217     stereocalc.SetCT1coor(-60.,-60.);
    218   else
    219     {
    220       cout << "Unknown CT id!" << endl;
    221       exit;
    222     }
    223 
    224   if (NCTs==2)
    225     {
    226       if (CT[1] == 1)
    227         stereocalc.SetCT2coor(0.,0.);
    228       else if (CT[1] == 2)
    229         stereocalc.SetCT2coor(0.,0.);
    230       else if (CT[1] == 3)
    231         stereocalc.SetCT2coor(60.,60.);  // in meters
    232       else if (CT[1] == 4)
    233         stereocalc.SetCT2coor(60.,-60.);
    234       else if (CT[1] == 5)
    235         stereocalc.SetCT2coor(-60.,60.);
    236       else if (CT[1] == 6)
    237         stereocalc.SetCT2coor(-60.,-60.);
    238       else
    239         {
    240           cout << "Unknown CT id!" << endl;
    241           exit;
    242         }
    243 
    244       tlist.AddToList(&stereocalc);
    245     }
     225  stereocalc.SetCT1coor(ctx[CT[0]-1],cty[CT[0]-1]);
     226  stereocalc.SetCT2coor(ctx[CT[1]-1],cty[CT[1]-1]);
     227
     228  tlist.AddToList(&stereocalc);
     229
    246230
    247231  MF filter1("{MMcEvt;1.fEvtNumber%2}<0.5");
Note: See TracChangeset for help on using the changeset viewer.