StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St2011WlumiMaker.cxx
1 // $Id: St2011WlumiMaker.cxx,v 1.2 2012/09/14 21:02:29 balewski Exp $
2 //
3 //*-- Author : Ross Corliss, MIT
4 
5 #include "St2011WMaker.h"
6 
7 #include "St2011WlumiMaker.h"
8 
9 ClassImp(St2011WlumiMaker)
10 
11 //_____________________________________________________________________________
12 //
13 St2011WlumiMaker::St2011WlumiMaker(const char *name):StMaker(name){
14  wMK=0;HList=0;
15 
16 }
17 
18 
19 //_____________________________________________________________________________
20 //
21 Int_t St2011WlumiMaker::Init(){
22  assert(wMK);
23 
24  assert(HList);
25  initHistos();
26  return StMaker::Init();
27 }
28 
29 
30 //_____________________________________________________________________________
31 //
32 Int_t St2011WlumiMaker::InitRun (int runumber){
33 
34  return kStOK;
35 }
36 
37 //_____________________________________________________________________________
38 //
39 Int_t St2011WlumiMaker::FinishRun (int runnumber){
40 
41 
42 return 0;
43 }
44 
45 //_____________________________________________________________________________
46 //
47 Int_t
49 
50  bXingSort();
51  return kStOK;
52 }
53 
54 //_____________________________________________________________________________
55 //
56 void
57 St2011WlumiMaker::bXingSort(){
58  //has access to whole W-algo-maker data via pointer 'wMK'
59 
60  hA[0]->Fill("inp",1.);
61  if(wMK->wEve->vertex.size()<=0) return;
62  hA[0]->Fill("ver",1.);
63 
64  unsigned int iv=0;
65  WeveVertex &V=wMK->wEve->vertex[iv];
66 
67  if(V.eleTrack.size()<=0) return;
68  hA[0]->Fill("PT>10",1.);
69 
70  int bxStar7=wMK->wEve->bxStar7;
71  int bxStar48=wMK->wEve->bxStar48;
72  if(bxStar48!=bxStar7) {
73  hA[0]->Fill("badBx48",1.);
74  return; // both counters must be in sync
75  }
76 
77  int spin4=wMK->wEve->spin4;
78  hA[2]->Fill(spin4);
79 
80 
81  // find max ET of the cluster matched to track
82  float ET=-1;
83  for( unsigned int it=0; it<V.eleTrack.size(); it++) {
84  WeveEleTrack &T=V.eleTrack[it];
85  if(T.pointTower.id<=0) continue; //skip endcap towers
86  if(ET>T.cluster.ET) continue;
87  ET=T.cluster.ET;
88  }
89  if(ET<=1.) return;
90  hA[0]->Fill("B ET>1",1.);
91  hA[1]->Fill(ET);
92 
93 
94  if(ET>5 && ET<10) hA[3]->Fill(spin4);
95  if(ET>10 && ET<14) hA[4]->Fill(spin4);
96 
97 
98  return;
99 }
100 
101 // $Log: St2011WlumiMaker.cxx,v $
102 // Revision 1.2 2012/09/14 21:02:29 balewski
103 // *lumi-maker re-written to accumulate alternative rel lumi monitors,
104 // * added spin sorting to Zs
105 //
106 // Revision 1.1 2011/02/10 20:33:23 balewski
107 // start
108 //
virtual Int_t Make()
Definition: Stypes.h:40
accumulates alternative rel lumi monitors based on jet events