Ignore:
Timestamp:
05/21/04 17:28:02 (21 years ago)
Author:
rico
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mifae/programs
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/Makefile

    r4050 r4117  
    2626           -I../library \
    2727           -I../../../mbase \
     28           -I../../../mfbase \
    2829           -I../../../mjobs \
    2930           -I../../../mpedestal \
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/falsesource.datacard

    r4094 r4117  
    3939
    4040// Size cut (lower and upper) in # of photons
    41 SIZECUT   1200   9999999
     41SIZECUT   2000   9999999
    4242
    4343// Dist cut (lower and upper) in degrees
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc

    r4100 r4117  
    2525#include "MFCosmics.h"
    2626#include "MContinue.h"
    27 #include "MFillH.h"
    2827#include "MLog.h"
    2928#include "MCerPhotEvt.h"
     
    4443#include "MIslandClean.h"
    4544#include "MWriteRootFile.h"
    46 #include "MProgressBar.h"
    4745#include "MArgs.h"
    4846#include "MRunIter.h"
    4947#include "MJPedestal.h"
    5048#include "MJCalibration.h"
     49#include "MHillasDisplay.h"
     50#include "MF.h"
     51#include "MContinue.h"
     52
     53#include "TApplication.h"
    5154
    5255#include <iostream>
     
    6871TString  outname;
    6972TString  idirname;
     73TString  filter;
    7074MRunIter caliter;
    7175MRunIter pediter;
    7276MRunIter datiter;
    73 ULong_t  nmaxevents=999999999;
    74 Short_t  calflag=1;
    75 Float_t  lcore = 3.0;
    76 Float_t  ltail = 1.5;
    77 Int_t islflag = 0;
    78 Float_t  lnew  = 40;
    79 Int_t  kmethod = 1;
    80 Int_t    nfiles = 0;
    81 
    82 const TString defaultcard="input.datacard";
     77Bool_t   display   = kFALSE;
     78ULong_t  nmaxevents= 999999999;
     79Short_t  calflag   = 1;
     80Float_t  lcore     = 3.0;
     81Float_t  ltail     = 1.5;
     82Int_t    islflag   = 0;
     83Float_t  lnew      = 40;
     84Int_t    kmethod   = 1;
     85Int_t    nfiles    = 0;
     86
     87const TString defaultcard="makehillas.datacard";
    8388/*************************************************************/
    8489static void Usage()
     
    9398int main(int argc, char **argv)
    9499{
     100  // create a TApplication to be able to
     101  TApplication app("Application",0,0);
     102
    95103  // evaluate arguments
    96104  MArgs arg(argc, argv);
     
    250258  plist4.AddToList(&hillas);
    251259  plist4.AddToList(&runhead);
     260
     261  // cuts
     262  MF cut(filter);
    252263 
    253264  //tasks
     
    285296  MHillasSrcCalc    csrc1;
    286297 
    287   MWriteRootFile write(outname,"RECREATE");
    288  
    289   write.AddContainer("MHillas"        , "Parameters");
    290   write.AddContainer("MHillasSrc"     , "Parameters");
    291   write.AddContainer("MHillasExt"     , "Parameters");
    292   write.AddContainer("MNewImagePar"   , "Parameters");
    293   write.AddContainer("MRawEvtHeader"  , "Parameters");
    294   write.AddContainer("MRawRunHeader"  , "Parameters");
    295   write.AddContainer("MConcentration" , "Parameters");
    296   write.AddContainer("MSrcPosCam"     , "Parameters");
    297 
    298   if (islflag == 1 || islflag == 2)
    299     write.AddContainer("MIslands1" , "Parameters");
    300   if (islflag == 2)
    301     write.AddContainer("MIslands2" , "Parameters");
     298  MContinue applycut(&cut);
     299  applycut.SetInverted(kTRUE);
     300  MWriteRootFile* write=NULL;
     301  MDisplay*  disphillas=NULL;
     302
     303  if(!display)
     304    {
     305      write = new MWriteRootFile(outname,"RECREATE");
     306     
     307      write->AddContainer("MHillas"        , "Parameters");
     308      write->AddContainer("MHillasSrc"     , "Parameters");
     309      write->AddContainer("MHillasExt"     , "Parameters");
     310      write->AddContainer("MNewImagePar"   , "Parameters");
     311      write->AddContainer("MRawEvtHeader"  , "Parameters");
     312      write->AddContainer("MRawRunHeader"  , "Parameters");
     313      write->AddContainer("MConcentration" , "Parameters");
     314      write->AddContainer("MSrcPosCam"     , "Parameters");
     315     
     316      if (islflag == 1 || islflag == 2)
     317        write->AddContainer("MIslands1" , "Parameters");
     318      if (islflag == 2)
     319        write->AddContainer("MIslands2" , "Parameters");
     320    }
     321  else
     322    {
     323      disphillas = new MHillasDisplay(&nphot,&geomcam);
     324    }
    302325
    303326  tlist4.AddToList(&read4);
     
    322345  //tlist4.AddToList(&blind2);
    323346  tlist4.AddToList(&hcalc);
    324   //  tlist4.AddToList(&srcposcalc);
    325347  tlist4.AddToList(&csrc1);
    326   tlist4.AddToList(&write);
     348  tlist4.AddToList(&applycut);
     349  if(!display)
     350    tlist4.AddToList(write);
     351  else
     352    tlist4.AddToList(disphillas);
    327353
    328354  // Create and setup the eventloop
     
    409435        }
    410436
     437      // exclusion cut
     438      if(strcmp(word.Data(),"FILTER")==0)
     439        {
     440          if(filter.Length())
     441            cout << "readDataCards Warning: overriding existing cut" << endl;
     442         
     443          char ch;
     444          while((ch=ifun.get())!='\n')
     445            filter.Append(ch);   
     446        }
     447
     448      // display flag
     449      if(strcmp(word.Data(),"DISPLAY")==0)
     450        ifun >> display;
     451
    411452      // calibration flag
    412453      if(strcmp(word.Data(),"CALFLAG")==0)
    413454        ifun >> calflag;
     455
    414456
    415457      // cleaning level
     
    454496    cout << pfile << endl;
    455497  cout << "Maximum number of events: " << nmaxevents << endl;
    456   cout << "Output file name: " << outname << endl;
     498  if(filter.Length())
     499    cout << "Applying rejection cut: " << filter << endl;
     500  if(!display)
     501    cout << "Output file name: " << outname << endl;
    457502  cout << "Calibration flag: " << calflag << endl;
    458503  cout << "Cleaning level: ("<<lcore<<","<<ltail<<")" << endl;
     
    489534  return kTRUE;
    490535}
     536
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard

    r4050 r4117  
    1414// OUTFILE ~/magic/mars/mars/hillasCrab/crab20040215OnA.root
    1515OUTFILE ./prueba.root
     16
     17// Selection cut.
     18// Condition "==" not supported.
     19// Enclose all conditions between brakets, like: "(x<y) && (z<5)"
     20// (see MF description class for more details)
     21FILTER (MHillas.fLength<100) && (MHillas.fLength>50)
     22
     23// Display flag (DISPLAY=1 will show event display and skip saving into output file)
     24DISPLAY 1
    1625
    1726// calibration flag:
     
    3443// 1: no timing method  val: 40, 50, 60...
    3544ISLANDCLEAN 1 40
     45
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/optimizecuts.datacard

    r4056 r4117  
    44
    55// On data acceptance rate (e.g 4 for taking 1/4 of whole data sample)
    6 ONRATE 1
     6ONRATE 2
    77
    88// Input file name pattern (On data)
    9 ONFILES  /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OnRotateNoCalB.root
     9ONFILES  /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OnRotateCalA-D.root
    1010
    1111// Input file name pattern (Off data)
    12 OFFFILES  /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OffRotateNoCalA-C.root
     12OFFFILES  /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OffRotateCalA-H.root
    1313
    1414// output file name
    15 OUTFILE  ./optimize_fine.out
     15OUTFILE  ./optimizeCrab_cal_fine.out
    1616
    1717// Preliminar cuts (size in size units, distance in deg)
     
    2020
    2121// Length initial, final and step values
    22 LENGTHCUTS 0.1 0.4 0.005
     22LENGTHCUTS 0.15 0.35 0.005
    2323
    2424// Width initial, final and step values
    25 WIDTHCUTS 0.0 0.3 0.005
     25WIDTHCUTS 0.05 0.15 0.005
    2626
    2727
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/srcpos.datacard

    r4094 r4117  
    44
    55// Input file name pattern (wildcards allowed)
    6 INPUTFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OnNoCalB.root
     6INPUTFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OnCal*.root
    77
    88// Specify optionally the name of OFF-data files you want to apply the same source position distribution to
    9 OFFFILES  /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/mrk20040215OffNoCal*.root
     9OFFFILES  /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OffCal*.root
    1010
    1111// output file name (on data)
    12 OUTFILE  ./srcPosPrueba.root
     12OUTFILE  /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OnRotateCalA-D.root
    1313
    1414// output file name (off data)
    15 OFFOUTFILE ./srcPosOffPrueba.root
     15OFFOUTFILE /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OffRotateCalA-H.root
    1616
    1717// X and Y position of the source (degrees) for a MJ date (days) -important only in case of rotation
    18 SRCPOS  0.21  0.176   53050.0773
     18SRCPOS  0.3  0.1   53049.89
    1919
    2020// Flag to determine whether source position is absolute (0) or relative to previous position (1)
     
    2727
    2828// source coordinates (RA DEC in rads)
    29 // SRCCOORDS 1.46 0.384 // (Crab)
    30 SRCCOORDS 2.899 0.667   // (Mrk 421)
     29SRCCOORDS 1.46 0.384 // (Crab)
     30// SRCCOORDS 2.899 0.667   // (Mrk 421)
    3131
    3232
    3333// File containing source position as a function of run number (invalidates SRCPOS, SRCABS, ROTFLAG and SRCCOORDS values)
    34 SRCFILE /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/programs/20040215_Mrk421.B.pos
     34// SRCFILE /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/programs/20040215_Mrk421.B.pos
    3535
    3636
Note: See TracChangeset for help on using the changeset viewer.