CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

L1TDTTFClient Class Reference

#include <L1TDTTFClient.h>

Inheritance diagram for L1TDTTFClient:
edm::EDAnalyzer

List of all members.

Public Member Functions

 L1TDTTFClient (const edm::ParameterSet &ps)
 Constructor.
virtual ~L1TDTTFClient ()
 Destructor.

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze.
void beginJob (void)
 BeginJob.
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void endJob ()
 Endjob.
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic.
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun.
void makeSummary ()

Private Member Functions

void buildHighQualityPlot (TH2F *occupancySummary, MonitorElement *highQual_Summary, const std::string &path)
void buildPhiEtaPlotO (MonitorElement *phi_eta_integ, const std::string &path, int wh)
void buildPhiEtaPlotOFC (MonitorElement *phi_eta_fine_integ, MonitorElement *phi_eta_coarse_integ, MonitorElement *phi_eta_integ, const std::string &path_fine, const std::string &path_coarse, int wh)
void buildSummaries ()
TH1F * getTH1F (const char *hname)
TH2F * getTH2F (const char *hname)
template<typename T >
void normalize (T *me)
template<typename T >
void normalize (T *me, const double &scale, const double &entries)
template<typename T >
void normalize (T *me, const double &scale)
void setGMTsummary ()
void setMapLabel (MonitorElement *me)
void setQualLabel (MonitorElement *me, int axis)
void setWheelLabel (MonitorElement *me)

Private Attributes

int counterLS_
DQMStoredbe_
MonitorElementdttf_2ndTrack_Summary
MonitorElementdttf_bx_integ
MonitorElementdttf_bx_integ_2ndTrack
MonitorElementdttf_bx_summary
MonitorElementdttf_bx_summary_2ndTrack
MonitorElementdttf_bx_wheel_integ [6]
MonitorElementdttf_bx_wheel_integ_2ndTrack [6]
MonitorElementdttf_bx_wheel_summary [6]
MonitorElementdttf_bx_wheel_summary_2ndTrack [6]
MonitorElementdttf_eta_fine_fraction
MonitorElementdttf_eta_fine_integ
MonitorElementdttf_eta_integ
MonitorElementdttf_eta_integ_2ndTrack
MonitorElementdttf_eta_wheel [6]
MonitorElementdttf_fine_fraction_wh [6]
MonitorElementdttf_gmt_matching
MonitorElementdttf_highQual_Summary
MonitorElementdttf_highQual_Summary_2ndTrack
MonitorElementdttf_nTracks_integ
MonitorElementdttf_nTracks_integ_2ndTrack
MonitorElementdttf_nTracks_wheel [6]
MonitorElementdttf_nTracks_wheel_2ndTrack [6]
MonitorElementdttf_occupancySummary
MonitorElementdttf_occupancySummary_2ndTrack
MonitorElementdttf_phi_eta_coarse_integ
MonitorElementdttf_phi_eta_fine_integ
MonitorElementdttf_phi_eta_integ
MonitorElementdttf_phi_eta_integ_2ndTrack
MonitorElementdttf_phi_integ
MonitorElementdttf_phi_integ_2ndTrack
MonitorElementdttf_phi_wheel [6]
MonitorElementdttf_pt_integ
MonitorElementdttf_pt_integ_2ndTrack
MonitorElementdttf_pt_wheel [6]
MonitorElementdttf_q_integ
MonitorElementdttf_q_integ_2ndTrack
MonitorElementdttf_q_wheel [6]
MonitorElementdttf_quality_integ
MonitorElementdttf_quality_integ_2ndTrack
MonitorElementdttf_quality_summary
MonitorElementdttf_quality_summary_2ndTrack
MonitorElementdttf_quality_summary_wheel [6]
MonitorElementdttf_quality_wheel [6]
edm::InputTag dttfSource_
std::string gmtpath_
std::string inclusivepath_
std::string l1tdttffolder_
TH2F * occupancy_r_
 counter
bool online_
int resetafterlumi_
bool verbose_
std::string wheel_ [6]
std::string wheelpath_ [6]

Detailed Description

Definition at line 21 of file L1TDTTFClient.h.


Constructor & Destructor Documentation

L1TDTTFClient::L1TDTTFClient ( const edm::ParameterSet ps)

Constructor.

base services

Definition at line 21 of file L1TDTTFClient.cc.

  : l1tdttffolder_ ( ps.getUntrackedParameter<std::string> ("l1tSourceFolder", "L1T/L1TDTTF") ),
    dttfSource_( ps.getParameter< edm::InputTag >("dttfSource") ),
    online_( ps.getUntrackedParameter<bool>("online", true) ),
    resetafterlumi_( ps.getUntrackedParameter<int>("resetAfterLumi", 3) ),
    counterLS_(0), occupancy_r_(0)
{
  edm::LogInfo( "L1TDTTFClient");
}
L1TDTTFClient::~L1TDTTFClient ( ) [virtual]

Destructor.

Definition at line 33 of file L1TDTTFClient.cc.

                             {
  edm::LogInfo("L1TDTTFClient")<<"[L1TDTTFClient]: ending... ";
}

Member Function Documentation

void L1TDTTFClient::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 442 of file L1TDTTFClient.cc.

{


}
void L1TDTTFClient::beginJob ( void  ) [protected, virtual]

BeginJob.

get backendinterface

occupancy summary

SUMMARY

DTTF Tracks per Wheel ditribution

DTTF Tracks distribution by Sector and Wheel

RESET 04

DTTF Tracks BX Distribution by Wheel

Fraction of DTTF Tracks BX w.r.t. Tracks with BX=0

DTTF Tracks Quality distribution

DTTF Tracks Quality distribution by Wheel

Fraction of DTTF Tracks with Quality>4 by Sector and Wheel

eta-phi Distribution of DTTF Tracks with coarse eta assignment

eta-phi Distribution of DTTF Tracks with fine eta assignment

eta-phi Distribution of DTTF Tracks

Fraction of DTTF Tracks with Fine eta Assignment

DTTF Tracks eta distribution (Packed values)

DTTF Tracks Phi distribution (Packed values)

DTTF Tracks p_{T} distribution (Packed values)

DTTF Tracks Charge distribution

DTTF 2nd Tracks Only Distribution by Sector and Wheel w.r.t. the total Number of tracks

GMT matching

DTTF 2nd Tracks per Wheel distribution

DTTF 2nd Tracks distribution by Sector and Wheel

DTTF 2nd Tracks BX Distribution by Wheel

Fraction of DTTF Tracks BX w.r.t. Tracks with BX=0

Quality

DTTF 2nd Tracks Tracks Quality distribution by Wheel

Fraction of DTTF 2nd Tracks with Quality>4 by Sector and Wheel

eta-phi Distribution of DTTF 2nd Tracks

eta Distribution of DTTF 2nd Tracks

phi Distribution of DTTF 2nd Tracks

pt Distribution of DTTF 2nd Tracks

charge Distribution of DTTF 2nd Tracks

number of tracks per wheel

Tracks BX distribution by Sector for each wheel

bx for each wheel

quality per wheel

quality per wheel 2D

eta assigment for each wheel

DTTF Tracks eta distribution (Packed values)

DTTF Tracks Phi distribution (Packed values)

DTTF Tracks p_{T} distribution (Packed values)

DTTF Tracks Charge distribution

number of 2nd tracks per wheel

bx for each wheel

bx for each wheel

Reimplemented from edm::EDAnalyzer.

