CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HOCalibAnalyzer Class Reference

#include <Calibration/HOCalibAnalyzer/src/HOCalibAnalyzer.cc>

Inheritance diagram for HOCalibAnalyzer:
edm::EDAnalyzer

Public Member Functions

 HOCalibAnalyzer (const edm::ParameterSet &)
 
 ~HOCalibAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void endJob ()
 

Private Attributes

float ahigh
 
float alow
 
float binwid
 
float caloen [3]
 
float chisq
 
TH1F * com_corrsgall [ringmx][sectmx]
 
TH1F * com_corrsgc [ringmx][sectmx]
 
TH1F * com_corrsgl [ringmx][sectmx]
 
TH1F * com_corrsglb [ringmx][sectmx]
 
TH1F * com_corrsglu [ringmx][sectmx]
 
TH1F * com_corrsgr [ringmx][sectmx]
 
TH1F * com_corrsgrb [ringmx][sectmx]
 
TH1F * com_corrsgru [ringmx][sectmx]
 
TH1F * com_crossg [ringmx][routmx+1]
 
TProfile * com_hbtime [ringmx][sectmx]
 
TProfile * com_hopedtime [ringmx][sectmx]
 
TProfile * com_hotime [ringmx][sectmx]
 
float com_invang [ringmx][routmx+1]
 
TH1F * com_sigrsg [ringmx][routmx+1]
 
TH1F * const_eta [netamx]
 
TH2F * const_eta_phi
 
TH1F * const_hpdrm [ringmx]
 
TH1F * corrsgall [netamx][nphimx]
 
TH1F * corrsgc [netamx][nphimx]
 
TH1F * corrsgl [netamx][nphimx]
 
TH1F * corrsglb [netamx][nphimx]
 
TH1F * corrsglu [netamx][nphimx]
 
TH1F * corrsgr [netamx][nphimx]
 
TH1F * corrsgrb [netamx][nphimx]
 
TH1F * corrsgru [netamx][nphimx]
 
TH1F * crossg [netamx][nphimx+1]
 
TH1F * fit_bkgevt
 
TH1F * fit_chi
 
TH1F * fit_sigevt
 
double fitprm [nsgpr][netamx]
 
TH1F * hbhe_sig [9]
 
float hbhesig [9]
 
TProfile * hbtime [netamx][nphimx]
 
TH1F * ho_sig00 [9]
 
TH1F * ho_sig1m [9]
 
TH1F * ho_sig1p [9]
 
TH1F * ho_sig2m [9]
 
TH1F * ho_sig2p [9]
 
float hoang
 
float hocorsig [18]
 
float hocro
 
float hodx
 
float hody
 
TProfile * hopedtime [netamx][nphimx]
 
float hosig [9]
 
TProfile * hotime [netamx][nphimx]
 
float htime
 
int ievt
 
float invang [netamx][nphimx+1]
 
int ipass
 
int irun
 
int irunold
 
int isect
 
int itrg1
 
int itrg2
 
bool m_checkmap
 
bool m_combined
 
bool m_constant
 
bool m_correl
 
bool m_cosmic
 
bool m_digiInput
 
bool m_figure
 
bool m_hbinfo
 
bool m_hbtime
 
bool m_histfit
 
bool m_hotime
 
bool m_pedsuppr
 
double m_sigma
 
TH2F * mean_energy
 
TH1F * mean_eta_ave
 
TH1F * mean_phi_ave
 
TH1F * mean_phi_hst
 
TH1F * mncorrsgall
 
TH1F * mncorrsgc
 
TH1F * mncorrsgl
 
TH1F * mncorrsglb
 
TH1F * mncorrsglu
 
TH1F * mncorrsgr
 
TH1F * mncorrsgrb
 
TH1F * mncorrsgru
 
TH1F * mncrossg
 
TH1F * mnsigrsg
 
TH1F * muonch
 
TH1F * muonmm
 
TH1F * muonnm
 
TH1F * muonph
 
TH1F * muonth
 
int nbn
 
int ndof
 
TH1F * nevcorrsgall
 
TH1F * nevcorrsgc
 
TH1F * nevcorrsgl
 
TH1F * nevcorrsglb
 
TH1F * nevcorrsglu
 
TH1F * nevcorrsgr
 
TH1F * nevcorrsgrb
 
TH1F * nevcorrsgru
 
TH1F * nevcrossg
 
int Nevents
 
TH1F * nevsigrsg
 
int nmuon
 
TH1F * peak_eta [netamx]
 
TH1F * peak_hpdrm [ringmx]
 
TH1F * ped_evt
 
TH1F * ped_mean
 
TH1F * ped_rms
 
TH1F * ped_statmean
 
TH1F * ped_width
 
float pherr
 
TH1F * rmscorrsgall
 
TH1F * rmscorrsgc
 
TH1F * rmscorrsgl
 
TH1F * rmscorrsglb
 
TH1F * rmscorrsglu
 
TH1F * rmscorrsgr
 
TH1F * rmscorrsgrb
 
TH1F * rmscorrsgru
 
TH1F * rmscrossg
 
TH1F * rmssigrsg
 
TH1F * sel_muonch
 
TH1F * sel_muonmm
 
TH1F * sel_muonnm
 
TH1F * sel_muonph
 
TH1F * sel_muonth
 
TH1F * sig_diff
 
TH2F * sig_effi [neffip]
 
TH1F * sig_evt
 
TH1F * sig_mean
 
TH1F * sig_meanerr
 
TH1F * sig_meanerrp
 
TH1F * sig_rms
 
TH1F * sig_sigma
 
TH1F * sig_signf
 
TH1F * sig_statmean
 
TH1F * sig_width
 
TH1F * sigrsg [netamx][nphimx+1]
 
TProfile * sigvsevt [15][ncut]
 
TH1F * stat_eta [netamx]
 
TH1F * statmn_eta [netamx]
 
TTree * T1
 
TFile * theFile
 
std::string theoutputpsFile
 
std::string theoutputtxtFile
 
std::string theRootFileName
 
float therr
 
float trkdr
 
float trkdz
 
float trkmm
 
float trkph
 
float trkth
 
float trkvx
 
float trkvy
 
float trkvz
 

Static Private Attributes

static const int mypow_2_ncut = 8192
 
static const int ncut = 13
 
static const int neffip =6
 
static const int ringmx =5
 
static const int rout12mx =24
 
static const int routmx =36
 
static const int sectmx =12
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 218 of file HOCalibAnalyzer.cc.

Constructor & Destructor Documentation

HOCalibAnalyzer::HOCalibAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 461 of file HOCalibAnalyzer.cc.

References gather_cfg::cout, edm::ParameterSet::getUntrackedParameter(), i, j, gen::k, TFileDirectory::make(), mergeVDriftHistosByStation::name, netamx, nphimx, interactiveExample::theFile, and indexGen::title.

