CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/Calibration/EcalCalibAlgos/interface/EcalEleCalibLooper.h

Go to the documentation of this file.
00001 
00010 #ifndef __CINT__
00011 #ifndef EcalEleCalibLooper_H
00012 #define EcalEleCalibLooper_H
00013 #include "Calibration/EcalCalibAlgos/interface/VEcalCalibBlock.h"
00014 #include "FWCore/Framework/interface/EDLooper.h"
00015 #include "FWCore/Framework/interface/Event.h"
00016 #include "Calibration/EcalCalibAlgos/interface/VFillMap.h"
00017 #include "CondFormats/EcalObjects/interface/EcalIntercalibConstants.h"
00018 #include <string>
00019 #include <vector>
00020 
00021 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00022 #include "DataFormats/DetId/interface/DetId.h"
00023 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00024 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00025 #include "DataFormats/EgammaReco/interface/BasicClusterShapeAssociation.h"
00026 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
00027 #include "DataFormats/EgammaCandidates/interface/Electron.h"
00028 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00029 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00030 
00031 #include "CLHEP/Matrix/GenMatrix.h"
00032 #include "CLHEP/Matrix/Matrix.h"
00033 #include "CLHEP/Matrix/Vector.h"
00034 class EcalEleCalibLooper : public edm::EDLooper {
00035   public:
00036 
00038     explicit EcalEleCalibLooper(const edm::ParameterSet&);
00040     ~EcalEleCalibLooper();
00041     void beginOfJob() ;
00042     void endOfJob();
00043     void startingNewLoop(unsigned int) ;
00044     Status duringLoop(const edm::Event&, const edm::EventSetup&) ;
00045     Status endOfLoop(const edm::EventSetup&,unsigned int iCounter) ;
00046     
00047 
00048   private:
00049 
00050   //DS to divide in Regions
00051   int EBRegionId (const int, const int) const;
00052   int EERegionId (const int, const int) const;
00053   //DS to define the regions for each cristal
00054   void EBRegionDefinition ();
00055   void EERegionDefinition ();
00056   //DS defines the limit for the tan of phi
00057   double giveLimit (int);
00058 
00059   //DS checks if the values of ics and ips are in EE or not
00060   int EEregionCheck (const int, const int) const;
00061   int EBregionCheck (const int eta,const int phi) const;
00062 
00064   int etaShifter (const int) const ;
00065 
00066   private:
00067 
00068 
00070     edm::InputTag m_barrelAlCa ;
00072     edm::InputTag m_endcapAlCa ;
00073   
00075     int m_recoWindowSidex ;
00076     int m_recoWindowSidey ;
00077 
00079     int m_etaWidth ;   //PG sub matrix size and borders
00081 //    int m_etaBorder ; //FIXME
00083     int m_phiWidthEB ;
00085 //    int m_phiBorderEB //FIXME;
00086     
00088     int m_etaStart ;   //PG ECAL region to be calibrated
00090     int m_etaEnd ;
00092     int m_phiStartEB ;
00094     int m_phiEndEB ;
00096     int m_radStart ;
00097     int m_radEnd ;
00098     int m_radWidth ;
00099 //FIXME    int m_radBorder ;
00100     int m_phiStartEE ;
00101     int m_phiEndEE ;
00102     int m_phiWidthEE ;
00103 
00105     int m_maxSelectedNumPerXtal ;  
00106 
00108     std::vector<VEcalCalibBlock *> m_EcalCalibBlocks ;
00110     double m_minEnergyPerCrystal ;
00112     double m_maxEnergyPerCrystal ;
00114     double m_minCoeff ;
00116     double m_maxCoeff ;
00118     int m_usingBlockSolver ;
00119 
00121     EcalIntercalibConstantMap  m_barrelMap ;
00122     EcalIntercalibConstantMap  m_endcapMap ;
00123 
00125     unsigned int m_loops ;
00127     edm::InputTag m_ElectronLabel ;
00128     //The map Filler
00129     VFillMap * m_MapFiller; 
00130 
00131   //DS number of regions in the Endcap
00132   inline int EEregionsNum () const ;
00133   //DS number of regions in the barrel
00134   inline int EBregionsNum () const ;
00135 
00136   std::vector<int> m_regions;
00137   
00138   std::vector<DetId> m_barrelCells;
00139   std::vector<DetId> m_endcapCells;
00140 
00141   std::map<int,int> m_xtalRegionId ;
00142   std::map<int,int> m_xtalPositionInRegion ;
00143   std::map <int,int> m_xtalNumOfHits;
00144 
00145   bool isfirstcall_;
00146 };
00147 #endif
00148 #endif