Changeset 9595 for trunk


Ignore:
Timestamp:
06/24/10 15:05:04 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9594 r9595  
    3333     - changed interpretation from file from radius to diameter
    3434
     35   * ceres.cc:
     36     - added option --run-number
     37
     38   * showplot.cc:
     39     - set default palette to pretty palette
     40
     41   * mcorsika/MCorsikaRunHeader.h:
     42     - added getter for ViewConeInnerAngle
     43
     44   * mmc/MMcCorsikaRunHeader.h:
     45     - added HasViewCone
     46     - added SetViewCone
     47
     48   * mmc/MMcEvt.cxx, mmc/MMcEvtBasic.h:
     49     - moved fPhi and fTheta from MMcEvt to MMcEvtBasic
     50     - increased class version number accordingly
     51     - moved setter
     52     - moved getter
     53     - adapted Clean()
     54     - adapter copy-constructor
     55
     56   * mpointing/MPointingDevCalc.cc:
     57     - added some comments
     58
     59   * msim/MSimMMCS.cc:
     60     - transfer view cone data
     61     - set run-info (run/file-number) according to new scheme
     62     - always set MMcEvt::fPhi/fTheta to particle direction
     63
    3564
    3665
  • trunk/MagicSoft/Mars/NEWS

    r9579 r9595  
    1515     objects and TCanvas' but no MStatusArray object has been improved.
    1616
     17   * MMcEvt.fPhi and MMcEvt.fTheta have been moved to its base class
     18     MMcEvtBasic. Consequently, the direction of the primary shower
     19     is not lost in the OriginalMC tree anymore
     20
    1721 ;ceres:
    1822
     
    2933   * The number of photons in the calibration signal is now distributed
    3034     by a possonian instead of a Gauss.
     35
     36   * implemented new file-naming scheme (corsika run-number is new
     37     tranfered to the ceres output as file-number). Therefore a new option
     38     has been implemented to set an artificial run-number:
     39        ---run-number=12345
    3140
    3241
  • trunk/MagicSoft/Mars/ceres.cc

    r9482 r9595  
    7171    gLog << "   --mode=pedestal           Execution mode. Produce either pedestals," << endl;
    7272    gLog << "   --mode=calibration        calibration data (no input files required) or" << endl;
    73     gLog << "   --mode=data               process data files [default]" << endl;
     73    gLog << "   --mode=data               process data files [default]" << endl << endl;
     74    gLog << "   --run-number=#            Optionally set the run number of the run to simulate" << endl << endl;
    7475    gLog << endl;
    7576//    gLog << "     -f:  force reading of runheader" << endl;
     
    166167    const TString kOutpath    = arg.GetStringAndRemove("--out=", ".");
    167168
     169    const Int_t   kRunNumber  = arg.GetIntAndRemove("--run-number=", -1);
     170
    168171    const TString kOpMode     = arg.GetStringAndRemove("--mode=", "data");
    169172
     
    342345        job.SetMode(opmode);
    343346        job.SetCommandLine(MArgs::GetCommandLine(argc, argv));
     347        job.SetRunNumber(kRunNumber);
     348
    344349        // job.SetPathIn(kInpath); // not yet needed
    345350
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h

    r9378 r9595  
    9898    Float_t GetMagneticFieldAz() const { return fMagneticFieldAz; }
    9999
     100    Float_t GetViewConeInnerAngle() const { return fViewConeInnerAngle; }
    100101    Float_t GetViewConeOuterAngle() const { return fViewConeOuterAngle; }
    101102    Bool_t HasViewCone() const { return fViewConeOuterAngle>0; }
  • trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc

    r9573 r9595  
    282282// New LUTs for M2
    283283//
     284// [2010-06-14 M. Garcz.]
     285//
     286// New LUTs for M1
     287//
    284288//
    285289// Others
  • trunk/MagicSoft/Mars/msim/MSimMMCS.cc

    r9362 r9595  
    122122    mch->SetSpectrum(fRunHeader->GetSlopeSpectrum(),
    123123                     fRunHeader->GetEnergyMin(), fRunHeader->GetEnergyMax());
     124    mch->SetViewCone(fRunHeader->GetViewConeInnerAngle(),
     125                     fRunHeader->GetViewConeOuterAngle());
    124126    mch->SetReadyToSave();
    125127
     
    147149
    148150    // FIXME: Is there a way to write them as LAST entry in the file?
    149     rh->SetRunInfo(1, fRunHeader->GetRunNumber(), 0);
     151    rh->SetFileNumber(fRunHeader->GetRunNumber()%1000);
    150152    rh->SetSourceInfo(MMcEvtBasic::GetParticleName(id));
    151153    rh->SetReadyToSave();
     
    160162// --------------------------------------------------------------------------
    161163//
     164// We have two scenarios for the ponting:
     165//
     166//  1) Diffuse flux (view cone option)
     167//
     168//     Azimuth and Zenith angle are fixed values (min==max).
     169//     The diffuse flux is produced in a cone around this angle.
     170//
     171//     That means that the telescope orientation is aligned and fixed
     172//     along the cone axis.
     173//
     174//     To analyse a diffuse flux the source position should be fixed to
     175//     the camera center.
     176//     In some cases (e.g. training of RF) the source depending parameters
     177//     might be needed w.r.t. the real origin of the primary particle.
     178//     In this case the primary shower direction is needed.
     179//
     180//  2) Directed flux
     181//
     182//     Particles are produced between a min and max Azimuth and Zenith angle.
     183//     The telescope axis is either parallel (on source) or off axis
     184//     (wobble) to the primary particle direction.
     185//     This is used to "fake" the trajectory of the source.
     186//
     187//  3) Flux along a trajectory
     188//
     189//     [...]
     190//
    162191Int_t MSimMMCS::Process()
    163192{
     
    165194    fMcEvtBasic->SetImpact(fEvtHeader->GetImpact());
    166195
     196    // Pointing direction of the telescope (telescope axis)
    167197    fMcEvtBasic->SetTelescopeTheta(fPointingTel->GetZdRad());
    168198    fMcEvtBasic->SetTelescopePhi(fPointingTel->GetAzRad());
    169199
    170     fMcEvtBasic->SetReadyToSave();
    171 
    172     static_cast<MMcEvtBasic&>(*fMcEvt) = *fMcEvtBasic;
    173 
     200    // Direction of primary particle
    174201    // Convert from corsika frame to telescope frame, taking
    175202    // the magnetic field into account: tel = corsika+offset
    176     if (fRunHeader->HasViewCone())
    177     {
    178         fMcEvt->SetTheta(fPointingTel->GetZdRad());
    179         fMcEvt->SetPhi(fPointingTel->GetAzRad());
    180     }
    181     else
    182     {
    183         fMcEvt->SetTheta(fEvtHeader->GetZd());
    184         fMcEvt->SetPhi(fEvtHeader->GetAz()+fRunHeader->GetMagneticFieldAz());
    185     }
     203    fMcEvtBasic->SetParticleTheta(fEvtHeader->GetZd());
     204    fMcEvtBasic->SetParticlePhi(fEvtHeader->GetAz()+fRunHeader->GetMagneticFieldAz());
     205
     206    fMcEvtBasic->SetReadyToSave();
     207
     208
     209    static_cast<MMcEvtBasic&>(*fMcEvt) = *fMcEvtBasic;
     210
    186211
    187212    fMcEvt->SetEvtNumber(fEvtHeader->GetEvtNumber());
  • trunk/MagicSoft/Mars/showplot.cc

    r9580 r9595  
    11#include <TROOT.h>
    22#include <TClass.h>
     3#include <TStyle.h>
    34#include <TGClient.h>
    45#include <TRint.h>
     
    245246        return 1;
    246247    }
     248
     249    gStyle->SetPalette(1, 0);
    247250
    248251    //
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.h

    r9312 r9595  
    101101    Float_t GetViewconeAngleOuter() const { return fViewconeAngles[1]; }
    102102    Float_t GetAtmosphericModel() const { return fAtmosphericModel; }
     103    Bool_t HasViewCone() const { return fViewconeAngles[1]>0; }
    103104
    104105    Int_t GetNumCT() const { return fNumCT; }
     
    113114        fSlopeSpec=slope; fELowLim=emin; fEUppLim=emax;
    114115    }
     116    void SetViewCone(Float_t inner, Float_t outer)
     117    {
     118        fViewconeAngles[0] = inner;
     119        fViewconeAngles[1] = outer;
     120    }
     121
    115122
    116123    MGeomCorsikaCT &operator[](Int_t i) const;
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.hxx

    r9312 r9595  
    1414    Float_t fFirstTarget;        // []
    1515    Float_t fZFirstInteraction;  // [cm]
    16 
    17     Float_t fTheta;              // [rad] Theta angle of event
    18     Float_t fPhi;                // [rad] Phi angle of event (see class description)
    1916
    2017    Float_t fCoreD;              // [cm] Core d pos
     
    7269    // Getter
    7370    UInt_t  GetEvtNumber() const { return fEvtNumber; }  //Get Event Number
    74     Float_t GetTheta() const { return fTheta; }          //Get Theta angle
    75     Float_t GetPhi() const { return fPhi ;  }            //Get Phi angle
    7671
    7772    Float_t GetCoreX() const { return fCoreX; }          //Get Core x pos
     
    10398
    10499    // Setter
    105     void SetTheta(Float_t Theta) { fTheta=Theta; }                //Set Theta angle
    106     void SetPhi(Float_t Phi)     { fPhi=Phi;  }                   //Set Phi angle
    107100    void SetCoreD(Float_t CoreD) { fCoreD=CoreD; }                //Set Core d pos
    108101    void SetCoreX(Float_t CoreX) { fCoreX=CoreX; }                //Set Core x pos
     
    123116    void Clear(Option_t *opt=NULL);
    124117
    125     ClassDef(MMcEvt, 6)  //Stores Montecarlo Information of one event (eg. the energy)
     118    ClassDef(MMcEvt, 7)  //Stores Montecarlo Information of one event (eg. the energy)
    126119};
    127120
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcEvtBasic.h

    r9313 r9595  
    3636  Float_t      fTelescopePhi;    // [rad]
    3737  Float_t      fTelescopeTheta;  // [rad]
    38  
     38
     39  Float_t      fTheta;           // [rad] Theta angle of event
     40  Float_t      fPhi;             // [rad] Phi angle of event (see class description)
     41
    3942public:
    4043  MMcEvtBasic();
     
    5053  Float_t GetTelescopePhi() const { return fTelescopePhi; }
    5154  Float_t GetTelescopeTheta() const { return fTelescopeTheta; }
     55
     56  Float_t GetParticlePhi() const { return fPhi; }
     57  Float_t GetParticleTheta() const { return fTheta; }
     58
     59  //Float_t GetTheta() const { return fTheta; }
     60  //Float_t GetPhi() const { return fPhi ;  }
    5261
    5362  static TString GetParticleName(Int_t id);
     
    7887  void SetTelescopePhi  (Float_t Phi)   { fTelescopePhi=Phi; }
    7988
     89  void SetParticleTheta(Float_t Theta)  { fTheta=Theta; }
     90  void SetParticlePhi  (Float_t Phi)    { fPhi=Phi; }
     91
     92  //void SetTheta(Float_t Theta) { fTheta=Theta; }                //Set Theta angle
     93  //void SetPhi(Float_t Phi)     { fPhi=Phi;  }                   //Set Phi angle
     94
    8095  void Fill(ParticleId_t, Float_t, Float_t, Float_t, Float_t);
    8196
     
    8499  void Print(Option_t *opt=NULL) const;
    85100
    86   ClassDef(MMcEvtBasic, 2) //Stores Basic Montecarlo Information of one event
     101  ClassDef(MMcEvtBasic, 3) //Stores Basic Montecarlo Information of one event
    87102
    88103};
Note: See TracChangeset for help on using the changeset viewer.