]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALPi0SelectionParam.cxx
fix effc++ warnings
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALPi0SelectionParam.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2007, 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  **************************************************************************/
15
16 /* History of cvs commits:
17 *
18 * $Log$
19 * Revision 1.3  2007/10/16 14:36:39  pavlinov
20 * fixed code violation (almost)
21 *
22 * Revision 1.2  2007/09/11 19:38:15  pavlinov
23 * added pi0 calibration, linearity, shower profile
24 * co: warning: `$Log' is obsolescent; use ` * $Log'.
25
26 * Revision 1.1  2007/08/08 15:58:01  hristov
27 * New calibration classes. They depend on TTable, so libTable.so is added to the list of Root libraries. (Aleksei)
28 */
29
30 //_________________________________________________________________________
31 //    Set of parameters for pi0 selection 
32 //
33 //*-- Author: Aleksei Pavlinov (WSU, Detroit, USA) 
34
35 #include "AliEMCALPi0SelectionParam.h"
36
37 ClassImp(AliEMCALPi0SelectionParRec)
38 //_________________________________________________________________________
39 AliEMCALPi0SelectionParRec::AliEMCALPi0SelectionParRec() : 
40 fEOfRpMin(0.3), fEOfRpMax(30.), fMassGGMin(0.03), fMassGGMax(0.28), fMomPi0Min(1.8), fMomPi0Max(12.)
41 {
42   // Default constructor 
43 }
44
45
46
47
48 ClassImp(AliEMCALPi0SelectionParam)
49 //_________________________________________________________________________
50 AliEMCALPi0SelectionParam::AliEMCALPi0SelectionParam() : TNamed("",""), fTable(0), fCurrentInd(0)
51 {
52   // Default constructor 
53 }
54
55 //_________________________________________________________________________
56 AliEMCALPi0SelectionParam::AliEMCALPi0SelectionParam(const AliEMCALPi0SelectionParam& param) 
57   : TNamed(param), fTable(param.fTable), fCurrentInd(param.fCurrentInd)
58 {
59   // Copy constructor 
60 }
61
62 //_________________________________________________________________________
63 AliEMCALPi0SelectionParam::AliEMCALPi0SelectionParam(const char* name, const Int_t nrow) : TNamed(name,"table of cell information") , fTable(0), fCurrentInd(0)
64 {
65   // Oct 16, 2007
66   fTable = new TObjArray(nrow);
67 }
68
69 //_________________________________________________________________________
70 void AliEMCALPi0SelectionParam::AddAt(AliEMCALPi0SelectionParRec* r)
71 {
72   // Oct 16, 2007
73   (*fTable)[fCurrentInd] = new AliEMCALPi0SelectionParRec(*r);
74   fCurrentInd++;
75 }
76
77 //_________________________________________________________________________
78 AliEMCALPi0SelectionParam::~AliEMCALPi0SelectionParam()
79 {
80   // Oct 16, 2007
81   if(fTable) {
82     fTable->Delete();
83     delete fTable;
84   }
85 }
86
87 //_________________________________________________________________________
88 AliEMCALPi0SelectionParRec* AliEMCALPi0SelectionParam::GetTable(Int_t i) const
89 {
90   // Oct 16, 2007
91   return (AliEMCALPi0SelectionParRec*)fTable->At(i);
92 }
93
94 //_________________________________________________________________________
95 void AliEMCALPi0SelectionParam::PrintTable()
96 {
97   // Oct 16, 2007
98   printf(" Table : %s : nrows %i \n", GetName(), int(GetNRows()));
99   for(int i=0; i<GetNRows(); i++) PrintTable(i);
100 }
101
102 //_________________________________________________________________________
103 void AliEMCALPi0SelectionParam::PrintTable(const Int_t i)
104 {
105   // Oct 16, 2007
106   if(i>=GetNRows()) return;
107   printf("row %i \n", i);
108   PrintRec(GetTable(i));
109 }
110
111 //_________________________________________________________________________
112 void AliEMCALPi0SelectionParam::PrintRec(AliEMCALPi0SelectionParRec* r)
113 {
114   // Oct 16, 2007
115   if(r==0) return;
116   printf(" cluster  energy  window %7.2f -> %7.2f \n", r->fEOfRpMin, r->fEOfRpMax);
117   printf(" gamma,gamma mass window %7.2f -> %7.2f \n", r->fMassGGMin, r->fMassGGMax);
118   printf(" pi0   momentum   window %7.2f -> %7.2f \n", r->fMomPi0Min, r->fMomPi0Max);
119 }
120
121 //_________________________________________________________________________
122 // Set 1;
123 AliEMCALPi0SelectionParam* AliEMCALPi0SelectionParam::Set1()
124 {
125   // Initial set of pars of Pi0 selection
126   AliEMCALPi0SelectionParRec r;
127   r.fEOfRpMin  = 0.3; 
128   r.fEOfRpMax  = 30.;
129   r.fMassGGMin = 0.03;  
130   r.fMassGGMax = 0.28; 
131   r.fMomPi0Min = 1.8;
132   r.fMomPi0Max = 12.0;
133   AliEMCALPi0SelectionParam *t = new AliEMCALPi0SelectionParam("Pi0Set1",1);
134   t->AddAt(&r);
135   return t;
136 }