File indexing completed on 2024-04-06 12:31:05
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef TrackQuality_h
0010 #define TrackQuality_h
0011
0012 #include <memory>
0013 #include <vector>
0014
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016
0017 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
0018
0019 #include "DataFormats/Common/interface/DetSetVector.h"
0020 #include "DataFormats/Common/interface/Handle.h"
0021 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0022
0023 #include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
0024
0025 class TrackerTopology;
0026
0027
0028 class TrackQuality {
0029 public:
0030 typedef std::vector<TrackingParticleRef> SimParticleTrail;
0031
0032 struct Layer {
0033 enum SubDet {
0034 Invalid = 0,
0035 PixelBarrel,
0036 PixelForward,
0037 StripTIB,
0038 StripTID,
0039 StripTOB,
0040 StripTEC,
0041 MuonDT,
0042 MuonCSC,
0043 MuonRPCBarrel,
0044 MuonRPCEndcap
0045 };
0046
0047 enum State { Unknown = 0, Good, Missed, Noise, Bad, Dead, Shared, Misassoc };
0048
0049 struct Hit {
0050 short int recHitId;
0051 State state;
0052 };
0053
0054 SubDet subDet;
0055 short int layer;
0056 std::vector<Hit> hits;
0057 };
0058
0059 public:
0060
0061
0062
0063
0064
0065 TrackQuality(const edm::ParameterSet &, edm::ConsumesCollector &iC);
0066
0067
0068 void newEvent(const edm::Event &, const edm::EventSetup &);
0069
0070
0071 void evaluate(SimParticleTrail const &, reco::TrackBaseRef const &, const TrackerTopology *tTopo);
0072
0073
0074 unsigned int numberOfLayers() const { return layers_.size(); }
0075
0076
0077 const Layer &layer(unsigned int index) const { return layers_[index]; }
0078
0079 private:
0080 TrackerHitAssociator::Config trackerHitAssociatorConfig_;
0081 std::unique_ptr<TrackerHitAssociator> associator_;
0082
0083 std::vector<Layer> layers_;
0084 };
0085
0086 #endif