Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:35

0001 #ifndef Validation_Geometry_MaterialBudget_h
0002 #define Validation_Geometry_MaterialBudget_h
0003 
0004 #include "SimG4Core/Watcher/interface/SimWatcher.h"
0005 #include "SimG4Core/Notification/interface/Observer.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007 
0008 #include <CLHEP/Vector/LorentzVector.h>
0009 
0010 class BeginOfRun;
0011 class BeginOfTrack;
0012 class G4Step;
0013 class EndOfTrack;
0014 #include "G4LogicalVolume.hh"
0015 
0016 #include <TH1F.h>
0017 #include <TH2F.h>
0018 #include <TProfile.h>
0019 #include <TProfile2D.h>
0020 
0021 #include <string>
0022 #include <vector>
0023 
0024 class MaterialBudget : public SimWatcher,
0025                        public Observer<const BeginOfRun*>,
0026                        public Observer<const BeginOfTrack*>,
0027                        public Observer<const G4Step*>,
0028                        public Observer<const EndOfTrack*> {
0029 public:
0030   MaterialBudget(const edm::ParameterSet&);
0031   MaterialBudget(const MaterialBudget&) = delete;  // stop default
0032   ~MaterialBudget() override;
0033 
0034   const MaterialBudget& operator=(const MaterialBudget&) = delete;  // ...
0035 
0036 private:
0037   void update(const BeginOfRun*) override;
0038   void update(const BeginOfTrack*) override;
0039   void update(const G4Step*) override;
0040   void update(const EndOfTrack*) override;
0041 
0042   void book(const edm::ParameterSet&);
0043   bool stopAfter(const G4Step*);
0044 
0045   std::vector<std::string> detTypes, detNames;
0046   std::vector<int> constituents, detLevels, regionTypes, stackOrder;
0047   std::vector<double> etaRegions, boundaries;
0048   std::vector<G4LogicalVolume*> logVolumes;
0049   std::vector<TProfile*> me100, me200, me300, me400, me500, me600;
0050   std::vector<double> stepLen, radLen, intLen;
0051   double eta_, phi_, stepT;
0052 };
0053 
0054 #endif