CMS 3D CMS Logo

SiPixelRecHitConverter.h

Go to the documentation of this file.
00001 #ifndef RecoLocalTracker_SiPixelRecHits_SiPixelRecHitConverter_h
00002 #define RecoLocalTracker_SiPixelRecHits_SiPixelRecHitConverter_h
00003 
00004 //---------------------------------------------------------------------------
00032 //---------------------------------------------------------------------------
00033 
00034 //--- Base class for CPEs:
00035 #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
00036 //&&& #include "RecoLocalTracker/SiPixelRecHits/interface/PixelCPEBase.h"
00037 
00038 //--- Geometry + DataFormats
00039 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00040 #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
00041 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
00042 #include "DataFormats/Common/interface/EDProduct.h"
00043 #include "DataFormats/Common/interface/DetSetVector.h"
00044 
00045 //--- Framework
00046 #include "FWCore/Framework/interface/EDProducer.h"
00047 #include "FWCore/Framework/interface/Event.h"
00048 #include "FWCore/Framework/interface/EventSetup.h"
00049 
00050 //#define TP_OLD
00051 #ifdef TP_OLD
00052 #include "FWCore/Framework/interface/Handle.h"
00053 #else
00054 #include "DataFormats/Common/interface/Handle.h"
00055 #endif
00056 #include "FWCore/Framework/interface/ESHandle.h"
00057 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00058 #include "FWCore/ParameterSet/interface/InputTag.h"
00059 
00060 class MagneticField;
00061 namespace cms
00062 {
00063   class SiPixelRecHitConverter : public edm::EDProducer
00064   {
00065   public:
00066     //--- Constructor, virtual destructor (just in case)
00067     explicit SiPixelRecHitConverter(const edm::ParameterSet& conf);
00068     virtual ~SiPixelRecHitConverter();
00069 
00070     //--- Factory method to make CPE's depending on the ParameterSet
00071     //--- Not sure if we need to make more than one CPE to run concurrently
00072     //--- on different parts of the detector (e.g., one for the barrel and the 
00073     //--- one for the forward).  The way the CPE's are written now, it's
00074     //--- likely we can use one (and they will switch internally), or
00075     //--- make two of the same but configure them differently.  We need a more
00076     //--- realistic use case...
00077 
00078     //--- The top-level event method.
00079     virtual void produce(edm::Event& e, const edm::EventSetup& c);
00080 
00081     // Begin Job
00082     virtual void beginJob(const edm::EventSetup& c);
00083 
00084     //--- Execute the position estimator algorithm(s).
00085     //--- New interface with DetSetVector
00086     void run(const edmNew::DetSetVector<SiPixelCluster>& input,
00087              SiPixelRecHitCollectionNew & output,
00088              edm::ESHandle<TrackerGeometry> & geom);
00089 
00090     void run(edm::Handle<edmNew::DetSetVector<SiPixelCluster> >  inputhandle,
00091              SiPixelRecHitCollectionNew & output,
00092              edm::ESHandle<TrackerGeometry> & geom);
00093 
00094   private:
00095     edm::ParameterSet conf_;
00096     // TO DO: maybe allow a map of pointers?
00097     std::string cpeName_;                   // what the user said s/he wanted
00098     const PixelClusterParameterEstimator * cpe_;  // what we got (for now, one ptr to base class)
00099     //&&& PixelCPEBase * cpe_;                    // what we got (for now, one ptr to base class)
00100     bool ready_;                            // needed CPE's valid => good to go!
00101     edm::InputTag src_;
00102     int   theVerboseLevel;              // algorithm's verbosity
00103     bool m_newCont; // save also in emdNew::DetSetVector
00104   };
00105 }
00106 
00107 
00108 #endif

Generated on Tue Jun 9 17:43:59 2009 for CMSSW by  doxygen 1.5.4