File indexing completed on 2024-04-06 12:28:05
0001
0002
0003
0004
0005 #include <memory>
0006
0007
0008 #include "FWCore/Framework/interface/Frameworkfwd.h"
0009 #include "FWCore/Framework/interface/global/EDProducer.h"
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/ESHandle.h"
0012 #include "FWCore/Framework/interface/MakerMacros.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0015 #include "FWCore/Utilities/interface/InputTag.h"
0016
0017
0018 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0019 #include "DataFormats/TrackReco/interface/Track.h"
0020 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
0021 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
0022 #include "DataFormats/VertexReco/interface/Vertex.h"
0023 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0024 #include "SimDataFormats/TrackingAnalysis/interface/TrackingVertex.h"
0025 #include "SimDataFormats/TrackingAnalysis/interface/TrackingVertexContainer.h"
0026 #include "SimDataFormats/Associations/interface/TrackToTrackingParticleAssociator.h"
0027 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0028
0029
0030 #include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
0031 #include "MagneticField/Engine/interface/MagneticField.h"
0032 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0033 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0034 #include "TrackingTools/PatternTools/interface/TSCBLBuilderNoMaterial.h"
0035
0036
0037 #include "DataFormats/Math/interface/LorentzVector.h"
0038
0039
0040 #include "AnalysisDataFormats/TrackInfo/interface/TPtoRecoTrack.h"
0041 #include "AnalysisDataFormats/TrackInfo/interface/TPtoRecoTrackCollection.h"
0042 #include "AnalysisDataFormats/TrackInfo/interface/RecoTracktoTP.h"
0043 #include "AnalysisDataFormats/TrackInfo/interface/RecoTracktoTPCollection.h"
0044
0045 #include <string>
0046 #include <vector>
0047 #include <TMath.h>
0048
0049 class TrackAlgoCompareUtil : public edm::global::EDProducer<> {
0050 public:
0051 explicit TrackAlgoCompareUtil(const edm::ParameterSet &);
0052 ~TrackAlgoCompareUtil() override;
0053
0054 private:
0055 void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
0056
0057 void SetTrackingParticleD0Dz(TrackingParticleRef tp,
0058 const reco::BeamSpot &bs,
0059 const MagneticField *bf,
0060 TPtoRecoTrack &TPRT) const;
0061 void SetTrackingParticleD0Dz(TrackingParticleRef tp,
0062 const reco::BeamSpot &bs,
0063 const MagneticField *bf,
0064 RecoTracktoTP &RTTP) const;
0065
0066
0067 const edm::EDGetTokenT<edm::View<reco::Track>> trackLabel_algoA;
0068 const edm::EDGetTokenT<edm::View<reco::Track>> trackLabel_algoB;
0069 const edm::EDGetTokenT<TrackingParticleCollection> trackingParticleLabel_fakes;
0070 const edm::EDGetTokenT<TrackingParticleCollection> trackingParticleLabel_effic;
0071 edm::EDGetTokenT<reco::VertexCollection> vertexLabel_algoA;
0072 edm::EDGetTokenT<reco::VertexCollection> vertexLabel_algoB;
0073 const edm::EDGetTokenT<reco::BeamSpot> beamSpotLabel;
0074 edm::EDGetTokenT<reco::RecoToSimCollection> associatormap_algoA_recoToSim;
0075 edm::EDGetTokenT<reco::RecoToSimCollection> associatormap_algoB_recoToSim;
0076 edm::EDGetTokenT<reco::SimToRecoCollection> associatormap_algoA_simToReco;
0077 edm::EDGetTokenT<reco::SimToRecoCollection> associatormap_algoB_simToReco;
0078 edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator> assocLabel_algoA;
0079 edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator> assocLabel_algoB;
0080 const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> magField;
0081 const bool UseAssociators;
0082 const bool UseVertex;
0083 };
0084
0085
0086 DEFINE_FWK_MODULE(TrackAlgoCompareUtil);