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

Last change on this file since 2399 was 2173, checked in by tbretz, 21 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 3.4 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 fFocalStdev =-1;
65 fPointSpread =-1;
66 fPointStdev =-1;
67 fDevAdjust =-1;
68 fBlackSpot =-1;
69 fCameraWidth =-1;
70
71 fMirrors = new TClonesArray("MGeomMirror", 0);
72 fPMTs = new TClonesArray("MGeomPMT", 0);
73
74}
75
76// --------------------------------------------------------------------------
77//
78// DESCRIPTION MISSING Please contact Oscar
79//
80void MMcConfigRunHeader::SetMagicDef(Float_t radius,
81 Float_t focal,
82 Float_t stdfocal,
83 Float_t point,
84 Float_t stdpoint,
85 Float_t adjust,
86 Float_t spot,
87 Float_t camwidth)
88{
89 fRadiusMirror=radius;
90 fFocalDist=focal;
91 fFocalStdev=stdfocal;
92 fPointSpread=point;
93 fPointStdev=stdpoint;
94 fDevAdjust=adjust;
95 fBlackSpot=spot;
96 fCameraWidth=camwidth;
97
98}
99
100// --------------------------------------------------------------------------
101//
102// DESCRIPTION MISSING Please contact Oscar
103//
104void MMcConfigRunHeader::SetLightGuides(const TArrayF &theta, const TArrayF &factor)
105{
106 if (fIncidentTheta.GetSize() !=theta.GetSize() ||
107 fLightGuidesFactor.GetSize()!=factor.GetSize())
108 {
109 *fLog<< err << dbginf << "fIncidentTheta or fLightGuidesFactor ";
110 *fLog << "do not have size of setting arrays" << endl;
111 return;
112 }
113
114 fIncidentTheta = theta;
115 fLightGuidesFactor = factor;
116}
Note: See TracBrowser for help on using the repository browser.