Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Validation_RecoMuon_MuonSeedTrack_H
0002 #define Validation_RecoMuon_MuonSeedTrack_H
0003 
0004 /** \class MuonSeedTrack 
0005  *
0006  *
0007  * Make a (fake) reco::Track from a TrajectorySeed.  The (fake) track
0008  * can be associated to a TrackingParticle (SimTrack) using
0009  * SimTracker/TrackAssociation.  The association can then be used in
0010  * Validation packages, such as Validation/RecoMuon/MuonTrackValidator.cc
0011  *
0012  *
0013  *  \author Adam Everett        Purdue University
0014  */
0015 
0016 // system include files
0017 #include <memory>
0018 
0019 // user include files
0020 #include "FWCore/Framework/interface/Frameworkfwd.h"
0021 #include "FWCore/Framework/interface/one/EDProducer.h"
0022 
0023 #include "FWCore/Framework/interface/Event.h"
0024 #include "FWCore/Framework/interface/MakerMacros.h"
0025 
0026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0027 
0028 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0029 
0030 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0031 #include "DQMServices/Core/interface/DQMStore.h"
0032 
0033 #include <DQMServices/Core/interface/DQMEDAnalyzer.h>
0034 
0035 namespace reco {
0036   class Track;
0037 }
0038 
0039 class MuonServiceProxy;
0040 class TrajectorySeed;
0041 class MuonUpdatorAtVertex;
0042 //
0043 // class decleration
0044 //
0045 
0046 class MuonSeedTrack : public edm::one::EDProducer<> {
0047 public:
0048   /// constructor with config
0049   explicit MuonSeedTrack(const edm::ParameterSet&);
0050 
0051   /// destructor
0052   ~MuonSeedTrack() override;
0053 
0054 private:
0055   /// pre-job booking
0056   void beginJob() override;
0057 
0058   /// construct proto-tracks
0059   void produce(edm::Event&, const edm::EventSetup&) override;
0060 
0061   /// post-job
0062   void endJob() override;
0063 
0064   /// get the TrajectorySeed's TrajectoryStateOnSurface
0065   TrajectoryStateOnSurface getSeedTSOS(const TrajectorySeed& seed) const;
0066 
0067   /// set the Branch alias
0068   void setAlias(std::string alias) {
0069     alias.erase(alias.size() - 1, alias.size());
0070     theAlias = alias;
0071   }
0072 
0073   /// Build a track at the PCA WITHOUT any vertex constriant
0074   std::pair<bool, reco::Track> buildTrackAtPCA(const TrajectorySeed&) const;
0075 
0076   // ----------member data ---------------------------
0077 
0078   /// the event setup proxy, it takes care the services update
0079   MuonServiceProxy* theService;
0080 
0081   /// the class used for updating a Trajectory State at veretex
0082   MuonUpdatorAtVertex* theUpdatorAtVtx;
0083 
0084   /// the Branch alias
0085   std::string theAlias;
0086 
0087   /// the propagator used for extracting TSOS from seed
0088   //std::string theSeedPropagatorName;
0089 
0090   /// the TrajectorySeed label
0091   edm::InputTag theSeedsLabel;
0092   edm::EDGetTokenT<TrajectorySeedCollection> theSeedsToken;
0093 
0094   ///
0095   bool theAllowNoVtxFlag;
0096 };
0097 
0098 #endif