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

Last change on this file since 1598 was 1597, checked in by blanch, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 3.3 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
38#ifndef MARS_MMcConfigRunHeader
39#include "MMcConfigRunHeader.h"
40#endif
41
42#include <fstream.h>
43#include <iomanip.h>
44
45#include "MLog.h"
46#include "MLogManip.h"
47ClassImp(MMcConfigRunHeader);
48
49// --------------------------------------------------------------------------
50//
51// Default constructor.
52//
53//
54MMcConfigRunHeader::MMcConfigRunHeader(const char *name, const char *title)
55{
56 fName = name ? name : "MMcConfigRunHeader";
57 fTitle = title ? title : "Mc Configuration Information";
58
59 fNumMirrors=0;
60 fNumPMTs=0;
61
62 fRadiusMirror=-10.0;
63 fFocalDist=-10.0;
64 fFocalStdev=-10.0;
65 fPointSpread=-10.0;
66 fPointStdev=-10.0;
67 fDevAdjust=-10.0;
68 fBlackSpot=-10.0;
69 fCameraWidth=-10.0;
70
71 fIncidentTheta->Set(181);
72 fLightGuidesFactor->Set(181);
73
74 fMirrors = new TClonesArray("MGeomMirror", 0);
75 fPMTs = new TClonesArray("MGeomPMT", 0);
76
77}
78
79// -------------------------------------------------------------------------
80//
81// SetMagicDef
82//
83void MMcConfigRunHeader::SetMagicDef(const Float_t radius,
84 const Float_t focal,
85 const Float_t stdfocal,
86 const Float_t point,
87 const Float_t stdpoint,
88 const Float_t adjust,
89 const Float_t spot,
90 const Float_t camwidth)
91{
92 fRadiusMirror=radius;
93 fFocalDist=focal;
94 fFocalStdev=stdfocal;
95 fPointSpread=point;
96 fPointStdev=stdpoint;
97 fDevAdjust=adjust;
98 fBlackSpot=spot;
99 fCameraWidth=camwidth;
100
101}
102
103void MMcConfigRunHeader::SetLightGuides(TArrayF *theta, TArrayF *factor){
104
105 if(fIncidentTheta->GetSize()==theta->GetSize() &&
106 fLightGuidesFactor->GetSize()==factor->GetSize()){
107 theta->Copy(*fIncidentTheta);
108 factor->Copy(*fLightGuidesFactor);
109 }
110 else
111 *fLog<<err << "MMcConfigRunHeader::SetLightGuides: fIncidentTheta "
112 <<"and fLightGuidesFactor do not have "
113 <<"size of setting arrays"<<endl;
114
115}
116
117
118
Note: See TracBrowser for help on using the repository browser.