Changeset 9336 for trunk/MagicSoft
- Timestamp:
- 02/15/09 13:24:59 (16 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9332 r9336 18 18 19 19 -*-*- END OF LINE -*-*- 20 2009/02/15 Thomas Bretz 21 22 * mjobs/MJCalibrateSignal.cc: 23 - updated the rule to allow for file names without the leading date 24 25 * mjobs/MJSpectrum.[h,cc]: 26 - set the kMustCleanup bit for sanity 27 - replaced a lot of Form by MString::Format 28 - moved the getting of the right Alpha-histogram to GetHAlpha 29 - the tlist2 doesn't neet to replace anything because all previous 30 tasklists added to the list have been removed again 31 - "DataType" already in parlist? Don't add a second one 32 - replaced some gLog by fLog 33 - make sure that the "Done." message is printed even in case 34 no output is written at the end 35 36 * ceres.rc: 37 - added some more info 38 39 * datacenter/scripts/runcorsika: 40 - added magnetic field Azimuth direction (ARRANG), currently 41 at ~ -7deg at La Palma 42 43 * mbase/MLog.cc: 44 - finallyadded a really stupid hack/workaround to suppress these 45 annoying errors in case of a log-scale set too early 46 47 * mbase/MTask.[h,cc]: 48 - Replaced OverwritesProcess by Overwrites 49 50 * mcorsika/MCorsikaEvtHeader.cc: 51 - fixed particle momentum coordinate system 52 53 * mcorsika/MCorsikaRunHeader.[h,cc]: 54 - added magnetic field values 55 - improved output 56 57 * mjobs/MJSimulation.cc: 58 - updated height scale 59 - use MPhotonStatistics.fLength 60 - plot median dev of photon arrival times 61 62 * mmc/MMcRunHeader.hxx: 63 - added a getter IsCeres 64 - added a setter for the Corsika Version 65 66 * mpedestal/MMcPedestalCopy.cc: 67 - use the new IsCeres 68 69 * msim/MSimMMCS.[h,cc]: 70 - use the telescope pointing in telescope coordinates for MMcEvt 71 - correct the shower direction by the magnetic field azimuth 72 - set corsika program version 73 74 * msim/MSimPointingPos.[h,cc]: 75 - splitted the output into coordinated in the corsika frame 76 (module the magnetic field) and the poiting direction in 77 telescope coordinates 78 - added possibility to "observe" in off-target mode 79 80 * msimreflector/MSimReflector.cc: 81 - use new pointing direction in the corsika frame 82 83 84 85 20 86 2009/02/13 Thomas Bretz 21 87 … … 66 132 - added reading of a default psf from the input file 67 133 134 * mjobs/MSequence.cc: 135 - fixed a bug in GetArrays which could cause seg-faults 136 - added a sanity check 68 137 69 138 -
trunk/MagicSoft/Mars/ceres.rc
r9332 r9336 60 60 61 61 # ------------------------------------------------------------------------- 62 # Ceres specificsetup62 # Ceres general setup 63 63 # ------------------------------------------------------------------------- 64 64 … … 68 68 # Force the use of the "hardware" trigger for calibration data 69 69 #ForceTrigger: Yes 70 71 72 # ------------------------------------------------------------------------- 73 # Here you can control the poiting of the telescope. 74 # To switch on off-target observations set a value for the distance >0. 75 # Whether they are randomly disributed (<0) or at a fixed phi can also 76 # be decided. Note, that this is options are ignored in the case 77 # a view-cone was used. (All valued given in degree) 78 # ------------------------------------------------------------------------- 79 80 #MSimPointingPos.OffTargetDistance: 0.4 81 #MSimPointingPos.OffTargetPhi: -1 70 82 71 83 … … 183 195 184 196 #MSimReadout.fConversionFactor: 1 197 -
trunk/MagicSoft/Mars/datacenter/scripts/runcorsika
r9301 r9336 65 65 # the detector, BZ is the vertical component (muT) downwards) 66 66 echo "MAGNET 30.3 24.1" 67 # Rotation angle between array x-direction and magnetic north direction 68 # positive if array x-direction points to the west 69 echo "ARRANG -7.0" 67 70 # Atmosphere 68 71 echo "ATMOSPHERE 11 T" -
trunk/MagicSoft/Mars/mbase/MLog.cc
r9302 r9336 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MLog.cc,v 1.6 2 2009-02-07 20:40:07tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MLog.cc,v 1.63 2009-02-15 13:24:59 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 814 814 gLog << ": " << msg << std::endl; 815 815 else 816 if ( !location || strlen(location) ==0)816 if (location==0 || location[0]==0) 817 817 gLog << ": " << msg << std::endl; 818 818 else … … 830 830 if (ErrorHandlerIgnore(level)) 831 831 return; 832 833 // This is a really stupid hack/workaround to suppress these 834 // annoying errors in case of a log-scale set too early 835 if (level==kError && !strcmp(location, "THistPainter::PaintInit")) 836 level=kInfo; 832 837 833 838 gLog << std::flush; -
trunk/MagicSoft/Mars/mbase/MTask.cc
r9314 r9336 452 452 void MTask::PrintStatistics(const Int_t lvl, Bool_t title, Double_t time) const 453 453 { 454 if (!Overwrites Process() && IsA()!=MTask::Class())454 if (!Overwrites("Process") && IsA()!=MTask::Class()) 455 455 return; 456 456 … … 511 511 // leave out the argument. 512 512 // 513 Bool_t MTask::Overwrites Process(TClass *cls) const513 Bool_t MTask::Overwrites(const char *name, TClass *cls) const 514 514 { 515 515 if (!cls) … … 525 525 // Check whether the class cls overwrites Process 526 526 // 527 if (cls->GetMethodAny( "Process"))527 if (cls->GetMethodAny(name)) 528 528 return kTRUE; 529 529 … … 535 535 while ((base=(TBaseClass*)NextBase())) 536 536 { 537 if (Overwrites Process(base->GetClassPointer()))537 if (Overwrites(name, base->GetClassPointer())) 538 538 return kTRUE; 539 539 } -
trunk/MagicSoft/Mars/mbase/MTask.h
r8642 r9336 79 79 80 80 const TList *GetListOfBranches() const { return fListOfBranches; } 81 Bool_t Overwrites Process(TClass *cls=NULL) const;81 Bool_t Overwrites(const char *name, TClass *cls=NULL) const; 82 82 83 83 // Filter functions -
trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc
r9308 r9336 121 121 // Pointing along particle direction 122 122 // (x=east, y=north, z=upwards) 123 fMomentumX = -f[7];124 fMomentumY = 123 fMomentumX = f[7]; 124 fMomentumY = -f[6]; 125 125 fMomentumZ = -f[8]; 126 126 … … 136 136 } 137 137 138 //fX = f[97]; 139 //fY = f[117]; 140 141 fX = f[117]; 142 fY = -f[97]; 138 fX = f[117]; //fX = f[97]; 139 fY = -f[97]; //fY = f[117]; 143 140 144 141 fin.seekg(1088-273*4, ios::cur); -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc
r9312 r9336 34 34 // + UInt_t fParticleID 35 35 // + Float_t fImpactMax 36 // + Float_t fMagneticFieldX 37 // + Float_t fMagneticFieldZ 38 // + Float_t fMagneticFieldAz 36 39 // 37 40 //////////////////////////////////////////////////////////////////////////// … … 86 89 fRunStart.SetCorsikaTime(f[1]); 87 90 88 fProgramVersion = f[2]; //FIXME: INT???91 fProgramVersion = f[2]; 89 92 fNumObsLevel = TMath::Nint(f[3]); 90 93 … … 149 152 fParticleID = TMath::Nint(g[1]); 150 153 151 fImpactMax = g[86]; 154 // MAGNETIC FIELD: x/z-component of earth magnetic field in muT 155 fMagneticFieldX = g[69]; // x-component ( BX) 156 fMagneticFieldZ = -g[70]; // z-component (-BZ) 157 fMagneticFieldAz = g[91]; // Azimuth angle of magnetic north expressed in telescope coordinates 152 158 153 159 fZdMin = g[79]; // lower edge of theta in ° … … 157 163 // FIXME: Correct for direction of magnetic field! 158 164 165 // Number of cherenkov detectors in x 166 // Number of cherenkov detectors in y 167 // Grid spacing x 168 // Grid spacing y 169 170 // g[93] angle between array x-direction and magnetic north 171 172 173 fImpactMax = g[86]; 174 159 175 fWavelengthMin = g[95]; // Cherenkov bandwidth lower end in nm 160 176 fWavelengthMax = g[96]; // Cherenkov bandwidth upper end in nm … … 222 238 { 223 239 *fLog << all << endl; 224 *fLog << "Run Number: " << fRunNumber << " (" << fRunStart.GetStringFmt("%d.%m.%Y") << ", V" << fProgramVersion << ")" << endl;225 *fLog << "Particle ID: " << MMcEvt::GetParticleName(fParticleID) << endl;240 *fLog << "Run Number: " << fRunNumber << " (" << fRunStart.GetStringFmt("%d.%m.%Y") << ", V" << fProgramVersion << ")" << endl; 241 *fLog << "Particle ID: " << MMcEvt::GetParticleName(fParticleID) << endl; 226 242 if (fNumEvents>0) 227 *fLog << "Num Events: " << fNumEvents << endl;228 *fLog << "Obs Level: ";243 *fLog << "Num Events: " << fNumEvents << endl; 244 *fLog << "Obs Level: "; 229 245 for (Byte_t i=0; i<fNumObsLevel; i++) 230 246 *fLog << " " << fObsLevel[i]/100. << "m"; 231 247 *fLog << endl; 232 *fLog << "Spectrum: Slope=" << fSlopeSpectrum << " (" << fEnergyMin << "GeV-" << fEnergyMax << "GeV)" << endl; 248 249 *fLog << "MagneticField: X/Z=(" << fMagneticFieldX << "/"; 250 *fLog << fMagneticFieldZ << ") Az=" << fMagneticFieldAz*TMath::RadToDeg() << "deg" << endl; 251 252 *fLog << "Spectrum: Slope=" << fSlopeSpectrum << " (" << fEnergyMin << "GeV-" << fEnergyMax << "GeV)" << endl; 233 253 234 254 if (fViewConeOuterAngle>0) 235 *fLog << "ViewCone: " << fViewConeInnerAngle << "deg-" << fViewConeOuterAngle << "deg" << endl;255 *fLog << "ViewCone: " << fViewConeInnerAngle << "deg-" << fViewConeOuterAngle << "deg" << endl; 236 256 237 257 if (fZdMax>=0) 238 258 { 239 *fLog << "Zd/Az: " << fZdMin << "deg";259 *fLog << "Zd/Az: " << fZdMin << "deg"; 240 260 if (fZdMin==fZdMax) 241 261 *fLog << " (fixed)"; -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h
r9332 r9336 16 16 17 17 private: 18 UInt_t fRunNumber;// Run number19 UInt_t fParticleID;// Particle ID (see MMcEvtBasic or CORSIKA manual)20 UInt_t fNumEvents;// Number of events21 MTime fRunStart;// Date of begin (yymmdd)22 Float_t fProgramVersion;// Version of program18 UInt_t fRunNumber; // Run number 19 UInt_t fParticleID; // Particle ID (see MMcEvtBasic or CORSIKA manual) 20 UInt_t fNumEvents; // Number of events 21 MTime fRunStart; // Date of begin (yymmdd) 22 Float_t fProgramVersion; // Version of program 23 23 24 Byte_t fNumObsLevel;// Number of observation levels25 Float_t fObsLevel[10];// Observation levels [cm]24 Byte_t fNumObsLevel; // Number of observation levels 25 Float_t fObsLevel[10]; // Observation levels [cm] 26 26 27 Float_t fImpactMax;// [cm] Maximum simulated impact27 Float_t fImpactMax; // [cm] Maximum simulated impact 28 28 29 Float_t fSlopeSpectrum;// Slope of energy spectrum30 Float_t fEnergyMin;// Lower limit of energy range31 Float_t fEnergyMax;// Upper limit of energy range29 Float_t fSlopeSpectrum; // Slope of energy spectrum 30 Float_t fEnergyMin; // Lower limit of energy range 31 Float_t fEnergyMax; // Upper limit of energy range 32 32 33 Float_t fZdMin; // [rad] Zenith distance 34 Float_t fZdMax; // [rad] Zenith distance 35 Float_t fAzMin; // [rad] Azimuth (north=0; east=90) 36 Float_t fAzMax; // [rad] Azimuth (north=0; east=90) (north denotes the magnet north which is defined to be in the geografic north!) 33 Float_t fZdMin; // [rad] Zenith distance 34 Float_t fZdMax; // [rad] Zenith distance 35 Float_t fAzMin; // [rad] Azimuth (north=0; east=90) 36 Float_t fAzMax; // [rad] Azimuth (north=0; east=90) (north denotes the magnet north which is defined to be in the geografic north!) 37 38 Float_t fMagneticFieldX; // [muT] x-component of earth magnetic field (ceres coordinate system) 39 Float_t fMagneticFieldZ; // [muT] z-component of earth magnetic field (ceres coordinate system) 40 Float_t fMagneticFieldAz; // [rad] Azimuth angle of magnetic north expressed in telescope coordinates 37 41 38 42 Float_t fWavelengthMin; // [nm] Wavelength bandwidth lo edge … … 50 54 UInt_t GetNumEvents() const { return fNumEvents; } 51 55 52 UInt_t GetFormatVersion() const { return (UInt_t)fProgramVersion; } 56 const MTime &GetRunStart() const { return fRunStart; } 57 58 Float_t GetProgramVersion() const { return fProgramVersion; } 53 59 54 60 Float_t GetZdMin() const { return fZdMin; } … … 67 73 Float_t GetImpactMax() const { return fImpactMax; } 68 74 75 Float_t GetMagneticFieldX() const { return fMagneticFieldX; } 76 Float_t GetMagneticFieldZ() const { return fMagneticFieldZ; } 77 Float_t GetMagneticFieldAz() const { return fMagneticFieldAz; } 78 69 79 Float_t GetViewConeOuterAngle() const { return fViewConeOuterAngle; } 70 80 Bool_t HasViewCone() const { return fViewConeOuterAngle>0; } -
trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
r9332 r9336 331 331 MBinning binss( 100, 1, 10000000, "BinningSize", "log"); 332 332 MBinning binsi( 50, -250, 250, "BinningImpact"); 333 MBinning binsh( 50, 0, 12, "BinningHeight");334 MBinning binsaz( 360, -360, 360, "BinningAz");333 MBinning binsh( 150, 0, 50, "BinningHeight"); 334 MBinning binsaz(720, -360, 360, "BinningAz"); 335 335 MBinning binszd( 70, 0, 70, "BinningZd"); 336 MBinning binsvc( 155, 0, 31, "BinningViewCone");336 MBinning binsvc( 45, 0, 9, "BinningViewCone"); 337 337 MBinning binsew(150, 0, 50, "BinningEvtWidth"); 338 338 MBinning binstr("BinningTrigPos"); … … 357 357 mhtp.SetTitle("Trigger position w.r.t. the first photon hitting a detector"); 358 358 359 MH3 mhew("MPhotonStatistics.f TimeLast-MPhotonStatistics.fTimeFirst - MRawRunHeader.GetFreqSampling/1000.*MRawRunHeader.fNumSamplesHiGain - 2*MPulseShape.GetPulseWidth");359 MH3 mhew("MPhotonStatistics.fLength"); 360 360 mhew.SetName("EvtWidth"); 361 361 mhew.SetTitle("Time between first and last photon hitting a detector"); 362 363 MH3 mhed("MPhotonStatistics.fTimeMedDev"); 364 mhed.SetName("EvtMedDev;EvtWidth"); 362 365 363 366 MFillH fillh1(&mhn1, "", "FillCorsika"); … … 366 369 MFillH filltp(&mhtp, "", "FillTriggerPos"); 367 370 MFillH fillew(&mhew, "", "FillEvtWidth"); 371 MFillH filled(&mhed, "", "FillMedDev"); 368 372 fillh1.SetNameTab("Corsika", "Distribution as simulated by Corsika"); 369 373 fillh2.SetNameTab("Detectable", "Distribution of events hit the detector"); … … 371 375 filltp.SetNameTab("TrigPos", "TriggerPosition w.r.t the first photon"); 372 376 fillew.SetNameTab("EvtWidth", "Time between first and last photon hitting a detector"); 377 filled.SetNameTab("MedDev", "Time between first and last photon hitting a detector"); 373 378 374 379 MHPhotonEvent planeG(1); // Get from MaxImpact … … 621 626 } 622 627 if (header.IsDataRun()) 628 { 623 629 tasks.AddToList(&fillew); 630 tasks.AddToList(&filled); 631 } 624 632 if (!header.IsPedestalRun()) 625 633 { -
trunk/MagicSoft/Mars/mpedestal/MMcPedestalCopy.cc
r9330 r9336 114 114 115 115 // Check if it is a ceres file 116 if (mcrun && mcrun-> GetCamVersion()==UShort_t(-1))116 if (mcrun && mcrun->IsCeres()) 117 117 { 118 118 *fLog << inf << "This is a ceres file... subtracting Baseline from ElectronicNoise [MPedestalCam]." << endl; -
trunk/MagicSoft/Mars/msim/MSimMMCS.cc
r9319 r9336 84 84 return kFALSE; 85 85 86 fPointing Pos= (MPointingPos*)plist->FindObject("MPointingPos");87 if (!fPointing Pos)86 fPointingTel = (MPointingPos*)plist->FindObject("MPointingPos"); 87 if (!fPointingTel) 88 88 { 89 89 *fLog << err << "MPointingPos not found... aborting." << endl; … … 134 134 135 135 // fNumPheFromDNSB MMcPedestalNSBAdd // Number of phe/ns from diffuse NSB 136 137 // FIXME: Is there a way to write them as LAST entry in the file? 136 138 mrh->SetNumSimulatedShowers(fRunHeader->GetNumEvents()); 137 139 mrh->SetImpactMax(fRunHeader->GetImpactMax()); 140 mrh->SetCorsikaVersion(TMath::Nint(fRunHeader->GetProgramVersion()*100)); 138 141 139 142 // ---------------------------------------------------- … … 148 151 const UInt_t id = fRunHeader->GetParticleID(); 149 152 153 // FIXME: Is there a way to write them as LAST entry in the file? 150 154 rh->SetRunInfo(1, fRunHeader->GetRunNumber(), 0); 151 155 rh->SetSourceInfo(MMcEvtBasic::GetParticleName(id)); … … 166 170 fMcEvtBasic->SetImpact(fEvtHeader->GetImpact()); 167 171 168 fMcEvtBasic->SetTelescopeTheta(fPointing Pos->GetZdRad());169 fMcEvtBasic->SetTelescopePhi(fPointing Pos->GetAzRad());172 fMcEvtBasic->SetTelescopeTheta(fPointingTel->GetZdRad()); 173 fMcEvtBasic->SetTelescopePhi(fPointingTel->GetAzRad()); 170 174 171 175 fMcEvtBasic->SetReadyToSave(); … … 173 177 static_cast<MMcEvtBasic&>(*fMcEvt) = *fMcEvtBasic; 174 178 179 // Convert from corsika franme to telescope frame, taking 180 // the magnetic field into account: tel = corsika+offset 175 181 fMcEvt->SetTheta(fEvtHeader->GetZd()); 176 fMcEvt->SetPhi(fEvtHeader->GetAz() );182 fMcEvt->SetPhi(fEvtHeader->GetAz()+fRunHeader->GetMagneticFieldAz()); 177 183 178 184 fMcEvt->SetEvtNumber(fEvtHeader->GetEvtNumber()); -
trunk/MagicSoft/Mars/msim/MSimMMCS.h
r9319 r9336 18 18 MMcEvtBasic *fMcEvtBasic; 19 19 MMcEvt *fMcEvt; 20 MPointingPos *fPointing Pos;20 MPointingPos *fPointingTel; //! telescope poiting position in local (telescope) coordinate system 21 21 MCorsikaEvtHeader *fEvtHeader; 22 22 MCorsikaRunHeader *fRunHeader; -
trunk/MagicSoft/Mars/msim/MSimPointingPos.cc
r9243 r9336 41 41 // Output Containers: 42 42 // MPointingPos 43 // PointingCorsika [MPointingPos] 43 44 // 44 45 ////////////////////////////////////////////////////////////////////////////// 45 46 #include "MSimPointingPos.h" 47 48 #include <TRandom.h> 49 #include <TVector3.h> 46 50 47 51 #include "MLog.h" … … 64 68 // 65 69 MSimPointingPos::MSimPointingPos(const char* name, const char *title) 66 : fRunHeader(0), fEvtHeader(0), fPointing(0) 70 : fRunHeader(0), fEvtHeader(0), fPointingCorsika(0), fPointingLocal(0), 71 fOffTargetDistance(-1), fOffTargetPhi(-1) 72 67 73 { 68 74 fName = name ? name : "MSimPointingPos"; … … 77 83 Int_t MSimPointingPos::PreProcess(MParList *pList) 78 84 { 79 fPointing = (MPointingPos*)pList->FindCreateObj("MPointingPos"); 80 if (!fPointing) 85 fPointingCorsika = (MPointingPos*)pList->FindCreateObj("MPointingPos", "PointingCorsika"); 86 if (!fPointingCorsika) 87 return kFALSE; 88 89 fPointingLocal = (MPointingPos*)pList->FindCreateObj("MPointingPos"); 90 if (!fPointingLocal) 81 91 return kFALSE; 82 92 … … 95 105 } 96 106 107 // FIXED offset 108 // Diffuse? ( FOV of camera folded with mirror diameter as Corsika input? ) 109 // Hour angle! 110 // Angle to magnetic field! 111 112 if (IsOffTargetObservation()) 113 { 114 *fLog << inf; 115 *fLog << "Off target observations switched on with" << endl; 116 *fLog <<" a pointing distance of " << GetOffTargetDistance() << "deg "; 117 if (fOffTargetPhi<0) 118 *fLog << "randomly distributed in phi." << endl; 119 else 120 *fLog << "and phi=" << GetOffTargetPhi() << "deg." << endl; 121 } 122 97 123 return kTRUE; 98 124 } 125 126 /* 127 Bool_t MSimPointingPos::ReInit(MParList *pList) 128 { 129 // FIXME: Check also the enlightened region on the ground! 130 return kTRUE; 131 } 132 */ 99 133 100 134 // -------------------------------------------------------------------------- … … 102 136 Int_t MSimPointingPos::Process() 103 137 { 138 104 139 // If a view cone is given use the fixed telescope orientation 105 140 const Bool_t fixed = fRunHeader->HasViewCone(); 106 141 107 142 // Local sky coordinates (direction of telescope axis) 108 const Double_t zd = fixed ? fRunHeader->GetZdMin() : fEvtHeader->GetZd()*TMath::RadToDeg(); // x==north 109 const Double_t az = fixed ? fRunHeader->GetAzMin() : fEvtHeader->GetAz()*TMath::RadToDeg(); // y==west 143 /*const*/ Double_t zd = fixed ? fRunHeader->GetZdMin() : fEvtHeader->GetZd()*TMath::RadToDeg(); // x==north 144 /*const*/ Double_t az = fixed ? fRunHeader->GetAzMin() : fEvtHeader->GetAz()*TMath::RadToDeg(); // y==west 145 146 if (!fixed && IsOffTargetObservation()) 147 { 148 const Double_t theta = zd*TMath::DegToRad(); 149 const Double_t phi = az*TMath::DegToRad(); 150 151 /*const*/ TVector3 source; 152 source.SetMagThetaPhi(1, theta, phi); 153 154 /*const*/ TVector3 point; 155 point.SetMagThetaPhi(1, theta+fOffTargetDistance, phi); 156 157 const Double_t delta = fOffTargetPhi>0 ? fOffTargetPhi : 158 gRandom->Uniform(TMath::TwoPi()); 159 160 point.Rotate(delta, source); 161 162 zd = point.Theta()*TMath::RadToDeg(); 163 az = point.Phi()*TMath::RadToDeg(); 164 } 110 165 111 166 // Setup the pointing position 112 fPointing->SetLocalPosition(zd, az); 167 fPointingCorsika->SetLocalPosition(zd, az); 168 fPointingLocal->SetLocalPosition(zd, az+fRunHeader->GetMagneticFieldAz()); 169 170 // Calculate incident angle between magnetic field direction 171 // and pointing direction ( phi and theta? ) 113 172 114 173 return kTRUE; 115 174 } 116 175 117 /*118 176 Int_t MSimPointingPos::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 119 177 { 120 178 Bool_t rc = kFALSE; 121 if (IsEnvDefined(env, prefix, " FileName", print))179 if (IsEnvDefined(env, prefix, "OffTargetDistance", print)) 122 180 { 123 181 rc = kTRUE; 124 Set FileName(GetEnvValue(env, prefix, "FileName", fFileName));182 SetOffTargetDistance(GetEnvValue(env, prefix, "OffTargetDistance", GetOffTargetDistance())); 125 183 } 126 184 127 if (IsEnvDefined(env, prefix, " UseTheta", print))185 if (IsEnvDefined(env, prefix, "OffTargetPhi", print)) 128 186 { 129 187 rc = kTRUE; 130 Set UseTheta(GetEnvValue(env, prefix, "UseTheta", fUseTheta));188 SetOffTargetPhi(GetEnvValue(env, prefix, "OffTargetPhi", GetOffTargetPhi())); 131 189 } 132 190 133 191 return rc; 134 192 } 135 */ 193 -
trunk/MagicSoft/Mars/msim/MSimPointingPos.h
r9232 r9336 14 14 { 15 15 private: 16 MCorsikaRunHeader *fRunHeader; //! Header storing event information 17 MCorsikaEvtHeader *fEvtHeader; //! Header storing event information 18 MPointingPos *fPointing; //! Output storing telescope poiting position 16 MCorsikaRunHeader *fRunHeader; //! Header storing event information 17 MCorsikaEvtHeader *fEvtHeader; //! Header storing event information 18 MPointingPos *fPointingCorsika; //! Output storing telescope poiting position in corsika coordinate system (modulo magnetig field declination) 19 MPointingPos *fPointingLocal; //! Output storing telescope poiting position in local (telescope) coordinate system 20 21 Double_t fOffTargetDistance; // [rad] Distance of the observed off-target position from the source 22 Double_t fOffTargetPhi; // [rad] Rotation angle of the off-target position (phi==0 means south, phi=90 west) [0;2pi], phi<0 means random 19 23 20 24 // MParContainer 21 //Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);25 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE); 22 26 23 27 // MTask 24 Int_t PreProcess(MParList *pList);25 Int_t Process();26 28 Int_t PreProcess(MParList *pList); 29 //Bool_t ReInit(MParList *pList); 30 Int_t Process(); 27 31 28 32 public: 29 33 MSimPointingPos(const char *name=NULL, const char *title=NULL); 30 34 35 // Getter 36 Double_t GetOffTargetDistance() const { return fOffTargetDistance*TMath::RadToDeg(); } 37 Double_t GetOffTargetPhi() const { return fOffTargetPhi*TMath::RadToDeg(); } 38 39 // Setter 40 void SetOffTargetDistance(Double_t d=-1) { fOffTargetDistance = d*TMath::DegToRad(); } 41 void SetOffTargetPhi(Double_t p=-1) { fOffTargetPhi = p*TMath::DegToRad(); } 42 31 43 // MSimPointingPos 44 Bool_t IsOffTargetObservation() const { return fOffTargetDistance>0; } 32 45 33 46 // TObject -
trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc
r9328 r9336 147 147 } 148 148 149 fPointing = (MPointingPos*)pList->FindObject(" MPointingPos");149 fPointing = (MPointingPos*)pList->FindObject("PointingCorsika", "MPointingPos"); 150 150 if (!fPointing) 151 151 { -
trunk/MagicSoft/include-Classes/MMcFormat/MMcRunHeader.hxx
r9312 r9336 161 161 Float_t GetImpactMax() const {return fImpactMax;} 162 162 163 Bool_t IsCeres() const { return fCamVersion==UShort_t(-1); } 164 163 165 void SetNumSimulatedShowers(UInt_t n) { fNumSimulatedShowers=n; } 164 166 void SetImpactMax(Float_t im) { fImpactMax=im; } 167 void SetCorsikaVersion(UInt_t v) { fCorsikaVersion=v; } 165 168 166 169 ClassDef(MMcRunHeader, 7) // storage container for general run info
Note:
See TracChangeset
for help on using the changeset viewer.