CMS 3D CMS Logo

SubsystemNeutronWriter.h
Go to the documentation of this file.
1 #ifndef SubsystemNeutronWriter_h
2 #define SubsystemNeutronWriter_h
3 
15 #include <vector>
16 #include <map>
20 
21 namespace CLHEP {
22  class HepRandomEngine;
23 }
24 
25 class NeutronWriter;
26 
29 public:
31 
33  ~SubsystemNeutronWriter() override;
34 
35  void printStats();
36 
37  void produce(edm::Event& e, edm::EventSetup const& c) override;
38 
39  virtual int localDetId(int globalDetId) const = 0;
40 
41  virtual int chamberType(int globalDetId) const = 0;
42 
43  virtual int chamberId(int globalDetId) const = 0;
44 
46  virtual bool accept(const edm::PSimHitContainer& cluster) const = 0;
47 
49  void initialize(int chamberType);
50 
51 protected:
52  virtual void writeHits(int chamberType, edm::PSimHitContainer& chamberHits, CLHEP::HepRandomEngine*);
53 
54  void writeCluster(int chamberType, const edm::PSimHitContainer& cluster);
55 
57  void adjust(PSimHit& h, float timeOffset, float smearing);
58 
60  void updateCount(int chamberType);
61 
62 private:
67  double theTimeWindow;
68  double theT0;
71  // true means to translate DetId into just layer number, e.g., 1-6 in CSC
73  std::map<int, int> theCountPerChamberType;
74 };
75 
76 #endif
static AlgebraicMatrix initialize()
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
doesn&#39;t have to be a producer. Can act as an analyzer, too.
std::map< int, int > theCountPerChamberType
std::vector< PSimHit > PSimHitContainer