CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/SimTracker/TrackHistory/interface/TrackQuality.h

Go to the documentation of this file.
00001 /*
00002  *  TrackQuality.h
00003  *
00004  *  Created by Christophe Saout on 9/25/08.
00005  *  Copyright 2007 __MyCompanyName__. All rights reserved.
00006  *
00007  */
00008 
00009 #ifndef TrackQuality_h
00010 #define TrackQuality_h
00011 
00012 #include <vector>
00013 #include <memory>
00014 
00015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00016 
00017 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
00018 
00019 #include "DataFormats/Common/interface/Handle.h"
00020 #include "DataFormats/Common/interface/DetSetVector.h"
00021 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00022 
00023 #include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
00024 
00026 class TrackQuality
00027 {
00028 public:
00029     typedef std::vector<TrackingParticleRef> SimParticleTrail;
00030 
00031     struct Layer
00032     {
00033         enum SubDet
00034         {
00035             Invalid = 0,
00036             PixelBarrel, PixelForward,
00037             StripTIB, StripTID, StripTOB, StripTEC,
00038             MuonDT, MuonCSC, MuonRPCBarrel, MuonRPCEndcap
00039         };
00040 
00041         enum State
00042         {
00043             Unknown = 0,
00044             Good,
00045             Missed,
00046             Noise,
00047             Bad,
00048             Dead,
00049             Shared,
00050             Misassoc
00051         };
00052 
00053         struct Hit
00054         {
00055             short int recHitId;
00056             State state;
00057         };
00058 
00059         SubDet subDet;
00060         short int layer;
00061         std::vector<Hit> hits;
00062     };
00063 
00064 public:
00066     /* Creates a TrackQuality object from a pset.
00067 
00068        /param[in] pset with the configuration values
00069     */
00070     TrackQuality(const edm::ParameterSet &);
00071 
00073     void newEvent(const edm::Event &, const edm::EventSetup &);
00074 
00076     void evaluate(SimParticleTrail const &, reco::TrackBaseRef const &);
00077 
00079     unsigned int numberOfLayers() const
00080     {
00081         return layers_.size();
00082     }
00083 
00085     const Layer &layer(unsigned int index) const
00086     {
00087         return layers_[index];
00088     }
00089 
00090 private:
00091     const edm::ParameterSet associatorPSet_;
00092     std::auto_ptr<TrackerHitAssociator> associator_;
00093 
00094     std::vector<Layer> layers_;
00095 };
00096 
00097 #endif