CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/RecoParticleFlow/PFClusterTools/interface/PFPhotonClusters.h

Go to the documentation of this file.
00001 #ifndef RecoParticleFlow_PFClusterTools_PFPhotonClusters_h
00002 #define RecoParticleFlow_PFClusterTools_PFPhotonClusters_h 
00003 #include"DataFormats/ParticleFlowReco/interface/PFCluster.h"
00004 #include"DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"
00005 //Package: PFClusterTools:
00006 //Class: PFPhotonClusters:
00007 /*
00008 R&D Class to develop ClusterTools for ECal Energy Resolution. 
00009 So Far Members are used for Regression Based Energy Corrections
00010 Developer: Rishi Patel rpatel@cern.ch
00011 */
00012 class PFPhotonClusters{
00013  public:
00014   PFPhotonClusters(reco::PFClusterRef PFClusterRef);
00015   void SetSeed();
00016   void PFCrystalCoor();
00017   void FillClusterShape();
00018   void FillClusterWidth();
00019   //return functions
00020   std::pair<double, double> GetCrysCoor(){
00021     std::pair<double, double> crys;
00022     if(isEB_){
00023       crys.first=CrysEta_;
00024       crys.second=CrysPhi_;
00025     }
00026     else{
00027       crys.first=CrysX_;
00028       crys.second=CrysY_;      
00029     }
00030     return crys;
00031   }
00032   std::pair<double, double> GetCrysIndex(){
00033     std::pair<int, int> crysI;
00034     if(isEB_){
00035       crysI.first=CrysIEta_;
00036       crysI.second=CrysIPhi_;
00037     }
00038     else{
00039       crysI.first=CrysIX_;
00040       crysI.second=CrysIY_;      
00041     }
00042     return crysI;
00043   }
00044   int EtaCrack(){return CrysIEtaCrack_;}
00045   double E5x5Element(int i, int j){
00046     //std::cout<<"i, j "<<i<<" , "<<j<<std::endl;
00047     double E=0;
00048     if(abs(i)>2 ||abs(j)>2)return E;
00049     int ind1=i+2;
00050     int ind2=j+2;
00051     E=e5x5_[ind1][ind2];
00052     //std::cout<<"E "<<E<<std::endl;
00053     return E;
00054   }
00055   double PhiWidth(){return sigphiphi_;}
00056   double EtaWidth(){return sigetaeta_;}
00057   double EtaPhiWidth(){return sigetaphi_;}
00058  private:
00059   reco::PFClusterRef PFClusterRef_;
00060   //seed detId, position and axis
00061   DetId idseed_; 
00062   math::XYZVector seedPosition_, seedAxis_; 
00063   bool isEB_;
00064   //crystal Coordinates and indices:
00065   float CrysX_, CrysY_, CrysEta_, CrysPhi_;
00066   int CrysIEta_, CrysIPhi_, CrysIEtaCrack_, CrysIX_, CrysIY_;
00067   //Cluster Shapes:
00068   double e5x5_[5][5];
00069   double sigphiphi_, sigetaeta_, sigetaphi_;
00070   //ClusterWidth
00071 };
00072 #endif