Changeset 5954


Ignore:
Timestamp:
01/24/05 09:38:42 (20 years ago)
Author:
domingo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mifae
Files:
1 added
3 edited

Legend:

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

    r5933 r5954  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2005/01/24 Eva Domingo
     22    * programs/makeHillas.cc
     23      programs/makehillas.datacard
     24      programs/DISPstd.root, default DISP parameters values
     25     - Add Disp computation
    2026
    2127 2005/01/21 Javier Rico
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc

    r5934 r5954  
    55#include "TString.h"
    66#include "TArrayS.h"
     7#include "TFile.h"
     8#include "TH1.h"
     9#include "TH2.h"
     10#include "TProfile.h"
    711
    812#include "MArray.h"
     
    6670#include "MRanForestCalc.h"
    6771#include "MRanForestFill.h"
     72#include "MPointingPos.h"
     73#include "MPointingPosCalc.h"
     74#include "MImageParDisp.h"
     75#include "MDispParameters.h"
     76#include "MDispCalc.h"
     77#include "MHDisp.h"
     78#include "MFillH.h"
    6879
    6980#include "TApplication.h"
     
    110121Int_t    sext    = 0;
    111122TString  rffilename;
     123TString  dispfilename;
    112124
    113125const TString defaultcard="makehillas.datacard";
     
    411423  MIslands      isl3;
    412424  MTopology     topology;
     425  // disp
     426  // (read in optimum Disp parameter values) 
     427  TFile inparam(dispfilename);
     428  MDispParameters dispin;
     429  dispin.Read("MDispParameters");
     430  inparam.Close();
     431  TArrayD dispPar;
     432  dispPar =  dispin.GetParameters();
     433  cout << "Optimum parameter values taken for calculating Disp : " << endl;
     434  for (Int_t i=0; i<dispPar.GetSize(); i++)
     435    {
     436      cout << dispPar[i] << ",  ";
     437    }
     438  cout << endl;
     439  // Disp results container
     440  MImageParDisp imagepardisp;
     441  // Disp histograms
     442  MHDisp hdisp;
     443  hdisp.SetName("MHDispAsym");
     444  hdisp.SetSelectedPos(4);
     445  MFillH filldisp("MHDispAsym[MHDisp]", "");
    413446 
    414447  isl.SetName("MIslands"); 
     
    440473  plist5.AddToList(&topology);
    441474  plist5.AddToList(&ranforest);
     475  plist5.AddToList(&dispin); 
     476  plist5.AddToList(&imagepardisp);
     477  plist5.AddToList(&hdisp);
    442478
    443479  // cuts
     
    478514  MTopologyCalc     topcalc;
    479515 
     516  MPointingPosCalc  pointingposcalc;
     517  MDispCalc         dispcalc; 
     518
    480519  MContinue applycut(&cut);
    481520  applycut.SetInverted(kTRUE);
     
    495534  write.AddContainer("MIslands"       , "Parameters");
    496535  write.AddContainer("MReportDrive"   , "Parameters");
    497   write.AddContainer("MTopology",       "Parameters");
    498   write.AddContainer("MHadronness",     "Parameters");
    499  
     536  write.AddContainer("MTopology"      , "Parameters");
     537  write.AddContainer("MPointingPos"   , "Parameters");
     538  if(rffilename.Length())
     539    write.AddContainer("MHadronness",     "Parameters");
     540  if(dispfilename.Length())
     541    write.AddContainer("MImageParDisp"  , "Parameters");
    500542  if (islflag == 2)
    501543    write.AddContainer("MIslands2" , "Parameters");
     
    542584  if(rffilename.Length())
    543585    tlist5.AddToList(&hadrcalc);
     586  tlist5.AddToList(&pointingposcalc);
     587  if(dispfilename.Length())
     588    {
     589      tlist5.AddToList(&dispcalc);
     590      tlist5.AddToList(&filldisp);
     591    }
    544592  tlist5.AddToList(&write);
    545593  if(display)
     
    551599      tlist5.AddToList(disphillas);
    552600    }
    553 
    554601 
    555602  // Create and setup the eventloop
     
    564611    return;
    565612 
     613  if(dispfilename.Length())
     614    {
     615      hdisp.GetHistSize()->Write();
     616      hdisp.GetHistcosZA()->Write();
     617      hdisp.GetSkymapXY()->Write();
     618      hdisp.GetHistMinPar()->Write();
     619      hdisp.GetHistDuDv()->Write();
     620      hdisp.GetHistMinParSize()->Write();
     621      hdisp.GetHistDuSize()->Write();
     622      hdisp.GetHistDvSize()->Write();
     623      hdisp.GetEvCorrAssign()->Write();
     624    }
     625
    566626  tlist5.PrintStatistics();   
    567627  delete extractor;
     
    688748        }
    689749     
     750      // disp file name
     751      if(strcmp(word.Data(),"DISP")==0)
     752        {
     753          if(dispfilename.Length())
     754            cout << "readDataCards Warning: overriding disp file name" << endl;
     755          ifun >> dispfilename;
     756        }
     757
    690758      // cleaning level
    691759      if(strcmp(word.Data(),"EXTRACTOR")==0)
     
    752820  if(rffilename.Length())
    753821    cout << "Random Forest will be read from " << rffilename << endl;
     822  if(dispfilename.Length())
     823    cout << "Disp parameters will be read from " << dispfilename << endl;
    754824  if (islflag == 1 || islflag == 2)
    755825    cout << "Island calcultation..." << "using algorithm #" << kalgorithm <<endl;
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard

    r5933 r5954  
    6767RANFOREST RFstd.root
    6868
     69// Add the following word if you want to apply DISP method analysis,
     70// followed by the name of the file where the MDispParameters container
     71// with the optimal values of the DISP parameters is stored
     72DISP DISPstd.root
     73
    6974//Island calculations
    7075// 0  same as 1                1:normal algorithm
Note: See TracChangeset for help on using the changeset viewer.