CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/RecoLocalTracker/SiPixelRecHits/interface/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/DetSetVector.h"
00043 
00044 //--- Framework
00045 #include "FWCore/Framework/interface/EDProducer.h"
00046 #include "FWCore/Framework/interface/Event.h"
00047 #include "FWCore/Framework/interface/EventSetup.h"
00048 
00049 //#define TP_OLD
00050 #ifdef TP_OLD
00051 #include "FWCore/Framework/interface/Handle.h"
00052 #else
00053 #include "DataFormats/Common/interface/Handle.h"
00054 #endif
00055 #include "FWCore/Framework/interface/ESHandle.h"
00056 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00057 #include "FWCore/Utilities/interface/InputTag.h"
00058 
00059 class MagneticField;
00060 namespace cms
00061 {
00062   class SiPixelRecHitConverter : public edm::EDProducer
00063   {
00064   public:
00065     //--- Constructor, virtual destructor (just in case)
00066     explicit SiPixelRecHitConverter(const edm::ParameterSet& conf);
00067     virtual ~SiPixelRecHitConverter();
00068 
00069     //--- Factory method to make CPE's depending on the ParameterSet
00070     //--- Not sure if we need to make more than one CPE to run concurrently
00071     //--- on different parts of the detector (e.g., one for the barrel and the 
00072     //--- one for the forward).  The way the CPE's are written now, it's
00073     //--- likely we can use one (and they will switch internally), or
00074     //--- make two of the same but configure them differently.  We need a more
00075     //--- realistic use case...
00076 
00077     //--- The top-level event method.
00078     virtual void produce(edm::Event& e, const edm::EventSetup& c);
00079 
00080     // Begin Job
00081     //virtual void beginJob();
00082     virtual void beginJob();
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