CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/RecoParticleFlow/PFRootEvent/interface/CMSMidpointAlgorithm.h

Go to the documentation of this file.
00001 #ifndef JetAlgorithms_CMSMidpointAlgorithm_h
00002 #define JetAlgorithms_CMSMidpointAlgorithm_h
00003 
00025 #include "RecoParticleFlow/PFRootEvent/interface/JetRecoTypes.h"
00026 
00027 class CMSMidpointAlgorithm 
00028 {
00029  public:
00030   typedef std::vector<ProtoJet*> InternalCollection;
00031 
00033   CMSMidpointAlgorithm () :
00034     theSeedThreshold(3.0),
00035     theConeRadius(0.5),
00036     theConeAreaFraction(1.0),
00037     theMaxPairSize(2),
00038     theMaxIterations(100),
00039     theOverlapThreshold(0.75),
00040     theDebugLevel(0)
00041   { }
00042 
00065   CMSMidpointAlgorithm(double fSeedThreshold, double fConeRadius, double fConeAreaFraction, 
00066                        int fMaxPairSize, int fMaxIterations, double fOverlapThreshold, int fDebugLevel) : 
00067     theSeedThreshold(fSeedThreshold),
00068     theConeRadius(fConeRadius),
00069     theConeAreaFraction(fConeAreaFraction),
00070     theMaxPairSize(fMaxPairSize),
00071     theMaxIterations(fMaxIterations),
00072     theOverlapThreshold(fOverlapThreshold),
00073     theDebugLevel(fDebugLevel)
00074   { }
00075 
00078   void run(const JetReco::InputCollection& fInput, JetReco::OutputCollection* fOutput);
00079 
00080  private:
00083   void findStableConesFromSeeds(const JetReco::InputCollection& fInput, InternalCollection* fOutput);
00084 
00087   void iterateCone(const JetReco::InputCollection& fInput,
00088                    double startRapidity, double startPhi, double startPt, bool reduceConeSize, 
00089                    InternalCollection* fOutput);
00090 
00093   void findStableConesFromMidPoints(const JetReco::InputCollection& fInput, InternalCollection* fOutput);
00094 
00097   void addClustersToPairs(const JetReco::InputCollection& fInput,
00098                           std::vector<int>& testPair, std::vector<std::vector<int> >& pairs,
00099                           std::vector<std::vector<bool> >& distanceOK, int maxClustersInPair);
00100 
00103   void splitAndMerge(const JetReco::InputCollection& fInput,
00104                      InternalCollection* fProtoJets, JetReco::OutputCollection* fFinalJets);
00105 
00106 
00107   double theSeedThreshold;
00108   double theConeRadius;
00109   double theConeAreaFraction;
00110   int    theMaxPairSize;
00111   int    theMaxIterations;
00112   double theOverlapThreshold;
00113   int    theDebugLevel;
00114 };
00115 
00116 #endif