Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:11

0001 #ifndef MU_END_DIGITIZER
0002 #define MU_END_DIGITIZER
0003 
0004 // This is CSCDigitizer.h
0005 
0006 /** \class CSCDigitizer
0007  *  Digitizer class for endcap muon CSCs.
0008  *
0009  *  \author Rick Wilkinson
0010  *
0011  */
0012 
0013 #include "CLHEP/Random/RandomEngine.h"
0014 #include "DataFormats/CSCDigi/interface/CSCComparatorDigiCollection.h"
0015 #include "DataFormats/CSCDigi/interface/CSCStripDigiCollection.h"
0016 #include "DataFormats/CSCDigi/interface/CSCWireDigiCollection.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
0019 #include "MagneticField/Engine/interface/MagneticField.h"
0020 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0021 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0022 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
0023 
0024 #include "DataFormats/Common/interface/DetSetVector.h"
0025 #include "SimDataFormats/TrackerDigiSimLink/interface/StripDigiSimLink.h"
0026 
0027 class CSCDriftSim;
0028 class CSCWireHitSim;
0029 class CSCStripHitSim;
0030 class CSCWireElectronicsSim;
0031 class CSCStripElectronicsSim;
0032 class CSCLayer;
0033 class CSCNeutronReader;
0034 class CSCStripConditions;
0035 
0036 namespace CLHEP {
0037   class HepRandomEngine;
0038 }
0039 
0040 class CSCDigitizer {
0041 public:
0042   typedef edm::DetSetVector<StripDigiSimLink> DigiSimLinks;
0043 
0044   ~CSCDigitizer();
0045   CSCDigitizer(const CSCDigitizer &) = delete;
0046   CSCDigitizer &operator=(const CSCDigitizer &) = delete;
0047 
0048   /// configurable parameters
0049   explicit CSCDigitizer(const edm::ParameterSet &p);
0050 
0051   /**  digitize
0052    */
0053   void doAction(MixCollection<PSimHit> &simHits,
0054                 CSCWireDigiCollection &wireDigis,
0055                 CSCStripDigiCollection &stripDigis,
0056                 CSCComparatorDigiCollection &comparators,
0057                 DigiSimLinks &wireDigiSimLinks,
0058                 DigiSimLinks &stripDigiSimLinks,
0059                 CLHEP::HepRandomEngine *);
0060 
0061   /// sets geometry
0062   void setGeometry(const CSCGeometry *geom) { theCSCGeometry = geom; }
0063 
0064   /// sets the magnetic field
0065   void setMagneticField(const MagneticField *field);
0066 
0067   void setStripConditions(CSCStripConditions *cond);
0068 
0069   void setParticleDataTable(const ParticleDataTable *pdt);
0070 
0071 private:
0072   /// finds the layer in the geometry associated with this det ID
0073   const CSCLayer *findLayer(int detId) const;
0074 
0075   /// finds which layers, 1-6, aren't in the current list
0076   std::list<int> layersMissing(const CSCStripDigiCollection &stripDigis) const;
0077 
0078   CSCDriftSim *theDriftSim;
0079   CSCWireHitSim *theWireHitSim;
0080   CSCStripHitSim *theStripHitSim;
0081   CSCWireElectronicsSim *theWireElectronicsSim;
0082   CSCStripElectronicsSim *theStripElectronicsSim;
0083   CSCNeutronReader *theNeutronReader;
0084   const CSCGeometry *theCSCGeometry;
0085   CSCStripConditions *theConditions;
0086   unsigned int theLayersNeeded;
0087   bool digitizeBadChambers_;
0088 };
0089 
0090 #endif