462 {
463  //now do what ever initialization is needed
464  ipass = 0;
465  Nevents = 0;
466 
467  theRootFileName = iConfig.getUntrackedParameter<string>("RootFileName", "test.root");
468  theoutputtxtFile = iConfig.getUntrackedParameter<string>("txtFileName", "test.txt");
469  theoutputpsFile = iConfig.getUntrackedParameter<string>("psFileName", "test.ps");
470 
471  m_hbinfo = iConfig.getUntrackedParameter<bool>("hbinfo", false);
472  m_hbtime = iConfig.getUntrackedParameter<bool>("hbtime", false);
473  m_hotime = iConfig.getUntrackedParameter<bool>("hotime", false);
474  m_correl = iConfig.getUntrackedParameter<bool>("correl", false);
475  m_checkmap = iConfig.getUntrackedParameter<bool>("checkmap", false);
476  m_combined = iConfig.getUntrackedParameter<bool>("combined", false);
477  m_constant = iConfig.getUntrackedParameter<bool>("get_constant", false);
478  m_figure = iConfig.getUntrackedParameter<bool>("get_figure", true);
479  m_digiInput = iConfig.getUntrackedParameter<bool>("digiInput", true);
480  m_histfit = iConfig.getUntrackedParameter<bool>("histFit", true);
481  m_pedsuppr = iConfig.getUntrackedParameter<bool>("pedSuppr", true);
482  m_cosmic = iConfig.getUntrackedParameter<bool>("cosmic", true);
483  m_sigma = iConfig.getUntrackedParameter<double>("sigma", 1.0);
484 
486 
487  theFile = new TFile(theRootFileName.c_str(), "RECREATE");
488  theFile->cd();
489 
490  T1 = new TTree("T1", "DT+CSC+HO");
491 
492  T1->Branch("irun",&irun,"irun/I");
493  T1->Branch("ievt",&ievt,"ievt/I");
494  T1->Branch("itrg1",&itrg1,"itrg1/I");
495  T1->Branch("itrg2",&itrg2,"itrg2/I");
496 
497  T1->Branch("isect",&isect,"isect/I");
498  // T1->Branch("nrecht",&nrecht,"nrecht/I");
499  T1->Branch("ndof",&ndof,"ndof/I");
500  T1->Branch("nmuon",&nmuon,"nmuon/I");
501 
502  T1->Branch("trkdr",&trkdr,"trkdr/F");
503  T1->Branch("trkdz",&trkdz,"trkdz/F");
504 
505  T1->Branch("trkvx",&trkvx,"trkvx/F");
506  T1->Branch("trkvy",&trkvy,"trkvy/F");
507  T1->Branch("trkvz",&trkvz,"trkvz/F");
508  T1->Branch("trkmm",&trkmm,"trkmm/F");
509  T1->Branch("trkth",&trkth,"trkth/F");
510  T1->Branch("trkph",&trkph,"trkph/F");
511 
512  T1->Branch("chisq",&chisq,"chisq/F");
513  T1->Branch("therr",&therr,"therr/F");
514  T1->Branch("pherr",&pherr,"pherr/F");
515  T1->Branch("hodx",&hodx,"hodx/F");
516  T1->Branch("hody",&hody,"hody/F");
517  T1->Branch("hoang",&hoang,"hoang/F");
518 
519  T1->Branch("htime",&htime,"htime/F");
520  T1->Branch("hosig",hosig,"hosig[9]/F");
521  T1->Branch("hocro",&hocro,"hocro/F");
522  T1->Branch("hocorsig",hocorsig,"hocorsig[18]/F");
523  T1->Branch("caloen",caloen,"caloen[3]/F");
524 
525  if (m_hbinfo) { // #ifdef HBINFO
526  T1->Branch("hbhesig",hbhesig,"hbhesig[9]/F");
527  } //m_hbinfo #endif
528 
529  muonnm = fs->make<TH1F>("muonnm", "No of muon", 10, -0.5, 9.5);
530  muonmm = fs->make<TH1F>("muonmm", "P_{mu}", 200, -100., 100.);
531  muonth = fs->make<TH1F>("muonth", "{Theta}_{mu}", 180, 0., 180.);
532  muonph = fs->make<TH1F>("muonph", "{Phi}_{mu}", 180, -180., 180.);
533  muonch = fs->make<TH1F>("muonch", "{chi^2}/ndf", 100, 0., 1000.);
534 
535  sel_muonnm = fs->make<TH1F>("sel_muonnm", "No of muon(sel)", 10, -0.5, 9.5);
536  sel_muonmm = fs->make<TH1F>("sel_muonmm", "P_{mu}(sel)", 200, -100., 100.);
537  sel_muonth = fs->make<TH1F>("sel_muonth", "{Theta}_{mu}(sel)", 180, 0., 180.);
538  sel_muonph = fs->make<TH1F>("sel_muonph", "{Phi}_{mu}(sel)", 180, -180., 180.);
539  sel_muonch = fs->make<TH1F>("sel_muonch", "{chi^2}/ndf(sel)", 100, 0., 1000.);
540 
541 
542  int nbin = 50; //40;// 45; //50; //55; //60; //55; //45; //40; //50;
543  alow = -2.0;// -1.85; //-1.90; // -1.95; // -2.0;
544  ahigh = 8.0;// 8.15; // 8.10; // 8.05; // 8.0;
545 
546  if (m_digiInput) {alow = -10.0; ahigh = 40.;}
547 
548  float tmpwid = (ahigh-alow)/nbin;
549  nbn = int(-alow/tmpwid)+1;
550  if (nbn <0) nbn = 0;
551  if (nbn>nbin) nbn = nbin;
552 
553  char name[200];
554  char title[200];
555 
556  cout <<"nbin "<< nbin<<" "<<alow<<" "<<ahigh<<" "<<tmpwid<<" "<<nbn<<endl;
557 
558  for (int i=0; i<15; i++) {
559 
560  sprintf(title, "sigvsndof_ring%i", i+1);
561  sigvsevt[i][0] = fs->make<TProfile>(title, title, 50, 0., 50.,-9., 20.);
562 
563  sprintf(title, "sigvschisq_ring%i", i+1);
564  sigvsevt[i][1] = fs->make<TProfile>(title, title, 50, 0., 30.,-9., 20.);
565 
566  sprintf(title, "sigvsth_ring%i", i+1);
567  sigvsevt[i][2] = fs->make<TProfile>(title, title, 50, .7, 2.4,-9., 20.);
568 
569  sprintf(title, "sigvsph_ring%i", i+1);
570  sigvsevt[i][3] = fs->make<TProfile>(title, title, 50, -2.4, -0.7,-9., 20.);
571 
572  sprintf(title, "sigvstherr_ring%i", i+1);
573  sigvsevt[i][4] = fs->make<TProfile>(title, title, 50, 0., 0.2,-9., 20.);
574 
575  sprintf(title, "sigvspherr_ring%i", i+1);
576  sigvsevt[i][5] = fs->make<TProfile>(title, title, 50, 0., 0.2,-9., 20.);
577 
578  sprintf(title, "sigvsdircos_ring%i", i+1);
579  sigvsevt[i][6] = fs->make<TProfile>(title, title, 50, 0.5, 1.,-9., 20.);
580 
581  sprintf(title, "sigvstrkmm_ring%i", i+1);
582  sigvsevt[i][7] = fs->make<TProfile>(title, title, 50, 0., 50.,-9., 20.);
583 
584  sprintf(title, "sigvsnmuon_ring%i", i+1);
585  sigvsevt[i][8] = fs->make<TProfile>(title, title, 5, 0.5, 5.5,-9., 20.);
586 
587  sprintf(title, "sigvserr_ring%i", i+1);
588  sigvsevt[i][9] = fs->make<TProfile>(title, title, 50, 0., .3, -9., 20.);
589 
590  sprintf(title, "sigvsaccx_ring%i", i+1);
591  sigvsevt[i][10] = fs->make<TProfile>(title, title, 100, -25., 25., -9., 20.);
592 
593  sprintf(title, "sigvsaccy_ring%i", i+1);
594  sigvsevt[i][11] = fs->make<TProfile>(title, title, 100, -25., 25., -9., 20.);
595 
596  sprintf(title, "sigvscalo_ring%i", i+1);
597  sigvsevt[i][12] = fs->make<TProfile>(title, title, 100, 0., 15., -9., 20.);
598  }
599 
600  for (int j=0; j<netamx; j++) {
601  int ieta = (j<15) ? j+1 : 14-j;
602  for (int i=0;i<nphimx+1;i++) {
603  if (i==nphimx) {
604  sprintf(title, "sig_eta%i_allphi", ieta);
605  } else {
606  sprintf(title, "sig_eta%i_phi%i", ieta,i+1);
607  }
608  sigrsg[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
609  if (i==nphimx) {
610  sprintf(title, "ped_eta%i_allphi", ieta);
611  } else {
612  sprintf(title, "ped_eta%i_phi%i", ieta,i+1);
613  }
614  crossg[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
615  }
616 
617  for (int i=0;i<nphimx;i++) {
618  if (m_hotime) { //#ifdef HOTIME
619  sprintf(title, "hotime_eta%i_phi%i", (j<=14) ? j+1 : 14-j, i+1);
620  hotime[j][i] = fs->make<TProfile>(title, title, 10, -0.5, 9.5, -1.0, 30.0);
621 
622  sprintf(title, "hopedtime_eta%i_phi%i", (j<=14) ? j+1 : 14-j, i+1);
623  hopedtime[j][i] = fs->make<TProfile>(title, title, 10, -0.5, 9.5, -1.0, 30.0);
624 
625  } //m_hotime #endif
626  if (m_hbtime) { //#ifdef HBTIME
627  sprintf(title, "hbtime_eta%i_phi%i", (j<=15) ? j+1 : 15-j, i+1);
628  hbtime[j][i] = fs->make<TProfile>(title, title, 10, -0.5, 9.5, -1.0, 30.0);
629  } //m_hbtime #endif
630 
631  if (m_correl) { //#ifdef CORREL
632  sprintf(title, "corrsg_eta%i_phi%i_leftbottom", ieta,i+1);
633  corrsglb[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
634 
635  sprintf(title, "corrsg_eta%i_phi%i_rightbottom", ieta,i+1);
636  corrsgrb[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
637 
638  sprintf(title, "corrsg_eta%i_phi%i_leftup", ieta,i+1);
639  corrsglu[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
640 
641  sprintf(title, "corrsg_eta%i_phi%i_rightup", ieta,i+1);
642  corrsgru[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
643 
644  sprintf(title, "corrsg_eta%i_phi%i_all", ieta,i+1);
645  corrsgall[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
646 
647  sprintf(title, "corrsg_eta%i_phi%i_left", ieta,i+1);
648  corrsgl[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
649 
650  sprintf(title, "corrsg_eta%i_phi%i_right", ieta,i+1);
651  corrsgr[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
652  } //m_correl #endif
653  if (m_checkmap) {// #ifdef CHECKMAP
654  sprintf(title, "corrsg_eta%i_phi%i_centrl", ieta,i+1);
655  corrsgc[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
656  } //m_checkmap #endif
657  }
658  }
659 
660  mnsigrsg = fs->make<TH1F>("mnsigrsg","mnsigrsg", netamx*nphimx+ringmx*routmx, -0.5, netamx*nphimx+ringmx*routmx -0.5);
661  rmssigrsg = fs->make<TH1F>("rmssigrsg","rmssigrsg", netamx*nphimx+ringmx*routmx, -0.5, netamx*nphimx+ringmx*routmx -0.5);
662  nevsigrsg = fs->make<TH1F>("nevsigrsg","nevsigrsg", netamx*nphimx+ringmx*routmx, -0.5, netamx*nphimx+ringmx*routmx -0.5);
663 
664  mncrossg = fs->make<TH1F>("mncrossg","mncrossg", netamx*nphimx+ringmx*routmx, -0.5, netamx*nphimx+ringmx*routmx -0.5);
665  rmscrossg = fs->make<TH1F>("rmscrossg","rmscrossg", netamx*nphimx+ringmx*routmx, -0.5, netamx*nphimx+ringmx*routmx -0.5);
666  nevcrossg = fs->make<TH1F>("nevcrossg","nevcrossg", netamx*nphimx+ringmx*routmx, -0.5, netamx*nphimx+ringmx*routmx -0.5);
667 
668 
669  for (int i=0; i<neffip; i++) {
670  if (i==0) {
671  sprintf(title, "Total projected muon in tower");
672  sprintf(name, "total_evt");
673  } else {
674  sprintf(title, "Efficiency with sig >%i #sigma", i);
675  sprintf(name, "Effi_with_gt%i_sig", i);
676  }
677  sig_effi[i] = fs->make<TH2F>(name, title, netamx+1, -netamx/2-0.5, netamx/2+0.5, nphimx, 0.5, nphimx+0.5);
678  }
679 
680  sprintf(title, "Mean Energy of all towers");
681  sprintf(name, "mean_energy");
682  mean_energy = fs->make<TH2F>(name, title, netamx+1, -netamx/2-0.5, netamx/2+0.5, nphimx, 0.5, nphimx+0.5);
683 
684  if (m_correl) { //#ifdef CORREL
685  mncorrsglb = fs->make<TH1F>("mncorrsglb","mncorrsglb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
686  rmscorrsglb = fs->make<TH1F>("rmscorrsglb","rmscorrsglb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
687  nevcorrsglb = fs->make<TH1F>("nevcorrsglb","nevcorrsglb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
688 
689  mncorrsgrb = fs->make<TH1F>("mncorrsgrb","mncorrsgrb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
690  rmscorrsgrb = fs->make<TH1F>("rmscorrsgrb","rmscorrsgrb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
691  nevcorrsgrb = fs->make<TH1F>("nevcorrsgrb","nevcorrsgrb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
692 
693  mncorrsglu = fs->make<TH1F>("mncorrsglu","mncorrsglu", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
694  rmscorrsglu = fs->make<TH1F>("rmscorrsglu","rmscorrsglu", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
695  nevcorrsglu = fs->make<TH1F>("nevcorrsglu","nevcorrsglu", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
696 
697  mncorrsgru = fs->make<TH1F>("mncorrsgru","mncorrsgru", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
698  rmscorrsgru = fs->make<TH1F>("rmscorrsgru","rmscorrsgru", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
699  nevcorrsgru = fs->make<TH1F>("nevcorrsgru","nevcorrsgru", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
700 
701  mncorrsgall = fs->make<TH1F>("mncorrsgall","mncorrsgall", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
702  rmscorrsgall = fs->make<TH1F>("rmscorrsgall","rmscorrsgall", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
703  nevcorrsgall = fs->make<TH1F>("nevcorrsgall","nevcorrsgall", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
704 
705  mncorrsgl = fs->make<TH1F>("mncorrsgl","mncorrsgl", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
706  rmscorrsgl = fs->make<TH1F>("rmscorrsgl","rmscorrsgl", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
707  nevcorrsgl = fs->make<TH1F>("nevcorrsgl","nevcorrsgl", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
708 
709  mncorrsgr = fs->make<TH1F>("mncorrsgr","mncorrsgr", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
710  rmscorrsgr = fs->make<TH1F>("rmscorrsgr","rmscorrsgr", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
711  nevcorrsgr = fs->make<TH1F>("nevcorrsgr","nevcorrsgr", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
712  } //m_correl #endif
713 
714  if (m_checkmap) { //#ifdef CHECKMAP
715  mncorrsgc = fs->make<TH1F>("mncorrsgc","mncorrsgc", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
716  rmscorrsgc = fs->make<TH1F>("rmscorrsgc","rmscorrsgc", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
717  nevcorrsgc = fs->make<TH1F>("nevcorrsgc","nevcorrsgc", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
718  } //m_checkmap #endif
719 
720  if (m_combined) { //#ifdef COMBINED
721  for (int j=0; j<ringmx; j++) {
722 
723  for (int i=0;i<routmx+1;i++) {
724  if (j!=2 && i>rout12mx) continue;
725  int phmn = 3*i-1;
726  int phmx = 3*i+1;
727  if (j==2) {phmn = 2*i-1; phmx=2*i;}
728  if (phmn <=0) phmn = nphimx+phmn;
729  if (phmx <=0) phmx = nphimx+phmx;
730 
731  if ((j==2 && i==routmx) || (j!=2 && i==rout12mx)) {
732  sprintf(title, "sig_ring%i_allrm", j-2);
733  sprintf(name, "sig_ring%i_allrm", j-2);
734  } else {
735  sprintf(title, "sig_ring%i_phi%i-%i", j-2,phmn,phmx);
736  sprintf(name, "sig_ring%i_rout%i", j-2,i+1);
737  }
738  com_sigrsg[j][i] = fs->make<TH1F>(name, title, nbin, alow, ahigh);
739  if ((j==2 && i==routmx) || (j!=2 && i==rout12mx)) {
740  sprintf(title, "ped_ring%i_allrm", j-2);
741  sprintf(name, "ped_ring%i_allrm", j-2);
742  } else {
743  sprintf(title, "ped_ring%i_phi%i-%i", j-2,phmn, phmx);
744  sprintf(name, "ped_ring%i_rout%i", j-2,i+1);
745  }
746  com_crossg[j][i] = fs->make<TH1F>(name, title, nbin, alow, ahigh);
747  }
748 
749  for (int i=0;i<sectmx;i++) {
750  if (m_hotime) { //#ifdef HOTIME
751  sprintf(title, "com_hotime_ring%i_sect%i", j-2, i+1);
752  com_hotime[j][i] = fs->make<TProfile>(title, title, 10, -0.5, 9.5, -1.0, 30.0);
753 
754  sprintf(title, "com_hopedtime_ring%i_sect%i", j-2, i+1);
755  com_hopedtime[j][i] = fs->make<TProfile>(title, title, 10, -0.5, 9.5, -1.0, 30.0);
756  } //m_hotime #endif
757  if (m_hbtime){ //#ifdef HBTIME
758  sprintf(title, "_com_hbtime_ring%i_serrct%i", j-2, i+1);
759  com_hbtime[j][i] = fs->make<TProfile>(title, title, 10, -0.5, 9.5, -1.0, 30.0);
760  } //m_hbtime #endif
761 
762  if (m_correl) { //#ifdef CORREL
763  sprintf(title, "com_corrsg_ring%i_sect%i_leftbottom", j-2,i+1);
764  com_corrsglb[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
765 
766  sprintf(title, "com_corrsg_ring%i_sect%i_rightbottom", j-2,i+1);
767  com_corrsgrb[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
768 
769  sprintf(title, "com_corrsg_ring%i_sect%i_leftup", j-2,i+1);
770  com_corrsglu[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
771 
772  sprintf(title, "com_corrsg_ring%i_sect%i_rightup", j-2,i+1);
773  com_corrsgru[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
774 
775  sprintf(title, "com_corrsg_ring%i_sect%i_all", j-2,i+1);
776  com_corrsgall[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
777 
778  sprintf(title, "com_corrsg_ring%i_sect%i_left", j-2,i+1);
779  com_corrsgl[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
780 
781  sprintf(title, "com_corrsg_ring%i_sect%i_right", j-2,i+1);
782  com_corrsgr[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
783  } //m_correl #endif
784 
785  if (m_checkmap) { // #ifdef CHECKMAP
786  sprintf(title, "com_corrsg_ring%i_sect%i_centrl", j-2,i+1);
787  com_corrsgc[j][i] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
788  } //m_checkmap #endif
789  }
790  }
791  } //m_combined #endif
792 
793  for (int i=-1; i<=1; i++) {
794  for (int j=-1; j<=1; j++) {
795  int k = 3*(i+1)+j+1;
796 
797  sprintf(title, "hosct2p_eta%i_phi%i", i, j);
798  ho_sig2p[k] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
799 
800  sprintf(title, "hosct1p_eta%i_phi%i", i, j);
801  ho_sig1p[k] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
802 
803  sprintf(title, "hosct00_eta%i_phi%i", i, j);
804  ho_sig00[k] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
805 
806  sprintf(title, "hosct1m_eta%i_phi%i", i, j);
807  ho_sig1m[k] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
808 
809  sprintf(title, "hosct2m_eta%i_phi%i", i, j);
810  ho_sig2m[k] = fs->make<TH1F>(title, title, nbin, alow, ahigh);
811 
812  if (m_hbinfo) { // #ifdef HBINFO
813  sprintf(title, "hbhesig_eta%i_phi%i", i, j);
814  hbhe_sig[k] = fs->make<TH1F>(title, title, 51, -10.5, 40.5);
815  } //m_hbinfo #endif
816  }
817  }
818 
819  if (m_constant) {
820  ped_evt = fs->make<TH1F>("ped_evt", "ped_evt", netamx*nphimx, -0.5, netamx*nphimx-0.5);
821  ped_mean = fs->make<TH1F>("ped_mean", "ped_mean", netamx*nphimx, -0.5, netamx*nphimx-0.5);
822  ped_width = fs->make<TH1F>("ped_width", "ped_width", netamx*nphimx, -0.5, netamx*nphimx-0.5);
823 
824  fit_chi = fs->make<TH1F>("fit_chi", "fit_chi", netamx*nphimx, -0.5, netamx*nphimx-0.5);
825  sig_evt = fs->make<TH1F>("sig_evt", "sig_evt", netamx*nphimx, -0.5, netamx*nphimx-0.5);
826  fit_sigevt = fs->make<TH1F>("fit_sigevt", "fit_sigevt", netamx*nphimx, -0.5, netamx*nphimx-0.5);
827  fit_bkgevt = fs->make<TH1F>("fit_bkgevt", "fit_bkgevt", netamx*nphimx, -0.5, netamx*nphimx-0.5);
828  sig_mean = fs->make<TH1F>("sig_mean", "sig_mean", netamx*nphimx, -0.5, netamx*nphimx-0.5);
829  sig_diff = fs->make<TH1F>("sig_diff", "sig_diff", netamx*nphimx, -0.5, netamx*nphimx-0.5);
830  sig_width = fs->make<TH1F>("sig_width", "sig_width", netamx*nphimx, -0.5, netamx*nphimx-0.5);
831  sig_sigma = fs->make<TH1F>("sig_sigma", "sig_sigma", netamx*nphimx, -0.5, netamx*nphimx-0.5);
832  sig_meanerr = fs->make<TH1F>("sig_meanerr", "sig_meanerr", netamx*nphimx, -0.5, netamx*nphimx-0.5);
833  sig_meanerrp = fs->make<TH1F>("sig_meanerrp", "sig_meanerrp", netamx*nphimx, -0.5, netamx*nphimx-0.5);
834  sig_signf = fs->make<TH1F>("sig_signf", "sig_signf", netamx*nphimx, -0.5, netamx*nphimx-0.5);
835 
836  ped_statmean = fs->make<TH1F>("ped_statmean", "ped_statmean", netamx*nphimx, -0.5, netamx*nphimx-0.5);
837  sig_statmean = fs->make<TH1F>("sig_statmean", "sig_statmean", netamx*nphimx, -0.5, netamx*nphimx-0.5);
838  ped_rms = fs->make<TH1F>("ped_rms", "ped_rms", netamx*nphimx, -0.5, netamx*nphimx-0.5);
839  sig_rms = fs->make<TH1F>("sig_rms", "sig_rms", netamx*nphimx, -0.5, netamx*nphimx-0.5);
840 
841  const_eta_phi = fs->make<TH2F>("const_eta_phi", "const_eta_phi", netamx+1, -(netamx+1)/2., (netamx+1)/2., nphimx, 0.5, nphimx+0.5);
842 
843  for (int ij=0; ij<netamx; ij++) {
844  int ieta = (ij<15) ? ij+1 : 14-ij;
845  sprintf(title, "Cont_Eta_%i", ieta);
846  const_eta[ij] = fs->make<TH1F>(title, title, nphimx, 0.5, nphimx+0.5);
847 
848  sprintf(title, "Peak_Eta_%i", ieta);
849  peak_eta[ij] = fs->make<TH1F>(title, title, nphimx, 0.5, nphimx+0.5);
850  }
851 
852  for (int ij=0; ij<ringmx; ij++) {
853  int iring = ij-2;
854  int iread = (ij==2) ? routmx : rout12mx;
855  sprintf(title, "Cont_hpdrm_%i", iring);
856  const_hpdrm[ij] = fs->make<TH1F>(title, title, iread, 0.5, iread+0.5);
857 
858  sprintf(title, "Peak_hpdrm_%i", iring);
859  peak_hpdrm[ij] = fs->make<TH1F>(title, title, iread, 0.5, iread+0.5);
860  }
861 
862  mean_phi_hst = fs->make<TH1F>("mean_phi_hst", "mean_phi_hst", netamx+1, -(netamx+1)/2., (netamx+1)/2.);
863  mean_phi_ave = fs->make<TH1F>("mean_phi_ave", "mean_phi_ave", netamx+1, -(netamx+1)/2., (netamx+1)/2.);
864 
865  mean_eta_ave = fs->make<TH1F>("mean_eta_ave", "mean_eta_ave", nphimx, 0.5, nphimx+0.5);
866 
867  } //m_constant
868 
869  for (int ij=0; ij<netamx; ij++) {
870  int ieta = (ij<15) ? ij+1 : 14-ij;
871 
872  sprintf(title, "Stat_Eta_%i", ieta);
873  stat_eta[ij] = fs->make<TH1F>(title, title, nphimx, 0.5, nphimx+0.5);
874 
875  sprintf(title, "#mu(stat)_Eta_%i", ieta);
876  statmn_eta[ij] = fs->make<TH1F>(title, title, nphimx, 0.5, nphimx+0.5);
877  }
878 
879  for (int j=0; j<netamx; j++) {
880  for (int i=0; i<nphimx; i++) {
881  invang[j][i] = 0.0;
882  }
883  }
884  for (int j=0; j<ringmx; j++) {
885  for (int i=0;i<routmx+1;i++) {
886  com_invang[j][i] = 0.0;
887  }
888  }
889 
890 }
TH1F * corrsgrb[netamx][nphimx]
TH2F * sig_effi[neffip]
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
TH1F * const_hpdrm[ringmx]
static const int ringmx
TH1F * com_crossg[ringmx][routmx+1]
std::string theRootFileName
TH1F * corrsgr[netamx][nphimx]
TH1F * corrsglu[netamx][nphimx]
static const int rout12mx
TH1F * crossg[netamx][nphimx+1]
TH1F * com_corrsgall[ringmx][sectmx]
float invang[netamx][nphimx+1]
TH1F * corrsgc[netamx][nphimx]
TH1F * peak_hpdrm[ringmx]
TH1F * corrsglb[netamx][nphimx]
TH1F * sigrsg[netamx][nphimx+1]
TH1F * com_corrsglu[ringmx][sectmx]
static const int neffip
TProfile * hopedtime[netamx][nphimx]
TProfile * hbtime[netamx][nphimx]
std::string theoutputtxtFile
TH1F * com_sigrsg[ringmx][routmx+1]
TProfile * com_hbtime[ringmx][sectmx]
float com_invang[ringmx][routmx+1]
std::string theoutputpsFile
TH1F * corrsgl[netamx][nphimx]
TH1F * com_corrsgc[ringmx][sectmx]
TH1F * com_corrsgrb[ringmx][sectmx]
int j
Definition: DBlmapReader.cc:9
TH1F * com_corrsgr[ringmx][sectmx]
TProfile * hotime[netamx][nphimx]
int k[5][pyjets_maxn]
TH1F * corrsgru[netamx][nphimx]
static const int routmx
TH1F * com_corrsgl[ringmx][sectmx]
TH1F * com_corrsglb[ringmx][sectmx]
TH1F * peak_eta[netamx]
static const int sectmx
TProfile * com_hopedtime[ringmx][sectmx]
const int nphimx
const int netamx
TH1F * const_eta[netamx]
T * make() const
make new ROOT object
TH1F * com_corrsgru[ringmx][sectmx]
tuple cout
Definition: gather_cfg.py:121
TProfile * com_hotime[ringmx][sectmx]
TH1F * statmn_eta[netamx]
TProfile * sigvsevt[15][ncut]
TH1F * corrsgall[netamx][nphimx]
TH1F * stat_eta[netamx]
HOCalibAnalyzer::~HOCalibAnalyzer ( )

Definition at line 893 of file HOCalibAnalyzer.cc.

References gather_cfg::cout, and interactiveExample::theFile.

894 {
895 
896  // do anything here that needs to be done at desctruction time
897  // (e.g. close files, deallocate resources etc.)
898 
899  theFile->cd();
900  theFile->Write();
901  theFile->Close();
902  cout <<" Selected events # is "<<ipass<<endl;
903 }
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

void HOCalibAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 912 of file HOCalibAnalyzer.cc.

References abs, gather_cfg::cout, cro_ssg, etamap, edm::EventID::event(), edm::EventSetup::get(), edm::Event::getByType(), i, edm::EventBase::id(), gen::k, mapx0m, mapx0p, mapx1, mapx2, nphimx, npixlebt, npixleft, npixleup, npixribt, npixrigh, npixriup, phimap, edm::EventID::run(), sig_reg, and findQualityFiles::size.

913 {
914 
915  // calcualte these once (and avoid the pow(int,int) ambiguities for c++)
916  int mypow_2_0 = 0; // 2^0
917  int mypow_2_1 = 2; // 2^1
918  int mypow_2_2 = 4; // 2^2
919 
920  int mypow_2_3 = 8; // 2^3
921  int mypow_2_4 = 16; // 2^4
922  int mypow_2_5 = 32; // 2^5
923  int mypow_2_6 = 64; // 2^6
924  int mypow_2_7 = 128; // 2^7
925  int mypow_2_8 = 256; // 2^8
926  int mypow_2_9 = 512; // 2^9
927  int mypow_2_10 = 1024; // 2^10
928  int mypow_2_11 = 2048; // 2^11
929  int mypow_2_12 = 4096; // 2^12
930 
931  /*
932  //FIXGM Put this is initialiser
933  int mapx1[6][3]={{1,4,8}, {12,7,3}, {5,9,13}, {11,6,2}, {16,15,14}, {19,18,17}};
934  // int etamap1[21]={-1, 0,3,1, 0,2,3, 1,0,2, -1, 3,1,2, 4,4,4, 5,5,5, -1};
935  // int phimap1[21]={-1, 0,2,2, 1,0,1, 1,2,1, -1, 0,0,2, 2,1,0, 2,1,0,-1};
936 
937  int mapx2[6][3]={{1,4,8}, {12,7,3}, {5,9,13}, {11,6,2}, {16,15,14}, {-1,-1,-1}};
938  // int etamap2[21]={-1, 0,3,1, 0,2,3, 1,0,2, -1, 3,1,2, 4,4,4, -1,-1,-1, -1};
939  // int phimap2[21]={-1, 0,2,2, 1,0,1, 1,2,1, -1, 0,0,2, 2,1,0, 2, 1, 0, -1};
940 
941  int mapx0p[9][2]={{3,1}, {7,4}, {6,5}, {12,8}, {0,0}, {11,9}, {16,13}, {15,14}, {19,17}};
942  int mapx0m[9][2]={{17,19}, {14,15}, {13,16}, {9,11}, {0,0}, {8,12}, {5,6}, {4,7}, {1,3}};
943 
944  // int etamap0p[21]={-1, 0,-1,0, 1,2,2, 1,3,5, -1, 5,3,6, 7,7,6, 8,-1,8, -1};
945  // int phimap0p[21]={-1, 1,-1,0, 1,1,0, 0,1,1, -1, 0,0,1, 1,0,0, 1,-1,0, -1};
946 
947  // int etamap0m[21]={-1, 8,-1,8, 7,6,6, 7,5,3, -1, 3,5,2, 1,1,2, 0,-1,0, -1};
948  // int phimap0m[21]={-1, 0,-1,1, 0,0,1, 1,0,0, -1, 1,1,0, 0,1,1, 0,-1,1, -1};
949 
950  int etamap[4][21]={{-1, 0,3,1, 0,2,3, 1,0,2, -1, 3,1,2, 4,4,4, -1,-1,-1, -1}, //etamap2
951  {-1, 0,3,1, 0,2,3, 1,0,2, -1, 3,1,2, 4,4,4, 5,5,5, -1}, //etamap1
952  {-1, 0,-1,0, 1,2,2, 1,3,5, -1, 5,3,6, 7,7,6, 8,-1,8, -1}, //etamap0p
953  {-1, 8,-1,8, 7,6,6, 7,5,3, -1, 3,5,2, 1,1,2, 0,-1,0, -1}}; //etamap0m
954 
955  int phimap[4][21] ={{-1, 0,2,2, 1,0,1, 1,2,1, -1, 0,0,2, 2,1,0, 2,1,0, -1}, //phimap2
956  {-1, 0,2,2, 1,0,1, 1,2,1, -1, 0,0,2, 2,1,0, 2,1,0, -1}, //phimap1
957  {-1, 1,-1,0, 1,1,0, 0,1,1, -1, 0,0,1, 1,0,0, 1,-1,0, -1}, //phimap0p
958  {-1, 0,-1,1, 0,0,1, 1,0,0, -1, 1,1,0, 0,1,1, 0,-1,1, -1}}; //phimap0m
959  //swapped phi map for R0+/R0- (15/03/07)
960  for (int i=0; i<4; i++) {
961  for (int j=0; j<21; j++) {
962  cout <<"ieta "<<i<<" "<<j<<" "<<etamap[i][j]<<endl;
963  }
964  }
965 
966  // Character convention for R+/-1/2
967  // int npixleft[21] = {-1, F, Q,-1, M, D, J,-1, T,-1, C,-1, R, P, H,-1, N, G};
968  // int npixrigh[21] = { Q, S,-1, D, J, L,-1, K,-1, E,-1, P, H, B,-1, G, A,-1};
969 
970  // int npixlb1[21]={-1,-1,-1,-1, F, Q, S,-1, M, J, L, T, K,-1, C, R, P, H};
971  // int npixrb1[21]={-1,-1,-1, F, Q, S,-1, M, D, L,-1, K,-1, C, E, P, H, B};
972  // int npixlu1[21]={ M, D, J, T, K,-1, C,-1, R, H, B,-1, N, G, A,-1,-1,-1};
973  // int npixru1[21]={ D, J, L, K,-1, C, E, R, P, B,-1, N, G, A,-1,-1,-1,-1};
974 
975  int npixleft[21]={0, 0, 1, 2, 0, 4, 5, 6, 0, 8, 0, 0,11, 0,13,14,15, 0,17,18,0};
976  int npixrigh[21]={0, 2, 3, 0, 5, 6, 7, 0, 9, 0, 0,12, 0,14,15,16, 0,18,19, 0,0};
977  int npixlebt[21]={0, 0, 0, 0, 0, 1, 2, 3, 0, 4, 0, 6, 7, 8, 9, 0,11,13,14,15,0};
978  int npixribt[21]={0, 0, 0, 0, 1, 2, 3, 0, 4, 5, 0, 7, 0, 9, 0,11,12,14,15,16,0};
979  int npixleup[21]={0, 4, 5, 6, 8, 9, 0,11, 0,13, 0,15,16, 0,17,18,19, 0, 0, 0,0};
980  int npixriup[21]={0, 5, 6, 7, 9, 0,11,12,13,14, 0,16, 0,17,18,19, 0, 0, 0, 0,0};
981  */
982 
983  int iaxxx = 0;
984  int ibxxx = 0;
985 
986  Nevents++;
987 
988  using namespace edm;
989 
990  float pival = acos(-1.);
991  irunold = irun = iEvent.id().run();
992  ievt = iEvent.id().event();
993 
994  // cout <<"Nevents "<<Nevents<<endl;
995 
997  bool isCosMu = true;
998  try {
999  iEvent.getByType(HOCalib);
1000  // iEvent.getByLabel("hoCalibProducer","HOCalibVariableCollection",HOCalib);
1001 
1002  } catch ( cms::Exception &iEvent ) { isCosMu = false; }
1003 
1004  if (isCosMu && (*HOCalib).size() >0 ) {
1005  nmuon = (*HOCalib).size();
1006  if (Nevents%5000==1) cout <<"nmuon event # "<<Nevents<<" Run # "<<iEvent.id().run()<<" Evt # "<<iEvent.id().event()<<" "<<nmuon<<endl;
1007 
1008  for (HOCalibVariableCollection::const_iterator hoC=(*HOCalib).begin(); hoC!=(*HOCalib).end(); hoC++){
1009  itrg1 = (*hoC).trig1;
1010  itrg2 = (*hoC).trig2;
1011 
1012  trkdr = (*hoC).trkdr;
1013  trkdz = (*hoC).trkdz;
1014 
1015  trkvx = (*hoC).trkvx;
1016  trkvy = (*hoC).trkvy;
1017  trkvz = (*hoC).trkvz;
1018 
1019  trkmm = (*hoC).trkmm;
1020  trkth = (*hoC).trkth;
1021  trkph = (*hoC).trkph;
1022 
1023  ndof = (int)(*hoC).ndof;
1024  // nrecht = (int)(*hoC).nrecht;
1025  chisq = (*hoC).chisq;
1026 
1027  therr = (*hoC).therr;
1028  pherr = (*hoC).pherr;
1029  trkph = (*hoC).trkph;
1030 
1031  isect = (*hoC).isect;
1032  hodx = (*hoC).hodx;
1033  hody = (*hoC).hody;
1034  hoang = (*hoC).hoang;
1035  htime = (*hoC).htime;
1036  for (int i=0; i<9; i++) { hosig[i] = (*hoC).hosig[i];} //cout<<"hosig "<<i<<" "<<hosig[i]<<endl;}
1037  for (int i=0; i<18; i++) { hocorsig[i] = (*hoC).hocorsig[i];} // cout<<"hocorsig "<<i<<" "<<hocorsig[i]<<endl;}
1038  hocro = (*hoC).hocro;
1039  for (int i=0; i<3; i++) { caloen[i] = (*hoC).caloen[i];}
1040 
1041  if (m_hbinfo) { for (int i=0; i<9; i++) { hbhesig[i] = (*hoC).hbhesig[i];}} // cout<<"hbhesig "<<i<<" "<<hbhesig[i]<<endl;}}
1042 
1043 
1044  int ipsall=0;
1045  int ips0=0;
1046  int ips1=0;
1047  int ips2=0;
1048  int ips3=0;
1049  int ips4=0;
1050  int ips5=0;
1051  int ips6=0;
1052  int ips7=0;
1053  int ips8=0;
1054  int ips9=0;
1055  int ips10 =0;
1056  int ips11 =0;
1057  int ips12 = 0;
1058 
1059  int iselect3 = 0;
1060  if (ndof >=15 && chisq <30) iselect3 = 1;
1061 
1062  if (isect <0) continue; //FIXGM Is it proper place ?
1063  if (fabs(trkth-pival/2)<0.000001) continue; //22OCT07
1064 
1065  int ieta = int((abs(isect)%10000)/100.)-30; //an offset to acodate -ve eta values
1066  if (abs(ieta)>=16) continue;
1067  int iphi = abs(isect)%100;
1068 
1069  int tmpsect = int((iphi + 1)/6.) + 1;
1070  if (tmpsect >12) tmpsect = 1;
1071 
1072  int iring = 0;
1073  int tmpeta = ieta + 4; //For pixel mapping
1074  if (ieta >=-15 && ieta <=-11) {iring = -2; tmpeta =-11-ieta; } //abs(ieta)-11;}
1075  if (ieta >=-10 && ieta <=-5) {iring = -1; tmpeta =-5-ieta; } // abs(ieta)-5;}
1076  if (ieta >= 5 && ieta <= 10) {iring = 1; tmpeta =ieta-5; }
1077  if (ieta >= 11 && ieta <= 15) {iring = 2; tmpeta =ieta-11;}
1078 
1079  int iring2 = iring + 2;
1080 
1081  int tmprout = int((iphi + 1)/3.) + 1;
1082  int tmproutmx =routmx;
1083  if (iring==0) {
1084  tmprout = int((iphi + 1)/2.) + 1;
1085  if (tmprout >routmx) tmprout = 1;
1086  } else {
1087  if (tmprout >rout12mx) tmprout = 1;
1088  tmproutmx =rout12mx;
1089  }
1090 
1091  // CRUZET1
1092  if (m_cosmic) {
1093  /* GMA temoparily change to increase event size at 3 & 9 O'clock position */
1094  if (abs(ndof) >=20 && abs(ndof) <40) {ips0 = (int)mypow_2_0; ipsall += ips0;}
1095  if (chisq >0 && chisq<15) {ips1 = (int)mypow_2_1; ipsall +=ips1;} //18Jan2008
1096  if (fabs(trkth-pival/2) <21.5) {ips2 = (int)mypow_2_2; ipsall +=ips2;} //No nead for pp evt
1097  if (fabs(trkph+pival/2) <21.5) {ips3 = (int)mypow_2_3; ipsall +=ips3;} //No nead for pp evt
1098 
1099  if (therr <0.02) {ips4 = (int)mypow_2_4; ipsall +=ips4;}
1100  if (pherr <0.0002) {ips5 = (int)mypow_2_5; ipsall +=ips5;}
1101  if (fabs(hoang) >0.30) {ips6 = (int)mypow_2_6; ipsall +=ips6;}
1102  if (fabs(trkmm) >0.100) {ips7 = (int)mypow_2_7; ipsall +=ips7;}
1103  // if (nmuon ==1) {ips8 = (int)mypow_2_8; ipsall +=ips8;}
1104  if (nmuon >=1 && nmuon <=4) {ips8 = (int)mypow_2_8; ipsall +=ips8;}
1105 
1106  if (iring2==2) {
1107  if (fabs(hodx)<100 && fabs(hodx)>2 && fabs(hocorsig[8]) <40 && fabs(hocorsig[8]) >2 )
1108  {ips10=(int)mypow_2_10;ipsall +=ips10;}
1109 
1110  if (fabs(hody)<100 && fabs(hody)>2 && fabs(hocorsig[9]) <40 && fabs(hocorsig[9]) >2 )
1111  {ips11=(int)mypow_2_11;ipsall +=ips11;}
1112 
1113  } else {
1114  if (fabs(hodx)<100 && fabs(hodx)>2 )
1115  {ips10=(int)mypow_2_10;ipsall +=ips10;}
1116 
1117  if (fabs(hody)<100 && fabs(hody)>2)
1118  {ips11=(int)mypow_2_11;ipsall +=ips11;}
1119  }
1120  if (caloen[0] ==0) { ips12=(int)mypow_2_12;ipsall +=ips12;}
1121  } else {
1122  //csa08
1123  if (abs(ndof) >=20 && abs(ndof) <40) {ips0 = (int)mypow_2_0; ipsall += ips0;}
1124  if (chisq >0 && chisq<15) {ips1 = (int)mypow_2_1; ipsall +=ips1;} //18Jan2008
1125  if (fabs(trkth-pival/2) <21.5) {ips2 = (int)mypow_2_2; ipsall +=ips2;} //No nead for pp evt
1126  if (fabs(trkph+pival/2) <21.5) {ips3 = (int)mypow_2_3; ipsall +=ips3;} //No nead for pp evt
1127 
1128  if (therr <0.02) {ips4 = (int)mypow_2_4; ipsall +=ips4;}
1129  if (pherr <0.0002) {ips5 = (int)mypow_2_5; ipsall +=ips5;}
1130  if (fabs(hoang) >0.30) {ips6 = (int)mypow_2_6; ipsall +=ips6;}
1131  if (fabs(trkmm) >4.0) {ips7 = (int)mypow_2_7; ipsall +=ips7;}
1132  if (nmuon >=1 && nmuon <=2) {ips8 = (int)mypow_2_8; ipsall +=ips8;}
1133 
1134  if (iring2==2) {
1135  if (fabs(hodx)<100 && fabs(hodx)>2 && fabs(hocorsig[8]) <40 && fabs(hocorsig[8]) >2 )
1136  {ips10=(int)mypow_2_10;ipsall +=ips10;}
1137 
1138  if (fabs(hody)<100 && fabs(hody)>2 && fabs(hocorsig[9]) <40 && fabs(hocorsig[9]) >2 )
1139  {ips11=(int)mypow_2_11;ipsall +=ips11;}
1140 
1141  } else {
1142  if (fabs(hodx)<100 && fabs(hodx)>2 )
1143  {ips10=(int)mypow_2_10;ipsall +=ips10;}
1144 
1145  if (fabs(hody)<100 && fabs(hody)>2)
1146  {ips11=(int)mypow_2_11;ipsall +=ips11;}
1147  }
1148  // if (m_cosmic || (caloen[0] >0.5 && caloen[0]<5.0)) {ips12=(int)pow_2_12;ipsall +=ips12;}
1149  if (ndof >0 && caloen[0]<5.0) {ips12=(int)mypow_2_12;ipsall +=ips12;}
1150  /* */
1151  }
1152 
1153  if (m_digiInput) {
1154  if (htime >2.5 && htime <6.5) {ips9=(int)mypow_2_9;ipsall +=ips9;}
1155  } else {
1156  if (htime >-40 && htime <60) {ips9=(int)mypow_2_9;ipsall +=ips9;}
1157  }
1158 
1159  if (ipsall-ips0==mypow_2_ncut-mypow_2_0-1) sigvsevt[iring2][0]->Fill(abs(ndof), hosig[4]);
1160  if (ipsall-ips1==mypow_2_ncut-mypow_2_1-1) sigvsevt[iring2][1]->Fill(chisq, hosig[4]);
1161  if (ipsall-ips2==mypow_2_ncut-mypow_2_2-1) sigvsevt[iring2][2]->Fill(trkth, hosig[4]);
1162  if (ipsall-ips3==mypow_2_ncut-mypow_2_3-1) sigvsevt[iring2][3]->Fill(trkph, hosig[4]);
1163  if (ipsall-ips4==mypow_2_ncut-mypow_2_4-1) sigvsevt[iring2][4]->Fill(therr, hosig[4]);
1164  if (ipsall-ips5==mypow_2_ncut-mypow_2_5-1) sigvsevt[iring2][5]->Fill(pherr, hosig[4]);
1165  if (ipsall-ips6==mypow_2_ncut-mypow_2_6-1) sigvsevt[iring2][6]->Fill(hoang, hosig[4]);
1166  if (ipsall-ips7==mypow_2_ncut-mypow_2_7-1) sigvsevt[iring2][7]->Fill(fabs(trkmm), hosig[4]);
1167  if (ipsall-ips8==mypow_2_ncut-mypow_2_8-1) sigvsevt[iring2][8]->Fill(nmuon, hosig[4]);
1168  if (ipsall-ips9==mypow_2_ncut-mypow_2_9-1) sigvsevt[iring2][9]->Fill(htime, hosig[4]);
1169  if (ipsall-ips10==mypow_2_ncut-mypow_2_10-1) sigvsevt[iring2][10]->Fill(hodx, hosig[4]);
1170  if (ipsall-ips11==mypow_2_ncut-mypow_2_11-1) sigvsevt[iring2][11]->Fill(hody, hosig[4]);
1171  if (!m_cosmic) {
1172  if (ipsall-ips12==mypow_2_ncut-mypow_2_12-1) sigvsevt[iring2][12]->Fill(caloen[0], hosig[4]);
1173  }
1174 
1175  sigvsevt[iring2+5][0]->Fill(abs(ndof), hosig[4]);
1176  if (ips0 >0) {
1177  sigvsevt[iring2+5][1]->Fill(chisq, hosig[4]);
1178  if (ips1 >0) {
1179  sigvsevt[iring2+5][2]->Fill(trkth, hosig[4]);
1180  if (ips2 >0) {
1181  sigvsevt[iring2+5][3]->Fill(trkph, hosig[4]);
1182  if (ips3 >0) {
1183  sigvsevt[iring2+5][4]->Fill(therr, hosig[4]);
1184  if (ips4 >0) {
1185  sigvsevt[iring2+5][5]->Fill(pherr, hosig[4]);
1186  if (ips5 >0) {
1187  sigvsevt[iring2+5][6]->Fill(hoang, hosig[4]);
1188  if (ips6 >0) {
1189  sigvsevt[iring2+5][7]->Fill(fabs(trkmm), hosig[4]);
1190  if (ips7 >0) {
1191  sigvsevt[iring2+5][8]->Fill(nmuon, hosig[4]);
1192  if (ips8 >0) {
1193  sigvsevt[iring2+5][9]->Fill(htime, hosig[4]);
1194  if (ips9 >0) {
1195  sigvsevt[iring2+5][10]->Fill(hodx, hosig[4]);
1196  if (ips10>0) {
1197  sigvsevt[iring2+5][11]->Fill(hody, hosig[4]);
1198  if (ips11>0) {
1199  if (!m_cosmic) sigvsevt[iring2+5][12]->Fill(caloen[0], hosig[4]);
1200  }
1201  }
1202  }
1203  }
1204  }
1205  }
1206  }
1207  }
1208  }
1209  }
1210  }
1211  }
1212 
1213  sigvsevt[iring2+10][0]->Fill(abs(ndof), hosig[4]);
1214  sigvsevt[iring2+10][1]->Fill(chisq, hosig[4]);
1215  sigvsevt[iring2+10][2]->Fill(trkth, hosig[4]);
1216  sigvsevt[iring2+10][3]->Fill(trkph, hosig[4]);
1217  sigvsevt[iring2+10][4]->Fill(therr, hosig[4]);
1218  sigvsevt[iring2+10][5]->Fill(pherr, hosig[4]);
1219  sigvsevt[iring2+10][6]->Fill(hoang, hosig[4]);
1220  sigvsevt[iring2+10][7]->Fill(fabs(trkmm), hosig[4]);
1221  sigvsevt[iring2+10][8]->Fill(nmuon, hosig[4]);
1222  sigvsevt[iring2+10][9]->Fill(htime, hosig[4]);
1223  sigvsevt[iring2+10][10]->Fill(hodx, hosig[4]);
1224  sigvsevt[iring2+10][11]->Fill(hody, hosig[4]);
1225  if (!m_cosmic) sigvsevt[iring2+10][12]->Fill(caloen[0], hosig[4]);
1226 
1227  int iselect = (ipsall == mypow_2_ncut - 1) ? 1 : 0;
1228 
1229  if (hocro !=-100.0 && hocro <-50.0) hocro +=100.;
1230 
1231  muonnm->Fill(nmuon);
1232  muonmm->Fill(trkmm);
1233  muonth->Fill(trkth*180/pival);
1234  muonph->Fill(trkph*180/pival);
1235  muonch->Fill(chisq);
1236 
1237  if (iselect==1) {
1238  ipass++;
1239  sel_muonnm->Fill(nmuon);
1240  sel_muonmm->Fill(trkmm);
1241  sel_muonth->Fill(trkth*180/pival);
1242  sel_muonph->Fill(trkph*180/pival);
1243  sel_muonch->Fill(chisq);
1244  }
1245 
1246  if (iselect3) T1->Fill();
1247 
1248  int tmpphi = (iphi + 1)%3; //pixel mapping
1249  int npixel = 0;
1250  int itag = -1;
1251  int iflip = 0;
1252  int fact = 2;
1253 
1254  if (iring ==0) {
1255  tmpphi = (iphi+1)%2;
1256  if (tmpsect==2 || tmpsect==3 || tmpsect==6 || tmpsect==7 || tmpsect==10 || tmpsect==11) {
1257  npixel = mapx0p[tmpeta][tmpphi];
1258  itag = 2;
1259  } else {
1260  npixel = mapx0m[tmpeta][tmpphi];
1261  itag = 3;
1262  }
1263  } else {
1264  fact = 3;
1265  if (tmpsect%2==1) iflip =1;
1266  if (abs(iring)==1) {
1267  npixel = mapx1[tmpeta][(iflip==0) ? tmpphi : abs(tmpphi-2)];
1268  itag = 1;
1269  } else {
1270  npixel = mapx2[tmpeta][(iflip==0) ? tmpphi : abs(tmpphi-2)];
1271  itag = 0;
1272  }
1273  }
1274 
1275  int tmpeta1 = (ieta>0) ? ieta -1 : -ieta +14;
1276 
1277  //Histogram filling for noise study: phi shift according to DTChamberAnalysis
1278  int tmpphi1 = iphi -1 ; //(iphi+6 <=nphimx) ? iphi+5 : iphi+5-nphimx;
1279 
1280  int iselect2=0;
1281  if (hosig[4]!=-100) {
1282  if (m_cosmic) {
1283  if (caloen[2]<=0.0) iselect2=1;
1284  } else {
1285  if (caloen[2]<=3.0) iselect2=1;
1286  }
1287  }
1288 
1289  // cout <<"cosmic "<<hosig[4]<<" "<<caloen[3]<<" "<<int(iselect2)<<" "<<int(m_cosmic)<<endl;
1290 
1291 
1292  if (iselect2==1) {
1293  int tmpphi2 = iphi - 1;
1294  if (!m_digiInput) { tmpphi2 = (iphi+6 <=nphimx) ? iphi+5 : iphi+5-nphimx;}
1295 
1296  int tmpsect2 = int((tmpphi2 + 2)/6.) + 1;
1297  if (tmpsect2 >12) tmpsect2 = 1;
1298 
1299  int tmprout2 = int((tmpphi2 + 2)/3.) + 1;
1300  if (iring==0) {
1301  tmprout2 = int((tmpphi2 + 2)/2.) + 1;
1302  if (tmprout2 >routmx) tmprout2 = 1;
1303  } else {
1304  if (tmprout2 >rout12mx) tmprout2 = 1;
1305  }
1306 
1307  if (cro_ssg[tmpeta1][tmpphi2].size()<4000) {
1308  if (hocro>alow && hocro<ahigh) {
1309  if (!m_histfit) cro_ssg[tmpeta1][tmpphi2].push_back(hocro);
1310  crossg[tmpeta1][tmpphi2]->Fill(hocro);
1311  }
1312  }
1313 
1314  if (tmpphi2 >=0 && tmpphi2 <nphimx) {
1315  crossg[tmpeta1][nphimx]->Fill(hocro);
1316  }
1317  if (m_combined) {
1318  com_crossg[iring2][tmprout2-1]->Fill(hocro);
1319  com_crossg[iring2][tmproutmx]->Fill(hocro);
1320  }
1321  }
1322 
1323  if (iselect==1) {
1324  for (int ij=0; ij<neffip; ij++) {
1325  if (ij==0) {
1326  sig_effi[ij]->Fill(ieta, iphi, 1.);
1327  } else {
1328  if (hosig[4] >ij*m_sigma) {
1329  sig_effi[ij]->Fill(ieta, iphi, 1.);
1330  }
1331  }
1332  }
1333 
1334  tmpphi1 = iphi - 1;
1335 
1336  if (sig_reg[tmpeta1][tmpphi1].size()<4000 ) {
1337  if (hosig[4]>-50&& hosig[4] <15) {
1338  sigrsg[tmpeta1][tmpphi1]->Fill(hosig[4]);
1339  if (!m_histfit && hosig[4]<=ahigh/2.) sig_reg[tmpeta1][tmpphi1].push_back(hosig[4]);
1340  invang[tmpeta1][tmpphi1] += 1./fabs(hoang);
1341  }
1342  }
1343 
1344  if (tmpphi1 >=0 && tmpphi1 <nphimx) { //GREN
1345  sigrsg[tmpeta1][nphimx]->Fill(hosig[4]);
1346  invang[tmpeta1][nphimx] += 1./fabs(hoang);
1347  }
1348 
1349  if (m_combined) { //#ifdef COMBINED
1350  com_sigrsg[iring2][tmprout-1]->Fill(hosig[4]);
1351  com_invang[iring2][tmprout-1] += 1./fabs(hoang);
1352 
1353  com_sigrsg[iring2][tmproutmx]->Fill(hosig[4]);
1354  com_invang[iring2][tmproutmx] += 1./fabs(hoang);
1355  } //m_combined #endif
1356 
1357  if (m_checkmap || m_correl) { //#ifdef CHECKMAP
1358  tmpeta = etamap[itag][npixel];
1359  tmpphi = phimap[itag][npixel];
1360  if (tmpeta>=0 && tmpphi >=0) {
1361  if (iflip !=0) tmpphi = abs(tmpphi-2);
1362  if (int((hocorsig[fact*tmpeta+tmpphi]-hosig[4])*10000)/10000.!=0) {
1363  iaxxx++;
1364  cout<<"iring2xxx "<<irun<<" "<<ievt<<" "<<isect<<" "<<iring<<" "<<tmpsect<<" "<<ieta<<" "<<iphi<<" "<<npixel<<" "<<tmpeta<<" "<<tmpphi<<" "<<tmpeta1<<" "<<tmpphi1<<" itag "<<itag<<" "<<iflip<<" "<<fact<<" "<<hocorsig[fact*tmpeta+tmpphi]<<" "<<fact*tmpeta+tmpphi<<" "<<hosig[4]<<" "<<hodx<<" "<<hody<<endl;
1365 
1366  for (int i=0; i<18; i++) {cout <<" "<<i<<" "<<hocorsig[i];}
1367  cout<<" ix "<<iaxxx<<" "<<ibxxx<<endl;
1368  } else { ibxxx++; }
1369 
1370  corrsgc[tmpeta1][tmpphi1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1371  if (m_combined) { //#ifdef COMBINED
1372  com_corrsgc[iring2][tmpsect-1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1373  } //m_combined #endif
1374  }
1375  } //m_checkmap #endif
1376 
1377  if (m_correl) { //#ifdef CORREL
1378  float allcorsig = 0.0;
1379 
1380  tmpeta = etamap[itag][npixleft[npixel]];
1381  tmpphi = phimap[itag][npixleft[npixel]];
1382 
1383  if (tmpeta>=0 && tmpphi >=0) {
1384  if (iflip !=0) tmpphi = abs(tmpphi-2);
1385  corrsgl[tmpeta1][tmpphi1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1386  allcorsig +=hocorsig[fact*tmpeta+tmpphi];
1387  if (m_combined) { //#ifdef COMBINED
1388  com_corrsgl[iring2][tmpsect-1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1389  } //m_combined #endif
1390  }
1391 
1392  tmpeta = etamap[itag][npixrigh[npixel]];
1393  tmpphi = phimap[itag][npixrigh[npixel]];
1394  if (tmpeta>=0 && tmpphi >=0) {
1395  if (iflip !=0) tmpphi = abs(tmpphi-2);
1396  corrsgr[tmpeta1][tmpphi1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1397  allcorsig +=hocorsig[fact*tmpeta+tmpphi];
1398  if (m_combined) { // #ifdef COMBINED
1399  com_corrsgr[iring2][tmpsect-1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1400  } //m_combined #endif
1401  }
1402 
1403  tmpeta = etamap[itag][npixlebt[npixel]];
1404  tmpphi = phimap[itag][npixlebt[npixel]];
1405  if (tmpeta>=0 && tmpphi >=0) {
1406  if (iflip !=0) tmpphi = abs(tmpphi-2);
1407  corrsglb[tmpeta1][tmpphi1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1408  allcorsig +=hocorsig[fact*tmpeta+tmpphi];
1409  if (m_combined){ //#ifdef COMBINED
1410  com_corrsglb[iring2][tmpsect-1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1411  } //m_combined #endif
1412  }
1413 
1414  tmpeta = etamap[itag][npixribt[npixel]];
1415  tmpphi = phimap[itag][npixribt[npixel]];
1416  if (tmpeta>=0 && tmpphi >=0) {
1417  if (iflip !=0) tmpphi = abs(tmpphi-2);
1418  corrsgrb[tmpeta1][tmpphi1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1419  allcorsig +=hocorsig[fact*tmpeta+tmpphi];
1420  if (m_combined) { // #ifdef COMBINED
1421  com_corrsgrb[iring2][tmpsect-1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1422  } //m_combined #endif
1423  }
1424 
1425  tmpeta = etamap[itag][npixleup[npixel]];
1426  tmpphi = phimap[itag][npixleup[npixel]];
1427  if (tmpeta>=0 && tmpphi >=0) {
1428  if (iflip !=0) tmpphi = abs(tmpphi-2);
1429  corrsglu[tmpeta1][tmpphi1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1430  allcorsig +=hocorsig[fact*tmpeta+tmpphi];
1431  if (m_combined) {// #ifdef COMBINED
1432  com_corrsglu[iring2][tmpsect-1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1433  } //m_combined #endif
1434  }
1435 
1436  tmpeta = etamap[itag][npixriup[npixel]];
1437  tmpphi = phimap[itag][npixriup[npixel]];
1438  if (tmpeta>=0 && tmpphi >=0) {
1439  if (iflip !=0) tmpphi = abs(tmpphi-2);
1440  corrsgru[tmpeta1][tmpphi1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1441  allcorsig +=hocorsig[fact*tmpeta+tmpphi];
1442  if (m_combined) { // #ifdef COMBINED
1443  com_corrsgru[iring2][tmpsect-1]->Fill(hocorsig[fact*tmpeta+tmpphi]);
1444  } //m_combined #endif
1445  }
1446  corrsgall[tmpeta1][tmpphi1]->Fill(allcorsig);
1447  if (m_combined) { // #ifdef COMBINED
1448  com_corrsgall[iring2][tmpsect-1]->Fill(allcorsig);
1449  } //m_combined #endif
1450 
1451 
1452  } //m_correl #endif
1453  for (int k=0; k<9; k++) {
1454  switch (iring)
1455  {
1456  case 2 : ho_sig2p[k]->Fill(hosig[k]); break;
1457  case 1 : ho_sig1p[k]->Fill(hosig[k]); break;
1458  case 0 : ho_sig00[k]->Fill(hosig[k]); break;
1459  case -1 : ho_sig1m[k]->Fill(hosig[k]); break;
1460  case -2 : ho_sig2m[k]->Fill(hosig[k]); break;
1461  }
1462  if (m_hbinfo) { // #ifdef HBINFO
1463  hbhe_sig[k]->Fill(hbhesig[k]);
1464  // cout <<"hbhe "<<k<<" "<<hbhesig[k]<<endl;
1465  } //m_hbinfo #endif
1466  }
1467  } //if (iselect==1)
1468  } //for (HOCalibVariableCollection::const_iterator hoC=(*HOCalib).begin(); hoC!=(*HOCalib).end(); hoC++){
1469 
1470  } //if (isCosMu)
1471 
1472 #ifdef THIS_IS_AN_EVENT_EXAMPLE
1473  Handle<ExampleData> pIn;
1474  iEvent.getByLabel("example",pIn);
1475 #endif
1476 
1477 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
1478  ESHandle<SetupData> pSetup;
1479  iSetup.get<SetupRecord>().get(pSetup);
1480 #endif
1481 }
RunNumber_t run() const
Definition: EventID.h:42
TH1F * corrsgrb[netamx][nphimx]
TH2F * sig_effi[neffip]
EventNumber_t event() const
Definition: EventID.h:44
int i
Definition: DBlmapReader.cc:9
TH1F * com_crossg[ringmx][routmx+1]
TH1F * corrsgr[netamx][nphimx]
static const int npixrigh[21]
static const int mapx2[6][3]
static const int npixleft[21]
TH1F * corrsglu[netamx][nphimx]
static const int rout12mx
TH1F * crossg[netamx][nphimx+1]
static const int phimap[4][21]
#define abs(x)
Definition: mlp_lapack.h:159
TH1F * com_corrsgall[ringmx][sectmx]
float invang[netamx][nphimx+1]
TH1F * corrsgc[netamx][nphimx]
bool getByType(Handle< PROD > &result) const
Definition: Event.h:398
static const int mapx1[6][3]
TH1F * corrsglb[netamx][nphimx]
TH1F * sigrsg[netamx][nphimx+1]
TH1F * com_corrsglu[ringmx][sectmx]
static const int npixriup[21]
static const int neffip
TH1F * com_sigrsg[ringmx][routmx+1]
float com_invang[ringmx][routmx+1]
vector< float > sig_reg[netamx][nphimx+1]
static const int npixribt[21]
TH1F * corrsgl[netamx][nphimx]
TH1F * com_corrsgc[ringmx][sectmx]
TH1F * com_corrsgrb[ringmx][sectmx]
TH1F * com_corrsgr[ringmx][sectmx]
static const int npixleup[21]
int k[5][pyjets_maxn]
TH1F * corrsgru[netamx][nphimx]
static const int routmx
TH1F * com_corrsgl[ringmx][sectmx]
static const int mapx0m[9][2]
TH1F * com_corrsglb[ringmx][sectmx]
const T & get() const
Definition: EventSetup.h:55
vector< float > cro_ssg[netamx][nphimx+1]
edm::EventID id() const
Definition: EventBase.h:56
const int nphimx
static const int mapx0p[9][2]
TH1F * com_corrsgru[ringmx][sectmx]
tuple cout
Definition: gather_cfg.py:121
static const int etamap[4][21]
static const int npixlebt[21]
static const int mypow_2_ncut
tuple size
Write out results.
TProfile * sigvsevt[15][ncut]
TH1F * corrsgall[netamx][nphimx]
void HOCalibAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1486 of file HOCalibAnalyzer.cc.

1487 {
1488 }
void HOCalibAnalyzer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1492 of file HOCalibAnalyzer.cc.

References abs, fitWZ::arglist, alignmentValidation::c1, gather_cfg::cout, diffTreeTool::diff, error, fcnbg(), fcnsg(), gausX(), fitWZ::gMinuit, i, ietafit, iphifit, j, gen::k, langaufun(), max(), timingPdfMaker::mean, mergeVDriftHistosByStation::name, nbgpr, netamx, nphimx, nsgpr, funct::pow(), plotscripts::rms(), set_mean(), set_sigma(), sig_reg, mathSSE::sqrt(), launcher::step, groupFilesInBlocks::temp, interactiveExample::theFile, and totalfunc().

1492  {
1493 
1494  theFile->cd();
1495 
1496  for (int i=0; i<nphimx; i++) {
1497  for (int j=0; j<netamx; j++) {
1498 
1499  nevsigrsg->Fill(netamx*i+j, sigrsg[j][i]->GetEntries());
1500  mnsigrsg->Fill(netamx*i+j, sigrsg[j][i]->GetMean());
1501  rmssigrsg->Fill(netamx*i+j, sigrsg[j][i]->GetRMS());
1502 
1503  nevcrossg->Fill(netamx*i+j, crossg[j][i]->GetEntries());
1504  mncrossg->Fill(netamx*i+j, crossg[j][i]->GetMean());
1505  rmscrossg->Fill(netamx*i+j, crossg[j][i]->GetRMS());
1506 
1507  if (m_correl) { //#ifdef CORREL
1508 
1509  nevcorrsglb->Fill(netamx*i+j, corrsglb[j][i]->GetEntries());
1510  mncorrsglb->Fill(netamx*i+j, corrsglb[j][i]->GetMean());
1511  rmscorrsglb->Fill(netamx*i+j, corrsglb[j][i]->GetRMS());
1512 
1513  nevcorrsgrb->Fill(netamx*i+j, corrsgrb[j][i]->GetEntries());
1514  mncorrsgrb->Fill(netamx*i+j, corrsgrb[j][i]->GetMean());
1515  rmscorrsgrb->Fill(netamx*i+j, corrsgrb[j][i]->GetRMS());
1516 
1517  nevcorrsglu->Fill(netamx*i+j, corrsglu[j][i]->GetEntries());
1518  mncorrsglu->Fill(netamx*i+j, corrsglu[j][i]->GetMean());
1519  rmscorrsglu->Fill(netamx*i+j, corrsglu[j][i]->GetRMS());
1520 
1521  nevcorrsgru->Fill(netamx*i+j, corrsgru[j][i]->GetEntries());
1522  mncorrsgru->Fill(netamx*i+j, corrsgru[j][i]->GetMean());
1523  rmscorrsgru->Fill(netamx*i+j, corrsgru[j][i]->GetRMS());
1524 
1525  nevcorrsgall->Fill(netamx*i+j, corrsgall[j][i]->GetEntries());
1526  mncorrsgall->Fill(netamx*i+j, corrsgall[j][i]->GetMean());
1527  rmscorrsgall->Fill(netamx*i+j, corrsgall[j][i]->GetRMS());
1528 
1529  nevcorrsgl->Fill(netamx*i+j, corrsgl[j][i]->GetEntries());
1530  mncorrsgl->Fill(netamx*i+j, corrsgl[j][i]->GetMean());
1531  rmscorrsgl->Fill(netamx*i+j, corrsgl[j][i]->GetRMS());
1532 
1533  nevcorrsgr->Fill(netamx*i+j, corrsgr[j][i]->GetEntries());
1534  mncorrsgr->Fill(netamx*i+j, corrsgr[j][i]->GetMean());
1535  rmscorrsgr->Fill(netamx*i+j, corrsgr[j][i]->GetRMS());
1536  } //m_correl #endif
1537  if (m_checkmap) { //#ifdef CHECKMAP
1538  nevcorrsgc->Fill(netamx*i+j, corrsgc[j][i]->GetEntries());
1539  mncorrsgc->Fill(netamx*i+j, corrsgc[j][i]->GetMean());
1540  rmscorrsgc->Fill(netamx*i+j, corrsgc[j][i]->GetRMS());
1541  } //m_checkmap #endif
1542  }
1543  }
1544 
1545  if (m_combined) { // #ifdef COMBINED
1546  for (int j=0; j<ringmx; j++) {
1547  for (int i=0; i<routmx; i++) {
1548  if (j!=2 && i>=rout12mx) continue;
1549  nevsigrsg->Fill(netamx*nphimx+ringmx*i+j, com_sigrsg[j][i]->GetEntries());
1550  mnsigrsg->Fill(netamx*nphimx+ringmx*i+j, com_sigrsg[j][i]->GetMean());
1551  rmssigrsg->Fill(netamx*nphimx+ringmx*i+j, com_sigrsg[j][i]->GetRMS());
1552 
1553  nevcrossg->Fill(netamx*nphimx+ringmx*i+j, com_crossg[j][i]->GetEntries());
1554  mncrossg->Fill(netamx*nphimx+ringmx*i+j, com_crossg[j][i]->GetMean());
1555  rmscrossg->Fill(netamx*nphimx+ringmx*i+j, com_crossg[j][i]->GetRMS());
1556  }
1557  }
1558 
1559  for (int i=0; i<sectmx; i++) {
1560  for (int j=0; j<ringmx; j++) {
1561  if (m_correl) { // #ifdef CORREL
1562  nevcorrsglb->Fill(netamx*nphimx+ringmx*i+j, com_corrsglb[j][i]->GetEntries());
1563  mncorrsglb->Fill(netamx*nphimx+ringmx*i+j, com_corrsglb[j][i]->GetMean());
1564  rmscorrsglb->Fill(netamx*nphimx+ringmx*i+j, com_corrsglb[j][i]->GetRMS());
1565 
1566  nevcorrsgrb->Fill(netamx*nphimx+ringmx*i+j, com_corrsgrb[j][i]->GetEntries());
1567  mncorrsgrb->Fill(netamx*nphimx+ringmx*i+j, com_corrsgrb[j][i]->GetMean());
1568  rmscorrsgrb->Fill(netamx*nphimx+ringmx*i+j, com_corrsgrb[j][i]->GetRMS());
1569 
1570  nevcorrsglu->Fill(netamx*nphimx+ringmx*i+j, com_corrsglu[j][i]->GetEntries());
1571  mncorrsglu->Fill(netamx*nphimx+ringmx*i+j, com_corrsglu[j][i]->GetMean());
1572  rmscorrsglu->Fill(netamx*nphimx+ringmx*i+j, com_corrsglu[j][i]->GetRMS());
1573 
1574  nevcorrsgru->Fill(netamx*nphimx+ringmx*i+j, com_corrsgru[j][i]->GetEntries());
1575  mncorrsgru->Fill(netamx*nphimx+ringmx*i+j, com_corrsgru[j][i]->GetMean());
1576  rmscorrsgru->Fill(netamx*nphimx+ringmx*i+j, com_corrsgru[j][i]->GetRMS());
1577 
1578  nevcorrsgall->Fill(netamx*nphimx+ringmx*i+j, com_corrsgall[j][i]->GetEntries());
1579  mncorrsgall->Fill(netamx*nphimx+ringmx*i+j, com_corrsgall[j][i]->GetMean());
1580  rmscorrsgall->Fill(netamx*nphimx+ringmx*i+j, com_corrsgall[j][i]->GetRMS());
1581 
1582  nevcorrsgl->Fill(netamx*nphimx+ringmx*i+j, com_corrsgl[j][i]->GetEntries());
1583  mncorrsgl->Fill(netamx*nphimx+ringmx*i+j, com_corrsgl[j][i]->GetMean());
1584  rmscorrsgl->Fill(netamx*nphimx+ringmx*i+j, com_corrsgl[j][i]->GetRMS());
1585 
1586  nevcorrsgr->Fill(netamx*nphimx+ringmx*i+j, com_corrsgr[j][i]->GetEntries());
1587  mncorrsgr->Fill(netamx*nphimx+ringmx*i+j, com_corrsgr[j][i]->GetMean());
1588  rmscorrsgr->Fill(netamx*nphimx+ringmx*i+j, com_corrsgr[j][i]->GetRMS());
1589  } //m_correl #endif
1590  if (m_checkmap) { // #ifdef CHECKMAP
1591  nevcorrsgc->Fill(netamx*nphimx+ringmx*i+j, com_corrsgc[j][i]->GetEntries());
1592  mncorrsgc->Fill(netamx*nphimx+ringmx*i+j, com_corrsgc[j][i]->GetMean());
1593  rmscorrsgc->Fill(netamx*nphimx+ringmx*i+j, com_corrsgc[j][i]->GetRMS());
1594  } //m_checkmap #endif
1595  }
1596  }
1597  } //m_combined #endif
1598 
1599 
1600  for (int i=1; i<neffip; i++) {
1601  sig_effi[i]->Divide(sig_effi[0]);
1602  }
1603  for (int ij=0; ij<netamx; ij++) {
1604  for (int jk = 0; jk <nphimx; jk++) {
1605  int ieta = (ij<15) ? ij+1 : 14-ij;
1606  int iphi = jk+1;
1607  double signal = sigrsg[ij][jk]->GetMean();
1608  mean_energy->Fill(ieta, iphi, signal);
1609  }
1610  }
1611 
1612  int irunold = irun;
1613 
1614 
1615  gStyle->SetOptLogy(0);
1616  gStyle->SetTitleFillColor(10);
1617  gStyle->SetStatColor(10);
1618 
1619  gStyle->SetCanvasColor(10);
1620  gStyle->SetOptStat(0); //1110);
1621  gStyle->SetOptTitle(1);
1622 
1623  gStyle->SetTitleColor(10);
1624  gStyle->SetTitleFontSize(0.09);
1625  gStyle->SetTitleOffset(-0.05);
1626  gStyle->SetTitleBorderSize(1);
1627 
1628  gStyle->SetPadColor(10);
1629  gStyle->SetPadBorderMode(0);
1630  gStyle->SetStatColor(10);
1631  gStyle->SetPadBorderMode(0);
1632  gStyle->SetStatBorderSize(1);
1633  gStyle->SetStatFontSize(.07);
1634 
1635  gStyle->SetStatStyle(1001);
1636  gStyle->SetOptFit(101);
1637  gStyle->SetCanvasColor(10);
1638  gStyle->SetCanvasBorderMode(0);
1639 
1640  gStyle->SetStatX(.99);
1641  gStyle->SetStatY(.99);
1642  gStyle->SetStatW(.45);
1643  gStyle->SetStatH(.16);
1644  gStyle->SetLabelSize(0.075,"XY");
1645  gStyle->SetLabelOffset(0.21,"XYZ");
1646  gStyle->SetTitleSize(0.065,"XY");
1647  gStyle->SetTitleOffset(0.06,"XYZ");
1648  gStyle->SetPadTopMargin(.09);
1649  gStyle->SetPadBottomMargin(0.11);
1650  gStyle->SetPadLeftMargin(0.12);
1651  gStyle->SetPadRightMargin(0.15);
1652  gStyle->SetPadGridX(3);
1653  gStyle->SetPadGridY(3);
1654  gStyle->SetGridStyle(2);
1655  gStyle->SetNdivisions(303,"XY");
1656 
1657  gStyle->SetMarkerSize(0.60);
1658  gStyle->SetMarkerColor(2);
1659  gStyle->SetMarkerStyle(20);
1660  gStyle->SetTitleFontSize(0.07);
1661 
1662  char out_file[200];
1663  int xsiz = 700;
1664  int ysiz = 500;
1665 
1666  TCanvas *c2 = new TCanvas("c2", "Statistics and efficiency", xsiz, ysiz);
1667  c2->Divide(2,1); //(3,2);
1668  for (int ij=0; ij<neffip; ij=ij+3) {
1669  sig_effi[ij]->GetXaxis()->SetTitle("#eta");
1670  sig_effi[ij]->GetXaxis()->SetTitleSize(0.075);
1671  sig_effi[ij]->GetXaxis()->SetTitleOffset(0.65); //0.85
1672  sig_effi[ij]->GetXaxis()->CenterTitle();
1673  sig_effi[ij]->GetXaxis()->SetLabelSize(0.055);
1674  sig_effi[ij]->GetXaxis()->SetLabelOffset(0.001);
1675 
1676  sig_effi[ij]->GetYaxis()->SetTitle("#phi");
1677  sig_effi[ij]->GetYaxis()->SetTitleSize(0.075);
1678  sig_effi[ij]->GetYaxis()->SetTitleOffset(0.9);
1679  sig_effi[ij]->GetYaxis()->CenterTitle();
1680  sig_effi[ij]->GetYaxis()->SetLabelSize(0.055);
1681  sig_effi[ij]->GetYaxis()->SetLabelOffset(0.01);
1682 
1683  c2->cd(int(ij/3.)+1); sig_effi[ij]->Draw("colz");
1684  }
1685  sprintf(out_file, "comb_hosig_evt_%i.jpg",irunold);
1686  c2->SaveAs(out_file);
1687 
1688  gStyle->SetTitleFontSize(0.045);
1689  gStyle->SetPadRightMargin(0.1);
1690  gStyle->SetPadLeftMargin(0.1);
1691  gStyle->SetPadBottomMargin(0.12);
1692 
1693  TCanvas *c1 = new TCanvas("c1", "Mean signal in each tower", xsiz, ysiz);
1694 
1695  mean_energy->GetXaxis()->SetTitle("#eta");
1696  mean_energy->GetXaxis()->SetTitleSize(0.075);
1697  mean_energy->GetXaxis()->SetTitleOffset(0.65); //0.6
1698  mean_energy->GetXaxis()->CenterTitle();
1699  mean_energy->GetXaxis()->SetLabelSize(0.045);
1700  mean_energy->GetXaxis()->SetLabelOffset(0.001);
1701 
1702  mean_energy->GetYaxis()->SetTitle("#phi");
1703  mean_energy->GetYaxis()->SetTitleSize(0.075);
1704  mean_energy->GetYaxis()->SetTitleOffset(0.5);
1705  mean_energy->GetYaxis()->CenterTitle();
1706  mean_energy->GetYaxis()->SetLabelSize(0.045);
1707  mean_energy->GetYaxis()->SetLabelOffset(0.01);
1708 
1709  mean_energy->Draw("colz");
1710  sprintf(out_file, "homean_energy_%i.jpg",irunold);
1711  c1->SaveAs(out_file);
1712 
1713  delete c1;
1714  delete c2;
1715 
1716  gStyle->SetPadBottomMargin(0.14);
1717  gStyle->SetPadLeftMargin(0.17);
1718  gStyle->SetPadRightMargin(0.03);
1719 
1720  gStyle->SetOptStat(1110);
1721 
1722  const int nsample =8;
1723  TF1* gx0[nsample]={0};
1724  TF1* ped0fun[nsample]={0};
1725  TF1* signal[nsample]={0};
1726  TF1* pedfun[nsample]={0};
1727  TF1* sigfun[nsample]={0};
1728  TF1* signalx[nsample]={0};
1729 
1730  TH1F* signall[nsample]={0};
1731  TH1F* pedstll[nsample]={0};
1732 
1733  if (m_constant) {
1734 
1735  gStyle->SetOptFit(101);
1736  gStyle->SetCanvasBorderMode(0);
1737  gStyle->SetPadBorderMode(0);
1738  gStyle->SetStatBorderSize(1);
1739  gStyle->SetStatStyle(1001);
1740  gStyle->SetTitleColor(10);
1741  gStyle->SetTitleFontSize(0.09);
1742  gStyle->SetTitleOffset(-0.05);
1743  gStyle->SetTitleBorderSize(1);
1744 
1745  gStyle->SetCanvasColor(10);
1746  gStyle->SetPadColor(10);
1747  gStyle->SetStatColor(10);
1748  gStyle->SetStatFontSize(.07);
1749  gStyle->SetStatX(0.99);
1750  gStyle->SetStatY(0.99);
1751  gStyle->SetStatW(0.30);
1752  gStyle->SetStatH(0.10);
1753  gStyle->SetTitleSize(0.065,"XYZ");
1754  gStyle->SetLabelSize(0.075,"XYZ");
1755  gStyle->SetLabelOffset(0.012,"XYZ");
1756  gStyle->SetPadGridX(1);
1757  gStyle->SetPadGridY(1);
1758  gStyle->SetGridStyle(3);
1759  gStyle->SetNdivisions(101,"XY");
1760  gStyle->SetOptLogy(0);
1761  int iiter = 0;
1762 
1763 
1764  ofstream file_out(theoutputtxtFile.c_str());
1765  // TPostScript* ps=0;
1766  int ips=111;
1767  TPostScript ps(theoutputpsFile.c_str(),ips);
1768  ps.Range(20,28);
1769 
1770  xsiz = 900; //900;
1771  ysiz = 1200; //600;
1772  TCanvas *c0 = new TCanvas("c0", " Pedestal vs signal", xsiz, ysiz);
1773 
1774  float mean_eta[nphimx];
1775  float mean_phi[netamx];
1776  float rms_eta[nphimx];
1777  float rms_phi[netamx];
1778 
1779  for (int ij=0; ij<nphimx; ij++) {mean_phi[ij] = rms_phi[ij] =0;}
1780  for (int ij=0; ij<netamx; ij++) {mean_eta[ij] = rms_eta[ij] =0;}
1781 
1782  int mxeta = 0;
1783  int mxphi = 0;
1784  int mneta = 0;
1785  int mnphi = 0;
1786 
1787  //iijj = 0 : Merging all ring
1788  // = 1 : Individual HPD
1789  //iijj = 2 : merging all phi
1790  // = 3 : Individual tower
1791 
1792  for (int iijj = 0; iijj <4; iijj++) {
1793  // if ((!mx_combined) && iijj==1) continue; //Use this only for combined data
1794  if (iijj==0){
1795  mxeta = ringmx; mxphi = 1; mneta = 0; mnphi = 0;
1796  } else if (iijj==1) {
1797  mxeta = ringmx; mxphi = routmx;
1798  mneta = 0; mnphi = 0;
1799  } else if (iijj==2) {
1800  mxeta = netamx; mxphi = 1; mneta = 0; mnphi = 0;
1801  } else if (iijj==3) {
1802  mxeta = netamx; mxphi = nphimx;
1803  mneta = 0; mnphi = 0;
1804  }
1805 
1806  for (int jk=mneta; jk<mxeta; jk++) {
1807  for (int ij=mnphi; ij<mxphi; ij++) {
1808  if (iijj==1) continue;
1809  if ((iijj==0 || iijj==1) && jk !=2 && ij >=rout12mx) continue;
1810  int izone = iiter%nsample;
1811 
1812  if (iijj==0) {
1813  int iread = (jk==2) ? routmx : rout12mx;
1814  signall[izone] = (TH1F*)com_sigrsg[jk][iread]->Clone("hnew");
1815  pedstll[izone] = (TH1F*)com_crossg[jk][iread]->Clone("hnew");
1816  } else if (iijj==1) {
1817  signall[izone] = (TH1F*)com_sigrsg[jk][ij]->Clone("hnew");
1818  pedstll[izone] = (TH1F*)com_crossg[jk][ij]->Clone("hnew");
1819  } else if (iijj==2) {
1820  signall[izone] = (TH1F*)sigrsg[jk][nphimx]->Clone("hnew");
1821  pedstll[izone] = (TH1F*)crossg[jk][nphimx]->Clone("hnew");
1822  } else if (iijj==3) {
1823  signall[izone] = (TH1F*)sigrsg[jk][ij]->Clone("hnew");
1824  pedstll[izone] = (TH1F*)crossg[jk][ij]->Clone("hnew");
1825  }
1826 
1827  pedstll[izone]->SetLineWidth(2);
1828  signall[izone]->SetLineWidth(2);
1829  pedstll[izone]->SetLineColor(2);
1830  signall[izone]->SetLineColor(4);
1831  pedstll[izone]->SetNdivisions(506,"XY");
1832  signall[izone]->SetNdivisions(506,"XY");
1833 
1834  signall[izone]->GetXaxis()->SetLabelSize(.065);
1835  signall[izone]->GetYaxis()->SetLabelSize(.06);
1836  if (m_digiInput) {
1837  signall[izone]->GetXaxis()->SetTitle("Signal (fC)");
1838  } else {
1839  signall[izone]->GetXaxis()->SetTitle("Signal (GeV)");
1840  }
1841  signall[izone]->GetXaxis()->SetTitleSize(.065);
1842  signall[izone]->GetXaxis()->CenterTitle();
1843 
1844  if (izone==0) { //iiter%8 ==0) {
1845  ps.NewPage();
1846  c0->Divide(4,4); //c0->Divide(2,4); // c0->Divide(1,2);
1847  }
1848  c0->cd(2*izone+1); // (iiter%8)+1); //c0->cd(iiter%8+1);
1849 
1850  /*
1851  if (iijj==0 && izone==0) {
1852  gStyle->SetOptLogy(1);
1853  gStyle->SetOptStat(0);
1854  gStyle->SetOptFit(0);
1855  c0->Divide(3,2);
1856  }
1857 
1858  if (iijj>0) {
1859  gStyle->SetOptLogy(0);
1860  gStyle->SetOptStat(1110);
1861  gStyle->SetOptFit(101);
1862 
1863  if (iiter==0) {
1864  int ips=111;
1865  ps = new TPostScript(theoutputpsFile.c_str(),ips);
1866  ps.Range(20,28);
1867  xsiz = 900; //900;
1868  ysiz = 1200; //600;
1869  c0 = new TCanvas("c0", " Pedestal vs signal", xsiz, ysiz);
1870  }
1871  if (izone==0) {
1872  ps.NewPage();
1873  c0->Divide(4,4);
1874  }
1875  }
1876  if (iijj==0) {c0->cd(izone+1); } else { c0->cd(2*izone+1);}
1877  */
1878 
1879  float mean = pedstll[izone]->GetMean();
1880  float rms = pedstll[izone]->GetRMS();
1881  if (m_digiInput) {
1882  if (rms <0.6) rms = 0.6;
1883  if (rms >1.2) rms = 1.2;
1884  if (mean >1.2) mean = 1.2;
1885  if (mean <-1.2) mean = -1.2;
1886  } else {
1887  if (rms <0.10) rms = 0.10;
1888  if (rms >0.15) rms=0.15;
1889  if (mean >0.20) mean = 0.20;
1890  if (mean <-0.20) mean = -0.20;
1891  }
1892  float xmn = mean-6.*rms;
1893  float xmx = mean+6.*rms;
1894 
1895  binwid = pedstll[izone]->GetBinWidth(1);
1896  if (xmx > pedstll[izone]->GetXaxis()->GetXmax()) xmx = pedstll[izone]->GetXaxis()->GetXmax()-0.5*binwid;
1897  if (xmn < pedstll[izone]->GetXaxis()->GetXmin()) xmn = pedstll[izone]->GetXaxis()->GetXmin()+0.5*binwid;
1898 
1899  float height = pedstll[izone]->GetEntries();
1900 
1901  double par[nbgpr] ={height, mean, 0.75*rms};
1902 
1903  double gaupr[nbgpr];
1904  double parer[nbgpr];
1905 
1906  ietafit = jk;
1907  iphifit = ij;
1908  pedstll[izone]->GetXaxis()->SetLabelSize(.065);
1909  pedstll[izone]->GetYaxis()->SetLabelSize(.06);
1910 
1911  // if (iijj==0) {
1912  // pedstll[izone]->GetXaxis()->SetRangeUser(alow, ahigh);
1913  // } else {
1914  pedstll[izone]->GetXaxis()->SetRangeUser(xmn, xmx);
1915  // }
1916 
1917  if (m_digiInput) {
1918  if (iijj==0) {
1919  pedstll[izone]->GetXaxis()->SetTitle("Pedestal/Signal (fC)");
1920  } else {
1921  pedstll[izone]->GetXaxis()->SetTitle("Pedestal (fC)");
1922  }
1923  } else {
1924  if (iijj==0) {
1925  pedstll[izone]->GetXaxis()->SetTitle("Pedestal/Signal (GeV)");
1926  } else {
1927  pedstll[izone]->GetXaxis()->SetTitle("Pedestal (GeV)");
1928  }
1929  }
1930  pedstll[izone]->GetXaxis()->SetTitleSize(.065);
1931  pedstll[izone]->GetXaxis()->CenterTitle();
1932  // pedstll[izone]->SetLineWidth(2);
1933 
1934  pedstll[izone]->Draw();
1935  if (m_pedsuppr && !m_digiInput) {
1936  gaupr[0] = 0;
1937  gaupr[1] = 0.0; // pedmean[ietafit][iphifit];
1938  if (m_digiInput) {
1939  gaupr[2] = 0.90; //GMA need from database pedwidth[ietafit][iphifit];
1940  } else {
1941  gaupr[2] = 0.15; //GMA need from database
1942  }
1943  parer[0] = parer[1] = parer[2] = 0;
1944  } else {
1945 
1946  if (pedstll[izone]->GetEntries() >5) {
1947 
1948  if ((iijj!=3) || m_histfit) {
1949  char temp[20];
1950  sprintf(temp, "gx0_%i",izone);
1951  gx0[izone] = new TF1(temp, gausX, xmn, xmx, nbgpr);
1952  gx0[izone]->SetParameters(par);
1953  gx0[izone]->SetLineWidth(1);
1954  pedstll[izone]->Fit(gx0[izone], "R+");
1955 
1956  for (int k=0; k<nbgpr; k++) {
1957  parer[k] = gx0[izone]->GetParError(k);
1958  gaupr[k] = gx0[izone]->GetParameter(k);
1959  }
1960  } else {
1961  double strt[nbgpr] = {height, mean, 0.75*rms};
1962  double step[nbgpr] = {1.0, 0.001, 0.001};
1963  double alowmn[nbgpr] = {0.5*height, mean-rms, 0.3*rms};
1964  double ahighmn[nbgpr] ={1.5*height, mean+rms, 1.5*rms};
1965 
1966  TMinuit *gMinuit = new TMinuit(nbgpr);
1967  gMinuit->SetFCN(fcnbg);
1968 
1969  double arglist[10];
1970  int ierflg = 0;
1971  arglist[0] =0.5;
1972  gMinuit->mnexcm("SET ERR", arglist, 1, ierflg);
1973  char name[100];
1974  for (int k=0; k<nbgpr; k++) {
1975  sprintf(name, "pedpar%i",k);
1976  gMinuit->mnparm(k, name, strt[k], step[k], alowmn[k], ahighmn[k],ierflg);
1977  }
1978 
1979  arglist[0] = 0;
1980  gMinuit->mnexcm("SIMPLEX", arglist, 0, ierflg);
1981 
1982  arglist[0] = 0;
1983  gMinuit->mnexcm("IMPROVE", arglist, 0, ierflg);
1984 
1985  TString chnam;
1986  double parv,err,xlo,xup, plerr, mierr, eparab, gcc;
1987  int iuit;
1988 
1989  for (int k=0; k<nbgpr; k++) {
1990  if (step[k] >-10) {
1991  gMinuit->mnpout(k, chnam, parv, err, xlo, xup, iuit);
1992  gMinuit->mnerrs(k, plerr, mierr, eparab, gcc);
1993  // cout <<"k "<< k<<" "<<chnam<<" "<<parv<<" "<<err<<" "<<xlo<<" "<<xup<<" "<<plerr<<" "<<mierr<<" "<<eparab<<endl;
1994  if (k==0) {
1995  gaupr[k] = parv*binwid;
1996  parer[k] = err*binwid;
1997  } else {
1998  gaupr[k] = parv;
1999  parer[k] = err;
2000  }
2001  }
2002  }
2003 
2004  // gx0[izone]->SetParameters(gaupr);
2005 
2006  char temp[20];
2007  sprintf(temp, "ped0fun_%i",izone);
2008  ped0fun[izone] = new TF1(temp, gausX, xmn, xmx, nbgpr);
2009  ped0fun[izone]->SetParameters(gaupr);
2010  ped0fun[izone]->SetLineColor(3);
2011  ped0fun[izone]->SetLineWidth(1);
2012  ped0fun[izone]->Draw("same");
2013 
2014  delete gMinuit;
2015  }
2016  } else {
2017  for (int k=0; k<nbgpr; k++) {gaupr[k] = par[k]; }
2018  if (m_digiInput) { gaupr[2] = 0.90; } else { gaupr[2] = 0.15;}
2019  }
2020  }
2021  // if (iijj!=0)
2022  c0->cd(2*izone+2);
2023  if (signall[izone]->GetEntries() >5) {
2024  Double_t parall[nsgpr];
2025  double parserr[nsgpr];
2026  double fitres[nsgpr];
2027  double pedht = 0;
2028 
2029  char temp[20];
2030  sprintf(temp, "signal_%i",izone);
2031  xmn = signall[izone]->GetXaxis()->GetXmin();
2032  xmx = 0.5*signall[izone]->GetXaxis()->GetXmax();
2033  signal[izone] = new TF1(temp, totalfunc, xmn, xmx, nsgpr);
2034  xmx *=2.0;
2035  if ((iijj!=3) || m_histfit) {
2036  pedht = (signall[izone]->GetBinContent(nbn-1)+
2037  signall[izone]->GetBinContent(nbn)+
2038  signall[izone]->GetBinContent(nbn+1))/3.;
2039 
2040  if (m_pedsuppr && !m_digiInput) {
2041  parall[1] = 0.0; // pedmean[ietafit][iphifit];
2042  if (m_digiInput) { parall[2] = 0.90; } else { parall[2] = 0.15;}
2043  } else {
2044  for (int i=0; i<nbgpr; i++) {parall[i] = gaupr[i];}
2045  }
2046 
2047  set_mean(parall[1], m_digiInput);
2048  set_sigma(parall[2], m_digiInput);
2049 
2050  parall[0] = 0.9*pedht; //GM for Z-mumu, there is almost no pedestal
2051  parall[3] = 0.14;
2052  double area = binwid*signall[izone]->GetEntries();
2053  parall[5]= area;
2054 
2055  if (iijj==3) {
2056  parall[4] = fitprm[4][jk];
2057  parall[6] = fitprm[6][jk];
2058  } else {
2059  parall[4] = signall[izone]->GetMean();
2060  parall[6]=parall[2];
2061  }
2062 
2063  signal[izone]->SetParameters(parall);
2064  signal[izone]->FixParameter(1, parall[1]);
2065  signal[izone]->FixParameter(2, parall[2]);
2066  signal[izone]->SetParLimits(0, 0.00, 2.0*pedht+0.1);
2067  signal[izone]->FixParameter(3, 0.14);
2068 
2069  signal[izone]->SetParLimits(5, 0.40*area, 1.15*area);
2070  // if (m_histfit) { //GMA
2071  if (iijj==3) {
2072  signal[izone]->SetParLimits(4, 0.2*fitprm[4][jk], 2.0*fitprm[4][jk]);
2073  signal[izone]->SetParLimits(6, 0.2*fitprm[6][jk], 2.0*fitprm[6][jk]);
2074  } else {
2075  if (m_digiInput) {
2076  signal[izone]->SetParLimits(4, 0.6, 6.0);
2077  signal[izone]->SetParLimits(6, 0.60, 3.0);
2078  } else {
2079  signal[izone]->SetParLimits(4, 0.1, 1.0);
2080  signal[izone]->SetParLimits(6, 0.035, 0.3);
2081  }
2082  }
2083  signal[izone]->SetParNames("const", "mean", "sigma","Width","MP","Area","GSigma");
2084  signall[izone]->Fit(signal[izone], "0R+");
2085 
2086  signall[izone]->GetXaxis()->SetRangeUser(xmn,xmx);
2087  for (int k=0; k<nsgpr; k++) {
2088  fitres[k] = fitprm[k][jk] = signal[izone]->GetParameter(k);
2089  parserr[k] = signal[izone]->GetParError(k);
2090  }
2091 
2092  } else {
2093  double pedhtx = 0;
2094  for (unsigned i =0; i<sig_reg[ietafit][iphifit].size(); i++) {
2095  if (sig_reg[ietafit][iphifit][i] >gaupr[1]-3*gaupr[2] && sig_reg[ietafit][iphifit][i]<gaupr[1]+gaupr[2]) pedhtx++;
2096  }
2097 
2098  set_mean(gaupr[1], m_digiInput);
2099  set_sigma(gaupr[2], m_digiInput);
2100 
2101  TString name[nsgpr] = {"const", "mean", "sigma","Width","MP","Area","GSigma"};
2102  double strt[nsgpr] = {0.9*pedhtx, gaupr[1], gaupr[2], fitprm[3][jk], fitprm[4][jk], signall[izone]->GetEntries(), fitprm[6][jk]};
2103  double alowmn[nsgpr] = {0.1*pedhtx-0.1, gaupr[1]-0.1, gaupr[2]-0.1,0.07, 0.2*strt[4], 0.1*strt[5], 0.2*strt[6]};
2104  double ahighmn[nsgpr] ={1.2*pedhtx+0.1, gaupr[1]+0.1, gaupr[2]+0.1,0.20, 2.5*strt[4], 1.5*strt[5], 2.2*strt[6]};
2105  double step[nsgpr] = {1.0, 0.0, 0.0, 0.0, 0.001, 1.0, 0.002};
2106 
2107  TMinuit *gMinuit = new TMinuit(nsgpr);
2108  gMinuit->SetFCN(fcnsg);
2109 
2110  double arglist[10];
2111  int ierflg = 0;
2112  arglist[0] =0.5;
2113  gMinuit->mnexcm("SET ERR", arglist, 1, ierflg);
2114 
2115  for (int k=0; k<nsgpr; k++) {
2116  gMinuit->mnparm(k, name[k], strt[k], step[k], alowmn[k], ahighmn[k],ierflg);
2117  }
2118 
2119  arglist[0] = 0;
2120  gMinuit->mnexcm("SIMPLEX", arglist, 0, ierflg);
2121 
2122  arglist[0] = 0;
2123  gMinuit->mnexcm("IMPROVE", arglist, 0, ierflg);
2124 
2125  TString chnam;
2126  double parv,err,xlo,xup, plerr, mierr, eparab, gcc;
2127  int iuit;
2128 
2129  for (int k=0; k<nsgpr; k++) {
2130  if (step[k] >-10) {
2131  gMinuit->mnpout(k, chnam, parv, err, xlo, xup, iuit);
2132  gMinuit->mnerrs(k, plerr, mierr, eparab, gcc);
2133  if (k==0 || k==5) {
2134  fitres[k] = parv*binwid;
2135  parserr[k]= err*binwid;
2136  } else {
2137  fitres[k] = parv;
2138  parserr[k]= err;
2139  }
2140 
2141  }
2142  }
2143 
2144  delete gMinuit;
2145  }
2146 
2147  // if (iijj==0) {
2148  // signall[izone]->Draw("same");
2149  // } else {
2150  signall[izone]->Draw();
2151  // }
2152 
2153  sprintf(temp, "pedfun_%i",izone);
2154  pedfun[izone] = new TF1(temp, gausX, xmn, xmx, nbgpr);
2155  pedfun[izone]->SetParameters(fitres);
2156  pedfun[izone]->SetLineColor(3);
2157  pedfun[izone]->SetLineWidth(1);
2158  pedfun[izone]->Draw("same");
2159 
2160  sprintf(temp, "signalfun_%i",izone);
2161  sigfun[izone] = new TF1(temp, langaufun, xmn, xmx, nsgpr-nbgpr);
2162  sigfun[izone]->SetParameters(&fitres[3]);
2163  sigfun[izone]->SetLineWidth(1);
2164  sigfun[izone]->SetLineColor(4);
2165  sigfun[izone]->Draw("same");
2166 
2167  sprintf(temp, "total_%i",izone);
2168  signalx[izone] = new TF1(temp, totalfunc, xmn, xmx, nsgpr);
2169  signalx[izone]->SetParameters(fitres);
2170  signalx[izone]->SetLineWidth(1);
2171  signalx[izone]->Draw("same");
2172 
2173  int kl = (jk<15) ? jk+1 : 14-jk;
2174 
2175  cout<<"histinfo"<<iijj<<" fit "
2176  <<std::setw(3)<< kl<<" "
2177  <<std::setw(3)<< ij+1<<" "
2178  <<std::setw(5)<<pedstll[izone]->GetEntries()<<" "
2179  <<std::setw(6)<<pedstll[izone]->GetMean()<<" "
2180  <<std::setw(6)<<pedstll[izone]->GetRMS()<<" "
2181  <<std::setw(5)<<signall[izone]->GetEntries()<<" "
2182  <<std::setw(6)<<signall[izone]->GetMean()<<" "
2183  <<std::setw(6)<<signall[izone]->GetRMS()<<" "
2184  <<std::setw(6)<< signal[izone]->GetChisquare()<<" "
2185  <<std::setw(3)<< signal[izone]->GetNDF()<<endl;
2186 
2187  file_out<<"histinfo"<<iijj<<" fit "
2188  <<std::setw(3)<< kl<<" "
2189  <<std::setw(3)<< ij+1<<" "
2190  <<std::setw(5)<<pedstll[izone]->GetEntries()<<" "
2191  <<std::setw(6)<<pedstll[izone]->GetMean()<<" "
2192  <<std::setw(6)<<pedstll[izone]->GetRMS()<<" "
2193  <<std::setw(5)<<signall[izone]->GetEntries()<<" "
2194  <<std::setw(6)<<signall[izone]->GetMean()<<" "
2195  <<std::setw(6)<<signall[izone]->GetRMS()<<" "
2196  <<std::setw(6)<< signal[izone]->GetChisquare()<<" "
2197  <<std::setw(3)<< signal[izone]->GetNDF()<<endl;
2198 
2199  file_out <<"fitres x"<<iijj<<" "<<kl<<" "<<ij+1<<" "<< fitres[0]<<" "<< fitres[1]<<" "<< fitres[2]<<" "<< fitres[3]<<" "<< fitres[4]<<" "<< fitres[5]<<" "<< fitres[6]<<endl;
2200  file_out <<"parserr"<<iijj<<" "<<kl<<" "<<ij+1<<" "<< parserr[0]<<" "<< parserr[1]<<" "<< parserr[2]<<" "<< parserr[3]<<" "<< parserr[4]<<" "<< parserr[5]<<" "<< parserr[6]<<endl;
2201 
2202  double diff=fitres[4]-fitres[1];
2203  if (diff <=0) diff = 0.000001;
2204  double error=parserr[4]*parserr[4]+parer[2]*parer[2];
2205  error = pow(error,0.5);
2206 
2207  int ieta = (jk<15) ? (15+jk) : (29-jk);
2208  int ifl = nphimx*ieta + ij;
2209 
2210  if (iijj==3) {
2211  ped_evt->Fill(ifl,pedstll[izone]->GetEntries());
2212  ped_mean->Fill(ifl,gaupr[1]);
2213  ped_width->Fill(ifl,gaupr[2]);
2214  fit_chi->Fill(ifl,signal[izone]->GetChisquare());
2215  sig_evt->Fill(ifl, signall[izone]->GetEntries());
2216  fit_sigevt->Fill(ifl, fitres[5]);
2217  fit_bkgevt->Fill(ifl, fitres[0]*sqrt(2*acos(-1.))*gaupr[2]);
2218  sig_mean->Fill(ifl, fitres[4]);
2219  sig_diff->Fill(ifl, fitres[4]-fitres[1]);
2220  sig_width->Fill(ifl, fitres[3]);
2221  sig_sigma->Fill(ifl, fitres[6]);
2222  sig_meanerr->Fill(ifl, parserr[4]);
2223  if (fitres[4]-fitres[1] !=0) sig_meanerrp->Fill(ifl, 100*parserr[4]/(fitres[4]-fitres[1]));
2224  if (gaupr[2]!=0) sig_signf->Fill(ifl,(fitres[4]-fitres[1])/gaupr[2]);
2225 
2226  ped_statmean->Fill(ifl,pedstll[izone]->GetMean());
2227  sig_statmean->Fill(ifl,signall[izone]->GetMean());
2228  ped_rms->Fill(ifl,pedstll[izone]->GetRMS());
2229  sig_rms->Fill(ifl,signall[izone]->GetRMS());
2230  }
2231 
2232  if ((iijj==2) || (iijj==3) || (iijj==1)) {
2233  if (signall[izone]->GetEntries() >5 && fitres[4]>0.1) {
2234  //GMA need to put this==1 in future
2235  float fact=0.812;
2236  if (abs(kl)<=4) fact=0.895;
2237  if (!m_digiInput) fact *=0.19; //conversion factor for GeV/fC
2238 
2239  float fact2 = 0;
2240  if (iijj==2) fact2 = invang[jk][nphimx];
2241  if (iijj==3) fact2 = invang[jk][ij];
2242  if (iijj==1) fact2 = com_invang[jk][ij];
2243 
2244  float calibc = fact*fact2/(fitres[4]*signall[izone]->GetEntries());
2245  float caliberr= TMath::Abs(calibc*parserr[4]/max(0.001,fitres[4]));
2246 
2247  if (iijj==2) {
2248  int ieta = (jk<15) ? jk+1 : 14-jk;
2249  mean_phi_hst->Fill(ieta, calibc);
2250  mean_phi_hst->SetBinError(mean_phi_hst->FindBin(ieta), caliberr);
2251  file_out<<"intieta "<<jk<<" "<<ij<<" "<<ieta<<" "<<mean_phi_hst->FindBin(double(ieta))<<" "<<calibc<<" "<<caliberr<<endl;
2252  } else if (iijj==3) {
2253  const_eta[jk]->Fill(ij+1,calibc);
2254  const_eta[jk]->SetBinError(const_eta[jk]->FindBin(ij+1), caliberr);
2255 
2256  peak_eta[jk]->Fill(ij+1,fitres[4]);
2257  peak_eta[jk]->SetBinError(peak_eta[jk]->FindBin(ij+1),parserr[4]);
2258 
2259  int ieta = (jk<15) ? jk+1 : 14-jk;
2260  const_eta_phi->Fill(ieta, ij+1,calibc);
2261  file_out<<"intietax "<<jk<<" "<<ij<<" "<<ieta<<" "<<const_eta_phi->FindBin(ieta, ij+1)<<endl;
2262  if (caliberr >0) {
2263  const_eta_phi->SetBinError(const_eta_phi->FindBin(ieta, ij+1),caliberr);
2264 
2265  mean_eta[ij] +=calibc/(caliberr*caliberr);
2266  mean_phi[jk] +=calibc/(caliberr*caliberr);
2267 
2268  rms_eta[ij] +=1./(caliberr*caliberr);
2269  rms_phi[jk] +=1./(caliberr*caliberr);
2270 
2271  } else {
2272  const_eta_phi->SetBinError(const_eta_phi->FindBin(ieta, ij+1), 0.0);
2273  }
2274  } else if (iijj==1) {
2275  const_hpdrm[jk]->Fill(ij+1,calibc);
2276  const_hpdrm[jk]->SetBinError(const_hpdrm[jk]->FindBin(ij+1), caliberr);
2277 
2278  peak_hpdrm[jk]->Fill(ij+1,fitres[4]);
2279  peak_hpdrm[jk]->SetBinError(peak_hpdrm[jk]->FindBin(ij+1),parserr[4]);
2280  }
2281 
2282  file_out<<"HO 4 "<<iijj<<" "<< std::setw(3)<<kl<<" "<<std::setw(3)<<ij+1<<" "
2283  <<std::setw(7)<<calibc<<" "<<std::setw(7)<<caliberr<<endl;
2284  }
2285  }
2286 
2287  } else { //if (signall[izone]->GetEntries() >10) {
2288  signall[izone]->Draw();
2289  float varx = 0.000;
2290  int kl = (jk<15) ? jk+1 : 14-jk;
2291  file_out<<"histinfo"<<iijj<<" nof "
2292  <<std::setw(3)<< kl<<" "
2293  <<std::setw(3)<< ij+1<<" "
2294  <<std::setw(5)<<pedstll[izone]->GetEntries()<<" "
2295  <<std::setw(6)<<pedstll[izone]->GetMean()<<" "
2296  <<std::setw(6)<<pedstll[izone]->GetRMS()<<" "
2297  <<std::setw(5)<<signall[izone]->GetEntries()<<" "
2298  <<std::setw(6)<<signall[izone]->GetMean()<<" "
2299  <<std::setw(6)<<signall[izone]->GetRMS()<<" "
2300  <<std::setw(6)<< varx<<" "
2301  <<std::setw(3)<< varx<<endl;
2302 
2303  file_out <<"fitres x"<<iijj<<" "<<kl<<" "<<ij+1<<" "<< varx<<" "<< varx<<" "<< varx<<" "<< varx<<" "<< varx<<" "<< varx<<" "<< varx<<endl;
2304  file_out <<"parserr"<<iijj<<" "<<kl<<" "<<ij+1<<" "<< varx<<" "<< varx<<" "<< varx<<" "<< varx<<" "<< varx<<" "<< varx<<" "<< varx<<endl;
2305 
2306  }
2307  iiter++;
2308  if (iiter%nsample==0) {
2309  c0->Update();
2310 
2311  for (int kl=0; kl<nsample; kl++) {
2312  if (gx0[kl]) {delete gx0[kl];gx0[kl] = 0;}
2313  if (ped0fun[kl]) {delete ped0fun[kl];ped0fun[kl] = 0;}
2314  if (signal[kl]) {delete signal[kl];signal[kl] = 0;}
2315  if (pedfun[kl]) {delete pedfun[kl];pedfun[kl] = 0;}
2316  if (sigfun[kl]) {delete sigfun[kl];sigfun[kl] = 0;}
2317  if (signalx[kl]) {delete signalx[kl];signalx[kl] = 0;}
2318  if (signall[kl]) {delete signall[kl];signall[kl] = 0;}
2319  if (pedstll[kl]) {delete pedstll[kl];pedstll[kl] = 0;}
2320  }
2321 
2322  }
2323  } //for (int jk=0; jk<netamx; jk++) {
2324  } //for (int ij=0; ij<nphimx; ij++) {
2325 
2326  // if (iijj==0) {
2327  // sprintf(out_file, "comb_hosig_allring_%i.jpg", irunold);
2328  // c0->SaveAs(out_file);
2329  // iiter = 0;
2330  // } else {
2331  // // c0->Update();
2332  // }
2333 
2334  // iiter = 0;
2335  } //end of iijj
2336  if (iiter%nsample!=0) {
2337  c0->Update();
2338  for (int kl=0; kl<nsample; kl++) {
2339  if (gx0[kl]) {delete gx0[kl];gx0[kl] = 0;}
2340  if (ped0fun[kl]) {delete ped0fun[kl];ped0fun[kl] = 0;}
2341  if (signal[kl]) {delete signal[kl];signal[kl] = 0;}
2342  if (pedfun[kl]) {delete pedfun[kl];pedfun[kl] = 0;}
2343  if (sigfun[kl]) {delete sigfun[kl];sigfun[kl] = 0;}
2344  if (signalx[kl]) {delete signalx[kl];signalx[kl] = 0;}
2345  if (signall[kl]) {delete signall[kl];signall[kl] = 0;}
2346  if (pedstll[kl]) {delete pedstll[kl];pedstll[kl] = 0;}
2347  }
2348  }
2349 
2350  delete c0;
2351 
2352  xsiz = 600; //int xsiz = 600;
2353  ysiz = 800; //int ysiz = 800;
2354 
2355  gStyle->SetTitleFontSize(0.05);
2356  gStyle->SetTitleSize(0.025,"XYZ");
2357  gStyle->SetLabelSize(0.025,"XYZ");
2358  gStyle->SetStatFontSize(.045);
2359 
2360  gStyle->SetOptStat(0);
2361  ps.NewPage(); TCanvas *c1 = new TCanvas("c1", " Pedestal vs signal", xsiz, ysiz);
2362  ped_evt->Draw(); c1->Update();
2363 
2364  ps.NewPage();
2365  ped_statmean->Draw(); c1->Update();
2366 
2367  ps.NewPage();
2368  ped_rms->Draw(); c1->Update();
2369 
2370  ps.NewPage();
2371  ped_mean->Draw(); c1->Update();
2372 
2373  ps.NewPage();
2374  ped_width->Draw(); c1->Update();
2375 
2376  ps.NewPage();
2377  sig_evt->Draw(); c1->Update();
2378 
2379  ps.NewPage();
2380  sig_statmean->Draw(); c1->Update();
2381 
2382  ps.NewPage();
2383  sig_rms->Draw(); c1->Update();
2384 
2385  ps.NewPage();
2386  fit_chi->Draw(); c1->Update();
2387 
2388  ps.NewPage();
2389  fit_sigevt->Draw(); c1->Update();
2390 
2391  ps.NewPage();
2392  fit_bkgevt->Draw(); c1->Update();
2393 
2394  ps.NewPage();
2395  sig_mean->Draw(); c1->Update();
2396 
2397  ps.NewPage();
2398  sig_width->Draw(); c1->Update();
2399 
2400  ps.NewPage();
2401  sig_sigma->Draw(); c1->Update();
2402 
2403  ps.NewPage();
2404  sig_meanerr->Draw(); c1->Update();
2405 
2406  ps.NewPage();
2407  sig_meanerrp->Draw(); c1->Update();
2408 
2409  ps.NewPage();
2410  sig_signf->Draw(); c1->Update();
2411 
2412  ps.Close();
2413  delete c1;
2414 
2415  file_out.close();
2416 
2417  if (m_figure) {
2418  xsiz = 700;
2419  ysiz = 450;
2420 
2421  gStyle->SetTitleFontSize(0.09);
2422  gStyle->SetPadBottomMargin(0.17);
2423  gStyle->SetPadLeftMargin(0.18);
2424  gStyle->SetPadRightMargin(0.01);
2425  gStyle->SetOptLogy(0);
2426  gStyle->SetOptStat(0);
2427 
2428  TCanvas *c2 = new TCanvas("c2", "runfile", xsiz, ysiz);
2429  c2->Divide(5,3);
2430 
2431  for (int side=0; side <2; side++) {
2432  gStyle->SetNdivisions(303,"XY");
2433  gStyle->SetPadRightMargin(0.01);
2434  int nmn = 0;
2435  int nmx = netamx/2;
2436  if (side==1) {
2437  nmn = netamx/2;
2438  nmx = netamx;
2439  }
2440 
2441  int nzone = 0;
2442 
2443  for (int ij=nmn; ij<nmx; ij++) {
2444 
2445  c2->cd(nzone+1);
2446  const_eta[ij]->GetXaxis()->SetTitle("#phi index");
2447  const_eta[ij]->GetXaxis()->SetTitleSize(.08);
2448  const_eta[ij]->GetXaxis()->CenterTitle();
2449  const_eta[ij]->GetXaxis()->SetTitleOffset(0.9);
2450  const_eta[ij]->GetXaxis()->SetLabelSize(.085);
2451  const_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2452 
2453  const_eta[ij]->GetYaxis()->SetLabelSize(.08);
2454  const_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2455  if (m_digiInput) {
2456  const_eta[ij]->GetYaxis()->SetTitle("GeV/fC");
2457  } else {
2458  const_eta[ij]->GetYaxis()->SetTitle("GeV/MIP-GeV!!");
2459  }
2460 
2461  const_eta[ij]->GetYaxis()->SetTitleSize(.085);
2462  const_eta[ij]->GetYaxis()->CenterTitle();
2463  const_eta[ij]->GetYaxis()->SetTitleOffset(1.3);
2464  const_eta[ij]->SetMarkerSize(0.60);
2465  const_eta[ij]->SetMarkerColor(2);
2466  const_eta[ij]->SetMarkerStyle(20);
2467 
2468 
2469  const_eta[ij]->Draw();
2470  nzone++;
2471  }
2472 
2473  sprintf(out_file, "calibho_%i_side%i.eps", irunold, side);
2474  c2->SaveAs(out_file);
2475 
2476  sprintf(out_file, "calibho_%i_side%i.jpg", irunold, side);
2477  c2->SaveAs(out_file);
2478 
2479  nzone = 0;
2480  for (int ij=nmn; ij<nmx; ij++) {
2481  c2->cd(nzone+1);
2482  peak_eta[ij]->GetXaxis()->SetTitle("#phi index");
2483  peak_eta[ij]->GetXaxis()->SetTitleSize(.08);
2484  peak_eta[ij]->GetXaxis()->CenterTitle();
2485  peak_eta[ij]->GetXaxis()->SetTitleOffset(0.90);
2486  peak_eta[ij]->GetXaxis()->SetLabelSize(.08);
2487  peak_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2488 
2489  peak_eta[ij]->GetYaxis()->SetLabelSize(.08);
2490  peak_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2491  if (m_digiInput) {
2492  peak_eta[ij]->GetYaxis()->SetTitle("fC");
2493  } else {
2494  peak_eta[ij]->GetYaxis()->SetTitle("GeV");
2495  }
2496 
2497  peak_eta[ij]->GetYaxis()->SetTitleSize(.085);
2498  peak_eta[ij]->GetYaxis()->CenterTitle();
2499  peak_eta[ij]->GetYaxis()->SetTitleOffset(1.3);
2500 
2501  peak_eta[ij]->SetMarkerSize(0.60);
2502  peak_eta[ij]->SetMarkerColor(2);
2503  peak_eta[ij]->SetMarkerStyle(20);
2504 
2505  peak_eta[ij]->Draw();
2506  nzone++;
2507  }
2508 
2509  sprintf(out_file, "peakho_%i_side%i.eps", irunold, side);
2510  c2->SaveAs(out_file);
2511 
2512  sprintf(out_file, "peakho_%i_side%i.jpg", irunold, side);
2513  c2->SaveAs(out_file);
2514  }
2515  delete c2;
2516 
2517  // if (m_combined) {
2518  gStyle->SetTitleFontSize(0.045);
2519  gStyle->SetPadRightMargin(0.13);
2520  gStyle->SetPadBottomMargin(0.15);
2521  gStyle->SetPadLeftMargin(0.1);
2522  gStyle->SetOptStat(0);
2523  xsiz = 700;
2524  ysiz = 600;
2525  TCanvas *c1 = new TCanvas("c1", "Fitted const in each tower", xsiz, ysiz);
2526  const_eta_phi->GetXaxis()->SetTitle("#eta");
2527  const_eta_phi->GetXaxis()->SetTitleSize(0.065);
2528  const_eta_phi->GetXaxis()->SetTitleOffset(0.85); //6);
2529  const_eta_phi->GetXaxis()->CenterTitle();
2530  const_eta_phi->GetXaxis()->SetLabelSize(0.045);
2531  const_eta_phi->GetXaxis()->SetLabelOffset(0.01);
2532 
2533  const_eta_phi->GetYaxis()->SetTitle("#phi");
2534  const_eta_phi->GetYaxis()->SetTitleSize(0.075);
2535  const_eta_phi->GetYaxis()->SetTitleOffset(0.5);
2536  const_eta_phi->GetYaxis()->CenterTitle();
2537  const_eta_phi->GetYaxis()->SetLabelSize(0.045);
2538  const_eta_phi->GetYaxis()->SetLabelOffset(0.01);
2539 
2540  const_eta_phi->Draw("colz");
2541  sprintf(out_file, "high_hoconst_eta_phi_%i.jpg",irunold);
2542  c1->SaveAs(out_file);
2543 
2544  delete c1;
2545 
2546  for (int jk=0; jk<netamx; jk++) {
2547  int ieta = (jk<15) ? jk+1 : 14-jk;
2548  if (rms_phi[jk]>0) {
2549  mean_phi_ave->Fill(ieta, mean_phi[jk]/rms_phi[jk]);
2550  mean_phi_ave->SetBinError(mean_phi_ave->FindBin(ieta), pow(double(rms_phi[jk]), -0.5));
2551  }
2552  }
2553 
2554  for (int ij=0; ij<nphimx; ij++) {
2555  if (rms_eta[ij] >0) {
2556  mean_eta_ave->Fill(ij+1, mean_eta[ij]/rms_eta[ij]);
2557  mean_eta_ave->SetBinError(mean_eta_ave->FindBin(ij+1), pow(double(rms_eta[ij]), -0.5));
2558  }
2559  }
2560 
2561  ysiz =450;
2562  gStyle->SetPadLeftMargin(0.13);
2563  gStyle->SetPadRightMargin(0.03);
2564 
2565 
2566  TCanvas *c2y = new TCanvas("c2", "Avearge signal in eta and phi", xsiz, ysiz);
2567  c2y->Divide(2,1);
2568  mean_eta_ave->GetXaxis()->SetTitle("#phi");
2569  mean_eta_ave->GetXaxis()->SetTitleSize(0.085);
2570  mean_eta_ave->GetXaxis()->SetTitleOffset(0.65);
2571  mean_eta_ave->GetXaxis()->CenterTitle();
2572  mean_eta_ave->GetXaxis()->SetLabelSize(0.05);
2573  mean_eta_ave->GetXaxis()->SetLabelOffset(0.001);
2574 
2575  mean_eta_ave->GetYaxis()->SetTitle("Signal (GeV)/MIP");
2576  mean_eta_ave->GetYaxis()->SetTitleSize(0.055);
2577  mean_eta_ave->GetYaxis()->SetTitleOffset(1.3);
2578  mean_eta_ave->GetYaxis()->CenterTitle();
2579  mean_eta_ave->GetYaxis()->SetLabelSize(0.045);
2580  mean_eta_ave->GetYaxis()->SetLabelOffset(0.01);
2581  mean_eta_ave->SetMarkerSize(0.60);
2582  mean_eta_ave->SetMarkerColor(2);
2583  mean_eta_ave->SetMarkerStyle(20);
2584 
2585  c2y->cd(1); mean_eta_ave->Draw();
2586 
2587  mean_phi_ave->GetXaxis()->SetTitle("#eta");
2588  mean_phi_ave->GetXaxis()->SetTitleSize(0.085);
2589  mean_phi_ave->GetXaxis()->SetTitleOffset(0.65); //55);
2590  mean_phi_ave->GetXaxis()->CenterTitle();
2591  mean_phi_ave->GetXaxis()->SetLabelSize(0.05);
2592  mean_phi_ave->GetXaxis()->SetLabelOffset(0.001);
2593 
2594  mean_phi_ave->GetYaxis()->SetTitle("Signal (GeV)/MIP");
2595  mean_phi_ave->GetYaxis()->SetTitleSize(0.055);
2596  mean_phi_ave->GetYaxis()->SetTitleOffset(1.3);
2597  mean_phi_ave->GetYaxis()->CenterTitle();
2598  mean_phi_ave->GetYaxis()->SetLabelSize(0.045);
2599  mean_phi_ave->GetYaxis()->SetLabelOffset(0.01);
2600  mean_phi_ave->SetMarkerSize(0.60);
2601  mean_phi_ave->SetMarkerColor(2);
2602  mean_phi_ave->SetMarkerStyle(20);
2603 
2604  c2y->cd(2); mean_phi_ave->Draw();
2605 
2606  sprintf(out_file, "high_hoaverage_eta_phi_%i.jpg",irunold);
2607  c2y->SaveAs(out_file);
2608 
2609  delete c2y;
2610  // } else { //m_combined
2611 
2612  xsiz = 800;
2613  ysiz = 450;
2614  TCanvas *c3 = new TCanvas("c3", "Avearge signal in eta and phi", xsiz, ysiz);
2615  c3->Divide(2,1);
2616  mean_phi_hst->GetXaxis()->SetTitle("#eta");
2617  mean_phi_hst->GetXaxis()->SetTitleSize(0.065);
2618  mean_phi_hst->GetXaxis()->SetTitleOffset(0.9);
2619  mean_phi_hst->GetXaxis()->CenterTitle();
2620  mean_phi_hst->GetXaxis()->SetLabelSize(0.065);
2621  mean_phi_hst->GetXaxis()->SetLabelOffset(0.001);
2622 
2623  mean_phi_hst->GetYaxis()->SetTitle("GeV/MIP");
2624  mean_phi_hst->GetYaxis()->SetTitleSize(0.055);
2625  mean_phi_hst->GetYaxis()->SetTitleOffset(0.9);
2626  mean_phi_hst->GetYaxis()->CenterTitle();
2627  mean_phi_hst->GetYaxis()->SetLabelSize(0.065);
2628  mean_phi_hst->GetYaxis()->SetLabelOffset(0.01);
2629 
2630  mean_phi_hst->SetMarkerColor(4);
2631  mean_phi_hst->SetMarkerSize(0.8);
2632  mean_phi_hst->SetMarkerStyle(20);
2633  mean_phi_hst->Draw();
2634 
2635  sprintf(out_file, "low_mean_phi_hst_%i.jpg",irunold);
2636  c3->SaveAs(out_file);
2637 
2638  delete c3;
2639 
2640  // } //m_combined
2641 
2642 
2643  gStyle->SetOptLogy(1);
2644  gStyle->SetPadTopMargin(.1);
2645  gStyle->SetPadLeftMargin(.15);
2646  xsiz = 800;
2647  ysiz = 500;
2648  TCanvas *c0x = new TCanvas("c0x", "Signal in each ring", xsiz, ysiz);
2649 
2650  c0x->Divide(3,2);
2651  for (int ij=0; ij<ringmx; ij++) {
2652  int iread = (ij==2) ? routmx : rout12mx;
2653  if (m_digiInput) {
2654  com_sigrsg[ij][iread]->GetXaxis()->SetTitle("Signal/ped (fC)");
2655  } else {
2656  com_sigrsg[ij][iread]->GetXaxis()->SetTitle("Signal/ped (GeV)");
2657  }
2658  com_sigrsg[ij][iread]->GetXaxis()->SetTitleSize(0.060);
2659  com_sigrsg[ij][iread]->GetXaxis()->SetTitleOffset(1.05);
2660  com_sigrsg[ij][iread]->GetXaxis()->CenterTitle();
2661  com_sigrsg[ij][iread]->GetXaxis()->SetLabelSize(0.065);
2662  com_sigrsg[ij][iread]->GetXaxis()->SetLabelOffset(0.01);
2663 
2664  com_sigrsg[ij][iread]->GetYaxis()->SetLabelSize(0.065);
2665  com_sigrsg[ij][iread]->GetYaxis()->SetLabelOffset(0.01);
2666 
2667 
2668  com_sigrsg[ij][iread]->SetLineWidth(3);
2669  com_sigrsg[ij][iread]->SetLineColor(4);
2670 
2671  c0x->cd(ij+1); com_sigrsg[ij][iread]->Draw();
2672 
2673  com_crossg[ij][iread]->SetLineWidth(2);
2674  com_crossg[ij][iread]->SetLineColor(2);
2675  com_crossg[ij][iread]->Draw("same");
2676  }
2677  sprintf(out_file, "hosig_ring_%i.jpg",irunold);
2678  c0x->SaveAs(out_file);
2679  delete c0x;
2680 
2681  gStyle->SetTitleFontSize(0.06);
2682  gStyle->SetOptStat(0);
2683  gStyle->SetOptLogy(0);
2684 
2685  TCanvas *c0 = new TCanvas("c0", "Signal in each ring", xsiz, ysiz);
2686 
2687  c0->Divide(3,2);
2688  for (int jk=0; jk<ringmx; jk++) {
2689  peak_hpdrm[jk]->GetXaxis()->SetTitle("RM #");
2690  peak_hpdrm[jk]->GetXaxis()->SetTitleSize(0.070);
2691  peak_hpdrm[jk]->GetXaxis()->SetTitleOffset(1.0);
2692  peak_hpdrm[jk]->GetXaxis()->CenterTitle();
2693  peak_hpdrm[jk]->GetXaxis()->SetLabelSize(0.065);
2694  peak_hpdrm[jk]->GetXaxis()->SetLabelOffset(0.01);
2695 
2696  peak_hpdrm[jk]->GetYaxis()->SetTitle("Peak(GeV)/MIP");
2697 
2698  peak_hpdrm[jk]->GetYaxis()->SetTitleSize(0.07);
2699  peak_hpdrm[jk]->GetYaxis()->SetTitleOffset(1.3);
2700  peak_hpdrm[jk]->GetYaxis()->CenterTitle();
2701  peak_hpdrm[jk]->GetYaxis()->SetLabelSize(0.065);
2702  peak_hpdrm[jk]->GetYaxis()->SetLabelOffset(0.01);
2703  // peak_hpdrm[jk]->SetLineWidth(3);
2704  // peak_hpdrm[jk]->SetLineColor(4);
2705  peak_hpdrm[jk]->SetMarkerSize(0.60);
2706  peak_hpdrm[jk]->SetMarkerColor(2);
2707  peak_hpdrm[jk]->SetMarkerStyle(20);
2708 
2709 
2710  c0->cd(jk+1); peak_hpdrm[jk]->Draw();
2711  }
2712  sprintf(out_file, "comb_peak_hpdrm_%i.jpg",irunold);
2713  c0->SaveAs(out_file);
2714 
2715  delete c0;
2716 
2717  TCanvas *c1y = new TCanvas("c1y", "Signal in each ring", xsiz, ysiz);
2718 
2719  c1y->Divide(3,2);
2720  for (int jk=0; jk<ringmx; jk++) {
2721  const_hpdrm[jk]->GetXaxis()->SetTitle("RM #");
2722  const_hpdrm[jk]->GetXaxis()->SetTitleSize(0.070);
2723  const_hpdrm[jk]->GetXaxis()->SetTitleOffset(1.3);
2724  const_hpdrm[jk]->GetXaxis()->CenterTitle();
2725  const_hpdrm[jk]->GetXaxis()->SetLabelSize(0.065);
2726  const_hpdrm[jk]->GetXaxis()->SetLabelOffset(0.01);
2727 
2728  if (m_digiInput) {
2729  const_hpdrm[jk]->GetYaxis()->SetTitle("Peak(fC)");
2730  } else {
2731  const_hpdrm[jk]->GetYaxis()->SetTitle("Peak(GeV)");
2732  }
2733  const_hpdrm[jk]->GetYaxis()->SetTitleSize(0.065);
2734  const_hpdrm[jk]->GetYaxis()->SetTitleOffset(1.0);
2735  const_hpdrm[jk]->GetYaxis()->CenterTitle();
2736  const_hpdrm[jk]->GetYaxis()->SetLabelSize(0.065);
2737  const_hpdrm[jk]->GetYaxis()->SetLabelOffset(0.01);
2738  // const_hpdrm[jk]->SetLineWidth(3);
2739  // const_hpdrm[jk]->SetLineColor(4);
2740  const_hpdrm[jk]->SetMarkerSize(0.60);
2741  const_hpdrm[jk]->SetMarkerColor(2);
2742  const_hpdrm[jk]->SetMarkerStyle(20);
2743 
2744  c1y->cd(jk+1); const_hpdrm[jk]->Draw();
2745  }
2746 
2747  sprintf(out_file, "comb_const_hpdrm_%i.jpg",irunold);
2748  c1y->SaveAs(out_file);
2749 
2750  delete c1y;
2751 
2752  } //if (m_figure) {
2753 
2754  // ps.Close();
2755  // file_out.close();
2756 
2757  }// if (m_constant){
2758 
2759 
2760  if (m_figure) {
2761  for (int ij=0; ij<nphimx; ij++) {
2762  for (int jk=0; jk<netamx; jk++) {
2763  stat_eta[jk]->Fill(ij+1,sigrsg[jk][ij]->GetEntries());
2764  statmn_eta[jk]->Fill(ij+1,sigrsg[jk][ij]->GetMean());
2765  }
2766  }
2767 
2768  xsiz = 700;
2769  ysiz = 450;
2770  gStyle->SetTitleFontSize(0.09);
2771  gStyle->SetPadBottomMargin(0.14);
2772  gStyle->SetPadLeftMargin(0.17);
2773  gStyle->SetPadRightMargin(0.01);
2774  gStyle->SetNdivisions(303,"XY");
2775  gStyle->SetOptLogy(1);
2776 
2777  TCanvas *c2x = new TCanvas("c2x", "runfile", xsiz, ysiz);
2778  c2x->Divide(5,3);
2779  for (int side=0; side <2; side++) {
2780  int nmn = 0;
2781  int nmx = netamx/2;
2782  if (side==1) {
2783  nmn = netamx/2;
2784  nmx = netamx;
2785  }
2786  int nzone = 0;
2787  char name[200];
2788 
2789  for (int ij=nmn; ij<nmx; ij++) {
2790  int ieta = (ij<15) ? ij+1 : 14-ij;
2791  c2x->cd(nzone+1);
2792  if (m_digiInput) {
2793  sprintf(name,"fC(#eta=%i)",ieta);
2794  } else {
2795  sprintf(name,"GeV(#eta=%i)",ieta);
2796  }
2797  sigrsg[ij][nphimx]->GetXaxis()->SetTitle(name);
2798  sigrsg[ij][nphimx]->GetXaxis()->SetTitleSize(.08);
2799  sigrsg[ij][nphimx]->GetXaxis()->CenterTitle();
2800  sigrsg[ij][nphimx]->GetXaxis()->SetTitleOffset(0.90);
2801  sigrsg[ij][nphimx]->GetXaxis()->SetLabelSize(.08);
2802  sigrsg[ij][nphimx]->GetXaxis()->SetLabelOffset(.01);
2803 
2804  sigrsg[ij][nphimx]->GetYaxis()->SetLabelSize(.08);
2805  sigrsg[ij][nphimx]->GetYaxis()->SetLabelOffset(.01);
2806  sigrsg[ij][nphimx]->SetLineWidth(2);
2807  sigrsg[ij][nphimx]->SetLineColor(4);
2808  sigrsg[ij][nphimx]->Draw();
2809  crossg[ij][nphimx]->SetLineWidth(2);
2810  crossg[ij][nphimx]->SetLineColor(2);
2811  crossg[ij][nphimx]->Draw("same");
2812  nzone++;
2813  }
2814 
2815  sprintf(out_file, "sig_ho_%i_side%i.eps", irunold, side);
2816  c2x->SaveAs(out_file);
2817 
2818  sprintf(out_file, "sig_ho_%i_side%i.jpg", irunold, side);
2819  c2x->SaveAs(out_file);
2820  }
2821 
2822  gStyle->SetOptLogy(0);
2823  c2x = new TCanvas("c2x", "runfile", xsiz, ysiz);
2824  c2x->Divide(5,3);
2825  for (int side=0; side <2; side++) {
2826  int nmn = 0;
2827  int nmx = netamx/2;
2828  if (side==1) {
2829  nmn = netamx/2;
2830  nmx = netamx;
2831  }
2832  int nzone = 0;
2833 
2834  nzone = 0;
2835  for (int ij=nmn; ij<nmx; ij++) {
2836  c2x->cd(nzone+1);
2837  statmn_eta[ij]->SetLineWidth(2);
2838  statmn_eta[ij]->SetLineColor(4);
2839  statmn_eta[ij]->GetXaxis()->SetTitle("#phi index");
2840  statmn_eta[ij]->GetXaxis()->SetTitleSize(.08);
2841  statmn_eta[ij]->GetXaxis()->CenterTitle();
2842  statmn_eta[ij]->GetXaxis()->SetTitleOffset(0.9);
2843  statmn_eta[ij]->GetYaxis()->SetLabelSize(.08);
2844  statmn_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2845  statmn_eta[ij]->GetXaxis()->SetLabelSize(.08);
2846  statmn_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2847  if (m_digiInput) {
2848  statmn_eta[ij]->GetYaxis()->SetTitle("fC");
2849  } else {
2850  statmn_eta[ij]->GetYaxis()->SetTitle("GeV");
2851  }
2852  statmn_eta[ij]->GetYaxis()->SetTitleSize(.075);
2853  statmn_eta[ij]->GetYaxis()->CenterTitle();
2854  statmn_eta[ij]->GetYaxis()->SetTitleOffset(1.30);
2855 
2856  statmn_eta[ij]->Draw();
2857  nzone++;
2858  }
2859 
2860  sprintf(out_file, "statmnho_%i_side%i.eps", irunold, side);
2861  c2x->SaveAs(out_file);
2862 
2863  sprintf(out_file, "statmnho_%i_side%i.jpg", irunold, side);
2864  c2x->SaveAs(out_file);
2865 
2866  gStyle->SetOptLogy(1);
2867  gStyle->SetNdivisions(203,"XY");
2868 
2869  nzone = 0;
2870  for (int ij=nmn; ij<nmx; ij++) {
2871  c2x->cd(nzone+1);
2872  stat_eta[ij]->SetLineWidth(2);
2873  stat_eta[ij]->SetLineColor(4);
2874  stat_eta[ij]->GetXaxis()->SetTitle("#phi index");
2875  stat_eta[ij]->GetXaxis()->SetTitleSize(.08);
2876  stat_eta[ij]->GetXaxis()->CenterTitle();
2877  stat_eta[ij]->GetXaxis()->SetTitleOffset(0.80);
2878  stat_eta[ij]->GetXaxis()->SetLabelSize(.08);
2879  stat_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2880  stat_eta[ij]->GetYaxis()->SetLabelSize(.08);
2881  stat_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2882 
2883  stat_eta[ij]->Draw();
2884  nzone++;
2885  }
2886 
2887  sprintf(out_file, "statho_%i_side%i.eps", irunold, side);
2888  c2x->SaveAs(out_file);
2889 
2890  sprintf(out_file, "statho_%i_side%i.jpg", irunold, side);
2891  c2x->SaveAs(out_file);
2892  }
2893  delete c2x;
2894 
2895  } //if (m_figure) {
2896 
2897  if (!m_constant) { //m_constant
2898  for (int j=0; j<netamx; j++) {
2899  for (int i=0; i<nphimx; i++) {
2900  if (crossg[j][i]) { delete crossg[j][i];}
2901  if (sigrsg[j][i]) { delete sigrsg[j][i];}
2902  }
2903  }
2904  }
2905 }
tuple arglist
Definition: fitWZ.py:38
TH1F * corrsgrb[netamx][nphimx]
TH2F * sig_effi[neffip]
int i
Definition: DBlmapReader.cc:9
TH1F * const_hpdrm[ringmx]
static const int ringmx
TH1F * com_crossg[ringmx][routmx+1]
TH1F * corrsgr[netamx][nphimx]
list step
Definition: launcher.py:15
TH1F * corrsglu[netamx][nphimx]
static const int rout12mx
TH1F * crossg[netamx][nphimx+1]
#define abs(x)
Definition: mlp_lapack.h:159
TH1F * com_corrsgall[ringmx][sectmx]
float invang[netamx][nphimx+1]
TH1F * corrsgc[netamx][nphimx]
TH1F * peak_hpdrm[ringmx]
TH1F * corrsglb[netamx][nphimx]
TH1F * sigrsg[netamx][nphimx+1]
TH1F * com_corrsglu[ringmx][sectmx]
static const int neffip
void set_sigma(double &x, bool mdigi)
std::string theoutputtxtFile
TH1F * com_sigrsg[ringmx][routmx+1]
float com_invang[ringmx][routmx+1]
const T & max(const T &a, const T &b)
Double_t totalfunc(Double_t *x, Double_t *par)
T sqrt(T t)
Definition: SSEVec.h:46
vector< float > sig_reg[netamx][nphimx+1]
std::string theoutputpsFile
TH1F * corrsgl[netamx][nphimx]
TH1F * com_corrsgc[ringmx][sectmx]
int iphifit
TH1F * com_corrsgrb[ringmx][sectmx]
int j
Definition: DBlmapReader.cc:9
TH1F * com_corrsgr[ringmx][sectmx]
void fcnsg(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t flag)
const int nbgpr
double fitprm[nsgpr][netamx]
Double_t gausX(Double_t *x, Double_t *par)
int k[5][pyjets_maxn]
const int nsgpr
TH1F * corrsgru[netamx][nphimx]
static const int routmx
TH1F * com_corrsgl[ringmx][sectmx]
TH1F * com_corrsglb[ringmx][sectmx]
void set_mean(double &x, bool mdigi)
TH1F * peak_eta[netamx]
static const int sectmx
const int nphimx
const int netamx
tuple gMinuit
Definition: fitWZ.py:35
TH1F * const_eta[netamx]
TH1F * com_corrsgru[ringmx][sectmx]
int ietafit
tuple cout
Definition: gather_cfg.py:121
void fcnbg(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t flag)
Double_t langaufun(Double_t *x, Double_t *par)
TH1F * statmn_eta[netamx]
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
TH1F * corrsgall[netamx][nphimx]
TH1F * stat_eta[netamx]

Member Data Documentation

float HOCalibAnalyzer::ahigh
private

Definition at line 436 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::alow
private

Definition at line 435 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::binwid
private

Definition at line 437 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::caloen[3]
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::chisq
private

Definition at line 430 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_corrsgall[ringmx][sectmx]
private

Definition at line 367 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_corrsgc[ringmx][sectmx]
private

Definition at line 373 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_corrsgl[ringmx][sectmx]
private

Definition at line 369 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_corrsglb[ringmx][sectmx]
private

Definition at line 363 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_corrsglu[ringmx][sectmx]
private

Definition at line 365 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_corrsgr[ringmx][sectmx]
private

Definition at line 370 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_corrsgrb[ringmx][sectmx]
private

Definition at line 364 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_corrsgru[ringmx][sectmx]
private

Definition at line 366 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_crossg[ringmx][routmx+1]
private

Definition at line 377 of file HOCalibAnalyzer.cc.

TProfile* HOCalibAnalyzer::com_hbtime[ringmx][sectmx]
private

Definition at line 360 of file HOCalibAnalyzer.cc.

TProfile* HOCalibAnalyzer::com_hopedtime[ringmx][sectmx]
private

Definition at line 357 of file HOCalibAnalyzer.cc.

TProfile* HOCalibAnalyzer::com_hotime[ringmx][sectmx]
private

Definition at line 356 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::com_invang[ringmx][routmx+1]
private

Definition at line 378 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::com_sigrsg[ringmx][routmx+1]
private

Definition at line 376 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::const_eta[netamx]
private

Definition at line 405 of file HOCalibAnalyzer.cc.

TH2F* HOCalibAnalyzer::const_eta_phi
private

Definition at line 403 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::const_hpdrm[ringmx]
private

Definition at line 410 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::corrsgall[netamx][nphimx]
private

Definition at line 283 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::corrsgc[netamx][nphimx]
private

Definition at line 317 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::corrsgl[netamx][nphimx]
private

Definition at line 285 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::corrsglb[netamx][nphimx]
private

Definition at line 279 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::corrsglu[netamx][nphimx]
private

Definition at line 281 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::corrsgr[netamx][nphimx]
private

Definition at line 286 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::corrsgrb[netamx][nphimx]
private

Definition at line 280 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::corrsgru[netamx][nphimx]
private

Definition at line 282 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::crossg[netamx][nphimx+1]
private

Definition at line 325 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::fit_bkgevt
private

Definition at line 389 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::fit_chi
private

Definition at line 386 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::fit_sigevt
private

Definition at line 388 of file HOCalibAnalyzer.cc.

double HOCalibAnalyzer::fitprm[nsgpr][netamx]
private

Definition at line 422 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::hbhe_sig[9]
private

Definition at line 344 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hbhesig[9]
private

Definition at line 430 of file HOCalibAnalyzer.cc.

TProfile* HOCalibAnalyzer::hbtime[netamx][nphimx]
private

Definition at line 273 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ho_sig00[9]
private

Definition at line 339 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ho_sig1m[9]
private

Definition at line 340 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ho_sig1p[9]
private

Definition at line 338 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ho_sig2m[9]
private

Definition at line 341 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ho_sig2p[9]
private

Definition at line 337 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hoang
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hocorsig[18]
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hocro
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hodx
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hody
private

Definition at line 430 of file HOCalibAnalyzer.cc.

TProfile* HOCalibAnalyzer::hopedtime[netamx][nphimx]
private

Definition at line 270 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hosig[9]
private

Definition at line 430 of file HOCalibAnalyzer.cc.

TProfile* HOCalibAnalyzer::hotime[netamx][nphimx]
private

Definition at line 269 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::htime
private

Definition at line 430 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::ievt
private

Definition at line 429 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::invang[netamx][nphimx+1]
private

Definition at line 326 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::ipass
private

Definition at line 252 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::irun
private

Definition at line 429 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::irunold
private

Definition at line 438 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::isect
private

Definition at line 429 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::itrg1
private

Definition at line 429 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::itrg2
private

Definition at line 429 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_checkmap
private

Definition at line 238 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_combined
private

Definition at line 240 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_constant
private

Definition at line 241 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_correl
private

Definition at line 237 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_cosmic
private

Definition at line 244 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_digiInput
private

Definition at line 243 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_figure
private

Definition at line 242 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_hbinfo
private

Definition at line 239 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_hbtime
private

Definition at line 236 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_histfit
private

Definition at line 245 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_hotime
private

Definition at line 235 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_pedsuppr
private

Definition at line 246 of file HOCalibAnalyzer.cc.

double HOCalibAnalyzer::m_sigma
private

Definition at line 247 of file HOCalibAnalyzer.cc.

TH2F* HOCalibAnalyzer::mean_energy
private

Definition at line 420 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mean_eta_ave
private

Definition at line 415 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mean_phi_ave
private

Definition at line 416 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mean_phi_hst
private

Definition at line 417 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncorrsgall
private

Definition at line 292 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncorrsgc
private

Definition at line 318 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncorrsgl
private

Definition at line 294 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncorrsglb
private

Definition at line 288 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncorrsglu
private

Definition at line 290 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncorrsgr
private

Definition at line 295 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncorrsgrb
private

Definition at line 289 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncorrsgru
private

Definition at line 291 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mncrossg
private

Definition at line 329 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::mnsigrsg
private

Definition at line 328 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonch
private

Definition at line 260 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonmm
private

Definition at line 257 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonnm
private

Definition at line 256 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonph
private

Definition at line 259 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonth
private

Definition at line 258 of file HOCalibAnalyzer.cc.

const int HOCalibAnalyzer::mypow_2_ncut = 8192
staticprivate

Definition at line 250 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::nbn
private

Definition at line 434 of file HOCalibAnalyzer.cc.

const int HOCalibAnalyzer::ncut = 13
staticprivate

Definition at line 249 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::ndof
private

Definition at line 429 of file HOCalibAnalyzer.cc.

const int HOCalibAnalyzer::neffip =6
staticprivate

Definition at line 353 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcorrsgall
private

Definition at line 310 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcorrsgc
private

Definition at line 320 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcorrsgl
private

Definition at line 312 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcorrsglb
private

Definition at line 306 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcorrsglu
private

Definition at line 308 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcorrsgr
private

Definition at line 313 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcorrsgrb
private

Definition at line 307 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcorrsgru
private

Definition at line 309 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevcrossg
private

Definition at line 335 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::Nevents
private

Definition at line 433 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::nevsigrsg
private

Definition at line 334 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::nmuon
private

Definition at line 429 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::peak_eta[netamx]
private

Definition at line 408 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::peak_hpdrm[ringmx]
private

Definition at line 413 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ped_evt
private

Definition at line 383 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ped_mean
private

Definition at line 384 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ped_rms
private

Definition at line 400 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ped_statmean
private

Definition at line 398 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::ped_width
private

Definition at line 385 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::pherr
private

Definition at line 430 of file HOCalibAnalyzer.cc.

const int HOCalibAnalyzer::ringmx =5
staticprivate

Definition at line 349 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscorrsgall
private

Definition at line 301 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscorrsgc
private

Definition at line 319 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscorrsgl
private

Definition at line 303 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscorrsglb
private

Definition at line 297 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscorrsglu
private

Definition at line 299 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscorrsgr
private

Definition at line 304 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscorrsgrb
private

Definition at line 298 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscorrsgru
private

Definition at line 300 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmscrossg
private

Definition at line 332 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::rmssigrsg
private

Definition at line 331 of file HOCalibAnalyzer.cc.

const int HOCalibAnalyzer::rout12mx =24
staticprivate

Definition at line 352 of file HOCalibAnalyzer.cc.

const int HOCalibAnalyzer::routmx =36
staticprivate

Definition at line 351 of file HOCalibAnalyzer.cc.

const int HOCalibAnalyzer::sectmx =12
staticprivate

Definition at line 350 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonch
private

Definition at line 266 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonmm
private

Definition at line 263 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonnm
private

Definition at line 262 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonph
private

Definition at line 265 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonth
private

Definition at line 264 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_diff
private

Definition at line 391 of file HOCalibAnalyzer.cc.

TH2F* HOCalibAnalyzer::sig_effi[neffip]
private

Definition at line 419 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_evt
private

Definition at line 387 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_mean
private

Definition at line 390 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_meanerr
private

Definition at line 394 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_meanerrp
private

Definition at line 395 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_rms
private

Definition at line 401 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_sigma
private

Definition at line 393 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_signf
private

Definition at line 396 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_statmean
private

Definition at line 399 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sig_width
private

Definition at line 392 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sigrsg[netamx][nphimx+1]
private

Definition at line 324 of file HOCalibAnalyzer.cc.

TProfile* HOCalibAnalyzer::sigvsevt[15][ncut]
private

Definition at line 425 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::stat_eta[netamx]
private

Definition at line 406 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::statmn_eta[netamx]
private

Definition at line 407 of file HOCalibAnalyzer.cc.

TTree* HOCalibAnalyzer::T1
private

Definition at line 254 of file HOCalibAnalyzer.cc.

TFile* HOCalibAnalyzer::theFile
private

Definition at line 230 of file HOCalibAnalyzer.cc.

std::string HOCalibAnalyzer::theoutputpsFile
private

Definition at line 233 of file HOCalibAnalyzer.cc.

std::string HOCalibAnalyzer::theoutputtxtFile
private

Definition at line 232 of file HOCalibAnalyzer.cc.

std::string HOCalibAnalyzer::theRootFileName
private

Definition at line 231 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::therr
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkdr
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkdz
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkmm
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkph
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkth
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkvx
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkvy
private

Definition at line 430 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkvz
private

Definition at line 430 of file HOCalibAnalyzer.cc.