Changeset 1800 for trunk


Ignore:
Timestamp:
02/27/03 14:56:53 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1797 r1800  
    44    * mmontecarlo/MMcTriggerRateCalc.cc:
    55      - Fixed: MMCTrigHeader could not be found in the case of camera
    6         files containing single trigger condition. To be fixed: selection of
    7         one condition within a file with several.
     6        files containing single trigger condition.
     7
    88    * macros/trigrate.C
    99      - no plot is made in the case of single trigger condition.
     10
     11    * mhist/MHMcRate.[h,cc]
     12      - Added member fTriggerCondNum to keep track of what trigger condition
     13        corresponds to each MHMcRate object, for the case of files with more
     14        than one condition (when running camera in trigger_loop mode). Added
     15        also Set and Get procedures for nre member.
     16
     17    * mmain/MMonteCarlo.cc
     18      - Fixed bug: matrix BgR was created with dimension "dim", a number which
     19        can be negative. Put "num" instead of "dim".
     20
    1021
    1122 2003/02/25: Thomas Bretz
  • trunk/MagicSoft/Mars/macros/trigrate.C

    r1797 r1800  
    131131        return;
    132132
     133    // Set for each MHMcRate object the trigger condition number in the
     134    // camera file (for the case of camera files with several conditions,
     135    // produced with the trigger_loop option.
     136    //
     137
     138    if (dim < 0)
     139      ((MHMcRate*)(hists[0]))->SetTriggerCondNum((Short_t)(-dim));
     140    else if (dim > 0)
     141      for (Short_t i = from ; i <= to; i++)
     142        ((MHMcRate*)(hists[i-1]))->SetTriggerCondNum(i);
     143
    133144    //
    134145    // Add the histograms to the paramater list.
     
    187198        gStyle->SetOptStat(0);
    188199        rate->Draw();
     200
     201        TFile f("ratehists.root", "recreate");
     202       
     203        rate->GetHist(2)->Write();
     204        rate->GetHist(3)->Write();
     205        rate->GetHist(4)->Write();
    189206      }
     207
     208
    190209}
    191 
    192 
    193 
    194 
  • trunk/MagicSoft/Mars/mhist/MHMcRate.cc

    r1789 r1800  
    6262    fTriggerRateError= -1.0; // Estimated error for the trigger rate in Hz
    6363
    64     fMultiplicity = -1;
    65     fMeanThreshold = -1.;
     64    fMultiplicity = -1;      // Multiplicity of the trigger condition
     65    fMeanThreshold = -1.;    // Discr. threshold of the trigger condition
     66    fTriggerCondNum = 0;     // Trigger condition number within camera file
    6667
    6768}
  • trunk/MagicSoft/Mars/mhist/MHMcRate.h

    r1789 r1800  
    4343    Short_t fMultiplicity;      // L1 trigger multiplicity.
    4444
     45    Short_t fTriggerCondNum;    // Trigger condition number, for the case of
     46                                // running over camra files containing several.
    4547
    4648    void Init(const char *name, const char *title);
     
    7476    void SetMeanThreshold(Float_t thresh) {fMeanThreshold = thresh;}
    7577
     78    void SetTriggerCondNum(Short_t num) {fTriggerCondNum = num;}
     79
    7680    void UpdateBoundaries(Float_t energy, Float_t theta, Float_t phi, Float_t impact);
    7781
     
    8084
    8185    Short_t GetMultiplicity() {return fMultiplicity;}
    82     Float_t  GetMeanThreshold() {return fMeanThreshold;}
     86    Float_t GetMeanThreshold() {return fMeanThreshold;}
     87    Short_t GetTriggerCondNum() {return fTriggerCondNum;}
     88
    8389
    8490    void CalcRate(Float_t trig, Float_t anal, Float_t simu);
  • trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc

    r1783 r1800  
    330330
    331331    //
    332     // Add the histograms to the paramater list.
     332    // Set for each MHMcRate object the trigger condition number in the
     333    // camera file (for the case of camera files with several conditions,
     334    // produced with the trigger_loop option.
     335    //
     336
     337    if (dim < 0)
     338      ((MHMcRate*)(hists[0]))->SetTriggerCondNum((Short_t)(-dim));
     339    else if (dim > 0)
     340      for (Short_t i = from ; i <= to; i++)
     341        ((MHMcRate*)(hists[i-1]))->SetTriggerCondNum(i);
     342
     343    //
     344    // Add the histograms to the parameter list.
    333345    //
    334346    plist.AddToList(&hists);
     
    353365
    354366    // We calculate only shower rate (not including NSB-only triggers)
    355     Float_t* BgR = new Float_t[dim];
     367    Float_t* BgR = new Float_t[num];
    356368    memset(BgR, 0, num*sizeof(Float_t));
    357369
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc

    r1797 r1800  
    143143
    144144        TString th("MMcTrigHeader");
    145         if (fNum > 1)
     145        if (GetRate(i)->GetTriggerCondNum() > 0)
    146146          {
    147147            th += ";";
    148             th += i+1;
     148            th += GetRate(i)->GetTriggerCondNum();
    149149          }
    150150
Note: See TracChangeset for help on using the changeset viewer.