StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St2011Wlumi_histo.cxx
1 // $Id: St2011Wlumi_histo.cxx,v 1.2 2012/09/14 21:02:29 balewski Exp $
2 //
3 //*-- Author : Ross Corliss, MIT
4 
5 #include <TH2.h>
6 #include <TList.h>
7 #include <TLine.h>
8 #include <TMath.h>
9 
10 #include "St2011WlumiMaker.h"
11 
12 //________________________________________________
13 //________________________________________________
14 void
15 St2011WlumiMaker::initHistos(){
16  // const float PI=TMath::Pi();
17  TString core="lum"; // prefix added to every histo name, to allow for multipl maker saving histos in the same root file
18 
19 
20  //...... data histograms
21  memset(hA,0,sizeof(hA));
22  TH1 *h;
23  int nCase=4;
24 
25  hA[0]=h=new TH1F(core+"StatEve",core+" event type",nCase,0,nCase);
26  h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
27  h->SetLineColor(kBlue);h->SetLineWidth(2);
28 
29  char key[][200]={"inp","ver","PT>10","B ET>1"};
30  for(int i=0;i<4;i++) h->Fill(key[i],0.); // preset the order of keys
31 
32 
33  hA[1]=new TH1F(core+"EleTrET","max ET of track w/ PT>10 GeV/c;barrel 2x2 ET (GeV)", 50,0,50);
34 
35  hA[2]=new TH1F(core+"Y0","input event w/ OK prim tracks; spin4 ",16,-0.5,15.5);
36  hA[3]=new TH1F(core+"Y2","EleTrET [5,10] GeV; spin4 ",16,-0.5,15.5);
37  hA[4]=new TH1F(core+"Y3","EleTrET [10,14] GeV; spin4 ",16,-0.5,15.5);
38 
39 
40  // add histos to the list (if provided)
41  for(int i=0;i<mxHA;i++) {
42  if( hA[i]==0) continue;
43  HList->Add( hA[i]);
44  }
45  // HList->ls();
46  LOG_INFO<<Form("%s::initHistos done",GetName())<<endm;
47 
48 }
49 
50 
51 // $Log: St2011Wlumi_histo.cxx,v $
52 // Revision 1.2 2012/09/14 21:02:29 balewski
53 // *lumi-maker re-written to accumulate alternative rel lumi monitors,
54 // * added spin sorting to Zs
55 //
56 // Revision 1.1 2011/02/10 20:33:24 balewski
57 // start
58 //
virtual const char * GetName() const
special overload
Definition: StMaker.cxx:237