Ignore:
Timestamp:
06/22/04 20:49:26 (20 years ago)
Author:
rico
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mifae
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mifae/Changelog

    r4316 r4328  
    2222    * library/MDispCalc.[h,cc]
    2323      - Included first version of DISP method evaluation classes.
     24
     25  2004/06/22  Javier Rico
     26    * library/MControlPlots.[h,cc]
     27      - Added
     28
     29    * library/Makefile, IFAELinkDef.h
     30      - Add MControlPlots. So far, it produces plots with the number
     31        of times each pixel survives the cleaning. It needs a MIsland
     32        object to be included on the parameter list
     33
     34    * programs/makeHillas.cc
     35      - Change pointer to MWriteRootFile object for MWriteRootFile
     36        object (otherwise the tree "Parameters" is not saved)
     37      - Islands are always computed since are needed for some control
     38        plots
     39
     40    * programs/srcPos.cc
     41      - Add MControlPlots to the task list
    2442
    2543  2004/06/15  Javier Lopez
  • trunk/MagicSoft/Mars/mtemp/mifae/library/IFAELinkDef.h

    r4294 r4328  
    1919#pragma link C++ class MCalibrateDC+;
    2020#pragma link C++ class MHPSFFromStars+;
    21 #pragma link C++ class MSrcPosFromStars+;
     21#pragma link C++ class MControlPlots+;
    2222
    2323#endif
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MIslands.cc

    r4218 r4328  
    4646        *fLog << "    + Pixel Number = " << fPixNum[i] << endl;
    4747        *fLog << "    + SigToNoise = " << fSigToNoise[i] << endl;
     48        *fLog << "    + TimeSpread = " << fTimeSpread[i] << endl;
    4849      }
    4950}
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcPosFromFile.cc

    r4117 r4328  
    142142      if(srcpos)
    143143        fLastValidSrcPosCam = srcpos;
     144      else if(run>fFirstRun)
     145        for(UInt_t irun=run-1; irun>=fFirstRun;irun--)
     146          if((srcpos=(MSrcPosCam*)fRunMap->GetValue(irun)))
     147            {
     148              *fLog << inf << " not found in file. Taking position for run "<< irun;
     149              fLastValidSrcPosCam = srcpos;
     150              break;
     151            }
    144152      else if(fLastValidSrcPosCam)
    145153        *fLog << inf << " not found in file. Taking previous position: ";
    146       else
     154       
     155      if(!fLastValidSrcPosCam)
    147156        {
    148           *fLog << warn << "MSrcPosFromFile::ComputeNewSrcPosition warning: no value for the first run. Taking first found run in file, run number " << fFirstRun << endl;
    149           fLastValidSrcPosCam = (MSrcPosCam*)fRunMap->GetValue(run);
     157          *fLog << warn << "MSrcPosFromFile::ComputeNewSrcPosition warning: no value for the first run. Taking first found run in file, run number " << fFirstRun;
     158          fLastValidSrcPosCam = (MSrcPosCam*)fRunMap->GetValue(fFirstRun);
    150159        }
    151160
  • trunk/MagicSoft/Mars/mtemp/mifae/library/Makefile

    r4294 r4328  
    6363        MCalibrateDC.cc \
    6464        MHPSFFromStars.cc \
    65         MSrcPosFromStars.cc
     65        MControlPlots.cc
     66       
    6667
    6768############################################################
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/Makefile

    r4117 r4328  
    2828           -I../../../mfbase \
    2929           -I../../../mjobs \
    30            -I../../../mpedestal \
     30           -I../../../mpedestal  \
    3131           -I../../../mbadpixels \
    3232           -I../../../mfileio \
     
    4242           -I../../../mpointing \
    4343           -I../../../mcamera \
     44           -I../../../mhist \
    4445           -I../../../mastro
    4546
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc

    r4286 r4328  
    2222#include "MExtractor.h"
    2323#include "MExtractFixedWindow.h"
     24#include "MExtractSlidingWindow.h"
    2425#include "MExtractSignal.h"
    2526#include "MCalibrationChargeCalc.h"
     
    122123      return -1;
    123124    }
     125
    124126  makeHillas();
    125127}
     
    131133  MExtractFixedWindow    extractor;
    132134  extractor.SetRange(hifirst,hilast,lofirst,lolast);
    133 
     135 
     136  //  MExtractSlidingWindow    extractor;
     137  // extractor.SetRange(hifirst,hilast,lofirst,lolast);
     138  // extractor.SetWindowSize(2,2);
     139 
    134140  MGeomCamMagic       geomcam;
    135141  MGeomApply          geomapl;
     
    232238
    233239  MArrivalTimeCam   timecam;
    234      
     240
     241
     242  // islands
    235243  MIslands      isl;
    236   isl.SetName("MIslands1");
    237  
    238244  MIslands      isl2;
     245  MIslands      isl3;
     246
     247  isl.SetName("MIslands"); 
    239248  isl2.SetName("MIslands2");
    240 
    241   MIslands      isl3;
    242249  isl3.SetName("MIslands3");
    243250
    244   if (islflag == 1 || islflag == 2 || islflag == 3)
    245     {
    246       plist4.AddToList(&timecam);
    247       plist4.AddToList(&isl);
    248     }
     251  plist4.AddToList(&timecam);
     252  plist4.AddToList(&isl);
    249253 
    250254  if (islflag == 2)
    251     {
    252       plist4.AddToList(&isl2);
    253     }
    254 
     255    plist4.AddToList(&isl2);
    255256  if (islflag == 3)
    256     {
    257       plist4.AddToList(&isl3);
    258     }
     257    plist4.AddToList(&isl3);
    259258 
    260259  plist4.AddToList(&geomcam);
     
    280279 
    281280  MImgCleanStd      clean(lcore,ltail);
    282 
    283281  MArrivalTimeCalc2 timecalc;
    284  
    285282  MIslandCalc       island;
    286   island.SetOutputName("MIslands1");
     283  island.SetOutputName("MIslands");
    287284  island.SetAlgorithm(kalgorithm);
    288285
     
    291288
    292289  MIslandClean      islclean(lnew);
    293   islclean.SetInputName("MIslands1");
     290  islclean.SetInputName("MIslands");
    294291  islclean.SetMethod(kmethod);
    295292     
     
    307304  MContinue applycut(&cut);
    308305  applycut.SetInverted(kTRUE);
    309   MWriteRootFile* write=NULL;
     306  MWriteRootFile write(outname,"RECREATE");
     307 
    310308  MHillasDisplay*  disphillas=NULL;
    311309
    312   write = new MWriteRootFile(outname,"RECREATE");
    313  
    314   write->AddContainer("MHillas"        , "Parameters");
    315   write->AddContainer("MHillasSrc"     , "Parameters");
    316   write->AddContainer("MHillasExt"     , "Parameters");
    317   write->AddContainer("MNewImagePar"   , "Parameters");
    318   write->AddContainer("MRawEvtHeader"  , "Parameters");
    319   write->AddContainer("MRawRunHeader"  , "Parameters");
    320   write->AddContainer("MConcentration" , "Parameters");
    321   write->AddContainer("MSrcPosCam"     , "Parameters");
    322  
    323   if (islflag == 1 || islflag == 2 || islflag == 3)
    324     write->AddContainer("MIslands1" , "Parameters");
     310  write.AddContainer("MHillas"        , "Parameters");
     311  write.AddContainer("MHillasSrc"     , "Parameters");
     312  write.AddContainer("MHillasExt"     , "Parameters");
     313  write.AddContainer("MNewImagePar"   , "Parameters");
     314  write.AddContainer("MRawEvtHeader"  , "Parameters");
     315  write.AddContainer("MRawRunHeader"  , "Parameters");
     316  write.AddContainer("MConcentration" , "Parameters");
     317  write.AddContainer("MSrcPosCam"     , "Parameters");
     318  write.AddContainer("MIslands" , "Parameters");
     319
    325320  if (islflag == 2)
    326     write->AddContainer("MIslands2" , "Parameters");
     321    write.AddContainer("MIslands2" , "Parameters");
    327322  if (islflag == 3)
    328     write->AddContainer("MIslands3" , "Parameters");
     323    write.AddContainer("MIslands3" , "Parameters");
    329324
    330325
     
    332327    {
    333328      disphillas = new MHillasDisplay(&nphot,&geomcam);
    334       if (islflag == 1)
    335         disphillas->SetIslandsName("MIslands1");
     329      disphillas->SetIslandsName("MIslands");
    336330      if (islflag == 2)
    337331        disphillas->SetIslandsName("MIslands2");
     
    347341    tlist4.AddToList(&interpolatebadpixels);
    348342  tlist4.AddToList(&clean);
    349 
    350   if (islflag == 1 || islflag == 2 || islflag == 3)
    351     {
    352       tlist4.AddToList(&timecalc);
    353       tlist4.AddToList(&island);
    354     }
     343  tlist4.AddToList(&timecalc);
     344  tlist4.AddToList(&island);
    355345
    356346  if (islflag == 2)
     
    366356    }
    367357 
    368 
    369   //tlist4.AddToList(&blind2);
    370358  tlist4.AddToList(&hcalc);
    371359  tlist4.AddToList(&csrc1);
    372360  if(filter.Length())
    373361    tlist4.AddToList(&applycut);
    374   tlist4.AddToList(write);
     362  tlist4.AddToList(&write);
    375363  if(display)
    376364    {
     
    381369      tlist4.AddToList(disphillas);
    382370    }
    383 
    384371
    385372  // Create and setup the eventloop
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/optimizeCuts.cc

    r4234 r4328  
    113113  ton->SetAlias("length","MHillas.fLength*0.6/189");
    114114  ton->SetAlias("width","MHillas.fWidth*0.6/189");
     115  //  ton->SetAlias("length","MHillas.fLength");
     116  //  ton->SetAlias("width","MHillas.fWidth");
    115117  ton->SetAlias("dist","MHillasSrc.fDist*0.6/189");
    116118  ton->SetAlias("conc","MNewImagePar.fConc");
     
    121123  toff->SetAlias("length","MHillas.fLength*0.6/189");
    122124  toff->SetAlias("width","MHillas.fWidth*0.6/189");
     125  //toff->SetAlias("length","MHillas.fLength");
     126  //toff->SetAlias("width","MHillas.fWidth");
    123127  toff->SetAlias("dist","MHillasSrc.fDist*0.6/189");
    124128  toff->SetAlias("conc","MNewImagePar.fConc");
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/psffit.cc

    r4045 r4328  
    3939#include "MPSFFitCalc.h"
    4040#include "MEvtLoop.h"
     41#include "MCalibrateDC.h"
    4142
    4243using namespace std;
     
    104105  MGeomApply geomapl;
    105106
     107  TString continuoslightfile =
     108    "/nfs/magic/CaCodata/rootdata/Miscellaneous/Period016/2004_04_16/dc_2004_04_16_04_46_18_22368_Off3c279-2CL100.root";
     109  MCalibrateDC dccal;
     110  dccal.SetFileName(continuoslightfile);
     111 
    106112  const Int_t numrings = 3;
    107   const Int_t numblind = 23;
    108   const Short_t x[numblind] = {  8,  27, 224, 279, 339,
    109                                507, 508, 509, 510, 511, 512, 513, 514,
    110                                543,
    111                                559, 560, 561, 562, 563, 564, 565, 566, 567};
     113  //  const Int_t numblind = 187;
     114
    112115
    113116  // 2004_02_15
     
    118121                               523, 524, 525, 526, 527, 528, 529, 530, 531};
    119122  */
     123  const Int_t numblind = 260;
     124  Short_t x[numblind];
     125
     126  for (int i=0;i<246;i++)
     127    x[i+14]=i+331;
     128  x[0]=124;
     129  x[1]=123;
     130  x[2]=125;
     131  x[3]=166;
     132  x[4]=165;
     133  x[5]=88;
     134  x[6]=89;
     135  x[7]=282;
     136  x[8]=283;
     137  x[9]=226;
     138  x[10]=227;
     139  x[11]=228;
     140  x[12]=177;
     141  x[13]=178;
     142
    120143  const TArrayS blindpixels(numblind,(Short_t*)x);
    121144  MPSFFitCalc psfcalc;
     
    128151  tlist.AddToList(&geomapl);
    129152  tlist.AddToList(&read);
     153  tlist.AddToList(&dccal, "Currents");
    130154  tlist.AddToList(&psfcalc, "Currents");
    131155
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/srcPos.cc

    r4094 r4328  
    3131#include "MWriteRootFile.h"
    3232#include "MTime.h"
     33#include "MControlPlots.h"
     34#include "MIslands.h"
    3335
    3436using namespace std;
     
    5456Double_t fDEC= -1.;
    5557TString  srcFile;
     58TString  controlplotsfilename="controlplots.ps";
    5659
    5760//-----------------------------------------------------------------------------
     
    107110  MParList  plist; 
    108111  MTaskList tlist;
     112  MIslands  islands;
    109113
    110114  // include containers in parameter list
    111115  plist.AddToList(&tlist);
     116  plist.AddToList(&islands);
    112117                 
    113118  // tasks
     
    144149  write.AddContainer("MConcentration" , "Parameters");
    145150  write.AddContainer("MSrcPosCam"     , "Parameters");
    146 
     151  write.AddContainer("MIslands"       , "Parameters");
     152  //write.AddContainer("MIslands2"     ,  "Parameters");
     153
     154  MControlPlots controlplots(controlplotsfilename);
     155  controlplots.SetProduceFile(kFALSE);
     156 
    147157  // include tasks in task list
    148158  tlist.AddToList(&read);
     
    156166    }
    157167  tlist.AddToList(&csrc1); 
     168  tlist.AddToList(&controlplots);
    158169  tlist.AddToList(&write);
    159170
     
    184195  write2.AddContainer("MConcentration" , "Parameters");
    185196  write2.AddContainer("MSrcPosCam"     , "Parameters");
     197  write2.AddContainer("MIslands"       , "Parameters");
     198  // write2.AddContainer("MIslands2"     ,  "Parameters");
    186199  tlist.AddToListBefore(&write2,&write,"All");
    187200  tlist.RemoveFromList(&write);
     
    191204  else
    192205    srcrotate.SetMode(MSrcPlace::kOff);
     206
     207  controlplots.SetMode(MControlPlots::kOff);
     208  controlplots.SetProduceFile(kTRUE);
    193209
    194210  if (!evtloop.Eventloop(nmaxevents))
Note: See TracChangeset for help on using the changeset viewer.