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 {
30 public:
31 
33 
35  virtual ~SubsystemNeutronWriter();
36 
37  void printStats();
38 
39  virtual void produce(edm::Event & e, edm::EventSetup const& c);
40 
41  virtual int localDetId(int globalDetId) const = 0;
42 
43  virtual int chamberType(int globalDetId) const = 0;
44 
45  virtual int chamberId(int globalDetId) const = 0;
46 
48  virtual bool accept(const edm::PSimHitContainer & cluster) const = 0;
49 
51  void initialize(int chamberType);
52 
53 protected:
54 
55  virtual void writeHits(int chamberType, edm::PSimHitContainer & chamberHits, CLHEP::HepRandomEngine*);
56 
57  void writeCluster(int chamberType, const edm::PSimHitContainer & cluster);
58 
60  void adjust(PSimHit & h, float timeOffset, float smearing);
61 
63  void updateCount(int chamberType);
64 
65 private:
70  double theTimeWindow;
71  double theT0;
74  // true means to translate DetId into just layer number, e.g., 1-6 in CSC
76  std::map<int, int> theCountPerChamberType;
77 };
78 
79 #endif
80 
static AlgebraicMatrix initialize()
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