]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALPi0SelectionParam.cxx
Coding convention: GC2 violation -> suppression
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALPi0SelectionParam.cxx
CommitLineData
16d3c94d 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
4a98f59c 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'.
0fc11500 25
4a98f59c 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*/
16d3c94d 29
30//_________________________________________________________________________
31// Set of parameters for pi0 selection
32//
33//*-- Author: Aleksei Pavlinov (WSU, Detroit, USA)
34
35#include "AliEMCALPi0SelectionParam.h"
36
b217491f 37ClassImp(AliEMCALPi0SelectionParRec)
38AliEMCALPi0SelectionParRec::AliEMCALPi0SelectionParRec() :
39fEOfRpMin(0.3), fEOfRpMax(30.), fMassGGMin(0.03), fMassGGMax(0.28), fMomPi0Min(1.8), fMomPi0Max(12.)
40{
41 // Default constructor
42}
0fc11500 43//_________________________________________________________________________
44
45ClassImp(AliEMCALPi0SelectionParam)
46AliEMCALPi0SelectionParam::AliEMCALPi0SelectionParam() : TNamed("",""), fTable(0), fCurrentInd(0)
47{
b217491f 48 // Default constructor
0fc11500 49}
50
51AliEMCALPi0SelectionParam::AliEMCALPi0SelectionParam(const char* name, const Int_t nrow) : TNamed(name,"table of cell information") , fTable(0), fCurrentInd(0)
52{
b217491f 53 // Oct 16, 2007
0fc11500 54 fTable = new TObjArray(nrow);
55}
56
b217491f 57void AliEMCALPi0SelectionParam::AddAt(AliEMCALPi0SelectionParRec* r)
0fc11500 58{
b217491f 59 // Oct 16, 2007
60 (*fTable)[fCurrentInd] = new AliEMCALPi0SelectionParRec(*r);
0fc11500 61 fCurrentInd++;
62}
63
64AliEMCALPi0SelectionParam::~AliEMCALPi0SelectionParam()
65{
b217491f 66 // Oct 16, 2007
0fc11500 67 if(fTable) {
68 fTable->Delete();
69 delete fTable;
70 }
71}
72
b217491f 73AliEMCALPi0SelectionParRec* AliEMCALPi0SelectionParam::GetTable(Int_t i) const
0fc11500 74{
b217491f 75 // Oct 16, 2007
76 return (AliEMCALPi0SelectionParRec*)fTable->At(i);
0fc11500 77}
16d3c94d 78
79void AliEMCALPi0SelectionParam::PrintTable()
80{
b217491f 81 // Oct 16, 2007
16d3c94d 82 printf(" Table : %s : nrows %i \n", GetName(), int(GetNRows()));
83 for(int i=0; i<GetNRows(); i++) PrintTable(i);
84}
85
86void AliEMCALPi0SelectionParam::PrintTable(const Int_t i)
87{
b217491f 88 // Oct 16, 2007
16d3c94d 89 if(i>=GetNRows()) return;
90 printf("row %i \n", i);
91 PrintRec(GetTable(i));
92}
93
b217491f 94void AliEMCALPi0SelectionParam::PrintRec(AliEMCALPi0SelectionParRec* r)
16d3c94d 95{
b217491f 96 // Oct 16, 2007
16d3c94d 97 if(r==0) return;
b217491f 98 printf(" cluster energy window %7.2f -> %7.2f \n", r->fEOfRpMin, r->fEOfRpMax);
99 printf(" gamma,gamma mass window %7.2f -> %7.2f \n", r->fMassGGMin, r->fMassGGMax);
100 printf(" pi0 momentum window %7.2f -> %7.2f \n", r->fMomPi0Min, r->fMomPi0Max);
16d3c94d 101}
102// Set 1;
103AliEMCALPi0SelectionParam* AliEMCALPi0SelectionParam::Set1()
104{
b217491f 105 // Initial set of pars of Pi0 selection
106 AliEMCALPi0SelectionParRec r;
107 r.fEOfRpMin = 0.3;
108 r.fEOfRpMax = 30.;
109 r.fMassGGMin = 0.03;
110 r.fMassGGMax = 0.28;
111 r.fMomPi0Min = 1.8;
112 r.fMomPi0Max = 12.0;
16d3c94d 113 AliEMCALPi0SelectionParam *t = new AliEMCALPi0SelectionParam("Pi0Set1",1);
114 t->AddAt(&r);
115 return t;
116}