CMS 3D CMS Logo

HcalTriggerPrimitiveAlgo.h

Go to the documentation of this file.
00001 #ifndef HcalSimAlgos_HcalTriggerPrimitiveAlgo_h
00002 #define HcalSimAlgos_HcalTriggerPrimitiveAlgo_h
00003 
00004 #include "DataFormats/HcalDetId/interface/HcalTrigTowerDetId.h"
00005 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00006 #include "Geometry/HcalTowerAlgo/interface/HcalTrigTowerGeometry.h"
00007 #include "CalibFormats/CaloObjects/interface/CaloSamples.h"
00008 #include "CalibFormats/CaloObjects/interface/IntegerCaloSamples.h"
00009 #include "CalibFormats/HcalObjects/interface/HcalTPGCoder.h"
00010 #include "CalibFormats/CaloTPG/interface/HcalTPGCompressor.h"
00011 
00012 #include <map>
00013 #include <vector>
00014 class CaloGeometry;
00015 class IntegerCaloSamples;
00016 
00017 class HcalTriggerPrimitiveAlgo {
00018 public:
00019   HcalTriggerPrimitiveAlgo(bool pf, 
00020                            const std::vector<double>& w, int latency, uint32_t FG_threshold);
00021   ~HcalTriggerPrimitiveAlgo();
00022 
00023   void run(const HcalTPGCoder * incoder,
00024            const HcalTPGCompressor * outcoder,
00025            const HBHEDigiCollection & hbheDigis,
00026            const HFDigiCollection & hfDigis,
00027            HcalTrigPrimDigiCollection & result);
00028  private:
00029 
00031   void addSignal(const HBHEDataFrame & frame);
00032   void addSignal(const HFDataFrame & frame);
00033   void addSignal(const IntegerCaloSamples & samples);
00034   void addSignalFG(const IntegerCaloSamples & samples);
00036   void analyze(IntegerCaloSamples & samples, HcalTriggerPrimitiveDigi & result);
00037   void analyzeHF(IntegerCaloSamples & samples, HcalTriggerPrimitiveDigi & result);
00038  
00039   std::vector<HcalTrigTowerDetId> towerIds(const HcalDetId & id) const;
00040 
00041   HcalTrigTowerGeometry theTrigTowerGeometry; // from event setup eventually?
00042 
00043   const HcalTPGCoder * incoder_;
00044   const HcalTPGCompressor * outcoder_;
00045 
00046   typedef std::map<HcalTrigTowerDetId, IntegerCaloSamples> SumMap;
00047   SumMap theSumMap;  
00048   
00049   typedef std::map<uint32_t, IntegerCaloSamples> SumMapFG;
00050   SumMapFG theFGSumMap;
00051 
00052   typedef std::multimap<HcalTrigTowerDetId, IntegerCaloSamples> TowerMapFG;
00053   TowerMapFG theTowerMapFG;
00054 
00055   double theThreshold;
00056   bool peakfind_;
00057   std::vector<double> weights_;
00058   int latency_;
00059   uint32_t FG_threshold_;
00060 };
00061 
00062 
00063 #endif
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 

Generated on Tue Jun 9 17:46:23 2009 for CMSSW by  doxygen 1.5.4