CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Validation/EcalHits/interface/EcalEndcapSimHitsValidation.h

Go to the documentation of this file.
00001 #ifndef EcalEndcapSimHitsValidation_H
00002 #define EcalEndcapSimHitsValidation_H
00003 
00004 /*
00005  * \file EcalEndcapSimHitsValidation.h
00006  *
00007  * \author C.Rovelli
00008  *
00009 */
00010 
00011 #include "FWCore/Framework/interface/Frameworkfwd.h"
00012 #include "FWCore/Framework/interface/EDAnalyzer.h"
00013 
00014 #include "FWCore/Framework/interface/Event.h"
00015 #include "FWCore/Framework/interface/EventSetup.h"
00016 #include "FWCore/Framework/interface/ESHandle.h"
00017 #include "FWCore/Framework/interface/MakerMacros.h"
00018 
00019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00020 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00021 
00022 #include "DQMServices/Core/interface/DQMStore.h"
00023 #include "FWCore/ServiceRegistry/interface/Service.h"
00024 
00025 #include "SimDataFormats/CaloHit/interface/PCaloHit.h"
00026 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
00027 #include "SimDataFormats/ValidationFormats/interface/PValidationFormats.h"
00028 
00029 #include <iostream>
00030 #include <fstream>
00031 #include <vector>
00032 #include <map>
00033 #include "DQMServices/Core/interface/MonitorElement.h"
00034 
00035 
00036 class EcalEndcapSimHitsValidation: public edm::EDAnalyzer{
00037 
00038     typedef std::map<uint32_t,float,std::less<uint32_t> >  MapType;
00039 
00040 public:
00041 
00043 EcalEndcapSimHitsValidation(const edm::ParameterSet& ps);
00044 
00046 ~EcalEndcapSimHitsValidation();
00047 
00048 protected:
00049 
00051 void analyze(const edm::Event& e, const edm::EventSetup& c);
00052 
00053 // BeginJob
00054 void beginJob();
00055 
00056 // EndJob
00057 void endJob(void);
00058 
00059 private:
00060 
00061  uint32_t getUnitWithMaxEnergy(MapType& themap);
00062 
00063  virtual float energyInMatrixEE(int nCellInX, int nCellInY, 
00064                                 int centralX, int centralY, int centralZ,
00065                                 MapType& themap); 
00066  
00067  std::vector<uint32_t> getIdsAroundMax(int nCellInX, int nCellInY, 
00068                                 int centralX, int centralY, int centralZ,
00069                                 MapType& themap); 
00070 
00071  bool  fillEEMatrix(int nCellInX, int nCellInY,
00072                     int CentralX, int CentralY,int CentralZ,
00073                     MapType& fillmap, MapType&  themap);
00074 
00075  float eCluster2x2( MapType& themap);
00076  float eCluster4x4(float e33,MapType& themap);
00077 
00078  std::string g4InfoLabel;
00079  std::string EEHitsCollection;
00080  std::string ValidationCollection;
00081  
00082  bool verbose_;
00083  
00084  DQMStore* dbe_;
00085  
00086  std::string outputFile_;
00087 
00088  int myEntries;
00089  float eRLength[26];
00090 
00091  MonitorElement* meEEzpHits_;
00092  MonitorElement* meEEzmHits_;
00093 
00094  MonitorElement* meEEzpCrystals_;
00095  MonitorElement* meEEzmCrystals_;
00096 
00097  MonitorElement* meEEzpOccupancy_;
00098  MonitorElement* meEEzmOccupancy_;
00099 
00100  MonitorElement* meEELongitudinalShower_;
00101 
00102  MonitorElement* meEEHitEnergy_;
00103 
00104  MonitorElement* meEEhitLog10Energy_;
00105 
00106  MonitorElement* meEEhitLog10EnergyNorm_;
00107 
00108  MonitorElement* meEEhitLog10Energy25Norm_;
00109 
00110 
00111  MonitorElement* meEEHitEnergy2_;
00112 
00113  MonitorElement* meEEcrystalEnergy_;
00114  MonitorElement* meEEcrystalEnergy2_;
00115 
00116  MonitorElement* meEEe1_; 
00117  MonitorElement* meEEe4_; 
00118  MonitorElement* meEEe9_; 
00119  MonitorElement* meEEe16_; 
00120  MonitorElement* meEEe25_; 
00121 
00122  MonitorElement* meEEe1oe4_;
00123  MonitorElement* meEEe1oe9_;
00124  MonitorElement* meEEe4oe9_;
00125  MonitorElement* meEEe9oe16_;
00126  MonitorElement* meEEe1oe25_;
00127  MonitorElement* meEEe9oe25_;
00128  MonitorElement* meEEe16oe25_;
00129 };
00130 
00131 #endif