source: trunk/MagicSoft/include-Classes/MMcFormat/MMcConfigRunHeader.cc@ 2703

Last change on this file since 2703 was 2703, checked in by moralejo, 22 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 3.2 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Oscar Blanch 11/2002 (blanch@ifae.es)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26//
27// MMcConfigRunHeader
28//
29// Root storage container for the MONTE CARLO CONFIGURATION information
30//
31// It saves in a root file all the infromation about values in the configuration
32// files used in the Monte Carlo production: MagicDef (definition of the teslescope),
33// Reflectivity.dat (mirror reflectivities), qe.dat (PMT QEs), axisdev.dat (mirrors
34// deviations) and lightguides.dat (Effect of the Light Guides).
35//
36////////////////////////////////////////////////////////////////////////////
37#include "MMcConfigRunHeader.h"
38
39#include <fstream>
40#include <iomanip>
41
42#include <TArrayF.h>
43
44#include "MLog.h"
45#include "MLogManip.h"
46
47ClassImp(MMcConfigRunHeader);
48
49using namespace std;
50
51// --------------------------------------------------------------------------
52//
53// Default constructor.
54//
55//
56MMcConfigRunHeader::MMcConfigRunHeader(const char *name, const char *title)
57 : fNumMirrors(0), fNumPMTs(0), fIncidentTheta(181), fLightGuidesFactor(181)
58{
59 fName = name ? name : "MMcConfigRunHeader";
60 fTitle = title ? title : "Mc Configuration Information";
61
62 fRadiusMirror=-1;
63 fFocalDist =-1;
64 fPointSpread =-1;
65 fBlackSpot =-1;
66 fCameraWidth =-1;
67
68 fMirrors = new TClonesArray("MGeomMirror", 0);
69 fPMTs = new TClonesArray("MGeomPMT", 0);
70
71}
72
73// --------------------------------------------------------------------------
74//
75// DESCRIPTION MISSING Please contact Oscar
76//
77void MMcConfigRunHeader::SetMagicDef(Float_t radius,
78 Float_t focal,
79 Float_t point,
80 Float_t spot,
81 Float_t camwidth)
82{
83 fRadiusMirror=radius;
84 fFocalDist=focal;
85 fPointSpread=point;
86 fBlackSpot=spot;
87 fCameraWidth=camwidth;
88
89}
90
91// --------------------------------------------------------------------------
92//
93// DESCRIPTION MISSING Please contact Oscar
94//
95void MMcConfigRunHeader::SetLightGuides(const TArrayF &theta, const TArrayF &factor)
96{
97 if (fIncidentTheta.GetSize() !=theta.GetSize() ||
98 fLightGuidesFactor.GetSize()!=factor.GetSize())
99 {
100 *fLog<< err << dbginf << "fIncidentTheta or fLightGuidesFactor ";
101 *fLog << "do not have size of setting arrays" << endl;
102 return;
103 }
104
105 fIncidentTheta = theta;
106 fLightGuidesFactor = factor;
107}
Note: See TracBrowser for help on using the repository browser.