Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:52

0001 #ifndef RecoTracker_TkSeedGenerator_ClusterChecker_H
0002 #define RecoTracker_TkSeedGenerator_ClusterChecker_H
0003 
0004 #include "FWCore/Utilities/interface/InputTag.h"
0005 #include "CommonTools/Utils/interface/StringCutObjectSelector.h"
0006 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0007 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
0008 #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
0009 
0010 #include "FWCore/Framework/interface/ConsumesCollector.h"
0011 
0012 namespace edm {
0013   class Event;
0014   class ParameterSet;
0015   class ParameterSetDescription;
0016 }  // namespace edm
0017 
0018 namespace reco {
0019   namespace utils {
0020     struct ClusterTotals {
0021       ClusterTotals() : strip(0), pixel(0), stripdets(0), pixeldets(0) {}
0022       int strip;      /// number of strip clusters
0023       int pixel;      /// number of pixel clusters
0024       int stripdets;  /// number of strip detectors with at least one cluster
0025       int pixeldets;  /// number of pixel detectors with at least one cluster
0026     };
0027   }  // namespace utils
0028 }  // namespace reco
0029 
0030 class ClusterChecker {
0031 public:
0032   ClusterChecker(const edm::ParameterSet& conf, edm::ConsumesCollector& iC);
0033   ClusterChecker(const edm::ParameterSet& conf, edm::ConsumesCollector&& iC);
0034   ClusterChecker() = delete;  // This is only needed for StringCutObjectSelector
0035 
0036   static void fillDescriptions(edm::ParameterSetDescription& description);
0037 
0038   ~ClusterChecker();
0039   size_t tooManyClusters(const edm::Event& e) const;
0040 
0041 private:
0042   bool doACheck_;
0043   edm::InputTag clusterCollectionInputTag_;
0044   edm::InputTag pixelClusterCollectionInputTag_;
0045   unsigned int maxNrOfStripClusters_;
0046   unsigned int maxNrOfPixelClusters_;
0047   StringCutObjectSelector<reco::utils::ClusterTotals> selector_;
0048   unsigned int ignoreDetsAboveNClusters_;
0049   edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster> > token_sc;
0050   edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > token_pc;
0051 };
0052 
0053 #endif