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