StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Bin.cxx
1 #include "Bin.h"
2 #include "Stiostream.h"
3 #ifndef ST_NO_NAMESPACES
4 using namespace std;
5 #endif
6 using namespace Bin;
7 
8 
9 void Bin::initPtAry(TArrayD* ary, int type)
10 {
11  double ptAry0[]=
12  {
13  1.6, 1.8, 2.0, 2.25, 2.5, 2.75, 3.0, 3.3, 3.6, 3.9,
14  4.2, 4.5, 4.8, 5.1, 5.5, 6.0, 6.5, 7.0, 8.0, 9.0,
15  10.0, 12.0, 14.0
16  };
17  int n0 = (int)sizeof(ptAry0)/sizeof(double);
18 
19  double ptAry1[]=
20  {
21  1.6, 1.7, 1.8, 1.9, 2.0, 2.2, 2.4, 2.6, 2.8,
22  3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0,
23  5.25, 5.5, 5.75, 6.0, 7.0, 8.0, 9.0, 10.0, 12.0, 14.0, 16.0
24  };
25  int n1 = (int)sizeof(ptAry1)/sizeof(double);
26  switch(type){
27  case 0: ary->Set(n0,ptAry0); break;
28  case 1: ary->Set(n1,ptAry1); break;
29  default:
30  cout << "ERROR. type " << type << "out of range" << endl; exit(1);
31  }
32 
33 }