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

Last change on this file since 6216 was 3619, checked in by moralejo, 21 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 3.8 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// Version 2:
38// -----------
39// removed obsolete variables which are no longer used by reflector,
40// nor present in the magic.def file: fFocalStdev, fPointStdev, fDevAdjust
41//
42//
43////////////////////////////////////////////////////////////////////////////
44#include "MMcConfigRunHeader.h"
45
46#include <fstream>
47#include <iomanip>
48
49#include <TArrayF.h>
50
51#include "MLog.h"
52#include "MLogManip.h"
53
54ClassImp(MMcConfigRunHeader);
55
56using namespace std;
57
58// --------------------------------------------------------------------------
59//
60// Default constructor.
61//
62//
63MMcConfigRunHeader::MMcConfigRunHeader(const char *name, const char *title)
64 : fNumMirrors(0), fNumPMTs(0), fIncidentTheta(181), fLightCollectionFactor(181), fLightCollectionFactorOuter(181)
65{
66 fName = name ? name : "MMcConfigRunHeader";
67 fTitle = title ? title : "Mc Configuration Information";
68
69 fRadiusMirror=-1;
70 fFocalDist =-1;
71 fPointSpread =-1;
72 fBlackSpot =-1;
73 fCameraWidth =-1;
74
75 fMirrors = new TClonesArray("MGeomMirror", 0);
76 fPMTs = new TClonesArray("MGeomPMT", 0);
77
78}
79
80// --------------------------------------------------------------------------
81//
82// DESCRIPTION MISSING Please contact Oscar
83//
84void MMcConfigRunHeader::SetMagicDef(Float_t radius,
85 Float_t focal,
86 Float_t point,
87 Float_t spot,
88 Float_t camwidth)
89{
90 fRadiusMirror=radius;
91 fFocalDist=focal;
92 fPointSpread=point;
93 fBlackSpot=spot;
94 fCameraWidth=camwidth;
95
96}
97
98// --------------------------------------------------------------------------
99//
100// Set the values corresponding to the light collection efficiency due to
101// light guides, plexiglas, double crossing, collection of 1st dynode. These
102// are fed to the camera program via de Data/LightCollection.dat file (see
103// camera manual)
104//
105void MMcConfigRunHeader::SetLightCollection(const TArrayF &theta, const TArrayF &factor, const TArrayF &factor_outer)
106{
107 if (fIncidentTheta.GetSize() !=theta.GetSize() ||
108 fLightCollectionFactor.GetSize()!=factor.GetSize() ||
109 fLightCollectionFactorOuter.GetSize()!=factor_outer.GetSize())
110 {
111 *fLog<< err << dbginf << "fIncidentTheta or fLightCollectionFactor";
112 *fLog << "or fLightCollectionFactorOuter" << endl;
113 *fLog << "do not have size of setting arrays" << endl;
114 return;
115 }
116
117 fIncidentTheta = theta;
118 fLightCollectionFactor = factor;
119 fLightCollectionFactorOuter = factor_outer;
120}
Note: See TracBrowser for help on using the repository browser.