00001 #ifndef Validation_Geometry_MaterialBudgetHcalHistos_h 00002 #define Validation_Geometry_MaterialBudgetHcalHistos_h 1 00003 00004 #include "DetectorDescription/Core/interface/DDFilteredView.h" 00005 #include "DetectorDescription/Core/interface/DDsvalues.h" 00006 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00007 00008 #include "G4Step.hh" 00009 #include "G4Track.hh" 00010 00011 #include <TH1F.h> 00012 #include <TH2F.h> 00013 #include <TProfile.h> 00014 #include <TProfile2D.h> 00015 00016 #include <string> 00017 #include <vector> 00018 00019 class MaterialBudgetHcalHistos { 00020 00021 public: 00022 00023 MaterialBudgetHcalHistos(const edm::ParameterSet &p); 00024 virtual ~MaterialBudgetHcalHistos() { hend(); } 00025 00026 void fillBeginJob(const DDCompactView &); 00027 void fillStartTrack(const G4Track*); 00028 void fillPerStep(const G4Step *); 00029 void fillEndTrack(); 00030 00031 private: 00032 00033 void book(); 00034 void fillHisto(int ii); 00035 void hend(); 00036 std::vector<std::string> getNames(DDFilteredView& fv); 00037 std::vector<double> getDDDArray(const std::string & str, 00038 const DDsvalues_type & sv); 00039 bool isSensitive(std::string); 00040 bool isItHF(const G4VTouchable*); 00041 bool isItEC(std::string); 00042 00043 private: 00044 00045 static const int maxSet = 25; 00046 std::vector<std::string> sensitives, hfNames, sensitiveEC; 00047 std::vector<int> hfLevels; 00048 int binEta, binPhi; 00049 double maxEta, etaLow, etaHigh; 00050 TH1F *me400[maxSet], *me800[maxSet]; 00051 TH2F *me1200[maxSet]; 00052 TProfile *me100[maxSet], *me200[maxSet], *me300[maxSet]; 00053 TProfile *me500[maxSet], *me600[maxSet], *me700[maxSet]; 00054 TProfile2D *me900[maxSet], *me1000[maxSet],*me1100[maxSet]; 00055 int id, layer, steps; 00056 double radLen, intLen, stepLen; 00057 double eta, phi; 00058 }; 00059 00060 00061 #endif