Definition at line 39 of file L1TDTTFClient.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe_, dttf_2ndTrack_Summary, dttf_bx_integ, dttf_bx_integ_2ndTrack, dttf_bx_summary, dttf_bx_summary_2ndTrack, dttf_bx_wheel_integ, dttf_bx_wheel_integ_2ndTrack, dttf_bx_wheel_summary, dttf_bx_wheel_summary_2ndTrack, dttf_eta_fine_fraction, dttf_eta_integ, dttf_eta_integ_2ndTrack, dttf_eta_wheel, dttf_fine_fraction_wh, dttf_gmt_matching, dttf_highQual_Summary, dttf_highQual_Summary_2ndTrack, dttf_nTracks_integ, dttf_nTracks_integ_2ndTrack, dttf_nTracks_wheel, dttf_nTracks_wheel_2ndTrack, dttf_occupancySummary, dttf_occupancySummary_2ndTrack, dttf_phi_eta_coarse_integ, dttf_phi_eta_fine_integ, dttf_phi_eta_integ, dttf_phi_eta_integ_2ndTrack, dttf_phi_integ, dttf_phi_integ_2ndTrack, dttf_phi_wheel, dttf_pt_integ, dttf_pt_integ_2ndTrack, dttf_pt_wheel, dttf_q_integ, dttf_q_integ_2ndTrack, dttf_q_wheel, dttf_quality_integ, dttf_quality_integ_2ndTrack, dttf_quality_summary, dttf_quality_summary_2ndTrack, dttf_quality_summary_wheel, dttf_quality_wheel, gmtpath_, inclusivepath_, l1tdttffolder_, cmsCodeRules::cppFunctionSkipper::operator, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), setQualLabel(), setWheelLabel(), wheel_, and wheelpath_.

