Changeset 203 in JEM-EUSO


Ignore:
Timestamp:
Sep 27, 2013, 1:21:08 PM (11 years ago)
Author:
dagoret
Message:

Now the class Analysis is operationnal

Location:
equalization_gain/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • equalization_gain/trunk/src/PlotScurvesAll-diffFit.cc

    r202 r203  
    775775{
    776776  if(DEBUG)
    777     cout << " START Analysis Constructor " << endl;
     777    cout << " >>>>>>> START Analysis Constructor " << endl;
    778778
    779779 /*********************** SIGNAL RUN ********************/
     
    791791
    792792 if(DEBUG)
    793     cout << " END Analysis Constructor " << endl;
     793    cout << " >>>>>>> END Analysis Constructor " << endl;
    794794}
    795795//--------------------------------------------------------------------------------------------------------
     
    803803 
    804804 if(DEBUG)
    805     cout << " START Analysis Destructor " << endl;
     805    cout << " >>>>>>> START Analysis Destructor " << endl;
    806806
    807807  if(input!=0) delete input;
     
    809809
    810810if(DEBUG)
    811     cout << " END Analysis Destructor " << endl;
     811    cout << " >>>>>>> END Analysis Destructor " << endl;
    812812
    813813}
     
    855855if(DEBUG)
    856856{
    857     cout << " START Analysis::PlotScurve " << endl;
     857    cout << " >>>>>>> START Analysis::PlotScurve " << endl;
    858858    cout << " \t - kDrawCh = " << kDrawCh << endl;
    859859    cout << " \t - fname = " << fname << endl;
     
    901901
    902902if(DEBUG)
    903     cout << " END Analysis::PlotSCurve " << endl;
     903    cout << " >>>>>>> END Analysis::PlotSCurve " << endl;
    904904
    905905}
     
    914914
    915915if(DEBUG)
    916     cout << " START Analysis::Init " << endl;
    917 
    918   if(input!=0) delete input;
    919   if(input_ped!=0) delete input_ped;
     916    cout << " >>>>>>> START Analysis::Init " << endl;
     917
     918//if(input!=0) delete input;
     919//if(input_ped!=0) delete input_ped;
    920920
    921921  // recreate the name
     
    966966
    967967if(DEBUG)
    968     cout << " END Analysis::Init " << endl;
     968    cout << " >>>>>>> END Analysis::Init " << endl;
    969969
    970970 
     
    978978{
    979979if(DEBUG)
    980     cout << " START Analysis::OpenGainFile " << endl;
     980    cout << " >>>>>>> START Analysis::OpenGainFile " << endl;
    981981
    982982
     
    992992
    993993if(DEBUG)
    994     cout << " END Analysis::OpenGainFile " << endl;
     994    cout << " >>>>>>> END Analysis::OpenGainFile " << endl;
    995995
    996996
     
    10051005
    10061006if(DEBUG)
    1007     cout << " START Analysis::FillHistoName " << endl;
     1007    cout << " >>>>>>> START Analysis::FillHistoName " << endl;
    10081008
    10091009
     
    10261026
    10271027if(DEBUG)
    1028     cout << " END Analysis::FillHistoName " << endl;
     1028    cout << " >>>>>>> END Analysis::FillHistoName " << endl;
    10291029
    10301030
     
    10451045if(DEBUG)
    10461046{
    1047     cout << " START Analysis::ReadGainFile " << endl;
     1047    cout << " >>>>>>> START Analysis::ReadGainFile " << endl;
    10481048    cout << " \t - fname_gain = " << fname_gain << endl;
    10491049    cout << " \t - kBoard = " << kBoard << " 0:ASIC_C, 1:ASIC_D " << endl;
     
    10831083if(DEBUG)
    10841084{
    1085     cout << " END Analysis::ReadGainFile " << endl;
     1085    cout << " >>>>>>> END Analysis::ReadGainFile " << endl;
    10861086       
    10871087}
     
    11141114if(DEBUG)
    11151115{
    1116   cout << " START Analysis::ProcessSingleChannel ch=" << ch << endl;
     1116  cout << " >>>>>>> START Analysis::ProcessSingleChannel ch=" << ch << endl;
    11171117    cout << " \t - kDrawCh = " << kDrawCh << endl;
    11181118    cout << " \t - fname = " << fname << endl;
     
    14881488if(DEBUG)
    14891489{
    1490     cout << " END Analysis::ProcessSingleChannel " << endl;     
     1490    cout << " >>>>>>> END Analysis::ProcessSingleChannel " << endl;     
    14911491}
    14921492   
     
    15041504if(DEBUG)
    15051505{
    1506   cout << " START Analysis::ComputeDACAverage " << endl;
     1506  cout << " >>>>>>> START Analysis::ComputeDACAverage " << endl;
    15071507 
    15081508    cout << " \t - dac_half_spe_fix = " << dac_half_spe_fix << endl;
     
    15751575if(DEBUG)
    15761576{
    1577   cout << " END Analysis::ComputeDACAverage " << endl;
    1578  
    1579     cout << " \t - dac_half_spe_fix = " << dac_half_spe_fix << endl;
    1580     cout << " \t - kChRef = " << kChRef << " ASIC_C " << endl;
    1581     cout << " \t - checkAve = " << checkAve << " 0:use ref pix, 1:check average " << endl;     
     1577  cout << " >>>>>>> END Analysis::ComputeDACAverage " << endl; 
    15821578}
    15831579 
     
    15931589if(DEBUG)
    15941590{
    1595   cout << " START Analysis::OutputGain " << endl;
     1591  cout << " >>>>>>> START Analysis::OutputGain " << endl;
    15961592  cout << " \t - fname_out = " << fname_out << endl;   
    15971593}
     
    16561652if(DEBUG)
    16571653{
    1658   cout << " END Analysis::OutputGain " << endl;
    1659 }
    1660 
    1661 
    1662 }
     1654  cout << " >>>>>>> END Analysis::OutputGain " << endl;
     1655}
     1656
     1657
     1658}
     1659//--------------------------------------------------------------------------------------------------------
     1660
     1661
     1662
     1663
     1664
     1665
     1666
     1667//--------------------------------------------------------------------------------------------------------
     1668//--------------------------------------------------------------------------------------------------------
     1669void Analysis::Help()
     1670{
     1671
     1672  cout << "This is the Help of the PlotScurveAll-diffFit" <<endl;
     1673  cout << " Version 2.0 from September 27 2013 " <<endl;
     1674  cout << " Main author Hiroko Miyamoto " << endl;
     1675  cout << " Adapted for modularity and compilable program by Sylvie Dagoret " << endl;
     1676  cout << " ==> Please from shell execute directly the compiled program :  " <<endl;
     1677  cout << " ==> ../../src/PlotScurvesAllMain  " << endl;
     1678   
     1679}
     1680//--------------------------------------------------------------------------------------------------------
     1681
     1682//--------------------------------------------------------------------------------------------------------
     1683//--------------------------------------------------------------------------------------------------------
     1684void Analysis::Menu()
     1685{
     1686 cout << "This is the Detailed menu information for running the PlotScurveAll-diffFit" <<endl;
     1687
     1688 cout << " void PlotScurve( " << endl;
     1689 cout << " \t " <<  " Int_t    kDrawCh=31, " << endl;
     1690 cout << " \t " <<  " TString  fname=kFname, " << endl;
     1691 cout << " \t " <<  " TString  fname_ped=kFnamePed, //ASIC_D ped_file " << endl;
     1692 cout << " \t " <<  " Double_t dac_half_spe_fix = -1," << endl;
     1693 cout << " \t " <<  " TString  fname_gain=\"gain-org.txt\"," << endl;
     1694 cout << " \t " <<  " Int_t    fit_min=kFitMin," << endl;
     1695 cout << " \t " <<  " Int_t    fit_max=kFitMax," << endl;
     1696 cout << " \t " <<  " Int_t    fit_min_scurve=kFitMinS," << endl;
     1697 cout << " \t " <<  " Int_t    fit_max_scurve=kFitMaxS," << endl;
     1698 cout << " \t " <<  " Bool_t   kBoard=1, //0:ASIC_C, 1:ASIC_D " << endl;
     1699 cout << " \t " <<  " Int_t    kChRef=kRefCh,//ASIC_C " << endl;
     1700 cout << " \t " <<  " Bool_t   checkAve=0 //0:use ref pix, 1:check average " << endl;
     1701 cout << " ) " << endl;         
     1702 cout << "Set the parameters on the top of the program depending on your analysis:  " << endl;
     1703 cout << "General policy: parameters starting with a \"k\" at the beginning is fixed gloval parameter and usually set in the header file, never change through the program. " << endl;
     1704 cout << " : " << endl;
     1705 cout << " - kDrawCh: channel just you want to check on display. doens't effect the analysis. " << endl;
     1706 
     1707 cout << " - fname, fname_ped (kFname, kFnamePed): \"YOUR DATA FILE\" without .data"  << endl;
     1708 cout << " See examples in the header file. " << endl;
     1709 cout << " - dac_half_spe_fix: set DAC value only when you want to adjust the gain to particular pulse height (DAC value) instead of either average of the pulse height of reference pixel. Usually just leave it -1. " << endl;
     1710 cout << " - fit_min, fit_max (kFitMin, kFitMax): leave them as default, it is not currently used for the analysis."  << endl;
     1711 cout << " - fit_min_scurve, fit_max_scurve (kFitMinS, kFitMaxS): define the range of s-curve fitting. search proper values by yourself with running root program a few times."  << endl;
     1712 cout << " - kBoard: don't forget to change 0(C) or 1(D) depending on which ASIC you're analysing "  << endl;
     1713 cout << " - kChRef (kRefCh): a pixel whose gain remains 64 thorough the gain adjustment. " << endl;
     1714 cout << " - checkAve: for the first run, set this parameter 1, and find a pixel which remains 64. In the case of parameter 1, all the gains are adjusted to the average pulse height. " << endl;
     1715   cout <<  " Once you choose the reference pixel, set the parameter 0, as well as set kRefCh the pixel number. (better to keep in the header file for the record of each PMTs.) " << endl;
     1716
     1717   cout << " Actual configuration " << endl;
     1718   cout << " \t " <<  "TString kFname = " << kFname << endl;
     1719   cout << " \t " <<  "TString  kFnamePed = " << kFnamePed  << endl;
     1720   cout << " \t " <<  "Int_t kFitMin = " << kFitMin << endl;
     1721   cout << " \t " <<  "Int_t kFitMax = " << kFitMax << endl;
     1722
     1723}
     1724
    16631725//-------------------------------------------------------------------------------------------------
    16641726// Configure (x)emacs for this file ...
  • equalization_gain/trunk/src/PlotScurvesAll-diffFit.h

    r202 r203  
    4747  // Main analysis function to be called from outside
    4848
    49 void PlotScurve(
     49  void Menu();
     50  void Help();
     51  void PlotScurve(
    5052                Int_t    kDrawCh=31,
    5153                TString  fname=kFname,
  • equalization_gain/trunk/src/PlotScurvesAllMain.cc

    r202 r203  
    2020   TRint *theApp=new TRint("ROOT-PlotScurvesAll",&argc,argv);
    2121   
    22    //Help();
    2322   
    24    PlotScurve();
     23   // SDC (27/09/2013) :: Old fashion of calling the function directly
     24   //PlotScurve();
    2525
    26    // to debug
    27    //Analysis* pa = new Analysis;
    28    //pa->PlotScurve();
     26   // SDC (27/09/2013) :: class analysis working now
     27   Analysis* ana = new Analysis;
     28
     29   ana->Help();
     30   ana->Menu();
     31   ana->PlotScurve();
    2932
    3033    theApp->Run();
Note: See TracChangeset for help on using the changeset viewer.