CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalTB07DaqFormatter.h
Go to the documentation of this file.
1 #ifndef EcalTB07DaqFormatter_H
2 #define EcalTB07DaqFormatter_H
3 
14 #include "DCCTowerBlock.h"
15 
16 #include <vector>
17 #include <map>
18 #include <iostream>
19 
21 
24 
25 class FEDRawData;
26 class DCCDataParser;
28 public:
29  EcalTB07DaqFormatter(std::string tbName, int a[68][5][5], int b[71], int c[201]);
31  LogDebug("EcalTB07RawToDigi") << "@SUB=EcalTB07DaqFormatter"
32  << "\n";
33  };
34 
35  void interpretRawData(const FEDRawData& data,
36  EBDigiCollection& digicollection,
37  EEDigiCollection& eeDigiCollection,
38  EcalPnDiodeDigiCollection& pndigicollection,
39  EcalRawDataCollection& DCCheaderCollection,
40  EBDetIdCollection& dccsizecollection,
41  EcalElectronicsIdCollection& ttidcollection,
42  EcalElectronicsIdCollection& blocksizecollection,
43  EBDetIdCollection& chidcollection,
44  EBDetIdCollection& gaincollection,
45  EBDetIdCollection& gainswitchcollection,
46  EcalElectronicsIdCollection& memttidcollection,
47  EcalElectronicsIdCollection& memblocksizecollection,
48  EcalElectronicsIdCollection& memgaincollection,
49  EcalElectronicsIdCollection& memchidcollection,
50  EcalTrigPrimDigiCollection& tpcollection);
51 
52 private:
53  void DecodeMEM(DCCTBTowerBlock* towerblock,
54  EcalPnDiodeDigiCollection& pndigicollection,
55  EcalElectronicsIdCollection& memttidcollection,
56  EcalElectronicsIdCollection& memblocksizecollection,
57  EcalElectronicsIdCollection& memgaincollection,
58  EcalElectronicsIdCollection& memchidcollection);
59 
60  std::pair<int, int> cellIndex(int tower_id, int strip, int xtal);
61  int cryIc(int tower_id, int strip, int xtal);
62  bool leftTower(int tower) const;
63  bool rightTower(int tower) const;
64 
65 private:
67  int cryIcMap_[68][5][5];
71 
72  int getEE_ix(int tower, int strip, int ch);
73  int getEE_iy(int tower, int strip, int ch);
74 
75  enum SMGeom_t {
76  kModules = 4, // Number of modules per supermodule
77  kTriggerTowers = 68, // Number of trigger towers per supermodule
78  kTowersInPhi = 4, // Number of trigger towers in phi
79  kTowersInEta = 17, // Number of trigger towers in eta
80  kCrystals = 1700, // Number of crystals per supermodule
81  kPns = 10, // Number of PN laser monitoring diodes per supermodule
82  kCrystalsInPhi = 20, // Number of crystals in phi
83  kCrystalsInEta = 85, // Number of crystals in eta
84  kCrystalsPerTower = 25, // Number of crystals per trigger tower
85  kCardsPerTower = 5, // Number of VFE cards per trigger tower
86  kChannelsPerCard = 5 // Number of channels per VFE card
87  };
88 
90  kSamplesPerChannel = 10, // Number of sample per channel, per event
91  kSamplesPerPn = 50, // Number of sample per PN, per event
92  kChannelsPerTower = 25, // Number of channels per trigger tower
93  kStripsPerTower = 5, // Number of VFE cards per trigger tower
94  kChannelsPerStrip = 5, // Number channels per VFE card
95  kPnPerTowerBlock = 5, // Number Pn diodes pertaining to 1 tower block = 1/2 mem box
96  kTriggerTowersAndMem = 70 // Number of trigger towers block including mems
97  };
98 
99  // index and container for expected towers (according to DCC status)
101  unsigned _ExpectedTowers[71];
102  unsigned _expTowersIndex;
103 
104  // used for mem boxes unpacking
105  int memRawSample_[kStripsPerTower][kChannelsPerStrip][kSamplesPerChannel + 1]; // store raw data for one mem
106  int data_MEM[500]; // collects unpacked data for both mems
109 };
110 #endif
const edm::EventSetup & c
int cryIc(int tower_id, int strip, int xtal)
DCCTBDataParser * theParser_
int getEE_iy(int tower, int strip, int ch)
bool leftTower(int tower) const
void DecodeMEM(DCCTBTowerBlock *towerblock, EcalPnDiodeDigiCollection &pndigicollection, EcalElectronicsIdCollection &memttidcollection, EcalElectronicsIdCollection &memblocksizecollection, EcalElectronicsIdCollection &memgaincollection, EcalElectronicsIdCollection &memchidcollection)
void interpretRawData(const FEDRawData &data, EBDigiCollection &digicollection, EEDigiCollection &eeDigiCollection, EcalPnDiodeDigiCollection &pndigicollection, EcalRawDataCollection &DCCheaderCollection, EBDetIdCollection &dccsizecollection, EcalElectronicsIdCollection &ttidcollection, EcalElectronicsIdCollection &blocksizecollection, EBDetIdCollection &chidcollection, EBDetIdCollection &gaincollection, EBDetIdCollection &gainswitchcollection, EcalElectronicsIdCollection &memttidcollection, EcalElectronicsIdCollection &memblocksizecollection, EcalElectronicsIdCollection &memgaincollection, EcalElectronicsIdCollection &memchidcollection, EcalTrigPrimDigiCollection &tpcollection)
double b
Definition: hdecay.h:118
bool pnIsOkInBlock[kPnPerTowerBlock]
int getEE_ix(int tower, int strip, int ch)
bool rightTower(int tower) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EcalTB07DaqFormatter(std::string tbName, int a[68][5][5], int b[71], int c[201])
std::pair< int, int > cellIndex(int tower_id, int strip, int xtal)
double a
Definition: hdecay.h:119
int memRawSample_[kStripsPerTower][kChannelsPerStrip][kSamplesPerChannel+1]
#define LogDebug(id)