/* ======================================================================== *\ ! ! * ! * This file is part of MARS, the MAGIC Analysis and Reconstruction ! * Software. It is distributed to you in the hope that it can be a useful ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes. ! * It is distributed WITHOUT ANY WARRANTY. ! * ! * Permission to use, copy, modify and distribute this software and its ! * documentation for any purpose is hereby granted without fee, ! * provided that the above copyright notice appear in all copies and ! * that both that copyright notice and this permission notice appear ! * in supporting documentation. It is provided "as is" without express ! * or implied warranty. ! * ! ! ! Author(s): Oscar Blanch 11/2002 (blanch@ifae.es) ! ! Copyright: MAGIC Software Development, 2000-2001 ! ! \* ======================================================================== */ ///////////////////////////////////////////////////////////////////////////// // // MMcCorsikaRunHeader // // Root storage container for the CORSIKA run header // // It saves in a root file all variable that are in the CORSIKA run header, except // dummies. // //////////////////////////////////////////////////////////////////////////// #include "MGeomCorsikaCT.h" #include "MMcCorsikaRunHeader.h" #include "MLog.h" #include "MLogManip.h" ClassImp(MMcCorsikaRunHeader); using namespace std; // -------------------------------------------------------------------------- // // Default constructor. // // MMcCorsikaRunHeader::MMcCorsikaRunHeader(const char *name, const char *title, int NumCT) : fTelescopes(NumCT) { fName = name ? name : "MMcCorsikaRunHeader"; fTitle = title ? title : "Translation of the CORSIKA header"; fRunNumber = 0; fDate = 0; fCorsikaVersion = 0; fNumObsLev = 0; for (int i=0; i<10; i++) fHeightLev[i]=0; fSlopeSpec = 0; fELowLim = 0; fEUppLim = 0; fEGS4flag = 0; fNKGflag = 0; fEcutoffh = 0; fEcutoffm = 0; fEcutoffe = 0; fEcutoffg = 0; for(int i=0; i<50; i++) fC[i] = 0; for(int i=0; i<40; i++) fCKA[i] = 0; for(int i=0; i<5; i++) fCETA[i] = 0; for(int i=0; i<11; i++) fCSTRBA[i] = 0; for(int i=0; i<5; i++) { fAATM[i] = 0; fBATM[i] = 0; fCATM[i] = 0; } for (int i=0;i<4; i++) fNFL[i] = 0; fViewconeAngles[0]=0.0; fViewconeAngles[1]=0.0; fWobbleMode=0; fAtmosphericModel=0; fNumCT=NumCT; fTelescopes.SetOwner(); for (int i=0;i(fTelescopes.UncheckedAt(CTnum)) ->Fill(ctx, cty, ctz, cttheta, ctphi, ctdiam, ctfocal); } // ------------------------------------------------------------------------- // // Returns a reference of the i-th entry (the telescope with the index i) // MGeomCorsikaCT &MMcCorsikaRunHeader::operator[](Int_t i) const { return *static_cast(fTelescopes.UncheckedAt(i)); } // -------------------------------------------------------------------------- // // Prints the information of all telescopes // void MMcCorsikaRunHeader::Print(Option_t *) const { // // Print Information about the Geometry of the camera // *fLog << all << GetTitle() <<":" << endl; *fLog << " Spectral Slope: " << fSlopeSpec << " from " << fELowLim << "GeV to " << fEUppLim << "GeV" << endl; *fLog << " Number of Telescopes: " << fNumCT << endl; fTelescopes.Print(); }