Changeset 8384 for trunk/MagicSoft


Ignore:
Timestamp:
03/28/07 14:32:37 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

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

    r4993 r8384  
    5151    tlist.AddToList(&read);
    5252
    53     // Create the container for the IPRs
    54     MTriggerIPR ipr;
    55     plist.AddToList(&ipr);
     53    MHCamEvent evt0(0, "IPR", "Individual Pixel Rate;;IPR [Hz]");
     54    //    evt0b.SetThreshold(0);
    5655
    57     // Create the histo to display the IPRs
    58     MHCamEvent IPRhist("IPRhist","IPRs");
    59     plist.AddToList(&IPRhist);
    60        
    61     // create a task to fill a histogram from the container
    62     MFillH fillIPR(&IPRhist, "MTriggerIPR");
    63     tlist.AddToList(&fillIPR);
     56    MFillH fill0(&evt0, "MTriggerIPR", "FillIPR");
     57
     58    tlist.AddToList(&fill0);
     59
     60    MStatusDisplay *d = new MStatusDisplay;
    6461
    6562    //
     
    6865    MEvtLoop evtloop;
    6966    evtloop.SetParList(&plist);
     67    evtloop.SetDisplay(d);
    7068
    71     //
    72     // Execute the analysis
    73     //
    74     if (!evtloop.PreProcess())
    75       return;
    76    
    7769    if (!evtloop.Eventloop())
    7870      return;
    7971
    8072    tlist.PrintStatistics();
    81 
    82     //-----------------------------------
    83     // Now display the result of the loop
    84     //
    85 
    86     // create a MHCamera histo where the sum off all events is filled
    87     MHCamera &h = *(MHCamera*)IPRhist.GetHistByName("sum");
    88 
    89     TCanvas *c = MH::MakeDefCanvas();
    90     c->Divide(2, 2);
    91 
    92     MHCamera *disp1=h.Clone();
    93     MHCamera *disp2=h.Clone();
    94     //MHCamera *disp3=h.Clone();
    95     disp2->SetCamContent(h, 1);
    96     //disp3->SetCamContent(h, 2);
    97 
    98     disp1->SetYTitle("Rate [Hz]");
    99     disp2->SetYTitle("\\sigma_{Rate} [Hz]");
    100     //disp3->SetYTitle("\\sigma_{Rate} [%]");
    101     disp1->SetName("IPRs;avg");
    102     disp2->SetName("IPRs;err");
    103     //disp3->SetName("IPRs;rel");
    104     disp1->SetTitle("IPRs Average");
    105     disp2->SetTitle("IPRs error");
    106     //disp3->SetTitle("IPRs relative error");
    107 
    108     c->cd(1);
    109     TText text(0.1, 0.95, &fname[fname.Last('/')+1]);
    110     text.SetTextSize(0.03);
    111     text.DrawClone();
    112     gPad->SetBorderMode(0);
    113     gPad->Divide(1,1);
    114     gPad->cd(1);
    115     gPad->SetLogy();
    116     disp1->Draw();
    117     disp1->SetBit(kCanDelete);
    118     c->cd(2);
    119     gPad->SetBorderMode(0);
    120     gPad->Divide(1,1);
    121     gPad->cd(1);
    122     gPad->SetLogy();
    123     disp2->Draw();
    124     disp2->SetBit(kCanDelete);
    125     //c->cd(3);
    126     //gPad->SetBorderMode(0);
    127     //gPad->Divide(1,1);
    128     //gPad->cd(1);
    129     //gPad->SetLogy();
    130     //disp3->Draw();
    131     //disp3->SetBit(kCanDelete);
    132     c->cd(3);
    133     gPad->SetBorderMode(0);
    134     disp1->Draw("EPhist");
    135     c->cd(4);
    136     gPad->SetBorderMode(0);
    137     gPad->SetLogy();
    138     disp2->Draw("Phist");
    139     //c->cd(6);
    140     //gPad->SetBorderMode(0);
    141     //gPad->SetLogy();
    142     //disp3->Draw("Phist");
    143 
    144     c->SaveAs(fname(0, fname.Last('.')+1) + "ps");
    145     //c->SaveAs(fname(0, fname.Last('.')+1) + "root");
    14673}
    14774
  • trunk/MagicSoft/Mars/mars.rc

    r7770 r8384  
    2626#ExtractSignal.WeightsFile: msignal/MC_weights46.dat
    2727# -------------------------------------------------------------------------
    28 # Define here an extractor which can be used for the December 04 data.
    29 # -------------------------------------------------------------------------
    30 #ExtractSignal: MExtractTimeAndChargeSpline, MExtractTimeAndChargeDigitalFilterPeakSearch, MExtractTimeAndChargeSlidingWindow
    31 # -------------------------------------------------------------------------
    3228# Define here parameters valid for all extractors above
    3329# -------------------------------------------------------------------------
    34 #ExtractSignal.HiGainFirst:         0
    35 #ExtractSignal.HiGainLast:         15
    36 #ExtractSignal.LoGainFirst:         3
    37 #ExtractSignal.LoGainLast:         14
    38 #ExtractSignal.SaturationLimit:   250
    39 #ExtractSignal.OffsetLoGain:     1.51
    40 #ExtractSignal.OffsetLoGain:        0
    41 #ExtractSignal.LoGainSwitch:      150
    42 #ExtractSignal.LoGainStartShift: -2.8
    43 #ExtractSignal.LoGainStartShift: -2.8
     30#ExtractSignal.LoGainSwitch:      120
     31#ExtractSignal.LoGainStartShift: -2.5
    4432# -------------------------------------------------------------------------
    4533# Define here parameters valid for the spline:
    4634# -------------------------------------------------------------------------
    47 #ExtractSignal.Resolution:        0.05
    48 #ExtractSignal.RiseTimeHiGain:    0.5
    49 #ExtractSignal.FallTimeHiGain:    1.5
     35#ExtractSignal.HiGainFirst:         0
     36#ExtractSignal.HiGainLast:         14
     37#ExtractSignal.LoGainFirst:         1
     38#ExtractSignal.LoGainLast:         14
     39#ExtractSignal.Resolution:       0.05
     40#ExtractSignal.RiseTimeHiGain:   0.64
     41#ExtractSignal.FallTimeHiGain:   0.76
    5042#ExtractSignal.LoGainStretch:     1.5
     43#ExtractSignal.OffsetLoGain:      1.3
    5144#ExtractSignal.ExtractionType: Integral <default>
    5245#ExtractSignal.ExtractionType: Amplitude
    5346# -------------------------------------------------------------------------
    54 # Define here parameters valid for the sliding window:
     47# Define here parameters valid for the Digital Filter:
    5548# -------------------------------------------------------------------------
    56 #ExtractSignal.HiGainWindowSize:     6
    57 #ExtractSignal.LoGainWindowSize:     6
    58 # -------------------------------------------------------------------------
    59 # Define here parameters valid for the digital filter with peak search:
    60 # -------------------------------------------------------------------------
    61 #ExtractSignal.OffsetLeftFromPeak:   3
    62 #ExtractSignal.OffsetRightFromPeak:  3
    63 #ExtractSignal.PeakSearchWindowSize: 2
    64 #ExtractSignal.HiGainFailureLimit:  10
    65 #ExtractSignal.LoGainFailureLimit:  25
     49#ExtractSignal.HiGainFirst:         0
     50#ExtractSignal.HiGainLast:         16
     51#ExtractSignal.LoGainFirst:         1
     52#ExtractSignal.LoGainLast:         14
     53#ExtractSignal.OffsetLoGain:     0.95
     54
     55# =========================================================================
     56# To look into MUX data use the following setup
     57# =========================================================================
     58#ExtractSignal: MExtractTimeAndChargeSpline
     59#ExtractSignal.RiseTimeHiGain:   4.3
     60#ExtractSignal.FallTimeHiGain:   5.1
     61#ExtractSignal.HiGainFirst:      15
     62#ExtractSignal.HiGainLast:       65
    6663
    6764# -------------------------------------------------------------------------
     
    8885#  e.g. Standard, Absolute, Scaled, Time
    8986# -------------------------------------------------------------------------
    90 MImgCleanStd.CleanMethod: Scaled
    91 MImgCleanStd.CleanLevel1: 4.5
    92 MImgCleanStd.CleanLevel2: 3.0
    93 
    94 #MImgCleanStd.CleanMethod: Absolute
    95 #MImgCleanStd.CleanLevel1: 8.5
    96 #MImgCleanStd.CleanLevel2: 4.0
     87MImgCleanStd.CleanMethod: Absolute
     88MImgCleanStd.CleanLevel1: 8.5
     89MImgCleanStd.CleanLevel2: 4.0
    9790
    9891# -------------------------------------------------------------------------
     
    10598#Cut.1: (MMuonSearchPar.fRadius>180) && (MMuonSearchPar.fRadius<400) && (MMuonSearchPar.fDeviation<45)
    10699#Cut.2: (MMuonCalibPar.fArcPhi>190)  && (MMuonSearchPar.fDeviation<35) && (MMuonCalibPar.fArcWidth<0.20) && (MMuonCalibPar.fArcWidth>0.04)
    107 
  • trunk/MagicSoft/Mars/mbase/MEnv.h

    r8240 r8384  
    3131
    3232    TObject    *Clone(const char *newname="") const;
     33
     34    Bool_t      Touch(const char *name) { return !TString(GetValue(name, "")).IsNull(); }
    3335
    3436    Int_t       GetValue(const char *name, Int_t dflt);
Note: See TracChangeset for help on using the changeset viewer.