Ignore:
Timestamp:
05/10/05 12:13:12 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/macros
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/mccalibrate.C

    r6496 r7005  
    6363
    6464  //
    65   //  Set signal extractor
     65  //  USER CHANGE: Set signal extractor
    6666  //
    6767  //    MExtractFixedWindowPeakSearch sigextract;
    6868  //    sigextract.SetWindows(6, 6, 4);
    6969  //
    70   MExtractTimeAndChargeDigitalFilter sigextract;
    71   sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
    72   sigextract.SetRange(1, 14, 3, 14);
    73 
     70
     71  //    MExtractTimeAndChargeDigitalFilter sigextract;
     72  //    sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
     73  //    sigextract.SetRange(1, 14, 3, 14);
     74
     75  MExtractTimeAndChargeSpline sigextract;
     76  sigextract.SetRiseTimeHiGain(0.5);
     77  sigextract.SetFallTimeHiGain(0.5);
     78
     79
     80  // USER CHANGE: high to low gain ratio. DEPENDS on EXTRACTOR!!
     81  // One should calculate somewhere else what this factor is for each extractor!
     82  Float_t hi2low = 12.; // tentative value for spline with risetime 0.5, fall time 0.5
    7483
    7584  MMcCalibrationUpdate  mccalibupdate;
     85  mccalibupdate.SetUserLow2HiGainFactor(hi2low);
    7686  ///// User change: calibrate in photons or phe- :
    7787  mccalibupdate.SetSignalType(MCalibrateData::kPhe);
  • trunk/MagicSoft/Mars/macros/starmc.C

    r6403 r7005  
    5252  // differences in gain of outer pixels)
    5353  //
    54   CalibrationFilename = new TString("/users/emc/moralejo/mcdata/Period021_0.73_mirror/gammas_nonoise/Gamma_zbin0_*.root");
     54  CalibrationFilename = new TString("/data1/magic/mc_data/root/Period025/gammas_nonoise/Gamma_zbin0_*.root");
    5555  // File to be used in the calibration (must be a camera file without added noise)
    5656
    5757
    58   Char_t* AnalysisFilename = "Gamma_*w0.root";  // File to be analyzed
     58  Char_t* AnalysisFilename = "Gamma_zbin1_0_*.root";  // File to be analyzed
    5959
    6060
     
    7474  Float_t accepted_fraction = 1.;
    7575
    76   Float_t CleanLev[2] = {5., 4.};
    77   // User change: tail cuts for image analysis
    78 
     76  // USER CHANGE: tail cuts for image analysis
     77
     78  Float_t CleanLev[2] = {7., 5.};
    7979  MImgCleanStd  clean(CleanLev[0], CleanLev[1]); // Applies tail cuts to image.
    80 
    81 
    82   //  User change: signal extraction
     80  clean.SetMethod(MImgCleanStd::kAbsolute);      // In absolute units (phot or phe- as chosen below)
     81
     82
     83  //  USER CHANGE: signal extraction
    8384  //
    8485  //  MExtractFixedWindowPeakSearch sigextract;
    8586  //  sigextract.SetWindows(6, 6, 4);
    8687
    87   MExtractTimeAndChargeDigitalFilter sigextract;
    88   sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
    89   sigextract.SetRange(1, 14, 3, 14);
     88  //  MExtractTimeAndChargeDigitalFilter sigextract;
     89  //  sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
     90  //  sigextract.SetRange(1, 14, 3, 14);
     91
     92  MExtractTimeAndChargeSpline sigextract;
     93  sigextract.SetRiseTimeHiGain(0.5);
     94  sigextract.SetFallTimeHiGain(0.5);
     95
     96  // USER CHANGE: high to low gain ratio. DEPENDS on EXTRACTOR!!
     97  // One should calculate somewhere else what this factor is for each extractor!
     98  Float_t hi2low = 12.; // tentative value for spline with risetime 0.5, fall time 0.5
     99
    90100
    91101  ////////// Calibration //////////
    92 
    93102  MMcCalibrationUpdate  mccalibupdate;
    94   ///// User change: calibrate in photons or phe- :
     103  mccalibupdate.SetUserLow2HiGainFactor(hi2low);
     104
     105  ///// USER CHANGE: calibrate in photons or phe- :
    95106  mccalibupdate.SetSignalType(MCalibrateData::kPhe);
    96107  //  mccalibupdate.SetSignalType(MCalibrateData::kPhot);
     
    233244  //
    234245
    235   //  MProgressBar bar;
    236   //  bar.SetWindowName("Calibrating...");
     246  MProgressBar bar;
     247  bar.SetWindowName("Calibrating...");
    237248
    238249  MEvtLoop evtloop;
    239   //  evtloop.SetProgressBar(&bar);
     250  evtloop.SetProgressBar(&bar);
    240251  evtloop.SetParList(&plist);
    241252
     
    271282  tlist.AddToListBefore(&skip, &sigextract);
    272283
    273   //  bar.SetWindowName("Analyzing...");
     284  bar.SetWindowName("Analyzing...");
    274285
    275286  tlist.RemoveFromList(&mccalibcalc); // Removes calibration task from list.
Note: See TracChangeset for help on using the changeset viewer.