Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:57

0001 #ifndef Validation_CheckOverlap_H
0002 #define Validation_CheckOverlap_H
0003 #include "SimG4Core/Watcher/interface/SimWatcher.h"
0004 #include "SimG4Core/Notification/interface/Observer.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 
0007 #include <iostream>
0008 #include <vector>
0009 #include <map>
0010 #include <string>
0011 
0012 class BeginOfRun;
0013 class G4LogicalVolume;
0014 class G4VPhysicalVolume;
0015 
0016 typedef std::multimap<G4LogicalVolume *, G4VPhysicalVolume *, std::less<G4LogicalVolume *> > mmlvpv;
0017 
0018 class CheckOverlap : public SimWatcher, public Observer<const BeginOfRun *> {
0019 public:
0020   CheckOverlap(edm::ParameterSet const &p);
0021   ~CheckOverlap() override;
0022 
0023 private:
0024   void update(const BeginOfRun *run) override;
0025   void checkHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth);
0026   void checkPV(G4VPhysicalVolume *pv, unsigned int leafDepth);
0027   G4VPhysicalVolume *getTopPV();
0028   void dumpLV(G4LogicalVolume *lv, std::string str);
0029 
0030 private:
0031   std::vector<std::string> nodeNames;
0032   int nPoints;
0033   std::vector<G4LogicalVolume *> topLV;
0034 };
0035 
0036 #endif