Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:21

0001 #ifndef CastorSim_CastorElectronicsSim_h
0002 #define CastorSim_CastorElectronicsSim_h
0003 
0004 /** This class turns a CaloSamples, representing the analog
0005     signal input to the readout electronics, into a
0006     digitized data frame
0007  */
0008 #include "CalibFormats/CaloObjects/interface/CaloSamples.h"
0009 
0010 class CastorDataFrame;
0011 
0012 class CastorAmplifier;
0013 class CastorCoderFactory;
0014 
0015 namespace CLHEP {
0016   class HepRandomEngine;
0017 }
0018 
0019 class CastorElectronicsSim {
0020 public:
0021   CastorElectronicsSim(CastorAmplifier *amplifier, const CastorCoderFactory *coderFactory);
0022   ~CastorElectronicsSim();
0023 
0024   void analogToDigital(CLHEP::HepRandomEngine *, CaloSamples &linearFrame, CastorDataFrame &result);
0025 
0026   /// Things that need to be initialized every event
0027   void newEvent(CLHEP::HepRandomEngine *);
0028 
0029 private:
0030   template <class Digi>
0031   void convert(CaloSamples &frame, Digi &result, CLHEP::HepRandomEngine *);
0032 
0033   CastorAmplifier *theAmplifier;
0034   const CastorCoderFactory *theCoderFactory;
0035 
0036   int theStartingCapId;
0037 };
0038 
0039 #endif