File indexing completed on 2024-04-06 12:33:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <string>
0021
0022
0023 #include "FWCore/Framework/interface/Frameworkfwd.h"
0024 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026
0027
0028 #include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
0029
0030
0031 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0032
0033
0034 #include "DataFormats/TrackReco/interface/TrackBase.h"
0035 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0036
0037
0038 class TFile;
0039 class TH1;
0040 class TH2;
0041
0042
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
0058 edm::EDGetTokenT<edm::SimVertexContainer> edmSimVertexContainerToken_;
0059 edm::EDGetTokenT<edm::SimTrackContainer> edmSimTrackContainerToken_;
0060 edm::EDGetTokenT<reco::TrackCollection> recoTrackCollectionToken_;
0061
0062 std::string outputFile_;
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 };