CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/SimTracker/TrackerMaterialAnalysis/plugins/TrackingMaterialAnalyser.h

Go to the documentation of this file.
00001 #ifndef TrackingMaterialAnalyser_h
00002 #define TrackingMaterialAnalyser_h
00003 #include <string>
00004 #include <vector>
00005 
00006 #include "FWCore/Framework/interface/EDAnalyzer.h"
00007 #include "FWCore/Framework/interface/Event.h"
00008 #include "FWCore/Framework/interface/EventSetup.h"
00009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00010 #include "FWCore/Utilities/interface/InputTag.h"
00011 
00012 #include "SimDataFormats/ValidationFormats/interface/MaterialAccountingTrack.h"
00013 #include "MaterialAccountingGroup.h"
00014 #include "TrackingMaterialPlotter.h"
00015 
00016 class TrackingMaterialAnalyser : public edm::EDAnalyzer
00017 {
00018 public:
00019   TrackingMaterialAnalyser(const edm::ParameterSet &);
00020   virtual ~TrackingMaterialAnalyser();
00021   
00022 private:
00023   enum SplitMode {
00024     NEAREST_LAYER,
00025     INNER_LAYER,
00026     OUTER_LAYER,
00027     UNDEFINED
00028   };
00029   
00030   void analyze(const edm::Event &, const edm::EventSetup &);
00031   void beginJob() {}
00032   void endJob();
00033 
00034   void split( MaterialAccountingTrack & track );
00035   int  findLayer( const MaterialAccountingDetector & detector );
00036 
00037   void saveParameters(const char* name);
00038   void saveXml(const char* name);
00039   void saveLayerPlots();
00040   
00041   edm::InputTag                             m_material;
00042   SplitMode                                 m_splitMode;
00043   bool                                      m_skipAfterLastDetector;
00044   bool                                      m_skipBeforeFirstDetector;
00045   bool                                      m_saveSummaryPlot;
00046   bool                                      m_saveDetailedPlots;
00047   bool                                      m_saveParameters;
00048   bool                                      m_saveXml;
00049   std::vector<MaterialAccountingGroup *>    m_groups;
00050   std::vector<std::string>                  m_groupNames;
00051   TrackingMaterialPlotter *                 m_plotter;
00052 };
00053 
00054 #endif // TrackingMaterialAnalyser_h