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

Last change on this file since 2070 was 1632, checked in by tbretz, 22 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.h>
40#include <iomanip.h>
41
42#include <TArrayF.h>
43
44#include "MLog.h"
45#include "MLogManip.h"
46
47ClassImp(MMcConfigRunHeader);
48
49// --------------------------------------------------------------------------
50//
51// Default constructor.
52//
53//
54MMcConfigRunHeader::MMcConfigRunHeader(const char *name, const char *title)
55 : fNumMirrors(0), fNumPMTs(0), fIncidentTheta(181), fLightGuidesFactor(181)
56{
57 fName = name ? name : "MMcConfigRunHeader";
58 fTitle = title ? title : "Mc Configuration Information";
59
60 fRadiusMirror=-1;
61 fFocalDist =-1;
62 fFocalStdev =-1;
63 fPointSpread =-1;
64 fPointStdev =-1;
65 fDevAdjust =-1;
66 fBlackSpot =-1;
67 fCameraWidth =-1;
68
69 fMirrors = new TClonesArray("MGeomMirror", 0);
70 fPMTs = new TClonesArray("MGeomPMT", 0);
71
72}
73
74// --------------------------------------------------------------------------
75//
76// DESCRIPTION MISSING Please contact Oscar
77//
78void MMcConfigRunHeader::SetMagicDef(Float_t radius,
79 Float_t focal,
80 Float_t stdfocal,
81 Float_t point,
82 Float_t stdpoint,
83 Float_t adjust,
84 Float_t spot,
85 Float_t camwidth)
86{
87 fRadiusMirror=radius;
88 fFocalDist=focal;
89 fFocalStdev=stdfocal;
90 fPointSpread=point;
91 fPointStdev=stdpoint;
92 fDevAdjust=adjust;
93 fBlackSpot=spot;
94 fCameraWidth=camwidth;
95
96}
97
98// --------------------------------------------------------------------------
99//
100// DESCRIPTION MISSING Please contact Oscar
101//
102void MMcConfigRunHeader::SetLightGuides(const TArrayF &theta, const TArrayF &factor)
103{
104 if (fIncidentTheta.GetSize() !=theta.GetSize() ||
105 fLightGuidesFactor.GetSize()!=factor.GetSize())
106 {
107 *fLog<< err << dbginf << "fIncidentTheta or fLightGuidesFactor ";
108 *fLog << "do not have size of setting arrays" << endl;
109 return;
110 }
111
112 fIncidentTheta = theta;
113 fLightGuidesFactor = factor;
114}
Note: See TracBrowser for help on using the repository browser.