CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/DataFormats/METReco/src/EcalHaloData.cc

Go to the documentation of this file.
00001 #include "DataFormats/METReco/interface/EcalHaloData.h"
00002 /*
00003   [class]:  EcalHaloData
00004   [authors]: R. Remington, The University of Florida
00005   [description]: See EcalHaloData.h
00006   [date]: October 15, 2009
00007 */
00008 
00009 #include <cmath>
00010 using namespace reco;
00011 EcalHaloData::EcalHaloData()
00012 {
00013 }
00014 
00015 int EcalHaloData::NumberOfHaloSuperClusters(float roundness, float angle ) const 
00016 {
00017 
00018   int n = 0 ; 
00019   for( unsigned int i = 0 ; i < TheSuperClusterRefs.size() ; i++ )
00020     {
00021       edm::Ref<SuperClusterCollection> cluster(TheSuperClusterRefs, i) ;
00022       float r = ShowerShapes_Roundness[cluster];
00023       float a = ShowerShapes_Angle[cluster];
00024       
00025       if( (r > 0 && r < roundness) && ( a > 0 && a < angle ) ) 
00026         n++ ;
00027     }
00028 
00029   return  n ;
00030 }