Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:26

0001 #ifndef CaloSimAlgos_CaloHitAnalyzer_h
0002 #define CaloSimAlgos_CaloHitAnalyzer_h
0003 
0004 #include "SimCalorimetry/CaloSimAlgos/interface/CaloValidationStatistics.h"
0005 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
0006 #include <map>
0007 #include <string>
0008 
0009 /**
0010   Sums up all the SimHit energy in each cell, and uses that
0011   to compare to the Rechits of the cell
0012 
0013   \Author Rick Wilkinson, Caltech
0014 */
0015 
0016 class CaloVSimParameterMap;
0017 class CaloVHitFilter;
0018 #include "SimDataFormats/CaloHit/interface/PCaloHit.h"
0019 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0020 
0021 class CaloHitAnalyzer {
0022 public:
0023   CaloHitAnalyzer(const std::string &name,
0024                   double hitEnergyThreshold,
0025                   const CaloVSimParameterMap *parameterMap,
0026                   const CaloVHitFilter *filter = nullptr);
0027 
0028   /// should be called each event
0029   void fillHits(MixCollection<PCaloHit> &hits);
0030 
0031   /// to be called for each RecHit
0032   void analyze(int detId, double recEnergy);
0033 
0034 public:
0035   std::map<int, double> hitEnergySumMap_;
0036   double hitEnergyThreshold_;
0037   const CaloVSimParameterMap *simParameterMap_;
0038   const CaloVHitFilter *hitFilter_;
0039   CaloValidationStatistics summary_;
0040   int noiseHits_;
0041 };
0042 
0043 #endif