{

  edm::LogInfo("L1TDTTFClient")<<"[L1TDTTFClient]: Begin Job";

  dbe_ = edm::Service<DQMStore>().operator->();

  wheelpath_[0] = l1tdttffolder_ + "/02-WHEEL_N2";
  wheelpath_[1] = l1tdttffolder_ + "/03-WHEEL_N1";
  wheelpath_[2] = l1tdttffolder_ + "/04-WHEEL_N0";
  wheelpath_[3] = l1tdttffolder_ + "/05-WHEEL_P0";
  wheelpath_[4] = l1tdttffolder_ + "/06-WHEEL_P1";
  wheelpath_[5] = l1tdttffolder_ + "/07-WHEEL_P2";

  wheel_[0] = "N2";
  wheel_[1] = "N1";
  wheel_[2] = "N0";
  wheel_[3] = "P0";
  wheel_[4] = "P1";
  wheel_[5] = "P2";

  inclusivepath_ = l1tdttffolder_ + "/01-INCLUSIVE";
  gmtpath_ = l1tdttffolder_ + "/08-GMT_MATCH";

  char hname[100];//histo name
  char mename[100];//ME name

  dbe_->setCurrentFolder( inclusivepath_ );

  sprintf(hname, "dttf_02_nTracks");
  sprintf(mename, "DTTF Tracks by Wheel");
  dttf_nTracks_integ = dbe_->book1D(hname, mename, 6, 0, 6);
  setWheelLabel( dttf_nTracks_integ );

  sprintf(hname, "dttf_03_tracks_occupancy_summary");
  sprintf(mename, "DTTF Tracks Occupancy");
  dttf_occupancySummary = dbe_->book2D( hname, mename, 6, 0, 6, 12, 1, 13 );
  setWheelLabel( dttf_occupancySummary );
  dttf_occupancySummary->setAxisTitle("Sector", 2);


  sprintf(hname, "dttf_05_bx_occupancy");
  sprintf(mename, "DTTF Tracks BX Distribution by Wheel");
  dttf_bx_summary = dbe_->book2D( hname, mename, 6, 0, 6, 3, -1, 2 );
  setWheelLabel( dttf_bx_summary );
  dttf_bx_summary->setAxisTitle("BX", 2 );

  sprintf(hname, "dttf_06_bx");
  sprintf(mename, "DTTF Tracks BX w.r.t. Tracks with BX=0");
  dttf_bx_integ = dbe_->book1D( hname, mename, 3, -1.5, 1.5 );
  dttf_bx_integ->setAxisTitle("BX", 1);

  sprintf(hname, "dttf_07_quality");
  sprintf(mename, "DTTF Tracks Quality distribution");
  dttf_quality_integ = dbe_->book1D(hname, mename, 7, 1, 8);
  setQualLabel( dttf_quality_integ, 1);

  sprintf(hname, "dttf_08_quality_occupancy");
  sprintf(mename, "DTTF Tracks Quality distribution by Wheel");
  dttf_quality_summary = dbe_->book2D( hname, mename, 6, 0, 6, 7, 1, 8 );
  dttf_quality_summary->setAxisTitle("Wheel", 1);
  setQualLabel( dttf_quality_summary, 2);
  setWheelLabel( dttf_quality_summary );

  sprintf(hname, "dttf_09_highQuality_Tracks");
  sprintf(mename, "Fraction of DTTF Tracks with Quality>3");
  dttf_highQual_Summary = dbe_->book2D( hname, mename, 6, 0, 6, 12, 1, 13 );
  setWheelLabel( dttf_highQual_Summary );
  dttf_highQual_Summary->setAxisTitle("Sector", 2);


  sprintf(hname, "dttf_10_phi_vs_etaCoarse");
  sprintf(mename, "#eta-#phi DTTF Tracks occupancy (coarse #eta only, packed values)");
  dttf_phi_eta_coarse_integ = dbe_->book2D( hname, mename, 64, 0, 64,
                                            144, -6, 138. );
  dttf_phi_eta_coarse_integ->setAxisTitle("#eta", 1);
  dttf_phi_eta_coarse_integ->setAxisTitle("#phi", 2);

  sprintf(hname, "dttf_11_phi_vs_etaFine");
  sprintf(mename, "#eta-#phi DTTF Tracks occupancy (fine #eta only, packed values)");
  dttf_phi_eta_fine_integ = dbe_->book2D( hname, mename, 64, 0, 64,
                                          144, -6, 138. );
  dttf_phi_eta_fine_integ->setAxisTitle("#eta", 1);
  dttf_phi_eta_fine_integ->setAxisTitle("#phi", 2);

  sprintf(hname, "dttf_12_phi_vs_eta");
  sprintf(mename, "#eta-#phi DTTF Tracks occupancy");
  dttf_phi_eta_integ = dbe_->book2D( hname, mename, 64, -1.2, 1.2,
                                     144, -15, 345. );
  dttf_phi_eta_integ->setAxisTitle("#eta", 1);
  dttf_phi_eta_integ->setAxisTitle("#phi", 2);

  sprintf(hname, "dttf_13_eta_fine_fraction");
  sprintf(mename, "Fraction of DTTF Tracks with Fine #eta Assignment");
  dttf_eta_fine_fraction = dbe_->book1D( hname, mename, 6, 0, 6 );
  setWheelLabel(dttf_eta_fine_fraction);
  dttf_eta_fine_fraction->setAxisTitle("", 2);


  sprintf(hname, "dttf_14_eta");
  sprintf(mename, "DTTF Tracks #eta distribution (Packed values)");
  dttf_eta_integ = dbe_->book1D(hname, mename, 64, -0.5, 63.5);
  dttf_eta_integ->setAxisTitle("#eta", 1);

  sprintf(hname, "dttf_15_phi");
  sprintf(mename, "DTTF Tracks Phi distribution (Packed values)");
  dttf_phi_integ = dbe_->book1D(hname, mename, 144, -6, 138. );
  dttf_phi_integ->setAxisTitle("#phi", 1);

  sprintf(hname, "dttf_16_pt");
  sprintf(mename, "DTTF Tracks p_{T} distribution (Packed values)");
  dttf_pt_integ  = dbe_->book1D(hname, mename, 32, -0.5, 31.5);
  dttf_pt_integ->setAxisTitle("p_{T}", 1);

  sprintf(hname, "dttf_17_charge");
  sprintf(mename, "DTTF Tracks Charge distribution");
  dttf_q_integ = dbe_->book1D(hname, mename, 2, -0.5, 1.5);
  dttf_q_integ->setAxisTitle("Charge", 1);



  sprintf(hname, "dttf_18_2ndTrack_occupancy_summary");
  sprintf(mename, "DTTF 2nd Tracks occupancy w.r.t. Tracks with BX=0");
  dttf_2ndTrack_Summary = dbe_->book2D( hname, mename, 6, 0, 6, 12, 1, 13 );
  setWheelLabel( dttf_2ndTrack_Summary );



  dbe_->setCurrentFolder( gmtpath_ );
  sprintf(hname, "dttf_gmt_fract_matching" );
  sprintf(mename, "Fraction of DTTF tracks matching with GMT tracks" );
  dttf_gmt_matching = dbe_->book1D( hname, mename, 3, 1, 4);
  dttf_gmt_matching->setBinLabel(1, "GMT Only", 1);
  dttf_gmt_matching->setBinLabel(2, "Matching", 1);
  dttf_gmt_matching->setBinLabel(3, "DTTF Only", 1);


  dbe_->setCurrentFolder( inclusivepath_ + "/2ND_TRACK_ONLY");

  sprintf(hname, "dttf_01_nTracks_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks per Wheel distribution");
  dttf_nTracks_integ_2ndTrack = dbe_->book1D(hname, mename, 6, 0, 6);
  setWheelLabel( dttf_nTracks_integ_2ndTrack );

  sprintf(hname, "dttf_02_occupancy_summary_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks distribution by Sector and Wheel");
  dttf_occupancySummary_2ndTrack = dbe_->book2D( hname, mename, 6, 0, 6,
                                                 12, 1, 13 );
  setWheelLabel( dttf_occupancySummary_2ndTrack );

  sprintf(hname, "dttf_03_bx_occupancy_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks BX Distribution by Wheel");
  dttf_bx_summary_2ndTrack = dbe_->book2D( hname, mename, 6, 0, 6, 3, -1, 2 );
  setWheelLabel( dttf_bx_summary_2ndTrack );
  dttf_bx_summary_2ndTrack->setAxisTitle("BX", 2 );

  sprintf(hname, "dttf_04_bx_2ndTrack");
  sprintf(mename, "Fraction of DTTF Tracks BX w.r.t. Tracks with BX=0");
  dttf_bx_integ_2ndTrack = dbe_->book1D( hname, mename, 3, -1.5, 1.5 );
  dttf_bx_integ_2ndTrack->setAxisTitle("BX", 1);

  sprintf(hname, "dttf_05_quality_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks Quality distribution");
  dttf_quality_integ_2ndTrack  = dbe_->book1D(hname, mename, 7, 0.5, 7.5);
  dttf_quality_integ_2ndTrack->setAxisTitle("Quality", 1);
  setQualLabel( dttf_quality_integ_2ndTrack, 1);

  sprintf(hname, "dttf_06_quality_occupancy_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks Quality distribution by Wheel");
  dttf_quality_summary_2ndTrack = dbe_->book2D( hname, mename,
                                                6, 0, 6, 7, 1, 8 );
  dttf_quality_summary_2ndTrack->setAxisTitle("Wheel", 1);
  setQualLabel( dttf_quality_summary_2ndTrack, 2);
  setWheelLabel( dttf_quality_summary_2ndTrack );

  sprintf(hname, "dttf_07_highQuality_Tracks_2ndTrack");
  sprintf(mename, "Fraction of DTTF 2nd Tracks with Quality>3");
  dttf_highQual_Summary_2ndTrack = dbe_->book2D( hname, mename, 6, 0, 6,
                                                 12, 1, 13 );
  dttf_highQual_Summary_2ndTrack->setAxisTitle("Sector", 2);
  setWheelLabel( dttf_highQual_Summary_2ndTrack );

  sprintf(hname, "dttf_08_phi_vs_eta_2ndTrack");
  sprintf(mename, "#eta-#phi DTTF Tracks occupancy for 2nd Tracks");
  dttf_phi_eta_integ_2ndTrack = dbe_->book2D( hname, mename, 64, 0, 64,
                                              144, -6, 138. );
  dttf_phi_eta_integ_2ndTrack->setAxisTitle("#eta", 1);
  dttf_phi_eta_integ_2ndTrack->setAxisTitle("#phi", 2);

  sprintf(hname, "dttf_09_eta_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks #eta distribution (Packed values)");
  dttf_eta_integ_2ndTrack = dbe_->book1D(hname, mename, 64, -0.5, 63.5);
  dttf_eta_integ_2ndTrack->setAxisTitle("#eta", 1);

  sprintf(hname, "dttf_10_phi_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks Phi distribution (Packed values)");
  dttf_phi_integ_2ndTrack = dbe_->book1D(hname, mename, 144, -6, 138 );
  dttf_phi_integ_2ndTrack->setAxisTitle("#phi", 1);

  sprintf(hname, "dttf_11_pt_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks p_{T} distribution (Packed values)");
  dttf_pt_integ_2ndTrack  = dbe_->book1D(hname, mename, 32, -0.5, 31.5);
  dttf_pt_integ_2ndTrack->setAxisTitle("p_{T}", 1);

  sprintf(hname, "dttf_12_charge_2ndTrack");
  sprintf(mename, "DTTF 2nd Tracks Charge distribution");
  dttf_q_integ_2ndTrack = dbe_->book1D(hname, mename, 2, -0.5, 1.5);
  dttf_q_integ_2ndTrack->setAxisTitle("Charge", 1);


  for ( unsigned int wh = 0; wh < 6 ; ++wh ) {
    dbe_->setCurrentFolder( wheelpath_[wh] );

    sprintf( hname, "dttf_02_nTracks_wh%s", wheel_[wh].c_str() );
    sprintf( mename, "Wheel %s - Number of Tracks", wheel_[wh].c_str() );
    dttf_nTracks_wheel[wh] = dbe_->book1D( hname, mename, 12, 1, 13);
    dttf_nTracks_wheel[wh]->setAxisTitle("sector", 1);
 
    sprintf(hname, "dttf_03_bx_occupancy_wh%s",  wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - DTTF Tracks BX distribution by Sector",
            wheel_[wh].c_str());
    dttf_bx_wheel_summary[wh] = dbe_->book2D( hname, mename, 12, 1, 13, 3, -1, 2);
    dttf_bx_wheel_summary[wh]->setAxisTitle("BX", 2 );
    dttf_bx_wheel_summary[wh]->setAxisTitle("Sector", 1 );

    sprintf(hname, "dttf_04_bx_wh%s", wheel_[wh].c_str());
    sprintf(mename, "Wheel %s - DTTF Tracks BX w.r.t. Tracks with BX=0", wheel_[wh].c_str());
    dttf_bx_wheel_integ[wh] = dbe_->book1D(hname, mename, 3, -1.5, 1.5);
    dttf_bx_wheel_integ[wh]->setAxisTitle("BX", 1);

    sprintf(hname, "dttf_05_quality_wh%s", wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - Tracks Quality Distribution", wheel_[wh].c_str() );
    dttf_quality_wheel[wh] = dbe_->book1D(hname, mename, 7, 1, 8);
    dttf_quality_wheel[wh]->setAxisTitle("Quality", 1);
    setQualLabel(dttf_quality_wheel[wh], 1);

    sprintf(hname, "dttf_06_quality_summary_wh%s", wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - Tracks Quality Distribution by Sector",
            wheel_[wh].c_str() );
    dttf_quality_summary_wheel[wh] = dbe_->book2D(hname, mename, 12, 1, 13, 7, 1, 8);
    dttf_quality_summary_wheel[wh]->setAxisTitle("Sector", 1);
    // dttf_quality_summary_wheel[wh]->setAxisTitle("Quality", 2);
    setQualLabel(dttf_quality_summary_wheel[wh], 2);

    sprintf(hname, "dttf_09_etaFine_fraction_wh%s",  wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - Fraction of DTTF Tracks with fine #eta assignment",
            wheel_[wh].c_str());
    dttf_fine_fraction_wh[wh] = dbe_->book1D( hname, mename, 12, 1, 13);
    dttf_fine_fraction_wh[wh]->setAxisTitle("Sector", 1 );


    sprintf(hname, "dttf_10_eta_wh%s", wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - DTTF Tracks #eta distribution (Packed values)",
            wheel_[wh].c_str() );
    dttf_eta_wheel[wh] = dbe_->book1D(hname, mename, 64, -0.5, 63.5 );
    dttf_eta_wheel[wh]->setAxisTitle("#eta", 1 );

    sprintf(hname, "dttf_11_phi_wh%s", wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - DTTF Tracks Phi distribution (Packed values)",
            wheel_[wh].c_str() );
    dttf_phi_wheel[wh] = dbe_->book1D(hname, mename, 144, -6, 138. );
    dttf_phi_wheel[wh]->setAxisTitle("#phi", 1);

    sprintf(hname, "dttf_12_pt_wh%s", wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - DTTF Tracks p_{T} distribution (Packed values)",
            wheel_[wh].c_str() );
    dttf_pt_wheel[wh] = dbe_->book1D(hname, mename, 32, -0.5, 31.5);
    dttf_pt_wheel[wh]->setAxisTitle("p_{T}", 1);

    sprintf(hname, "dttf_13_charge_wh%s", wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - DTTF Tracks Charge distribution",
            wheel_[wh].c_str() );
    dttf_q_wheel[wh] = dbe_->book1D(hname, mename, 2, -0.5, 1.5);
    dttf_q_wheel[wh]->setAxisTitle("Charge", 1);

  }


  for ( unsigned int wh = 0; wh < 6 ; ++wh ) {
    dbe_->setCurrentFolder( wheelpath_[wh]  + "/2ND_TRACK_ONLY" );

    sprintf( hname, "dttf_01_nTracks_wh%s_2ndTrack", wheel_[wh].c_str() );
    sprintf( mename, "Wheel %s - DTTF Number of 2nd Tracks with BX=0",
             wheel_[wh].c_str() );
    dttf_nTracks_wheel_2ndTrack[wh] = dbe_->book1D( hname, mename,
                                                     12, 1, 13);
    dttf_nTracks_wheel_2ndTrack[wh]->setAxisTitle("sector", 1);
 
    sprintf(hname, "dttf_02_bx_occupancy_wh%s_2ndTrack",  wheel_[wh].c_str() );
    sprintf(mename, "Wheel %s - DTTF 2nd Tracks BX distribution by Sector",
            wheel_[wh].c_str());
    dttf_bx_wheel_summary_2ndTrack[wh] = dbe_->book2D( hname, mename, 12, 1, 13, 3, -1, 2);
    dttf_bx_wheel_summary_2ndTrack[wh]->setAxisTitle("BX", 2 );
    dttf_bx_wheel_summary_2ndTrack[wh]->setAxisTitle("Sector", 1 );

    sprintf(hname, "dttf_03_bx_wh%s_2ndTrack", wheel_[wh].c_str());
    sprintf(mename, "Wheel %s - 2nd Tracks BX Distribution", wheel_[wh].c_str());
    dttf_bx_wheel_integ_2ndTrack[wh] = dbe_->book1D(hname, mename, 3, -1.5, 1.5);
    dttf_bx_wheel_integ_2ndTrack[wh]->setAxisTitle("BX", 1);


  }



}
void L1TDTTFClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

optionally reset histograms here

Reimplemented from edm::EDAnalyzer.

Definition at line 405 of file L1TDTTFClient.cc.

References counterLS_, getTH2F(), inclusivepath_, occupancy_r_, online_, and resetafterlumi_.

{
  ++counterLS_;

  if ( online_ && !( counterLS_ % resetafterlumi_ ) ) {
    char hname[60];
    sprintf( hname, "%s/dttf_04_tracks_occupancy_by_lumi",
             inclusivepath_.c_str() );

    occupancy_r_ = getTH2F(hname);
    if ( ! occupancy_r_ ) {
      edm::LogError("L1TDTTFClient::beginLuminosityBlock:ME")
        << "Failed to get TH2D " << std::string(hname);
    } else {
      edm::LogInfo("L1TDTTFClient::beginLuminosityBlock:RESET") << "Reseting plots by lumi!";
      occupancy_r_->Reset();
    }
  }

}
void L1TDTTFClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 400 of file L1TDTTFClient.cc.

{
}
void L1TDTTFClient::buildHighQualityPlot ( TH2F *  occupancySummary,
MonitorElement highQual_Summary,
const std::string &  path 
) [private]

high quality TOBE IMPROVED

Definition at line 1056 of file L1TDTTFClient.cc.

References getTH2F(), MonitorElement::setBinContent(), wheel_, and wheelpath_.

Referenced by makeSummary().

{

  char hname[150];

  for ( unsigned int wh = 0; wh < 6 ; ++wh ) {
    sprintf( hname, path.c_str(), wheelpath_[wh].c_str(), wheel_[wh].c_str() );

    TH2F * quality = getTH2F(hname);
    if ( ! quality ) {
      edm::LogError("L1TDTTFClient::buildHighQualityPlot")
        << "Failed to get TH2F " << std::string(hname);
    } else {

      for ( unsigned int sec = 1; sec < 13 ; ++sec ) {
        double denHighQual = occupancySummary->GetBinContent( wh+1, sec );
        double val = 0;
        if ( denHighQual > 0 ) {
          for ( unsigned int qual = 4; qual < 8 ; ++qual ) {
            val += quality->GetBinContent( qual, sec );
          }
          val /= denHighQual;
        }
        highQual_Summary->setBinContent( wh+1, sec, val );
      }
    }
  }
}
void L1TDTTFClient::buildPhiEtaPlotO ( MonitorElement phi_eta_integ,
const std::string &  path,
int  wh 
) [private]

Definition at line 1177 of file L1TDTTFClient.cc.

References eta(), MonitorElement::getBinContent(), getTH2F(), pileupCalc::nbins, phi, MonitorElement::setBinContent(), wheel_, and wheelpath_.

Referenced by buildSummaries().

{
  char hname[100];
  sprintf( hname, path.c_str(),
           wheelpath_[wh].c_str(), wheel_[wh].c_str() );

  TH2F * phi_vs_eta = getTH2F(hname);
  if ( ! phi_vs_eta ) {
    edm::LogError("L1TDTTFClient::buildPhiEtaPlotO:ME") << "Failed to get TH1D "
                                                   << std::string(hname);
  } else {

    for ( unsigned int phi = 1; phi < 145 ; ++phi ) {
      float start = 0;
      int nbins = 0;
      switch ( wh ) {
      case 0 : start = 0;  nbins = 18; break; // N2
      case 1 : start = 8;  nbins = 20; break; // N1
      case 2 : start = 22; nbins = 10; break; // N0
      case 3 : start = 22; nbins = 20; break; // P0
      case 4 : start = 36; nbins = 20; break; // P1
      case 5 : start = 46; nbins = 18; break; // P2
      default : start = 0; nbins = 0; break; // BOH
      }

      for ( int eta = 1; eta <= nbins ; ++eta ) {
        double setbin = eta + start;
        double val = phi_vs_eta->GetBinContent( eta, phi )
          + phi_eta_integ->getBinContent( setbin, phi );
        phi_eta_integ->setBinContent( setbin, phi, val );
      }

      double underflow = phi_vs_eta->GetBinContent( 0, phi )
        + phi_eta_integ->getBinContent( 1, phi );
      phi_eta_integ->setBinContent( 1, phi, underflow );

      double overflow = phi_vs_eta->GetBinContent( nbins+1, phi )
        + phi_eta_integ->getBinContent( 64 );
      phi_eta_integ->setBinContent( 64, phi, overflow );

    }
  }
}
void L1TDTTFClient::buildPhiEtaPlotOFC ( MonitorElement phi_eta_fine_integ,
MonitorElement phi_eta_coarse_integ,
MonitorElement phi_eta_integ,
const std::string &  path_fine,
const std::string &  path_coarse,
int  wh 
) [private]

Definition at line 1091 of file L1TDTTFClient.cc.

References eta(), MonitorElement::getBinContent(), getTH2F(), pileupCalc::nbins, phi, MonitorElement::setBinContent(), wheel_, and wheelpath_.

Referenced by buildSummaries().

{

  char hname[150];
  sprintf( hname, path_fine.c_str(),
           wheelpath_[wh].c_str(), wheel_[wh].c_str() );

  TH2F * phi_vs_eta_fine = getTH2F(hname);
  if ( ! phi_vs_eta_fine ) {
    edm::LogError("L1TDTTFClient::buildPhiEtaPloOtFC")
      << "Failed to get TH1D " << std::string(hname);
  }

  sprintf( hname, path_coarse.c_str(),
           wheelpath_[wh].c_str(), wheel_[wh].c_str() );
  TH2F * phi_vs_eta_coarse = getTH2F(hname);
  if ( ! phi_vs_eta_coarse ) {
    edm::LogError("L1TDTTFClient::buildPhiEtaPlotOFC")
      << "Failed to get TH1D " << std::string(hname);
  }

  if ( ! phi_vs_eta_fine || ! phi_vs_eta_coarse ) {
    return;
  }

  for ( unsigned int phi = 1; phi < 145 ; ++phi ) {
    float start = 0;
    int nbins = 0;
    switch ( wh ) {
    case 0 : start = 0;  nbins = 18; break; // N2
    case 1 : start = 8;  nbins = 20; break; // N1
    case 2 : start = 22; nbins = 10; break; // N0
    case 3 : start = 22; nbins = 20; break; // P0
    case 4 : start = 36; nbins = 20; break; // P1
    case 5 : start = 46; nbins = 18; break; // P2
    default : start = 0; nbins = 0; break; // BOH
    }

    for ( int eta = 1; eta <= nbins ; ++eta ) {
      double setbin = eta + start;

      double valfine = phi_vs_eta_fine->GetBinContent( eta, phi )
        + phi_eta_fine_integ->getBinContent( setbin, phi );

      double valcoarse = phi_vs_eta_coarse->GetBinContent( eta, phi )
        + phi_eta_coarse_integ->getBinContent( setbin, phi );

      phi_eta_fine_integ->setBinContent( setbin, phi, valfine );
      phi_eta_coarse_integ->setBinContent( setbin, phi, valcoarse );
      phi_eta_integ->setBinContent( setbin, phi, valfine+valcoarse );

    }

    // double underflow_f = phi_vs_eta_fine->GetBinContent( 0, phi )
    //   + phi_eta_fine_integ->getBinContent( 1, phi );
    // phi_eta_fine_integ->setBinContent( 1, phi, underflow_f );
    // 
    // double underflow_c = phi_vs_eta_coarse->GetBinContent( 0, phi )
    //   + phi_eta_coarse_integ->getBinContent( 1, phi );
    // phi_eta_coarse_integ->setBinContent( 1, phi, underflow_c );
    // 
    // double overflow_f = phi_vs_eta_fine->GetBinContent( nbins+1, phi )
    //   + phi_eta_fine_integ->getBinContent( 64 );
    // phi_eta_fine_integ->setBinContent( 64, phi, overflow_f );
    // 
    // double overflow_c = phi_vs_eta_coarse->GetBinContent( nbins+1, phi )
    //   + phi_eta_coarse_integ->getBinContent( 64, phi );
    // phi_eta_coarse_integ->setBinContent( 64, phi, overflow_c );
    // 
    // double underflow = underflow_f + underflow_c;
    // phi_eta_integ->setBinContent( 1, phi, underflow );
    // 
    // double overflow = overflow_f + overflow_c;
    // phi_eta_integ->setBinContent( 64, phi, overflow );

  }

}
void L1TDTTFClient::buildSummaries ( ) [private]

needed for bx_integ

needed for bx_summary 2nd

needed for bx_integ

needed for bx_summary 2nd

needed for by wheel qualities

reset histograms

????

needed for fine fraction

needed for fine fraction

for quality

PHI vs Eta

Loop over sectors

Charge by sector

PT by sector

Phi by sector

Quality by sector

needed for high quality plot

needed for high quality plot (denominator)

eta fine by sector

eta fine fraction by sector

still eta: fraction by wheel

integ summary

still bx: wheel summary & inclusive

by wheel quality: integ summary

by wheel rescaling bx by wheel and number of tracks distribution

by wheel rescaling bx distributions

MORE ON 2ND TRACKS

eta by sector

Phi by wheel 2nd Tracks

PT by wheel 2nd Tracks

Charge by wheel 2nd Tracks

Quality by wheel 2nd Tracks

still bx: scaling integrals

rescaling bx distributions

Definition at line 549 of file L1TDTTFClient.cc.

References buildPhiEtaPlotO(), buildPhiEtaPlotOFC(), dttf_2ndTrack_Summary, dttf_bx_integ, dttf_bx_integ_2ndTrack, dttf_bx_summary, dttf_bx_summary_2ndTrack, dttf_bx_wheel_integ, dttf_bx_wheel_integ_2ndTrack, dttf_bx_wheel_summary, dttf_bx_wheel_summary_2ndTrack, dttf_eta_fine_fraction, dttf_eta_integ, dttf_eta_integ_2ndTrack, dttf_eta_wheel, dttf_fine_fraction_wh, dttf_highQual_Summary, dttf_nTracks_integ, dttf_nTracks_integ_2ndTrack, dttf_nTracks_wheel, dttf_nTracks_wheel_2ndTrack, dttf_occupancySummary, dttf_occupancySummary_2ndTrack, dttf_phi_eta_coarse_integ, dttf_phi_eta_fine_integ, dttf_phi_eta_integ, dttf_phi_eta_integ_2ndTrack, dttf_phi_integ, dttf_phi_integ_2ndTrack, dttf_phi_wheel, dttf_pt_integ, dttf_pt_integ_2ndTrack, dttf_pt_wheel, dttf_q_integ, dttf_q_integ_2ndTrack, dttf_q_wheel, dttf_quality_integ, dttf_quality_integ_2ndTrack, dttf_quality_summary, dttf_quality_summary_2ndTrack, dttf_quality_summary_wheel, dttf_quality_wheel, MonitorElement::getTH1F(), getTH1F(), getTH2F(), normalize(), MonitorElement::Reset(), pileupReCalc_HLTpaths::scale, MonitorElement::setBinContent(), tmp, wheel_, and wheelpath_.

Referenced by makeSummary().

{

  char hname[100];
  int wheelBx[4]; 
  int wheelBx2nd[4]; 
  int wheelSumBx[4]; 
  int wheelSumBx2nd[4]; 
  int qualities[8]; 

  memset( wheelSumBx, 0, 4 * sizeof(int) );
  memset( wheelSumBx2nd, 0, 4 * sizeof(int) );

  dttf_eta_integ->Reset();
  dttf_q_integ->Reset();
  dttf_pt_integ->Reset();
  dttf_phi_integ->Reset();
  dttf_quality_integ->Reset();
  dttf_phi_eta_integ->Reset();
  dttf_phi_eta_fine_integ->Reset();
  dttf_phi_eta_coarse_integ->Reset();
  dttf_q_integ_2ndTrack->Reset();
  dttf_pt_integ_2ndTrack->Reset();
  dttf_phi_integ_2ndTrack->Reset();
  dttf_eta_integ_2ndTrack->Reset();

  dttf_quality_integ_2ndTrack->Reset();
  dttf_quality_summary_2ndTrack->Reset();
 
  for ( unsigned int wh = 0; wh < 6 ; ++wh ) {

    dttf_eta_wheel[wh]->Reset();
    dttf_q_wheel[wh]->Reset();
    dttf_pt_wheel[wh]->Reset();
    dttf_phi_wheel[wh]->Reset();
    dttf_quality_wheel[wh]->Reset();
    dttf_quality_summary_wheel[wh]->Reset();
 
    double wheelEtaAll = 0; 
    double wheelEtaFine = 0; 
    memset( wheelBx, 0, 4 * sizeof(int) );
    memset( wheelBx2nd, 0, 4 * sizeof(int) );

    memset( qualities, 0, 8 * sizeof(int) );

    buildPhiEtaPlotOFC( dttf_phi_eta_fine_integ, dttf_phi_eta_coarse_integ,
                        dttf_phi_eta_integ,
                        "%s/dttf_07_phi_vs_etaFine_wh%s",
                        "%s/dttf_08_phi_vs_etaCoarse_wh%s", wh );

    buildPhiEtaPlotO( dttf_phi_eta_integ_2ndTrack,
                      "%s/2ND_TRACK_ONLY/dttf_06_phi_vs_eta_wh%s_2ndTrack",
                      wh );


    for ( unsigned int sector = 1; sector < 13; ++sector ) {

      sprintf( hname, "%s/BX_BySector/dttf_bx_wh%s_se%d",
               wheelpath_[wh].c_str(), wheel_[wh].c_str(), sector );
      
      TH1F * bxsector = getTH1F(hname);
      if ( ! bxsector ) {
        edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                       << std::string(hname);
      } else {
      
        for ( unsigned int bx = 1; bx < 4 ; ++bx ) {

          int bxval = bxsector->GetBinContent( bx );

          if ( bx == 2 ) {
            // if ( wh == 2 )
            //   dttf_occupancySummary->setBinContent( wh+1, sector, bxval*14 );
            // else
            //   dttf_occupancySummary->setBinContent( wh+1, sector, bxval );
            dttf_occupancySummary->setBinContent( wh+1, sector, bxval );
            dttf_nTracks_wheel[wh]->setBinContent(sector, bxval );
          }
          wheelBx[bx] += bxval;
          dttf_bx_wheel_summary[wh]->setBinContent( sector, bx, bxval );
        }
      }


      sprintf( hname, "%s/BX_BySector/2ND_TRACK_ONLY/dttf_bx_2ndTrack_wh%s_se%d",
               wheelpath_[wh].c_str(), wheel_[wh].c_str(), sector );
      
      TH1F * bxsector2nd = getTH1F(hname);
      if ( ! bxsector2nd ) {
        edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                       << std::string(hname);
      } else {
      
        for ( unsigned int bx = 1; bx < 4 ; ++bx ) {
          int bxval = bxsector2nd->GetBinContent( bx );

          if ( bx == 2 ) {
            dttf_2ndTrack_Summary->setBinContent( wh+1, sector, bxval );
            dttf_occupancySummary_2ndTrack->setBinContent(wh+1, sector, bxval);
            dttf_nTracks_wheel_2ndTrack[wh]->setBinContent(sector, bxval );
          }
          wheelBx2nd[bx] += bxval;
          dttf_bx_wheel_summary_2ndTrack[wh]->setBinContent(sector, bx, bxval);
        }
      }

      sprintf( hname, "%s/Charge/dttf_charge_wh%s_se%d", 
               wheelpath_[wh].c_str(), wheel_[wh].c_str(), sector );
      TH1F * tmp = getTH1F(hname);
      if ( ! tmp ) {
        edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                       << std::string(hname);
      } else {
        dttf_q_integ->getTH1F()->Add( tmp );
        dttf_q_wheel[wh]->getTH1F()->Add( tmp );
      }

      sprintf( hname, "%s/PT/dttf_pt_wh%s_se%d", 
               wheelpath_[wh].c_str(), wheel_[wh].c_str(), sector );
      tmp = getTH1F(hname);
      if ( ! tmp ) {
        edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                       << std::string(hname);
      } else {
        dttf_pt_integ->getTH1F()->Add( tmp );
        dttf_pt_wheel[wh]->getTH1F()->Add( tmp );
      }


      sprintf( hname, "%s/Phi/dttf_phi_wh%s_se%d", 
               wheelpath_[wh].c_str(), wheel_[wh].c_str(), sector );
      tmp = getTH1F(hname);
      if ( ! tmp ) {
        edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                       << std::string(hname);
      } else {
        dttf_phi_integ->getTH1F()->Add( tmp );
        dttf_phi_wheel[wh]->getTH1F()->Add( tmp );
      }


      double highQual = 0; 
      double denHighQual = 0; 
      sprintf( hname, "%s/Quality/dttf_qual_wh%s_se%d", 
               wheelpath_[wh].c_str(), wheel_[wh].c_str(), sector );
      tmp = getTH1F(hname);
      if ( ! tmp ) {
        edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                       << std::string(hname);
      } else {

        dttf_quality_wheel[wh]->getTH1F()->Add( tmp );


        for ( unsigned int qual = 1; qual < 4 ; ++qual ) {
          double bincontent = tmp->GetBinContent( qual );
          qualities[qual] += bincontent;
          denHighQual += bincontent;
          dttf_quality_summary_wheel[wh]->setBinContent(sector, qual, bincontent);
        }

        for ( unsigned int qual = 4; qual < 8 ; ++qual ) {
          double bincontent = tmp->GetBinContent( qual );
          qualities[qual] += bincontent;
          dttf_quality_summary_wheel[wh]->setBinContent(sector, qual, bincontent);
          denHighQual += bincontent;
          highQual += bincontent;
        }

      }
      if ( denHighQual > 0 ) highQual /= denHighQual;
      dttf_highQual_Summary->setBinContent( wh+1, sector, highQual );


      sprintf( hname, "%s/Eta/dttf_eta_wh%s_se%d", 
               wheelpath_[wh].c_str(), wheel_[wh].c_str(), sector );
      tmp = getTH1F(hname);
      if ( ! tmp ) {
        edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                       << std::string(hname);
      } else {
        dttf_eta_integ->getTH1F()->Add( tmp );
        dttf_eta_wheel[wh]->getTH1F()->Add( tmp );
      }


      sprintf( hname, "%s/EtaFineFraction/dttf_etaFine_fraction_wh%s_se%d", 
               wheelpath_[wh].c_str(), wheel_[wh].c_str(), sector );
      tmp = getTH1F(hname);
      if ( ! tmp ) {
        edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                       << std::string(hname);
      } else {
        double fine = tmp->GetBinContent( 1 );
        double coarse = tmp->GetBinContent( 2 );
        double tot = fine + coarse;
        wheelEtaAll += tot;
        wheelEtaFine += fine;
        if ( tot > 0 ) {
          dttf_fine_fraction_wh[wh]->setBinContent( sector, fine/tot );
        }
      }

    }

    if ( wheelEtaAll > 0 ) {
      dttf_eta_fine_fraction->setBinContent( wh+1, wheelEtaFine/wheelEtaAll );
    }

    dttf_nTracks_integ->setBinContent( wh+1, wheelBx[2] );
    dttf_nTracks_integ_2ndTrack->setBinContent( wh+1, wheelBx2nd[2] );

    for ( unsigned int bx = 1; bx < 4; ++bx ) {

      dttf_bx_wheel_integ[wh]->setBinContent( bx, wheelBx[bx] );
      dttf_bx_summary->setBinContent( wh+1, bx, wheelBx[bx] );
      wheelSumBx[bx] += wheelBx[bx];

      dttf_bx_wheel_integ_2ndTrack[wh]->setBinContent( bx, wheelBx2nd[bx] );
      dttf_bx_summary_2ndTrack->setBinContent( wh+1, bx, wheelBx2nd[bx] );
      wheelSumBx2nd[bx] += wheelBx2nd[bx];

    }


    for ( unsigned int qual = 1; qual < 8 ; ++qual ) {
      dttf_quality_summary->setBinContent( wh+1, qual, qualities[qual] );
      dttf_quality_integ->getTH1F()->AddBinContent( qual, qualities[qual] );
    }


    normalize( dttf_bx_wheel_summary[wh]->getTH2F() );
    normalize( dttf_bx_wheel_summary_2ndTrack[wh]->getTH2F() );
    normalize( dttf_nTracks_wheel[wh]->getTH1F() );
    normalize( dttf_nTracks_wheel_2ndTrack[wh]->getTH1F() );
    normalize( dttf_quality_summary_wheel[wh]->getTH2F() );
    normalize( dttf_quality_wheel[wh]->getTH1F() );
    normalize( dttf_eta_wheel[wh]->getTH1F() );
    normalize( dttf_q_wheel[wh]->getTH1F() );
    normalize( dttf_pt_wheel[wh]->getTH1F() );
    normalize( dttf_phi_wheel[wh]->getTH1F() );

    double scale = wheelBx[2];
    if ( scale > 0 ) {
      scale = 1/scale;
      normalize( dttf_bx_wheel_integ[wh]->getTH1F(), scale );
    }

    scale = wheelBx2nd[2];
    if ( scale > 0 ) {
      scale = 1/scale;
      normalize( dttf_bx_wheel_integ_2ndTrack[wh]->getTH1F(), scale );
    }






    sprintf( hname, "%s/2ND_TRACK_ONLY/dttf_07_eta_wh%s_2ndTrack", 
             wheelpath_[wh].c_str(), wheel_[wh].c_str() );
    
    TH1F * tmp = getTH1F(hname);
    if ( ! tmp ) {
      edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                     << std::string(hname);
    } else {
      dttf_eta_integ_2ndTrack->getTH1F()->Add( tmp );
    }

    sprintf( hname, "%s/2ND_TRACK_ONLY/dttf_08_phi_wh%s_2ndTrack", 
             wheelpath_[wh].c_str(), wheel_[wh].c_str() );
    tmp = getTH1F(hname);
    if ( ! tmp ) {
      edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                     << std::string(hname);
    } else {
      dttf_phi_integ_2ndTrack->getTH1F()->Add( tmp );
    }


    sprintf( hname, "%s/2ND_TRACK_ONLY/dttf_09_pt_wh%s_2ndTrack", 
             wheelpath_[wh].c_str(), wheel_[wh].c_str() );
    tmp = getTH1F(hname);
    if ( ! tmp ) {
      edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                     << std::string(hname);
    } else {
      dttf_pt_integ_2ndTrack->getTH1F()->Add( tmp );
    }

    sprintf( hname, "%s/2ND_TRACK_ONLY/dttf_10_charge_wh%s_2ndTrack", 
             wheelpath_[wh].c_str(), wheel_[wh].c_str() );
    tmp = getTH1F(hname);
    if ( ! tmp ) {
      edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                     << std::string(hname);
    } else {
      dttf_q_integ_2ndTrack->getTH1F()->Add( tmp );
    }

    sprintf( hname, "%s/2ND_TRACK_ONLY/dttf_04_quality_wh%s_2ndTrack", 
             wheelpath_[wh].c_str(), wheel_[wh].c_str() );
    tmp = getTH1F(hname);
    if ( ! tmp ) {
      edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                     << std::string(hname);
    } else {
      for ( unsigned int qual = 1; qual < 8; ++qual ) {
        double binqual = tmp->GetBinContent( qual );
        dttf_quality_integ_2ndTrack->getTH1F()->AddBinContent( qual, binqual );
        dttf_quality_summary_2ndTrack->setBinContent( wh+1, qual, binqual );
      }
    }


  }

  for ( unsigned int bx = 1; bx < 4; ++bx ) {
    dttf_bx_integ->setBinContent( bx, wheelSumBx[bx] );
    dttf_bx_integ_2ndTrack->setBinContent( bx, wheelSumBx2nd[bx] );
  }

  double scale = wheelSumBx[2];
  if ( scale > 0 ) {
    scale = 1./scale;
    normalize( dttf_bx_integ->getTH1F(), scale );
  }

  scale = wheelSumBx2nd[2];
  if ( scale > 0 ) {
    scale = 1./scale;
    normalize( dttf_bx_integ_2ndTrack->getTH1F(), scale );
  }


}
void L1TDTTFClient::endJob ( void  ) [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 456 of file L1TDTTFClient.cc.

{
}
void L1TDTTFClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) [protected, virtual]

DQM Client Diagnostic.

Processing by Luminosity Block

Reimplemented from edm::EDAnalyzer.

Definition at line 429 of file L1TDTTFClient.cc.

References makeSummary(), normalize(), occupancy_r_, and online_.

{

  if (  online_  ) {
    makeSummary();
    if ( occupancy_r_ ) normalize( occupancy_r_ );
  }

}
void L1TDTTFClient::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 450 of file L1TDTTFClient.cc.

References makeSummary().

{
  makeSummary();
}
TH1F * L1TDTTFClient::getTH1F ( const char *  hname) [private]

Definition at line 1014 of file L1TDTTFClient.cc.

References dbe_, DQMStore::get(), MonitorElement::getTH1F(), and NULL.

Referenced by buildSummaries().

{

  MonitorElement * me = dbe_->get(hname);
  if ( ! me ) {
    edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get ME "
                                                   << std::string(hname);
    return NULL;
  }


  //   edm::LogInfo("L1TDTTFClient::getTH1F") << "#################### "
  //                                     << std::string(hname);

  return me->getTH1F();

}
TH2F * L1TDTTFClient::getTH2F ( const char *  hname) [private]

Definition at line 1034 of file L1TDTTFClient.cc.

References dbe_, DQMStore::get(), MonitorElement::getTH2F(), and NULL.

Referenced by beginLuminosityBlock(), buildHighQualityPlot(), buildPhiEtaPlotO(), buildPhiEtaPlotOFC(), buildSummaries(), and setGMTsummary().

{

  MonitorElement * me = dbe_->get(hname);
  if ( ! me ) {
    edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get ME "
                                                   << std::string(hname);
    return NULL;
  }


  //   edm::LogInfo("L1TDTTFClient::getTH2F") << "#################### "
  //                                     << std::string(hname);

  return me->getTH2F();

}
void L1TDTTFClient::makeSummary ( ) [protected]

Build Summariy plots

RESCALE PLOTS

BX has simply all entries

Scale plots with all entries

Scale plots with only physical entries (no N0 duplicates)

RESCALE PLOTS FOR 2nd tracks

BX has simply all entries

buildHigh Quality Summary Plot

Scale plots with all entries

Scale plots with only physical entries (no N0 duplicates)

GMT

Definition at line 462 of file L1TDTTFClient.cc.

References buildHighQualityPlot(), buildSummaries(), dttf_2ndTrack_Summary, dttf_bx_summary, dttf_bx_summary_2ndTrack, dttf_eta_integ, dttf_eta_integ_2ndTrack, dttf_highQual_Summary_2ndTrack, dttf_nTracks_integ, dttf_nTracks_integ_2ndTrack, dttf_occupancySummary, dttf_occupancySummary_2ndTrack, dttf_phi_eta_coarse_integ, dttf_phi_eta_fine_integ, dttf_phi_eta_integ, dttf_phi_eta_integ_2ndTrack, dttf_phi_integ, dttf_phi_integ_2ndTrack, dttf_pt_integ, dttf_pt_integ_2ndTrack, dttf_q_integ, dttf_q_integ_2ndTrack, dttf_quality_integ, dttf_quality_integ_2ndTrack, dttf_quality_summary, dttf_quality_summary_2ndTrack, python::tagInventory::entries, MonitorElement::getTH1F(), MonitorElement::getTH2F(), normalize(), pileupReCalc_HLTpaths::scale, and setGMTsummary().

Referenced by endLuminosityBlock(), and endRun().

{
  buildSummaries();

  double scale = 0;
  double entries = dttf_occupancySummary->getTH2F()->Integral();

  if ( entries ) {

    normalize( dttf_bx_summary->getTH2F() );

    scale = 1 / entries;
    normalize( dttf_occupancySummary->getTH2F(), scale );
    normalize( dttf_nTracks_integ->getTH1F(), scale );

    double physEntries = dttf_eta_integ->getTH1F()->Integral();
    if ( physEntries > 0 ) {
      double physScale = 1 / physEntries;

      normalize( dttf_phi_eta_integ->getTH2F(), physScale );

      normalize( dttf_phi_eta_fine_integ->getTH2F(), physScale );
      normalize( dttf_phi_eta_coarse_integ->getTH2F(), physScale );
      normalize( dttf_quality_summary->getTH2F(), physScale );

      normalize( dttf_eta_integ->getTH1F(), physScale );
      normalize( dttf_q_integ->getTH1F(), physScale );
      normalize( dttf_pt_integ->getTH1F(), physScale );
      normalize( dttf_phi_integ->getTH1F(), physScale );
      normalize( dttf_quality_integ->getTH1F(), physScale );

    }

  }


  double entries2ndTrack = dttf_occupancySummary_2ndTrack->getTH2F()->Integral();
  if ( entries2ndTrack > 0 ) {

    normalize( dttf_bx_summary_2ndTrack->getTH2F() ); //

    TH2F * ratio = dttf_occupancySummary_2ndTrack->getTH2F();
    buildHighQualityPlot( ratio, dttf_highQual_Summary_2ndTrack,
                          "%s/2ND_TRACK_ONLY/dttf_05_quality_summary_wh%s_2ndTrack" );

    normalize( dttf_2ndTrack_Summary->getTH2F(), scale ); //

    double scale2nd = 1 / entries2ndTrack;
    normalize( dttf_occupancySummary_2ndTrack->getTH2F(), scale2nd ); //
    normalize( dttf_nTracks_integ_2ndTrack->getTH1F(), scale2nd ); //


    normalize( dttf_phi_eta_integ_2ndTrack->getTH2F() );
    normalize( dttf_q_integ_2ndTrack->getTH1F() );
    normalize( dttf_pt_integ_2ndTrack->getTH1F() );
    normalize( dttf_phi_integ_2ndTrack->getTH1F() );
    normalize( dttf_eta_integ_2ndTrack->getTH1F() );
    normalize( dttf_quality_integ_2ndTrack->getTH1F() );
    normalize( dttf_quality_summary_2ndTrack->getTH2F() );

  }

  setGMTsummary();

}
template<typename T >
void L1TDTTFClient::normalize ( T me,
const double &  scale 
) [inline, private]

Definition at line 169 of file L1TDTTFClient.h.

References normalize().

    {
      normalize( me, scale, me->Integral() );
    }
template<typename T >
void L1TDTTFClient::normalize ( T me) [inline, private]

Definition at line 160 of file L1TDTTFClient.h.

References pileupReCalc_HLTpaths::scale.

Referenced by buildSummaries(), endLuminosityBlock(), makeSummary(), and normalize().

    {
      double scale = me->Integral();
      if ( scale > 0 ) {
        normalize( me, 1./scale, scale );
      }
    }
template<typename T >
void L1TDTTFClient::normalize ( T me,
const double &  scale,
const double &  entries 
) [inline, private]

Definition at line 176 of file L1TDTTFClient.h.

    {
      me->SetEntries( entries );
      me->Scale( scale );
    }
void L1TDTTFClient::setGMTsummary ( ) [private]

Definition at line 967 of file L1TDTTFClient.cc.

References dttf_gmt_matching, getTH2F(), gmtpath_, match(), and MonitorElement::setBinContent().

Referenced by makeSummary().

{
  char hname[60];
  sprintf( hname, "%s/dttf_tracks_with_gmt_match", gmtpath_.c_str() );
  TH2F * gmt_match = getTH2F(hname);
  if ( ! gmt_match ) {
    edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                   << std::string(hname);
    return;
  }



  sprintf( hname, "%s/dttf_tracks_without_gmt_match", gmtpath_.c_str() );
  TH2F * gmt_missed = getTH2F(hname);
  if ( ! gmt_missed ) {
    edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                   << std::string(hname);
    return;
  }


  sprintf( hname, "%s/dttf_missing_tracks_in_gmt", gmtpath_.c_str() );
  TH2F * gmt_ghost = getTH2F(hname);
  if ( ! gmt_ghost ) {
    edm::LogError("L1TDTTFClient::makeSummary:ME") << "Failed to get TH1D "
                                                   << std::string(hname);
    return;
  }

  int match = gmt_match->Integral();
  int missed = gmt_missed->Integral();
  int ghost = gmt_ghost->Integral();
  float tot = match + missed + ghost;
  if ( tot > 0 ) {
    double val = ghost/tot;
    dttf_gmt_matching->setBinContent( 1, val );
    val = match/tot;
    dttf_gmt_matching->setBinContent( 2, val );
    val = missed/tot;
    dttf_gmt_matching->setBinContent( 3, val );
  }
}
void L1TDTTFClient::setMapLabel ( MonitorElement me) [private]
void L1TDTTFClient::setQualLabel ( MonitorElement me,
int  axis 
) [private]

Definition at line 1319 of file L1TDTTFClient.cc.

References MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

Referenced by beginJob().

{

  if( axis == 1 )
    me->setAxisTitle("Quality", axis);
  me->setBinLabel(1, "T34", axis);
  me->setBinLabel(2, "T23/24", axis);
  me->setBinLabel(3, "T12/13/14", axis);
  me->setBinLabel(4, "T234", axis);
  me->setBinLabel(5, "T134", axis);
  me->setBinLabel(6, "T123/124", axis);
  me->setBinLabel(7, "T1234", axis);
}
void L1TDTTFClient::setWheelLabel ( MonitorElement me) [private]

Definition at line 1305 of file L1TDTTFClient.cc.

References MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

Referenced by beginJob().

{
  me->setAxisTitle("Wheel", 1);
  me->setBinLabel(1, "N2", 1);
  me->setBinLabel(2, "N1", 1);
  me->setBinLabel(3, "N0", 1);
  me->setBinLabel(4, "P0", 1);
  me->setBinLabel(5, "P1", 1);
  me->setBinLabel(6, "P2", 1);

}

Member Data Documentation

Definition at line 64 of file L1TDTTFClient.h.

Referenced by beginLuminosityBlock().

Definition at line 66 of file L1TDTTFClient.h.

Referenced by beginJob(), getTH1F(), and getTH2F().

Definition at line 91 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 76 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 97 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 75 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 96 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 109 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 120 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 108 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 119 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 84 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 77 of file L1TDTTFClient.h.

Definition at line 87 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 102 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 113 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 112 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 90 of file L1TDTTFClient.h.

Referenced by beginJob(), and setGMTsummary().

Definition at line 80 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 100 of file L1TDTTFClient.h.

Referenced by beginJob(), and makeSummary().

Definition at line 73 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 94 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 107 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 118 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 74 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 95 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 81 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 82 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 83 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 101 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 85 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 103 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 114 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 86 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 104 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 115 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 88 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 105 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 116 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 78 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 98 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 79 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 99 of file L1TDTTFClient.h.

Referenced by beginJob(), buildSummaries(), and makeSummary().

Definition at line 111 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 110 of file L1TDTTFClient.h.

Referenced by beginJob(), and buildSummaries().

Definition at line 60 of file L1TDTTFClient.h.

std::string L1TDTTFClient::gmtpath_ [private]

Definition at line 71 of file L1TDTTFClient.h.

Referenced by beginJob(), and setGMTsummary().

std::string L1TDTTFClient::inclusivepath_ [private]

Definition at line 70 of file L1TDTTFClient.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::string L1TDTTFClient::l1tdttffolder_ [private]

Definition at line 59 of file L1TDTTFClient.h.

Referenced by beginJob().

TH2F* L1TDTTFClient::occupancy_r_ [private]

counter

Definition at line 65 of file L1TDTTFClient.h.

Referenced by beginLuminosityBlock(), and endLuminosityBlock().

bool L1TDTTFClient::online_ [private]

Definition at line 61 of file L1TDTTFClient.h.

Referenced by beginLuminosityBlock(), and endLuminosityBlock().

Definition at line 63 of file L1TDTTFClient.h.

Referenced by beginLuminosityBlock().

bool L1TDTTFClient::verbose_ [private]

Definition at line 62 of file L1TDTTFClient.h.

std::string L1TDTTFClient::wheel_[6] [private]
std::string L1TDTTFClient::wheelpath_[6] [private]