CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/Validation/TrackerHits/interface/TrackerHitProducer.h

Go to the documentation of this file.
00001 #ifndef TrackerHitProducer_h
00002 #define TrackerHitProducer_h
00003 
00004 // framework & common header files
00005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00006 #include "FWCore/Framework/interface/EDProducer.h"
00007 #include "FWCore/Framework/interface/Frameworkfwd.h"
00008 #include "FWCore/Framework/interface/Event.h"
00009 #include "FWCore/Framework/interface/EventSetup.h"
00010 #include "DataFormats/Common/interface/Handle.h"
00011 #include "FWCore/Framework/interface/ESHandle.h"
00012 #include "FWCore/Framework/interface/MakerMacros.h"
00013 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
00014 #include "DataFormats/Provenance/interface/Provenance.h"
00015 //#include "FWCore/Framework/interface/Provenance.h"
00016 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00017 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00018 #include "DataFormats/DetId/interface/DetId.h"
00019 
00020 // tracker info
00021 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00022 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
00023 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00024 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
00025 
00026 
00027 // data in edm::event
00028 #include "SimDataFormats/ValidationFormats/interface/PValidationFormats.h"
00029 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
00030 #include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
00031 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
00032 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
00033 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
00034 //#include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
00035 //#include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
00036 
00037 // helper files
00038 #include <CLHEP/Vector/LorentzVector.h>
00039 #include "CLHEP/Units/GlobalSystemOfUnits.h"
00040 
00041 #include <iostream>
00042 #include <stdlib.h>
00043 #include <string>
00044 #include <memory>
00045 #include <vector>
00046 
00047 #include "TString.h"
00048 
00049 class PGlobalSimHit;
00050   
00051 class TrackerHitProducer : public edm::EDProducer
00052 {
00053   
00054  public:
00055 
00056   typedef std::vector<float> FloatVector;
00057   typedef std::vector<int> IntegerVector;
00058 
00059   explicit TrackerHitProducer(const edm::ParameterSet&);
00060   virtual ~TrackerHitProducer();
00061   virtual void beginJob();
00062   virtual void endJob();  
00063   virtual void produce(edm::Event&, const edm::EventSetup&);
00064   
00065  private:
00066 
00067   //TrackerHitidation(const TrackerHitidation&);   
00068   //const TrackerHitidation& operator=(const TrackerHitidation&);
00069 
00070   // production related methods
00071   void fillG4MC(edm::Event&);
00072   void storeG4MC(PTrackerSimHit&);
00073   void fillTrk(edm::Event&, const edm::EventSetup&);
00074   void storeTrk(PTrackerSimHit&);
00075 
00076   void clear();
00077 
00078  private:
00079 
00080   //  parameter information
00081   std::string fName;
00082   int verbosity;
00083   std::string label;
00084   bool getAllProvenances;
00085   bool printProvenanceInfo;
00086 
00087   // G4MC info
00088   int nRawGenPart;
00089   FloatVector G4VtxX; 
00090   FloatVector G4VtxY; 
00091   FloatVector G4VtxZ; 
00092   FloatVector G4TrkPt; 
00093   FloatVector G4TrkE;
00094   FloatVector G4TrkEta;
00095   FloatVector G4TrkPhi;
00096 
00097 
00098   // Tracker info
00099 
00100   // Hit info
00101   IntegerVector HitsSysID;
00102   FloatVector HitsDuID;
00103   FloatVector HitsTkID; 
00104   FloatVector HitsProT; 
00105   FloatVector HitsParT; 
00106   FloatVector HitsP;
00107   FloatVector HitsLpX; 
00108   FloatVector HitsLpY; 
00109   FloatVector HitsLpZ; 
00110   FloatVector HitsLdX; 
00111   FloatVector HitsLdY; 
00112   FloatVector HitsLdZ; 
00113   FloatVector HitsLdTheta; 
00114   FloatVector HitsLdPhi;
00115   FloatVector HitsExPx; 
00116   FloatVector HitsExPy; 
00117   FloatVector HitsExPz;
00118   FloatVector HitsEnPx; 
00119   FloatVector HitsEnPy; 
00120   FloatVector HitsEnPz;
00121   FloatVector HitsEloss; 
00122   FloatVector HitsToF;
00123   
00124   edm::InputTag SiTIBLowSrc_;
00125   edm::InputTag SiTIBHighSrc_;
00126   edm::InputTag SiTOBLowSrc_;
00127   edm::InputTag SiTOBHighSrc_;
00128   edm::InputTag SiTIDLowSrc_;
00129   edm::InputTag SiTIDHighSrc_;
00130   edm::InputTag SiTECLowSrc_;
00131   edm::InputTag SiTECHighSrc_;
00132   edm::InputTag PxlBrlLowSrc_;
00133   edm::InputTag PxlBrlHighSrc_;
00134   edm::InputTag PxlFwdLowSrc_;
00135   edm::InputTag PxlFwdHighSrc_;
00136 
00137   edm::ParameterSet config_;
00138   // private statistics information
00139   unsigned int count;
00140 
00141 }; // end class declaration
00142   
00143 
00144 #endif