Changeset 9378


Ignore:
Timestamp:
03/03/09 11:19:46 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
18 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9377 r9378  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2009/03/03 Thomas Bretz
     21
     22   * ceres.rc:
     23     - added some more infomation
     24     - updated paths
     25
     26   * mcorsika/MCorsikaRunHeader.[h,cc]:
     27     - added atmospheric layers
     28     - added interpretation of new XSCATT/YSCATT in newer corsikas
     29
     30   * msim/MSimAtmosphere.[h,cc]:
     31     - changed path
     32     - MAtmosphere doesn't search for any files per default anymore
     33     - changed atmopsheric layers to the ones fitted by Corsika
     34     - added possibility to change input files to ReadEnv
     35
     36   * msimcamera/MSimCalibrationSignal.cc:
     37     - don't create a camera geometry yourself
     38     
     39   * resmc/atmosphere-aerosols.txt, resmc/atmosphere-ozone.txt,
     40     resmc/ct1-pde.txt, resmc/dwarf-apdmap.txt, resmc/dwarf-cones.txt,
     41     resmc/dwarf-pde-gapd.txt, resmc/dwarf-reflectivity.txt,
     42     resmc/dwarf-reflector.txt, resmc/magic-cones-inner.txt,
     43     resmc/magic-pde.txt, resmc/magic-reflectivity.txt,
     44     resmc/magic-reflector-chessboard.txt, resmc/magic-reflector.txt,
     45     resmc/magic-trigger-1NN.txt, resmc/magic-trigger-2NN.txt,
     46     resmc/magic-trigger-3NN.txt, resmc/magic-trigger-4NN.txt:
     47     - added
     48
     49
     50
    2051 2009/03/02 Daniela Dorner
    2152
  • trunk/MagicSoft/Mars/ceres.rc

    r9368 r9378  
    5252# BinningDist.Raw:        100      0       2.5
    5353# BinningDistC.Raw:       100      0       2.5
     54# BinningThreshold.Raw:    35    0.9     90000  log
     55# BinningEnergyEst.Raw:   100    0.9     90000  log
    5456
    5557
     
    7375
    7476# -------------------------------------------------------------------------
    75 # Here you can control the poiting of the telescope.
    76 # To switch on off-target observations set a value for the distance >0.
    77 # Whether they are randomly disributed (<0) or at a fixed phi can also
    78 # be decided. Note, that this is options are ignored in the case
    79 # a view-cone was used. (All valued given in degree)
    80 # -------------------------------------------------------------------------
    81 
     77# Some setup for the atmosphere. The default should be well suited.
     78# -------------------------------------------------------------------------
     79#MSimAtmosphere.FileAerosols: resmc/atmopshere-aerosols.txt
     80#MSimAtmosphere.FileOzone:    resmc/atmopshere-ozone.txt
     81
     82
     83# -------------------------------------------------------------------------
     84# Here you can control the poiting of the telescope. To switch on
     85# off-target observations set a value for the distance !=0 [deg].
     86# For details see MSimPointingPos
     87# -------------------------------------------------------------------------
    8288#MSimPointingPos.OffTargetDistance: 0.4
    8389#MSimPointingPos.OffTargetPhi: -1
     
    9197# For the file definition see MReflector::ReadFile
    9298
    93 #Reflector.FileName: mreflector/reflector-magic.def
    94 #Reflector.FileName: mreflector/magic-chessboard.def
     99#Reflector.FileName: resmc/magic-reflector.txt
     100#Reflector.FileName: resmc/magic-reflector-chessboard.txt
    95101# Units mm: ~0.020°
    96102#Reflector.SetSigmaPSF: 6.0
     
    98104#Reflector.SetSigmaPSF: 7.5
    99105
    100 Reflector.FileName: mreflector/reflector-dwarf.def
     106Reflector.FileName: resmc/dwarf-reflector.txt
    101107# Units mm: ~0.02°
    102108#Reflector.SetSigmaPSF: 1.8
     
    115121MGeomCam.Constructor:   MGeomCamDwarf(209.5, 15,  4.8887);
    116122
    117 MSimBundlePhotons.FileName: mreflector/dwarf-apdmap.txt
     123MSimBundlePhotons.FileName: resmc/dwarf-apdmap.txt
    118124
    119125# Set the APD type (1: 30x30 <default>, 2: 60x60)
     
    127133# Setup the absorption, conversion efficiency and angular acceptance
    128134# -------------------------------------------------------------------------
    129 MirrorReflectivity.FileName:           mreflector/pde-mirror.txt
    130 PhotonDetectionEfficiency.FileName:    mreflector/pde-apd.txt
    131 ConesAngularAcceptance.FileName:       mreflector/dwarf-cones.txt
     135MirrorReflectivity.FileName:           resmc/dwarf-reflectivity.txt
     136PhotonDetectionEfficiency.FileName:    resmc/dwarf-pde-gapd.txt
     137ConesAngularAcceptance.FileName:       resmc/dwarf-cones.txt
    132138
    133139
     
    145151# evaluated for all pixels not just for the pixels which are
    146152# later "connected" in the trigger (used in the coincidence map)
    147 # MSimTrigger.FileNameRouteAC:         inner.txt
     153# MSimTrigger.FileNameRouteAC:         resmc/magic-trigger-1NN.txt
    148154
    149155# HEGRA like single pixel above threshold trigger
     
    154160
    155161# Magic like 2NN trigger (inner 396 pixel)
    156 #MSimTrigger.FileNameCoincidenceMap:  2NN-lut-uniq.txt
     162#MSimTrigger.FileNameCoincidenceMap:  resmc/magic-trigger-2NN.txt
    157163#MSimTrigger.DiscriminatorThreshold:  7.00
    158164#MSimTrigger.DigitalSignalLength:     8
     
    160166
    161167# Magic like 3NN trigger (inner 396 pixel)
    162 MSimTrigger.FileNameCoincidenceMap:  3NN-lut-uniq.txt
    163 MSimTrigger.DiscriminatorThreshold:  6.0
    164 MSimTrigger.DigitalSignalLength:     8
    165 MSimTrigger.CoincidenceTime:         0.5
     168#MSimTrigger.FileNameCoincidenceMap:  resmc/magic-trigger-3NN.txt
     169#MSimTrigger.DiscriminatorThreshold:  6.0
     170#MSimTrigger.DigitalSignalLength:     8
     171#MSimTrigger.CoincidenceTime:         0.5
    166172
    167173# Magic like 4NN trigger (inner 396 pixel)
    168 #MSimTrigger.FileNameCoincidenceMap:  4NN-lut-uniq.txt
     174#MSimTrigger.FileNameCoincidenceMap:  resmc/magic-trigger-4NN.txt
    169175#MSimTrigger.DiscriminatorThreshold:  5.0
    170176#MSimTrigger.DigitalSignalLength:     8
    171177#MSimTrigger.CoincidenceTime:         0.5
     178
     179MSimTrigger.FileNameRouteAC:         resmc/magic-trigger-3NN.txt
     180MSimTrigger.DiscriminatorThreshold:  11000
     181MSimTrigger.DigitalSignalLength:     8
     182MSimTrigger.CoincidenceTime:         0.5
    172183
    173184IntendedPulsePos.Val: 40
     
    203214#MPulseShape.Function.Xmin:   -5
    204215#MPulseShape.Function.Xmax:   45
     216
     217# -------------------------------------------------------------------------
     218# Setup an image cleaning on the pure gamma signal (without noise)
     219# -------------------------------------------------------------------------
     220
     221#MImgCleanStd.CleanLevel1:   6.0
     222#MImgCleanStd.CleanLevel2:   6.0
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc

    r9362 r9378  
    3737//  + Float_t fMagneticFieldZ
    3838//  + Float_t fMagneticFieldAz
     39//  + Float_t fAtmosphericLayers[5]
    3940//  + Float_t fAtmosphericCoeffA[5]
    4041//  + Float_t fAtmosphericCoeffB[5]
     
    111112    fEnergyMax      = f[16];
    112113
    113     // 0/10 not supported?
     114    // Implemented in CORSIKA Version >= 6.822
     115    fImpactMax = -1;
     116
     117    // CORSIKA scattering in a disc on the ground
     118    if (f[246]>0 && f[247]==0)
     119    {
     120        *fLog << warn << "WARNING - Events scattered in a disc on the ground." << endl;
     121        fImpactMax = f[246];
     122    }
     123
     124    // MMCS scattering in a disc perpendicular to the shower axis
     125    if (f[246]==0 && f[247]>0)
     126        fImpactMax = f[247];
     127
     128    // CORSIKA scattering in a rectangle on the ground
     129    if (f[246]>0 && f[247]>0)
     130        *fLog << warn << "WARNING - Events scattered in a rectangle on the ground." << endl;
     131
     132    // Implemented in CORSIKA Version >= 6.822
     133    memcpy(fAtmosphericLayers, f+248, 5*4);
    114134
    115135    memcpy(fAtmosphericCoeffA, f+253, 5*4);
     
    136156    // f[93]  flag for additinal muon information of particle output file
    137157    // f[145] Muon multiple scattering flag
    138     // f[156] altitude of horizontal shower axis
    139158
    140159    char evth[4];
     
    176195    // FIXME: Correct for direction of magnetic field!
    177196
    178     // Number of cherenkov detectors in x
    179     // Number of cherenkov detectors in y
    180     // Grid spacing x
    181     // Grid spacing y
    182 
    183     // g[93] angle between array x-direction and magnetic north
     197    if (TMath::Nint(g[83])!=1)
     198        *fLog << warn << "WARNING - Cherenkov bunch size not 1, but " << g[83] << endl;
     199
     200    // g[84] Number of cherenkov detectors in x
     201    // g[85] Number of cherenkov detectors in y
     202    // g[86] Grid spacing x
     203    // g[87] Grid spacing y
     204    // g[88] Length of detectors in x
     205    // g[89] Length of detectors in y
    184206
    185207    fImpactMax = -1;
     
    267289
    268290    *fLog << "MagneticField:  X/Z=(" << fMagneticFieldX << "/";
    269     *fLog << fMagneticFieldZ << ")" << UTF8::kMu << "T  Az=" << fMagneticFieldAz*TMath::RadToDeg() << "deg  (magnetic North w.r.t. North)" << endl;
     291    *fLog << fMagneticFieldZ << ")" << UTF8::kMu << "T  Az=" << fMagneticFieldAz*TMath::RadToDeg() << UTF8::kDeg << "  (magnetic North w.r.t. North)" << endl;
    270292
    271293    *fLog << "Spectrum:       Slope=" << fSlopeSpectrum << "  (" << fEnergyMin << "GeV-" << fEnergyMax << "GeV)" <<  endl;
    272294    *fLog << "Wavelength:     " << fWavelengthMin << "nm - " << fWavelengthMax << "nm" << endl;
    273295
     296    if (fImpactMax>0)
     297        *fLog << "ImpactMax:      " << fImpactMax << "cm" << endl;
    274298    if (fViewConeOuterAngle>0)
    275299        *fLog << "ViewCone:       " << fViewConeInnerAngle << UTF8::kDeg << " - " << fViewConeOuterAngle << UTF8::kDeg << endl;
     
    303327        *fLog << " ATMEXT" << GetNumAtmosphericModel();
    304328    if (Has(kRefraction))
    305         *fLog << " AtmRefraction";
     329        *fLog << " +Refraction";
    306330    if (Has(kVolumedet))
    307331        *fLog << " VOLUMEDET";
     
    312336    *fLog << endl;
    313337
     338    if (HasLayers())
     339    {
     340        *fLog << "Atm.Layers:    ";
     341        for (int i=0; i<5; i++)
     342            *fLog << " " << fAtmosphericLayers[i];
     343    }
    314344    *fLog << "Atm.Coeff A:   ";
    315345    for (int i=0; i<5; i++)
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h

    r9348 r9378  
    6060    Float_t fViewConeOuterAngle;      // [deg]
    6161
    62     Float_t fAtmosphericCoeffA[5];    // [g/cm²] AATM (see Corsika Manual for details)
    63     Float_t fAtmosphericCoeffB[5];    // [g/cm²] BATM (see Corsika Manual for details)
    64     Float_t fAtmosphericCoeffC[5];    // [cm]    CATM (see Corsika Manual for details)
     62    Float_t fAtmosphericLayers[5];    // [cm]    ATMLAY (see Corsika Manual for details)
     63    Float_t fAtmosphericCoeffA[5];    // [g/cm²] AATM   (see Corsika Manual for details)
     64    Float_t fAtmosphericCoeffB[5];    // [g/cm²] BATM   (see Corsika Manual for details)
     65    Float_t fAtmosphericCoeffC[5];    // [cm]    CATM   (see Corsika Manual for details)
    6566
    6667    UInt_t fCerenkovFlag;
     
    107108
    108109    // Preliminary!
     110    Bool_t HasLayers() const { return fAtmosphericLayers[4]>0; }
     111
     112    const Float_t *GetAtmosphericLayers() const { return fAtmosphericLayers; }
    109113    const Float_t *GetAtmosphericCoeffA() const { return fAtmosphericCoeffA; }
    110114    const Float_t *GetAtmosphericCoeffB() const { return fAtmosphericCoeffB; }
  • trunk/MagicSoft/Mars/msim/MSimAtmosphere.cc

    r9351 r9378  
    165165        // the observer
    166166
     167        // FIXME: Could be replaced by 0, AtmLay[0]-fAtmLay[3]
     168
    167169        const Double_t h[5] =
    168170        {
    169             fObsLevel,                       //   0km
    170             TMath::Max(fObsLevel, 4e5),      //   4km
    171             1.0e6,                           //  10km
    172             4.0e6,                           //  40km
    173             1.0e7                            // 100km
     171            fObsLevel,                     // fObsLevel,                   //   0km
     172            TMath::Max(fObsLevel, 7.75e5), // TMath::Max(fObsLevel, 4e5),  //   4km
     173             16.5e5,                       //  10e5,                       //  10km
     174             50.0e5,                       //  40e5,                       //  40km
     175            105.0e5,                       // 100e5                        // 100km
    174176        };
    175177
     
    418420    MAtmosphere(const MCorsikaRunHeader &h) : fAbsCoeffOzone(0), fAbsCoeffAerosols(0)
    419421    {
    420         Init(h, "ozone.txt", "aerosols.txt");
    421     }
    422 
    423     MAtmosphere(const char *name1="ozone.txt", const char *name2="aerosols.txt") : fAbsCoeffOzone(0), fAbsCoeffAerosols(0)
    424     {
    425         InitOzone(name1);
    426         InitAerosols(name2);
     422        Init(h);//, "ozone.txt", "aerosols.txt");
     423    }
     424
     425    MAtmosphere(const char *name1=0, const char *name2=0) : fAbsCoeffOzone(0), fAbsCoeffAerosols(0)
     426    {
     427        if (name1)
     428            InitOzone(name1);
     429        if (name2)
     430            InitAerosols(name2);
    427431    }
    428432
     
    694698//
    695699MSimAtmosphere::MSimAtmosphere(const char* name, const char *title)
    696     : fEvt(0), fAtmosphere(0)
     700    : fEvt(0), fAtmosphere(0),
     701    fFileAerosols("resmc/atmosphere-aerosols.txt"),
     702    fFileOzone("resmc/atmosphere-ozone.txt")
    697703{
    698704    fName  = name  ? name  : "MSimAtmosphere";
     
    753759    */
    754760
    755     fAtmosphere->Init(*h);
     761    fAtmosphere->Init(*h, fFileOzone, fFileAerosols);
    756762
    757763    if (!fAtmosphere->IsAllValid())
     
    847853// --------------------------------------------------------------------------
    848854//
    849 // FileName: reflectivity.txt
    850 // UseTheta: No
     855// FileAerosols: resmc/atmosphere-aerosols.txt
     856// FileOzone:    resmc/atmosphere-ozone.txt
    851857//
    852858Int_t MSimAtmosphere::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
    853859{
    854860    Bool_t rc = kFALSE;
    855 /*
    856     if (IsEnvDefined(env, prefix, "FileName", print))
     861
     862    if (IsEnvDefined(env, prefix, "FileAerosols", print))
    857863    {
    858864        rc = kTRUE;
    859         SetFileName(GetEnvValue(env, prefix, "FileName", fFileName));
    860     }
    861 
    862     if (IsEnvDefined(env, prefix, "UseTheta", print))
     865        fFileAerosols = GetEnvValue(env, prefix, "FileAerosols", fFileAerosols);
     866    }
     867
     868    if (IsEnvDefined(env, prefix, "FileOzone", print))
    863869    {
    864870        rc = kTRUE;
    865         SetUseTheta(GetEnvValue(env, prefix, "UseTheta", fUseTheta));
    866     }
    867 */
     871        fFileOzone = GetEnvValue(env, prefix, "FileOzone", fFileOzone);
     872    }
     873
    868874    return rc;
    869875}
  • trunk/MagicSoft/Mars/msim/MSimAtmosphere.h

    r9351 r9378  
    1717    MAtmosphere  *fAtmosphere; //! Instance of class describing atmosphere
    1818
     19    TString fFileAerosols;     // Name of file with aersole absorption
     20    TString fFileOzone;        // Name of file with ozone absorption
     21
    1922    // MParContainer
    2023    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
     
    2932    ~MSimAtmosphere();
    3033
    31     // MSimAtmosphere
    32 
    33     // TObject
    34 
    3534    ClassDef(MSimAtmosphere, 0) // Simulate the wavelength and height-dependant atmpsheric absorption
    3635};
  • trunk/MagicSoft/Mars/msimcamera/MSimCalibrationSignal.cc

    r9317 r9378  
    9898        *fLog << inf << fNameGeomCam << " [MGeomCam] not found..." << endl;
    9999
    100         fGeom = (MGeomCam*)pList->FindCreateObj(fNameGeomCam);
     100        fGeom = (MGeomCam*)pList->FindObject("MGeomCam");
    101101        if (!fGeom)
     102        {
     103            *fLog << err << "MGeomCam not found... aborting." << endl;
    102104            return kFALSE;
     105        }
    103106    }
    104107
Note: See TracChangeset for help on using the changeset viewer.