Ignore:
Timestamp:
10/26/09 14:31:19 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msimcamera
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc

    r9462 r9518  
    173173        break;
    174174
     175    case 3:
     176        ncells    = 60;
     177        crosstalk = 0.15;
     178        deadtime  = 3;
     179        recovery  = 8.75;
     180        break;
     181
    175182    default:
    176183        *fLog << err << "ERROR - APD type " << fType << " undefined." << endl;
  • trunk/MagicSoft/Mars/msimcamera/MSimBundlePhotons.cc

    r9422 r9518  
    173173        const Int_t &idx = row[0];
    174174
    175         // Check if we were routed to a valid entry
     175        // Check if we were routed to a valid entry ("not connected")
    176176        // if not throw away this photon.
    177177        if (idx<0)
  • trunk/MagicSoft/Mars/msimcamera/MSimExcessNoise.cc

    r9252 r9518  
    5959//
    6060MSimExcessNoise::MSimExcessNoise(const char* name, const char *title)
    61 : fEvt(0)
     61: fEvt(0), fExcessNoise(0.2)
    6262{
    6363    fName  = name  ? name  : "MSimExcessNoise";
     
    7777        return kFALSE;
    7878    }
     79
     80    *fLog << inf << "Excess Noise Factor in use " << fExcessNoise << "%" << endl;
    7981
    8082    return kTRUE;
     
    9698            continue;
    9799
    98         const Float_t neww = gRandom->Gaus(oldw, 0.2*TMath::Sqrt(oldw));
     100        const Float_t neww = gRandom->Gaus(oldw, fExcessNoise*TMath::Sqrt(oldw));
    99101        ph.SetWeight(neww);
    100102    }
     
    102104    return kTRUE;
    103105}
     106
     107// --------------------------------------------------------------------------
     108//
     109// ExcessNoise: 0.2
     110//
     111Int_t MSimExcessNoise::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     112{
     113    Bool_t rc = kFALSE;
     114    if (IsEnvDefined(env, prefix, "ExcessNoise", print))
     115    {
     116        rc = kTRUE;
     117        fExcessNoise = GetEnvValue(env, prefix, "ExcessNoise", fExcessNoise);
     118    }
     119
     120    return rc;
     121}
  • trunk/MagicSoft/Mars/msimcamera/MSimExcessNoise.h

    r9239 r9518  
    1414    MPhotonEvent *fEvt;     //! Event storing the photons
    1515
     16    Double_t fExcessNoise;
     17
     18    // MParContainer
     19    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
     20
    1621    // MTask
    1722    Int_t PreProcess(MParList *pList);
  • trunk/MagicSoft/Mars/msimcamera/MSimTrigger.cc

    r9465 r9518  
    277277    }
    278278
    279     fElectronicNoise = 0;
    280     if (fShiftBaseline)
    281     {
    282         fElectronicNoise = (MPedestalCam*)pList->FindObject("ElectronicNoise", "MPedestalCam");
    283         if (!fElectronicNoise)
    284         {
    285             *fLog << err << "ElectronicNoise [MPedestalCam] not found... aborting." << endl;
    286             return kFALSE;
    287         }
    288         *fLog << inf << "Baseline will be shifted back to 0 for discriminator." << endl;
    289     }
    290 
    291     fGain = 0;
    292     if (fUngainSignal)
    293     {
    294         fGain = (MPedestalCam*)pList->FindObject("Gain", "MPedestalCam");
    295         if (!fGain)
    296         {
    297             *fLog << err << "Gain [MPedestalCam] not found... aborting." << endl;
    298             return kFALSE;
    299         }
    300         *fLog << inf << "Discriminator will be multiplied by applied gain." << endl;
    301     }
    302 
    303279    fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    304280    if (!fRunHeader)
     
    311287    if (!fEvtHeader)
    312288        return kFALSE;
     289
     290    if (!fSimulateElectronics)
     291    {
     292        *fLog << inf << "Simulation of electronics switched off... first photon will trigger." << endl;
     293        return kTRUE;
     294    }
     295
     296    fElectronicNoise = 0;
     297    if (fShiftBaseline)
     298    {
     299        fElectronicNoise = (MPedestalCam*)pList->FindObject("ElectronicNoise", "MPedestalCam");
     300        if (!fElectronicNoise)
     301        {
     302            *fLog << err << "ElectronicNoise [MPedestalCam] not found... aborting." << endl;
     303            return kFALSE;
     304        }
     305        *fLog << inf << "Baseline will be shifted back to 0 for discriminator." << endl;
     306    }
     307
     308    fGain = 0;
     309    if (fUngainSignal)
     310    {
     311        fGain = (MPedestalCam*)pList->FindObject("Gain", "MPedestalCam");
     312        if (!fGain)
     313        {
     314            *fLog << err << "Gain [MPedestalCam] not found... aborting." << endl;
     315            return kFALSE;
     316        }
     317        *fLog << inf << "Discriminator will be multiplied by applied gain." << endl;
     318    }
    313319
    314320    fRouteAC.Delete();
  • trunk/MagicSoft/Mars/msimcamera/Makefile

    r9436 r9518  
    66#
    77##################################################################
     8include ../Makefile.conf.general
    89include ../Makefile.conf.$(OSTYPE)
    9 include ../Makefile.conf.general
    1010
    1111#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.