CMS 3D CMS Logo

HCalSD.h

Go to the documentation of this file.
00001 #ifndef SimG4CMS_HCalSD_h
00002 #define SimG4CMS_HCalSD_h
00004 // File: HCalSD.h
00005 // Description: Stores hits of Hadron calorimeter in appropriate container
00006 // Use in your sensitive detector builder:
00007 //    HCalSD* hcalSD = new HCalSD(SDname, new CaloNumberingScheme());
00009 
00010 #include "SimG4CMS/Calo/interface/CaloSD.h"
00011 #include "SimG4CMS/Calo/interface/HFShower.h"
00012 #include "SimG4CMS/Calo/interface/HFShowerLibrary.h"
00013 #include "SimG4CMS/Calo/interface/HFShowerParam.h"
00014 #include "SimG4CMS/Calo/interface/HFShowerPMT.h"
00015 #include "SimG4CMS/Calo/interface/HcalNumberingScheme.h"
00016 #include "DetectorDescription/Core/interface/DDsvalues.h"
00017 #include "Geometry/HcalCommonData/interface/HcalNumberingFromDDD.h"
00018 
00019 #include "G4String.hh"
00020 #include <map>
00021 #include <string>
00022 
00023 class DDCompactView;
00024 class DDFilteredView;
00025 class G4LogicalVolume;
00026 class G4Material;
00027 class G4Step;
00028 
00029 class HCalSD : public CaloSD {
00030 
00031 public:    
00032 
00033   HCalSD(G4String , const DDCompactView &, SensitiveDetectorCatalog &,
00034          edm::ParameterSet const &, const SimTrackManager*);
00035   virtual ~HCalSD();
00036   virtual bool                  ProcessHits(G4Step * , G4TouchableHistory * );
00037   virtual double                getEnergyDeposit(G4Step* );
00038   virtual uint32_t              setDetUnitId(G4Step* step);
00039   void                          setNumberingScheme(HcalNumberingScheme* );
00040 
00041 protected:
00042 
00043   virtual void                  initRun();
00044 
00045 private:    
00046 
00047   uint32_t                      setDetUnitId(int, G4ThreeVector, int, int);
00048   std::vector<double>           getDDDArray(const std::string&, 
00049                                             const DDsvalues_type&);
00050   std::vector<G4String>         getNames(DDFilteredView&);
00051   bool                          isItHF(G4Step *);
00052   bool                          isItHF(G4String);
00053   bool                          isItFibre(G4LogicalVolume*);
00054   bool                          isItFibre(G4String);
00055   bool                          isItPMT(G4LogicalVolume*);
00056   bool                          isItScintillator(G4Material*);
00057   void                          getFromLibrary(G4Step * step);
00058   void                          hitForFibre(G4Step * step);
00059   void                          getFromParam(G4Step * step);
00060   void                          getHitPMT(G4Step * step);
00061   int                           setTrackID(G4Step * step);
00062   void                          readWeightFromFile(std::string);
00063   double                        layerWeight(int, G4ThreeVector, int, int);
00064 
00065   HcalNumberingFromDDD*         numberingFromDDD;
00066   HcalNumberingScheme*          numberingScheme;
00067   HFShowerLibrary *             showerLibrary;
00068   HFShower *                    hfshower;
00069   HFShowerParam *               showerParam;
00070   HFShowerPMT *                 showerPMT;
00071   bool                          useBirk, useLayerWt;
00072   double                        birk1, birk2, birk3, betaThr;
00073   bool                          useHF, useShowerLibrary, useParam, usePMTHit;
00074   G4int                         mumPDG, mupPDG; 
00075   std::vector<double>           layer0wt;
00076   std::vector<G4LogicalVolume*> hfLV;
00077   std::vector<G4String>         hfNames;
00078   std::vector<int>              hfLevels;
00079   std::vector<G4LogicalVolume*> fibreLV;
00080   std::vector<G4String>         fibreNames;
00081   std::vector<G4String>         matNames;
00082   std::vector<G4Material*>      materials;
00083   std::vector<G4LogicalVolume*> pmtLV;
00084   std::vector<G4String>         pmtNames;
00085   std::map<uint32_t,double>     layerWeights;
00086 
00087 };
00088 
00089 #endif // HCalSD_h

Generated on Tue Jun 9 17:46:48 2009 for CMSSW by  doxygen 1.5.4