StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
multStruct.h
1 #ifndef _multStruct
2 #define _multStruct
3 
4 #include <stdio.h>
5 #include <TObject.h>
6 
7 const int NPHIBINS = 24;
8 const int NETABINS = 16;
9 const int NPTBINS = 5;
10 
11 class multStruct : public TObject {
12  public :
13  multStruct( int nPtBins );
14  virtual ~multStruct();
15  int NewEvent(float xv, float yv, float zv);
16  int GetRefMult();
17  void SetRefMult(int refMult);
18  int AddTrack(int phiBin, int etaBin, int iPt, int sign, double pt);
19 
20  int mNPtBins;
21  bool mCalcRefMult;
22  int mRefMult;
23  float mXVertex;
24  float mYVertex;
25  float mZVertex;
26  double mTrackBinPlus[NPTBINS][NPHIBINS][NETABINS][3];
27  double mTrackBinMinus[NPTBINS][NPHIBINS][NETABINS][3];
28 
29  // Following routines return counts in individual bins.
30  double GetNSum( int iPhi, int iEta, int iPt );
31  double GetNPlus( int iPhi, int iEta, int iPt );
32  double GetNMinus( int iPhi, int iEta, int iPt );
33  double GetNDiff( int iPhi, int iEta, int iPt );
34  double GetPtSum( int iPhi, int iEta, int iPt );
35  double GetPtPlus( int iPhi, int iEta, int iPt );
36  double GetPtMinus( int iPhi, int iEta, int iPt );
37  double GetPtSqSum( int iPhi, int iEta, int iPt );
38  double GetPtSqPlus( int iPhi, int iEta, int iPt );
39  double GetPtSqMinus( int iPhi, int iEta, int iPt );
40 
41  ClassDef( multStruct, 1 ) // macro for rootcint
42 };
43 
44 #endif
45 
46 #ifdef multStruct_cxx
47 
48 multStruct::multStruct( int nPtBins ) {
49  if (nPtBins >= NPTBINS) {
50  printf("!!!!!!!!!! You are asking for more Pt bins than multStruct can handle -> Recompile\n");
51  printf("!!!!!!!!!! For this run we use lowest %i distinct bins and lump all rest in last bin.\n", nPtBins-1);
52  mNPtBins = NPTBINS-1;
53  } else {
54  mNPtBins = nPtBins;
55  }
56 }
57 
58 multStruct::~multStruct() {
59 }
60 
61 #endif // #ifdef multStruct_cxx
62