CMS 3D CMS Logo

Public Member Functions | Private Attributes

RPCRecHitProbabilityClient Class Reference

#include <RPCRecHitProbabilityClient.h>

Inheritance diagram for RPCRecHitProbabilityClient:
edm::EDAnalyzer

List of all members.

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 Analyze.
void beginJob ()
 BeginJob.
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 Begin Lumi block.
void beginRun (const edm::Run &, const edm::EventSetup &)
void endJob ()
 Endjob.
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 End Lumi Block.
void endRun (const edm::Run &, const edm::EventSetup &)
 RPCRecHitProbabilityClient (const edm::ParameterSet &ps)
 Constructor.
virtual ~RPCRecHitProbabilityClient ()
 Destructor.

Private Attributes

DQMStoredbe_
std::string globalFolder_

Detailed Description

Definition at line 10 of file RPCRecHitProbabilityClient.h.


Constructor & Destructor Documentation

RPCRecHitProbabilityClient::RPCRecHitProbabilityClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 12 of file RPCRechitProbabilityClient.cc.

References edm::ParameterSet::getUntrackedParameter(), and globalFolder_.

                                                                                    {

  edm::LogVerbatim ("rpcdqmclient") << "[RPCRecHitProbabilityClient]: Constructor";

  
  std::string subsystemFolder= iConfig.getUntrackedParameter<std::string>("RPCFolder", "RPC");
  std::string recHitTypeFolder= iConfig.getUntrackedParameter<std::string>("MuonFolder", "Muon");

  std::string summaryFolder = iConfig.getUntrackedParameter<std::string>("GlobalFolder", "SummaryHistograms");

  globalFolder_ = subsystemFolder + "/"+ recHitTypeFolder + "/"+ summaryFolder ;

}
RPCRecHitProbabilityClient::~RPCRecHitProbabilityClient ( ) [virtual]

Destructor.

Definition at line 26 of file RPCRechitProbabilityClient.cc.

References dbe_.

{dbe_ = 0;}

Member Function Documentation

void RPCRecHitProbabilityClient::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Analyze.

Implements edm::EDAnalyzer.

Definition at line 42 of file RPCRechitProbabilityClient.cc.

{}
void RPCRecHitProbabilityClient::beginJob ( void  ) [virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 28 of file RPCRechitProbabilityClient.cc.

References dbe_, cmsCodeRules::cppFunctionSkipper::operator, and DQMStore::setVerbose().

                                         {

  edm::LogVerbatim ("rpcrechitprobabilityclient") << "[RPCRecHitProbabilityClient]: Begin Job";

  dbe_ = edm::Service<DQMStore>().operator->();
  dbe_->setVerbose(0);
  
}
void RPCRecHitProbabilityClient::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
) [virtual]

Begin Lumi block.

Reimplemented from edm::EDAnalyzer.

Definition at line 40 of file RPCRechitProbabilityClient.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 38 of file RPCRechitProbabilityClient.cc.

