Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Validation_Geometry_MaterialBudgetForward_h
0002 #define Validation_Geometry_MaterialBudgetForward_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 MaterialBudgetForward : 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   MaterialBudgetForward(const edm::ParameterSet &);
0031   MaterialBudgetForward(const MaterialBudgetForward &) = delete;  // stop default
0032   ~MaterialBudgetForward() override;
0033 
0034   const MaterialBudgetForward &operator=(const MaterialBudgetForward &) = 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   static const int maxSet = 25;
0050   TH1F *me400[maxSet];
0051   TH2F *me800[maxSet];
0052   TProfile *me100[maxSet], *me200[maxSet], *me300[maxSet];
0053   TProfile2D *me500[maxSet], *me600[maxSet], *me700[maxSet];
0054   std::vector<double> stepLen, radLen, intLen;
0055   double eta_, phi_, stepT;
0056 };
0057 
0058 #endif