Getting the trigger descriptors from CDB
[u/mrichter/AliRoot.git] / TMEVSIM / AliMevSimConfig.cxx
CommitLineData
36b81802 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
bb52edc0 15//__________________________________________________________________
16////////////////////////////////////////////////////////////////////
17//
18// class AliMevSimConfig
19//
20// Class containing configuation inforamtion for MeVSim generator
21// --------------------------------------------
22// --------------------------------------------
23// --------------------------------------------
24// author: radomski@if.pw.edu.pl
25//
89dfa58e 26// (3) model_type - equals 1,2,3,4,5 or 6 so far. See comments in
27// Function dNdpty to see what is calculated.
28// The models included are:
29// = 1, Factorized mt exponential, Gaussian rapidity model
30// = 2, Pratt non-expanding, spherical thermal source model
31// = 3, Bertsch non-expanding spherical thermal source model
32// = 4, Pratt spherically expanding, thermally equilibrated
33// source model.
34// = 5, Factorized pt and eta distributions input bin-by-bin.
35// = 6, Fully 2D pt,eta distributions input bin-by-bin.
36// NOTE: model_type = 1-4 are functions of (pt,y)
37// model_type = 5,6 are functions of (pt,eta)
38// (4) reac_plane_cntrl - Can be either 1,2,3 or 4 where:
39// = 1 to ignore reaction plane and anisotropic flow,
40// all distributions will be azimuthally symm.
41// = 2 to use a fixed reaction plane angle for all
42// events in the run.
43// = 3 to assume a randomly varying reaction plane
44// angle for each event as determined by a
45// Gaussian distribution.
46// = 4 to assume a randomly varying reaction plane
47// for each event in the run as determined by
48// a uniform distribution from 0 to 360 deg.
49// (5) PSIr_mean, PSIr_stdev - Reaction plane angle mean and Gaussian
50// std.dev. (both are in degrees) for cases
51// with reac_plane_cntrl = 2 (use mean value)
52// and 3. Note: these are read in regardless
53// of the value of reac_plane_cntrl.
54// (6) MultFac_mean, MultFac_stdev - Overall multiplicity scaling factor
55// for all PID types; mean and std.dev.;
56// for trigger fluctuations event-to-evt.
57// (7) pt_cut_min,pt_cut_max - Range of transverse momentum in GeV/c.
58// (8) eta_cut_min,eta_cut_max - Pseudorapidity range
59// (9) phi_cut_min,phi_cut_max - Azimuthal angular range in degrees.
60// (10) n_stdev_mult - Number of standard deviations about the mean value
61// of multiplicity to include in the random event-to-
62// event selection process. The maximum number of
63// steps that can be covered is determined by
64// parameter n_mult_max_steps in the accompanying
65// include file 'Parameter_values.inc' which is
66// presently set at 1000, but the true upper limit for
67// this is n_mult_max_steps - 1 = 999.
68// (11) n_stdev_temp - Same, except for the "Temperature" parameter.
69// (12) n_stdev_sigma- Same, except for the rapidity width parameter.
70// (13) n_stdev_expvel - Same, except for the expansion velocity parameter.
71// (14) n_stdev_PSIr - Same, except for the reaction plane angle
72// (15) n_stdev_Vn - Same, except for the anisotropy coefficients, Vn.
73// (16) n_stdev_MultFac - Same, except for the multiplicity scaling factor.
74// (17) n_integ_pts - Number of mesh points to use in the random model
75// parameter selection process. The upper limit is
76// set by parameter nmax_integ in the accompanying
77// include file 'Parameter_values.inc' which is presently
78// set at 100, but the true upper limit for n_integ_pts
79// is nmax_integ - 1 = 99.
80// (18) n_scan_pts - Number of mesh points to use to scan the (pt,y)
81// dependence of the model distributions looking for
82// the maximum value. The 2-D grid has
83// n_scan_pts * n_scan_pts points; no limit to size of
84// n_scan_pts.
85//
bb52edc0 86////////////////////////////////////////////////////////////////////
36b81802 87
88#include "AliMevSimConfig.h"
89
90ClassImp(AliMevSimConfig)
91
92
93//////////////////////////////////////////////////////////////////////////////////////////////////
94
95AliMevSimConfig::AliMevSimConfig() {
bb52edc0 96//def ctor
36b81802 97 Init();
98}
99
100//////////////////////////////////////////////////////////////////////////////////////////////////
101
102AliMevSimConfig::AliMevSimConfig(Int_t modelType) {
bb52edc0 103//ctor
36b81802 104 Init();
105 SetModelType(modelType);
106}
107
108//////////////////////////////////////////////////////////////////////////////////////////////////
109
110AliMevSimConfig::~AliMevSimConfig() {
bb52edc0 111//dtor
36b81802 112}
113
114//////////////////////////////////////////////////////////////////////////////////////////////////
115
116void AliMevSimConfig::Init() {
36b81802 117 // Default Values
118
119 fModelType = 1;
120 fReacPlaneCntrl = 4;
121 fPsiRMean = fPsiRStDev = 0;
122
123 fMultFacMean = 1.0;
124 fMultFacStDev = 0.0;
125
126 fNStDevMult = fNStDevTemp = fNStDevSigma = 3.0;
127 fNStDevExpVel = fNStdDevPSIr = fNStDevVn = fNStDevMultFac = 3.0;
128
129 fNIntegPts = fNScanPts = 100;
130
131}
132
133//////////////////////////////////////////////////////////////////////////////////////////////////
134
135void AliMevSimConfig::SetModelType(Int_t modelType) {
bb52edc0 136//Sets type of the model
137 if (modelType < 0 || modelType > fgkMAX_MODEL)
36b81802 138 Error("SetModelType","Wrog Model Type indentifier (%d)",modelType);
139
140 fModelType = modelType;
141}
142
143//////////////////////////////////////////////////////////////////////////////////////////////////
144
145void AliMevSimConfig::SetRectPlane(Int_t ctrl, Float_t psiRMean, Float_t psiRStDev) {
bb52edc0 146//Sets reaction plane parameters
147 if (ctrl < 0 || ctrl > fgkMAX_CTRL)
36b81802 148 Error("SetReactPlane","Wrong Control Parameter (%d)", ctrl);
149
150 fReacPlaneCntrl = ctrl;
151 fPsiRMean = psiRMean;
152 fPsiRStDev = psiRStDev;
153}
154
155//////////////////////////////////////////////////////////////////////////////////////////////////
156
157void AliMevSimConfig::SetMultFac(Float_t mean, Float_t stDev) {
bb52edc0 158 //Sets multiplicity mean and variance
36b81802 159 fMultFacMean = mean;
160 fMultFacStDev = stDev;
161}
162
163//////////////////////////////////////////////////////////////////////////////////////////////////
164
165void AliMevSimConfig::SetStDev(Float_t mult, Float_t temp, Float_t sigma,
166 Float_t expVel, Float_t psiR, Float_t Vn, Float_t multFac) {
bb52edc0 167//sets Dev parameters (whatever Dev is)
36b81802 168 fNStDevMult = mult;
169 fNStDevTemp = temp;
170 fNStDevSigma = sigma;
171 fNStDevExpVel = expVel;
172 fNStdDevPSIr = psiR;
173 fNStDevVn = Vn;
174 fNStDevMultFac =multFac;
bb52edc0 175
176}
177void AliMevSimConfig::GetStDev(Float_t& mult, Float_t& temp, Float_t& sigma,
178 Float_t& expVel, Float_t& psiR, Float_t& Vn, Float_t& multFac) const
179{
180 //returns dev parameters
181 mult = fNStDevMult;
182 temp = fNStDevTemp;
183 sigma = fNStDevSigma;
184 expVel = fNStDevExpVel;
185 psiR = fNStdDevPSIr;
186 Vn = fNStDevVn;
187 multFac = fNStDevMultFac;
188
36b81802 189}
190
191//////////////////////////////////////////////////////////////////////////////////////////////////
192
193void AliMevSimConfig::SetGrid(Int_t integr, Int_t scan) {
bb52edc0 194//Sets grid
36b81802 195 fNIntegPts = integr;
196 fNScanPts = scan;
197}
198
199//////////////////////////////////////////////////////////////////////////////////////////////////
200