{}
void RPCRecHitProbabilityClient::endJob ( void  ) [virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 169 of file RPCRechitProbabilityClient.cc.

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

End Lumi Block.

Reimplemented from edm::EDAnalyzer.

Definition at line 44 of file RPCRechitProbabilityClient.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 46 of file RPCRechitProbabilityClient.cc.

References dbe_, DQMStore::get(), MonitorElement::getTH1F(), globalFolder_, i, mergeVDriftHistosByStation::name, and NULL.

                                                                               {
  
  edm::LogVerbatim ("rpcrechitprobabilityclient") << "[RPCRecHitProbabilityClient]: End Run";
  
  MonitorElement *  NumberOfMuonEta = dbe_->get( globalFolder_ +"/NumberOfMuonEta");
  MonitorElement *  NumberOfMuonPt_B = dbe_->get( globalFolder_ + "/NumberOfMuonPt_Barrel");
  MonitorElement *  NumberOfMuonPt_EP = dbe_->get( globalFolder_ + "/NumberOfMuonPt_EndcapP");
  MonitorElement *  NumberOfMuonPt_EM = dbe_->get( globalFolder_ + "/NumberOfMuonPt_EndcapM");
  MonitorElement *  NumberOfMuonPhi_B = dbe_->get( globalFolder_ + "/NumberOfMuonPhi_Barrel");
  MonitorElement *  NumberOfMuonPhi_EP = dbe_->get( globalFolder_ + "/NumberOfMuonPhi_EndcapP");
  MonitorElement *  NumberOfMuonPhi_EM = dbe_->get( globalFolder_ + "/NumberOfMuonPhi_EndcapM");
  
  if(NumberOfMuonEta == 0  || 
     NumberOfMuonPt_B == 0  || NumberOfMuonPt_EP == 0  || NumberOfMuonPt_EM == 0  || 
     NumberOfMuonPhi_B == 0  || NumberOfMuonPhi_EP == 0  || NumberOfMuonPhi_EM == 0 ) return;


  TH1F *    NumberOfMuonEtaTH1F = NumberOfMuonEta->getTH1F(); 
  TH1F *    NumberOfMuonPtBTH1F = NumberOfMuonPt_B->getTH1F(); 
  TH1F *    NumberOfMuonPtEPTH1F = NumberOfMuonPt_EP->getTH1F(); 
  TH1F *    NumberOfMuonPtEMTH1F = NumberOfMuonPt_EM->getTH1F(); 
  TH1F *    NumberOfMuonPhiBTH1F = NumberOfMuonPhi_B->getTH1F(); 
  TH1F *    NumberOfMuonPhiEPTH1F = NumberOfMuonPhi_EP->getTH1F(); 
  TH1F *    NumberOfMuonPhiEMTH1F = NumberOfMuonPhi_EM->getTH1F(); 
      
  MonitorElement *  recHit;
  TH1F *  recHitTH1F; 
  std::stringstream name;
      
  for(int i = 1 ; i<= 6  ; i++) {
    
    recHit = NULL;
    recHitTH1F = NULL;

    name.str("");
    name<< globalFolder_ <<"/"<<i<<"RecHitMuonEta";
    recHit = dbe_->get(name.str());

    if(recHit){
      
      recHitTH1F = recHit->getTH1F(); 
      recHitTH1F->Divide(NumberOfMuonEtaTH1F);
    }

    recHit = NULL;
    recHitTH1F = NULL;

    name.str("");
    name<< globalFolder_ <<"/"<<i<<"RecHitMuonPtB";
    recHit = dbe_->get(name.str());

    if(recHit){      
      recHitTH1F = recHit->getTH1F(); 
      recHitTH1F->Divide(NumberOfMuonPtBTH1F);
    }

    recHit = NULL;
    recHitTH1F = NULL;
    
    name.str("");
    name<< globalFolder_ <<"/"<<i<<"RecHitMuonPhiB";
    recHit = dbe_->get(name.str());

    if(recHit){      
      recHitTH1F = recHit->getTH1F(); 
      recHitTH1F->Divide(NumberOfMuonPhiBTH1F);
    }

    recHit = NULL;
    recHitTH1F = NULL;

    name.str("");
    name<< globalFolder_ <<"/"<<i<<"RecHitMuonPtEP";
    recHit = dbe_->get(name.str());

    if(recHit){      
      recHitTH1F = recHit->getTH1F(); 
      recHitTH1F->Divide(NumberOfMuonPtEPTH1F);
    }

    recHit = NULL;
    recHitTH1F = NULL;

    name.str("");
    name<< globalFolder_ <<"/"<<i<<"RecHitMuonPhiEP";
    recHit = dbe_->get(name.str());

    if(recHit){      
      recHitTH1F = recHit->getTH1F(); 
      recHitTH1F->Divide(NumberOfMuonPhiEPTH1F);
    }

    
    recHit = NULL;
    recHitTH1F = NULL;

    name.str("");
    name<< globalFolder_ <<"/"<<i<<"RecHitMuonPtEM";
    recHit = dbe_->get(name.str());

    if(recHit){      
      recHitTH1F = recHit->getTH1F(); 
      recHitTH1F->Divide(NumberOfMuonPtEMTH1F);
    }

    recHit = NULL;
    recHitTH1F = NULL;

    name.str("");
    name<< globalFolder_ <<"/"<<i<<"RecHitMuonPhiEM";
    recHit = dbe_->get(name.str());

    if(recHit){     
      recHitTH1F = recHit->getTH1F(); 
      recHitTH1F->Divide(NumberOfMuonPhiEMTH1F);
    }



  }

}

Member Data Documentation

Definition at line 45 of file RPCRecHitProbabilityClient.h.

Referenced by beginJob(), endRun(), and ~RPCRecHitProbabilityClient().

Definition at line 43 of file RPCRecHitProbabilityClient.h.

Referenced by endRun(), and RPCRecHitProbabilityClient().