Changeset 19534


Ignore:
Timestamp:
Jun 3, 2019, 9:30:20 AM (4 months ago)
Author:
tbretz
Message:
Instead of a constant number for Type==1 use BinningImpact. Also, if available, allow to overwrite this number from the environment (fMaxImpact). Updated class version accordingly
Location:
trunk/Mars/msim
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msim/MHPhotonEvent.cc

    r10167 r19534  
    6969//  + replaced TH2D by TH2F
    7070//
     71// Class Version 4:
     72// ----------------
     73//  + added fMaxImpact
     74//
    7175/////////////////////////////////////////////////////////////////////////////
    7276#include "MHPhotonEvent.h"
     
    140144//
    141145MHPhotonEvent::MHPhotonEvent(Double_t max, const char *name, const char *title)
    142     : fHistT("", "", 1, 0, 1, 1, 0, 1), fType(-1), fPermanentReset(kFALSE)
     146    : fHistT("", "", 1, 0, 1, 1, 0, 1), fType(-1), fPermanentReset(kFALSE), fMaxImpact(25000)
    143147{
    144148    // pre-initialization of the profile is necessary to get fZmin and fZmax set
     
    159163//
    160164MHPhotonEvent::MHPhotonEvent(Int_t type, const char *name, const char *title)
    161     : fHistT("", "", 1, 0, 1, 1, 0, 1), fType(type), fPermanentReset(kFALSE)
     165    : fHistT("", "", 1, 0, 1, 1, 0, 1), fType(type), fPermanentReset(kFALSE), fMaxImpact(25000)
    162166{
    163167    // pre-initialization of the profile is necessary to get fZmin and fZmax set
     
    195199{
    196200    Double_t xmax =  -1;
    197     Int_t    num  = 100;
     201    Int_t    num  = 100;  // N=100: see ReInit
    198202
    199203    const Int_t f = fPermanentReset ? 2 : 1;
     
    207211        // case0: Take a value defined by the user
    208212    case 1:
    209         xmax = 25000;
     213        xmax = fMaxImpact;
    210214        break;
    211215    case 2:
     
    296300    }
    297301
     302    if (fType==1)
     303    {
     304        // N=100: see SetupFill
     305        MBinning *bins = (MBinning*)pList->FindObject("BinningImpact", "MBinning");
     306        if (bins)
     307            SetBinningXY(100, bins->GetEdgeHi()*100);
     308    }
     309
    298310    /*
    299311    // What is the size of the light pool onm the ground?
     
    454466        fPermanentReset = GetEnvValue(env, prefix, "PermanentReset", fPermanentReset);
    455467    }
     468    if (IsEnvDefined(env, prefix, "MaxImpact", print))
     469    {
     470        rc = kTRUE;
     471        fMaxImpact = GetEnvValue(env, prefix, "MaxImpact", fMaxImpact);
     472    }
    456473
    457474    return rc;
  • trunk/Mars/msim/MHPhotonEvent.h

    r19251 r19534  
    2929    Int_t      fType;
    3030    Bool_t     fPermanentReset;
     31    Float_t    fMaxImpact;
    3132
    3233    // MHPhotonEvent
     
    6566    const TProfile2D &GetHistT() const  { return fHistT; }
    6667
    67     ClassDef(MHPhotonEvent, 3) // Histogram to display the information of MPhotonEvents
     68    ClassDef(MHPhotonEvent, 4) // Histogram to display the information of MPhotonEvents
    6869};
    6970
Note: See TracChangeset for help on using the changeset viewer.