CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/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 using namespace reco;
00013 class PFPhotonClusters{
00014  public:
00015   PFPhotonClusters(PFClusterRef PFClusterRef);
00016   void SetSeed();
00017   void PFCrystalCoor();
00018   void FillClusterShape();
00019   void FillClusterWidth();
00020   //return functions
00021   std::pair<double, double> GetCrysCoor(){
00022     std::pair<double, double> crys;
00023     if(isEB_){
00024       crys.first=CrysEta_;
00025       crys.second=CrysPhi_;
00026     }
00027     else{
00028       crys.first=CrysX_;
00029       crys.second=CrysY_;      
00030     }
00031     return crys;
00032   }
00033   std::pair<double, double> GetCrysIndex(){
00034     std::pair<int, int> crysI;
00035     if(isEB_){
00036       crysI.first=CrysIEta_;
00037       crysI.second=CrysIPhi_;
00038     }
00039     else{
00040       crysI.first=CrysIX_;
00041       crysI.second=CrysIY_;      
00042     }
00043     return crysI;
00044   }
00045   int EtaCrack(){return CrysIEtaCrack_;}
00046   double E5x5Element(int i, int j){
00047     //std::cout<<"i, j "<<i<<" , "<<j<<std::endl;
00048     double E=0;
00049     if(abs(i)>2 ||abs(j)>2)return E;
00050     int ind1=i+2;
00051     int ind2=j+2;
00052     E=e5x5_[ind1][ind2];
00053     //std::cout<<"E "<<E<<std::endl;
00054     return E;
00055   }
00056   double PhiWidth(){return sigphiphi_;}
00057   double EtaWidth(){return sigetaeta_;}
00058   double EtaPhiWidth(){return sigetaphi_;}
00059  private:
00060   PFClusterRef PFClusterRef_;
00061   //seed detId, position and axis
00062   DetId idseed_; 
00063   math::XYZVector seedPosition_, seedAxis_; 
00064   bool isEB_;
00065   //crystal Coordinates and indices:
00066   float CrysX_, CrysY_, CrysEta_, CrysPhi_;
00067   int CrysIEta_, CrysIPhi_, CrysIEtaCrack_, CrysIX_, CrysIY_;
00068   //Cluster Shapes:
00069   double e5x5_[5][5];
00070   double sigphiphi_, sigetaeta_, sigetaphi_;
00071   //ClusterWidth
00072 };
00073 #endif