source: trunk/Mars/mmc/MMcConfigRunHeader.cc@ 19344

Last change on this file since 19344 was 17386, checked in by tbretz, 11 years ago
Removed svn:executable property, these are no executables.
File size: 4.6 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
32// configuration files used in the Monte Carlo production: MagicDef
33// (definition of the teslescope), Reflectivity.dat (mirror reflectivities),
34// qe.dat (PMT QEs), axisdev.dat (mirrors deviations) and lightguides.dat
35// (Effect of the Light Guides).
36//
37//
38// Class Version 2:
39// ----------------
40// removed obsolete variables which are no longer used by reflector,
41// nor present in the magic.def file: fFocalStdev, fPointStdev, fDevAdjust
42//
43// Class Version 3:
44// ----------------
45// Added member fLightCollectionFactorOuter so that we can store
46// the data on the simulatedlight collection efficiency (light
47// guides + plexiglas +...) as a function of incidence angle for
48// outer and inner pixels independently.
49//
50// Class Version 4:
51// ----------------
52// Added member fMirrorFraction, the "active" fraction of the
53// mirror dish, to account for reflectivity losses, missing
54// mirrors, etc.
55//
56// Class Version 5:
57// ----------------
58// Added member fPmtTimeJitter, the time jitter of the PMTs (sigma
59// of gaussian) for each photoelectron.
60//
61// Class Version 6:
62// ----------------
63// Added fParaboloidFocal
64//
65/////////////////////////////////////////////////////////////////////////////////
66
67//
68////////////////////////////////////////////////////////////////////////////
69#include "MMcConfigRunHeader.h"
70
71#include <fstream>
72#include <iomanip>
73
74#include <TArrayF.h>
75
76#include "MLog.h"
77#include "MLogManip.h"
78
79ClassImp(MMcConfigRunHeader);
80
81using namespace std;
82
83// --------------------------------------------------------------------------
84//
85// Default constructor.
86//
87//
88MMcConfigRunHeader::MMcConfigRunHeader(const char *name, const char *title)
89 : fNumMirrors(0), fNumPMTs(0), fIncidentTheta(181), fLightCollectionFactor(181), fLightCollectionFactorOuter(181)
90{
91 fName = name ? name : "MMcConfigRunHeader";
92 fTitle = title ? title : "Mc Configuration Information";
93
94 fRadiusMirror = -1;
95 fFocalDist = -1;
96 fPointSpread = -1;
97 fBlackSpot = -1;
98 fCameraWidth = -1;
99 fParaboloidFocal = -1;
100
101 fMirrors = new TClonesArray("MGeomMirror", 0);
102 fPMTs = new TClonesArray("MGeomPMT", 0);
103
104}
105
106// --------------------------------------------------------------------------
107//
108// DESCRIPTION MISSING Please contact Oscar
109//
110void MMcConfigRunHeader::SetMagicDef(Float_t radius,
111 Float_t focal,
112 Float_t point,
113 Float_t spot,
114 Float_t camwidth)
115{
116 fRadiusMirror=radius;
117 fFocalDist=focal;
118 fPointSpread=point;
119 fBlackSpot=spot;
120 fCameraWidth=camwidth;
121}
122
123// --------------------------------------------------------------------------
124//
125// Set the values corresponding to the light collection efficiency due to
126// light guides, plexiglas, double crossing, collection of 1st dynode. These
127// are fed to the camera program via de Data/LightCollection.dat file (see
128// camera manual)
129//
130void MMcConfigRunHeader::SetLightCollection(const TArrayF &theta, const TArrayF &factor, const TArrayF &factor_outer)
131{
132 if (fIncidentTheta.GetSize() !=theta.GetSize() ||
133 fLightCollectionFactor.GetSize()!=factor.GetSize() ||
134 fLightCollectionFactorOuter.GetSize()!=factor_outer.GetSize())
135 {
136 *fLog<< err << dbginf << "fIncidentTheta or fLightCollectionFactor";
137 *fLog << "or fLightCollectionFactorOuter" << endl;
138 *fLog << "do not have size of setting arrays" << endl;
139 return;
140 }
141
142 fIncidentTheta = theta;
143 fLightCollectionFactor = factor;
144 fLightCollectionFactorOuter = factor_outer;
145}
Note: See TracBrowser for help on using the repository browser.