CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Validation/Geometry/interface/MaterialBudgetHcalHistos.h

Go to the documentation of this file.
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 fillLayer();
00036   void hend();
00037   std::vector<std::string> getNames(DDFilteredView& fv);
00038   std::vector<double>      getDDDArray(const std::string & str,
00039                                        const DDsvalues_type & sv);
00040   bool isSensitive(std::string);
00041   bool isItHF(const G4VTouchable*);
00042   bool isItEC(std::string);
00043   
00044 private:
00045 
00046   static const int         maxSet = 25, maxSet2 = 9;
00047   std::vector<std::string> sensitives, hfNames, sensitiveEC;
00048   std::vector<int>         hfLevels;
00049   bool                     fillHistos, printSum;
00050   int                      binEta, binPhi;
00051   double                   maxEta, etaLow, etaHigh;
00052   std::vector<std::string> matList;
00053   std::vector<double>      stepLength, radLength, intLength;
00054   TH1F                     *me400[maxSet], *me800[maxSet], *me1300[maxSet2];
00055   TH2F                     *me1200[maxSet],*me1400[maxSet2];
00056   TProfile                 *me100[maxSet], *me200[maxSet], *me300[maxSet];
00057   TProfile                 *me500[maxSet], *me600[maxSet], *me700[maxSet];
00058   TProfile                 *me1500[maxSet2];
00059   TProfile2D               *me900[maxSet], *me1000[maxSet],*me1100[maxSet];
00060   int                      id, layer, steps;
00061   double                   radLen, intLen, stepLen;
00062   double                   eta, phi;
00063   int                      nlayHB, nlayHE, nlayHO, nlayHF;
00064 };
00065 
00066 
00067 #endif