CMS 3D CMS Logo

Public Member Functions | Private Attributes

BjetAnalysis Class Reference

Inheritance diagram for BjetAnalysis:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 BjetAnalysis (const edm::ParameterSet &cfg)

Private Attributes

double chi2Cut_
double etaMax_
double etaMin_
TH1D * h_GlbMuChi2_
TH1D * h_GlbMuDxy_
TH1D * h_GlbMuNofHitsGlbMu_
TH1D * h_TrkMuNofHitsGlbMu_
double massMax_
double massMin_
std::vector< unsigned int > matched_
int nHitCut_
double ptMin_
edm::InputTag src_
double trkIso_
std::vector< unsigned int > unMatched_

Detailed Description

Definition at line 6 of file BjetAnalyzer.cc.


Constructor & Destructor Documentation

BjetAnalysis::BjetAnalysis ( const edm::ParameterSet cfg)

Definition at line 37 of file BjetAnalyzer.cc.

References h_GlbMuChi2_, h_GlbMuDxy_, h_GlbMuNofHitsGlbMu_, h_TrkMuNofHitsGlbMu_, and TFileDirectory::make().

                                                      : 
  src_(cfg.getParameter<InputTag>("src")), 
  ptMin_(cfg.getUntrackedParameter<double>("ptMin")),
  massMin_(cfg.getUntrackedParameter<double>("massMin")),
  massMax_(cfg.getUntrackedParameter<double>("massMax")),
  etaMin_(cfg.getUntrackedParameter<double>("etaMin")),
  etaMax_(cfg.getUntrackedParameter<double>("etaMax")),
  trkIso_(cfg.getUntrackedParameter<double>("trkIso")),
  chi2Cut_(cfg.getUntrackedParameter<double>("chi2Cut")),
  nHitCut_(cfg.getUntrackedParameter<int>("nHitCut"))
{
  Service<TFileService> fs;
  TFileDirectory trackEffDir = fs->mkdir("QualityOfGlbMu");
  h_GlbMuNofHitsGlbMu_= trackEffDir.make<TH1D>("# of Hits of GlobalMuon", "# of Hits of GlobalMuon", 100, 0, 100);
  h_TrkMuNofHitsGlbMu_= trackEffDir.make<TH1D>("# of Hits of TrackerMuon", "# of Hits of TrackerMuon", 100, 0, 100);
  h_GlbMuChi2_= trackEffDir.make<TH1D>("chi2 of GlobalMuon", "chi2 of GlobalMuon", 100,0,10); 
  h_GlbMuDxy_= trackEffDir.make<TH1D>("Dxy of GlobalMuon", "Dxy of GlobalMuon", 1000,-5.,5.); 
}

Member Function Documentation

void BjetAnalysis::analyze ( const edm::Event evt,
const edm::EventSetup  
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 61 of file BjetAnalyzer.cc.

References gather_cfg::cout, edm::Event::getByLabel(), i, edm::Handle< T >::product(), and edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::size().

                                                                    {


  // Get b tag information
  edm::Handle<reco::JetTagCollection> bTagHandle;
  evt.getByLabel("trackCountingHighEffBJetTags", bTagHandle);
  const reco::JetTagCollection & bTags = *(bTagHandle.product());

  // Loop over jets and study b tag info.
  for (unsigned int i = 0; i != bTags.size(); ++i) {
    cout<<" Jet "<< i 
        <<" has b tag discriminator (trackCountingHighEffBJetTags)= "<<bTags[i].second
        << " and jet Pt = "<<bTags[i].first->pt()<<endl;
  }

  // Get b tag information
  edm::Handle<reco::JetTagCollection> bTagHandle2;
  evt.getByLabel("jetProbabilityBJetTags", bTagHandle2);
  const reco::JetTagCollection & bTags2 = *(bTagHandle2.product());

  // Loop over jets and study b tag info.
  for (unsigned int i = 0; i != bTags2.size(); ++i) {
    cout<<" Jet "<< i 
        <<" has b tag discriminator (jetProbabilityBJetTags) = "<<bTags2[i].second
        << " and jet Pt = "<<bTags2[i].first->pt()<<endl;
  }


  // Get b tag information
  edm::Handle<reco::JetTagCollection> bTagHandle3;
  evt.getByLabel("jetBProbabilityBJetTags", bTagHandle3);
  const reco::JetTagCollection & bTags3 = *(bTagHandle3.product());

  // Loop over jets and study b tag info.
  for (unsigned int i = 0; i != bTags3.size(); ++i) {
    cout<<" Jet "<< i 
        <<" has b tag discriminator (jetBProbabilityBJetTags) = "<<bTags3[i].second
        << " and jet Pt = "<<bTags3[i].first->pt()<<endl;
  }










}

Member Data Documentation

double BjetAnalysis::chi2Cut_ [private]

Definition at line 14 of file BjetAnalyzer.cc.

double BjetAnalysis::etaMax_ [private]

Definition at line 14 of file BjetAnalyzer.cc.

double BjetAnalysis::etaMin_ [private]

Definition at line 14 of file BjetAnalyzer.cc.

TH1D * BjetAnalysis::h_GlbMuChi2_ [private]

Definition at line 16 of file BjetAnalyzer.cc.

Referenced by BjetAnalysis().

TH1D * BjetAnalysis::h_GlbMuDxy_ [private]

Definition at line 16 of file BjetAnalyzer.cc.

Referenced by BjetAnalysis().

Definition at line 16 of file BjetAnalyzer.cc.

Referenced by BjetAnalysis().

Definition at line 16 of file BjetAnalyzer.cc.

Referenced by BjetAnalysis().

double BjetAnalysis::massMax_ [private]

Definition at line 14 of file BjetAnalyzer.cc.

double BjetAnalysis::massMin_ [private]

Definition at line 14 of file BjetAnalyzer.cc.

std::vector<unsigned int> BjetAnalysis::matched_ [private]

Definition at line 13 of file BjetAnalyzer.cc.

int BjetAnalysis::nHitCut_ [private]

Definition at line 15 of file BjetAnalyzer.cc.

double BjetAnalysis::ptMin_ [private]

Definition at line 14 of file BjetAnalyzer.cc.

Definition at line 12 of file BjetAnalyzer.cc.

double BjetAnalysis::trkIso_ [private]

Definition at line 14 of file BjetAnalyzer.cc.

std::vector<unsigned int> BjetAnalysis::unMatched_ [private]

Definition at line 13 of file BjetAnalyzer.cc.