CMS 3D CMS Logo

L1RCTCrate.h

Go to the documentation of this file.
00001 #ifndef L1RCTCrate_h
00002 #define L1RCTCRate_h
00003 
00004 #include <vector>
00005 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTReceiverCard.h"
00006 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTElectronIsolationCard.h"
00007 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTJetSummaryCard.h"
00008 
00009 class L1RCTLookupTables;
00010 
00011 class L1RCTCrate {
00012 
00013  public:
00014   L1RCTCrate(int crtNo, const L1RCTLookupTables* rctLookupTables);
00015 
00016   int crateNumber(){return crtNo;}
00017 
00018   //For sharing information between crates.
00019   //It passes the pointers to the cards rather than the copies of the cards
00020   //because we need to modify the actual regions when setting their
00021   //neighbors rather than just copies.
00022   //Working in non garbage collected languages can really suck sometimes.
00023   L1RCTReceiverCard* getReceiverCard(int i) { return &receiverCards.at(i);}
00024   // L1RCTJetSummaryCard* getJetSummaryCard { return &jetSummaryCard;}
00025   
00026   //This method receives the input from the L1RCT class and distributes
00027   //the RCInput to the 7 receiver cards and sends the HFInput straight
00028   //to the JSC for this crate.  The RCs never see the HF data.  Instead
00029   //the JSC acts like a primitive RC for these regions.
00030   void input(std::vector<std::vector<unsigned short> > RCInput,
00031              std::vector<unsigned short> HFInput);
00032   //The two following are methods for running the actual data processing
00033   //in the RCs and the EICs.  They're to be called for each card
00034   //from the L1RCT process method
00035   void processReceiverCards();
00036   void fillElectronIsolationCards();
00037   void processElectronIsolationCards();
00038   //Pulls the information from the RCs and EICs and sends it to the 
00039   //JSC.
00040   void fillJetSummaryCard();
00041   void processJetSummaryCard();
00042   void print();
00043   void printJSC(){
00044     jetSummaryCard.print();
00045   }
00046   void printRC(int i){
00047     receiverCards.at(i).print();
00048   }
00049   void printEIC(int i){
00050     electronCards.at(i).print();
00051   }
00052   void printEICEdges(int i){
00053     electronCards.at(i).printEdges();
00054   }
00055 
00056   // region sums
00057   std::vector<unsigned short> getJetRegions(){
00058     return jetSummaryCard.getJetRegions();
00059   }
00060   std::vector<unsigned short> getBarrelRegions(){
00061     return jetSummaryCard.getBarrelRegions();
00062   }
00063   std::vector<unsigned short> getHFRegions(){
00064     return jetSummaryCard.getHFRegions();
00065   }
00066 
00067   // e-gamma objects
00068   std::vector<unsigned short> getIsolatedEGObjects(){
00069     return jetSummaryCard.getIsolatedEGObjects();
00070   }
00071   std::vector<unsigned short> getNonisolatedEGObjects(){
00072     return jetSummaryCard.getNonisolatedEGObjects();
00073   }
00074 
00075   // the bits
00076   unsigned short getTauBits(){
00077     return jetSummaryCard.getTauBits();
00078   }
00079   unsigned short getMIPBits(){
00080     return jetSummaryCard.getMIPBits();
00081   }
00082   unsigned short getOverFlowBits(){
00083     return jetSummaryCard.getOverFlowBits();
00084   }
00085   unsigned short getQuietBits(){
00086     return jetSummaryCard.getQuietBits();
00087   }
00088   // hf bit
00089   std::vector<unsigned short> getHFFineGrainBits(){
00090     return jetSummaryCard.getHFFineGrainBits();
00091   }
00092 
00093  private:
00094   //The seven RCs and EICs
00095   //They are laid out according to CMS IN 2004/008
00096   //Increasing number towards higher absolute eta
00097   //The seventh card is always sideways with respect to the
00098   //other six.
00099   std::vector<L1RCTReceiverCard> receiverCards;
00100   std::vector<L1RCTElectronIsolationCard> electronCards;
00101   //The JSC receives the jet and electron information from the 
00102   //RCs and EICs.  There is only one per crate.
00103   L1RCTJetSummaryCard jetSummaryCard;
00104   
00105   int crtNo;
00106   const L1RCTLookupTables* rctLookupTables_;
00107 
00108   L1RCTCrate();
00109 
00110   //L1RCTJetCaptureCard jetCaptureCard;
00111 };
00112 #endif

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