CMS 3D CMS Logo

SubsystemNeutronWriter.h

Go to the documentation of this file.
00001 #ifndef SubsystemNeutronWriter_h
00002 #define SubsystemNeutronWriter_h
00003 
00015 #include <vector>
00016 #include <map>
00017 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
00018 #include "FWCore/Framework/interface/EDAnalyzer.h"
00019 #include "SimMuon/Neutron/src/NeutronWriter.h"
00020 #include "FWCore/Framework/interface/Event.h"
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022 #include "FWCore/Framework/interface/EventSetup.h"
00023 
00024 
00025 class SubsystemNeutronWriter : public edm::EDAnalyzer
00026 {
00027 public:
00028 
00029   explicit SubsystemNeutronWriter(edm::ParameterSet const& pset);
00030 
00032   virtual ~SubsystemNeutronWriter();
00033 
00034   void printStats();
00035 
00036   virtual void analyze(edm::Event const& e, edm::EventSetup const& c);
00037 
00038   virtual int localDetId(int globalDetId) const = 0;
00039 
00040   virtual int chamberType(int globalDetId) const = 0;
00041 
00042   virtual int chamberId(int globalDetId) const = 0;
00043 
00045   void initialize(int chamberType);
00046 
00047 protected:
00048 
00049 
00050   virtual void writeHits(int chamberType, edm::PSimHitContainer & allSimHits);
00051 
00053   void adjust(PSimHit & h, float timeOffset);
00054 
00056   void updateCount(int chamberType);
00057 
00058 private:
00059   NeutronWriter * theHitWriter;
00060   edm::InputTag theInputTag;
00061   double theNeutronTimeCut;
00062   double theTimeWindow;
00063   int theNEvents;
00064   bool initialized;
00065   std::map<int, int> theCountPerChamberType;
00066 };
00067 
00068 #endif
00069 

Generated on Tue Jun 9 17:47:41 2009 for CMSSW by  doxygen 1.5.4