CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixTcp.h

Go to the documentation of this file.
00001 #ifndef ECAL_FENIX_TCP_H
00002 #define ECAL_FENIX_TCP_H
00003 
00004 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixEtTot.h>
00005 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixBypassLin.h>
00006 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixMaxof2.h>
00007 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixTcpFormat.h>
00008 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixFgvbEB.h>
00009 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixTcpFgvbEE.h>
00010 
00011 
00012 #include <DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h>
00013 #include <DataFormats/EcalDigi/interface/EBDataFrame.h>
00014 #include <DataFormats/EcalDigi/interface/EEDataFrame.h>
00015 
00016 #include "FWCore/Framework/interface/EventSetup.h"
00017 
00018 #include <vector> 
00019 #include <iostream>
00020 
00021 class EcalTPGFineGrainEBGroup;
00022 class EcalTPGLutGroup;
00023 class EcalTPGLutIdMap;
00024 class EcalTPGFineGrainEBIdMap;
00025 class EcalTPGFineGrainTowerEE;
00026 class EcalTrigTowerDetId;
00027 class EcalTPGTowerStatus;
00028 
00033 class EcalFenixTcp {
00034 
00035  private:
00036   bool debug_;
00037 
00038   int nbMaxStrips_;
00039 
00040   EcalFenixMaxof2 *maxOf2_;
00041   std::vector<EcalFenixBypassLin *> bypasslin_;
00042   EcalFenixEtTot *adder_;
00043   EcalFenixFgvbEB *fgvbEB_;
00044   EcalFenixTcpFgvbEE *fgvbEE_;
00045     
00046   EcalFenixTcpFormat *formatter_;
00047 
00048   // permanent data structures
00049   std::vector<std::vector<int> > bypasslin_out_;
00050   std::vector<int> adder_out_;
00051   std::vector<int> maxOf2_out_;
00052   std::vector<int> fgvb_out_;
00053    
00054  public:
00055   // temporary, for timing tests
00056   void setPointers(  const EcalTPGFineGrainEBGroup * ecaltpgFgEBGroup,
00057                      const EcalTPGLutGroup * ecaltpgLutGroup,
00058                      const EcalTPGLutIdMap * ecaltpgLut,
00059                      const EcalTPGFineGrainEBIdMap * ecaltpgFineGrainEB,
00060                      const EcalTPGFineGrainTowerEE * ecaltpgFineGrainTowerEE,
00061                      const EcalTPGTowerStatus * ecaltpgBadTT)
00062     {
00063       ecaltpgFgEBGroup_=ecaltpgFgEBGroup;
00064       ecaltpgLutGroup_=ecaltpgLutGroup;
00065       ecaltpgLut_=ecaltpgLut;
00066       ecaltpgFineGrainEB_=ecaltpgFineGrainEB;
00067       ecaltpgFineGrainTowerEE_=ecaltpgFineGrainTowerEE;
00068       ecaltpgBadTT_=ecaltpgBadTT;
00069    }
00070   // end temporary, for timing tests
00071 
00072   EcalFenixTcp(const edm::EventSetup & setup, bool tcpFormat, bool debug, bool famos, int binOfMax, int maxNrSamples,int nbMaxStrips);
00073   virtual ~EcalFenixTcp() ;
00074 
00075   void process(const edm::EventSetup & setup,
00076                std::vector <EBDataFrame> &bid,             //dummy argument for template call 
00077                std::vector<std::vector<int> > & tpframetow, int nStr,
00078                std::vector< EcalTriggerPrimitiveSample> & tptow,
00079                std::vector< EcalTriggerPrimitiveSample> & tptow2,
00080                bool isInInnerRings, EcalTrigTowerDetId thisTower);
00081   void process(const edm::EventSetup & setup,
00082                std::vector <EEDataFrame> &bid,             //dummy argument for template call 
00083                std::vector<std::vector<int> > & tpframetow, int nStr,
00084                std::vector< EcalTriggerPrimitiveSample> & tptow,
00085                std::vector< EcalTriggerPrimitiveSample> & tptow2,
00086                bool isInInnerRings, EcalTrigTowerDetId thisTower);
00087 
00088   void process_part1(std::vector<std::vector<int> > &tpframetow, int nStr,int bitMask);
00089 
00090   void  process_part2_barrel(std::vector<std::vector<int> > &, int nStr,
00091                              const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,
00092                              const EcalTPGLutGroup*ecaltpgLutGroup,
00093                              const EcalTPGLutIdMap *ecaltpgLut,
00094                              const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB,
00095                              const EcalTPGTowerStatus *ecaltpgBadTT,
00096                              std::vector< EcalTriggerPrimitiveSample> &tptow,
00097                              std::vector< EcalTriggerPrimitiveSample> &tptow2,
00098                              EcalTrigTowerDetId towid);
00099                                
00100   void  process_part2_endcap(std::vector<std::vector<int> > &, int nStr,int bitMask,
00101                              const EcalTPGLutGroup *ecaltpgLutGroup,
00102                              const EcalTPGLutIdMap *ecaltpgLut,
00103                              const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,
00104                              const EcalTPGTowerStatus *ecaltpgBadTT,
00105                              std::vector< EcalTriggerPrimitiveSample> &tptow,
00106                              std::vector< EcalTriggerPrimitiveSample> &tptow2,bool isInInnerRings,      
00107                              EcalTrigTowerDetId towid);
00108                                    
00109 
00110   EcalFenixBypassLin *getBypasslin(int i) const {return bypasslin_[i];}
00111   EcalFenixEtTot *getAdder() const { return  adder_;}
00112   EcalFenixMaxof2 *getMaxOf2() const {return maxOf2_;}
00113   EcalFenixTcpFormat *getFormatter() const {return formatter_;}
00114   EcalFenixFgvbEB *getFGVBEB() const {return fgvbEB_;}
00115   EcalFenixTcpFgvbEE *getFGVBEE() const {return fgvbEE_;}
00116                               
00117   const EcalTPGFineGrainEBGroup * ecaltpgFgEBGroup_;
00118   const EcalTPGLutGroup * ecaltpgLutGroup_;
00119   const EcalTPGLutIdMap * ecaltpgLut_;
00120   const EcalTPGFineGrainEBIdMap * ecaltpgFineGrainEB_;
00121   const EcalTPGFineGrainTowerEE * ecaltpgFineGrainTowerEE_;
00122   const EcalTPGTowerStatus * ecaltpgBadTT_;
00123 };
00124 
00125 
00126 #endif