Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-23 04:29:26

0001 #ifndef TrackerHitProducer_h
0002 #define TrackerHitProducer_h
0003 
0004 // framework & common header files
0005 #include "FWCore/Framework/interface/one/EDProducer.h"
0006 #include "FWCore/Framework/interface/Frameworkfwd.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 
0009 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0010 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0011 #include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
0012 
0013 #include <string>
0014 #include <vector>
0015 
0016 namespace edm {
0017   class HepMCProduct;
0018 }
0019 class PTrackerSimHit;
0020 
0021 class TrackerHitProducer : public edm::one::EDProducer<> {
0022 public:
0023   typedef std::vector<float> FloatVector;
0024   typedef std::vector<int> IntegerVector;
0025 
0026   explicit TrackerHitProducer(const edm::ParameterSet &);
0027   ~TrackerHitProducer() override;
0028   void beginJob() override;
0029   void endJob() override;
0030   void produce(edm::Event &, const edm::EventSetup &) override;
0031 
0032 private:
0033   // production related methods
0034   void fillG4MC(edm::Event &);
0035   void storeG4MC(PTrackerSimHit &);
0036   void fillTrk(edm::Event &, const edm::EventSetup &);
0037   void storeTrk(PTrackerSimHit &);
0038 
0039   void clear();
0040 
0041 private:
0042   //  parameter information
0043   bool getAllProvenances;
0044   bool printProvenanceInfo;
0045   int verbosity;
0046 
0047   // private statistics information
0048   unsigned int count;
0049 
0050   int nRawGenPart;
0051 
0052   edm::ParameterSet config_;
0053 
0054   edm::EDGetTokenT<edm::HepMCProduct> edmHepMCProductToken_;
0055   edm::EDGetTokenT<edm::SimVertexContainer> edmSimVertexContainerToken_;
0056   edm::EDGetTokenT<edm::SimTrackContainer> edmSimTrackContainerToken_;
0057   edm::EDGetTokenT<edm::PSimHitContainer> edmPSimHitContainer_pxlBrlLow_Token_, edmPSimHitContainer_pxlBrlHigh_Token_;
0058   edm::EDGetTokenT<edm::PSimHitContainer> edmPSimHitContainer_pxlFwdLow_Token_, edmPSimHitContainer_pxlFwdHigh_Token_;
0059   edm::EDGetTokenT<edm::PSimHitContainer> edmPSimHitContainer_siTIBLow_Token_, edmPSimHitContainer_siTIBHigh_Token_;
0060   edm::EDGetTokenT<edm::PSimHitContainer> edmPSimHitContainer_siTOBLow_Token_, edmPSimHitContainer_siTOBHigh_Token_;
0061   edm::EDGetTokenT<edm::PSimHitContainer> edmPSimHitContainer_siTIDLow_Token_, edmPSimHitContainer_siTIDHigh_Token_;
0062   edm::EDGetTokenT<edm::PSimHitContainer> edmPSimHitContainer_siTECLow_Token_, edmPSimHitContainer_siTECHigh_Token_;
0063 
0064   // G4MC info
0065   FloatVector G4VtxX;
0066   FloatVector G4VtxY;
0067   FloatVector G4VtxZ;
0068   FloatVector G4TrkPt;
0069   FloatVector G4TrkE;
0070   FloatVector G4TrkEta;
0071   FloatVector G4TrkPhi;
0072 
0073   // Tracker info
0074 
0075   // Hit info
0076   IntegerVector HitsSysID;
0077   FloatVector HitsDuID;
0078   FloatVector HitsTkID;
0079   FloatVector HitsProT;
0080   FloatVector HitsParT;
0081   FloatVector HitsP;
0082   FloatVector HitsLpX;
0083   FloatVector HitsLpY;
0084   FloatVector HitsLpZ;
0085   FloatVector HitsLdX;
0086   FloatVector HitsLdY;
0087   FloatVector HitsLdZ;
0088   FloatVector HitsLdTheta;
0089   FloatVector HitsLdPhi;
0090   FloatVector HitsExPx;
0091   FloatVector HitsExPy;
0092   FloatVector HitsExPz;
0093   FloatVector HitsEnPx;
0094   FloatVector HitsEnPy;
0095   FloatVector HitsEnPz;
0096   FloatVector HitsEloss;
0097   FloatVector HitsToF;
0098 
0099   std::string fName;
0100   std::string label;
0101 
0102 };  // end class declaration
0103 
0104 #endif