Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:33:34

0001 // -*- C++ -*-
0002 //
0003 // Package:    TrackParameterAnalyzer
0004 // Class:      TrackParameterAnalyzer
0005 //
0006 /**\class TrackParameterAnalyzer TrackParameterAnalyzer.cc Validation/RecoVertex/src/TrackParameterAnalyzer.cc
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Wolfram Erdmann
0015 //         Created:  Fri Jun  2 10:54:05 CEST 2006
0016 //
0017 //
0018 
0019 // system include files
0020 #include <string>
0021 
0022 // user include files
0023 #include "FWCore/Framework/interface/Frameworkfwd.h"
0024 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026 
0027 // simulated vertex
0028 #include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
0029 
0030 // simulated track
0031 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0032 
0033 // track
0034 #include "DataFormats/TrackReco/interface/TrackBase.h"
0035 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0036 
0037 // ROOT forward declarations
0038 class TFile;
0039 class TH1;
0040 class TH2;
0041 
0042 // class declaration
0043 //
0044 typedef reco::TrackBase::ParameterVector ParameterVector;
0045 
0046 class TrackParameterAnalyzer : public edm::one::EDAnalyzer<> {
0047 public:
0048   explicit TrackParameterAnalyzer(const edm::ParameterSet&);
0049   ~TrackParameterAnalyzer() override;
0050 
0051   void analyze(const edm::Event&, const edm::EventSetup&) override;
0052   void beginJob() override;
0053   void endJob() override;
0054 
0055 private:
0056   bool match(const ParameterVector& a, const ParameterVector& b);
0057   // ----------member data ---------------------------
0058   edm::EDGetTokenT<edm::SimVertexContainer> edmSimVertexContainerToken_;
0059   edm::EDGetTokenT<edm::SimTrackContainer> edmSimTrackContainerToken_;
0060   edm::EDGetTokenT<reco::TrackCollection> recoTrackCollectionToken_;
0061   // root file to store histograms
0062   std::string outputFile_;  // output file
0063   TFile* rootFile_;
0064   TH1* h1_pull0_;
0065   TH1* h1_pull1_;
0066   TH1* h1_pull2_;
0067   TH1* h1_pull3_;
0068   TH1* h1_pull4_;
0069   TH1* h1_res0_;
0070   TH1* h1_res1_;
0071   TH1* h1_res2_;
0072   TH1* h1_res3_;
0073   TH1* h1_res4_;
0074   TH1* h1_Beff_;
0075   TH2* h2_dvsphi_;
0076   TH1* h1_par0_;
0077   TH1* h1_par1_;
0078   TH1* h1_par2_;
0079   TH1* h1_par3_;
0080   TH1* h1_par4_;
0081   double simUnit_;
0082   bool verbose_;
0083 };