CMS 3D CMS Logo

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
EcalTB07DaqFormatter::kCrystalsInEta
Definition: EcalTB07DaqFormatter.h:83
MessageLogger.h
EcalTB07DaqFormatter::kCardsPerTower
Definition: EcalTB07DaqFormatter.h:85
EcalTB07DaqFormatter::memRawSample_
int memRawSample_[kStripsPerTower][kChannelsPerStrip][kSamplesPerChannel+1]
Definition: EcalTB07DaqFormatter.h:105
EcalTB07DaqFormatter::kStripsPerTower
Definition: EcalTB07DaqFormatter.h:93
EcalTB07DaqFormatter::SMElectronics_t
SMElectronics_t
Definition: EcalTB07DaqFormatter.h:89
EcalTB07DaqFormatter::getEE_ix
int getEE_ix(int tower, int strip, int ch)
Definition: EcalTB07DaqFormatter.cc:817
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
EcalTB07DaqFormatter::leftTower
bool leftTower(int tower) const
Definition: EcalTB07DaqFormatter.cc:863
EcalDetIdCollections.h
EcalTB07DaqFormatter::kSamplesPerPn
Definition: EcalTB07DaqFormatter.h:91
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:3
edm::SortedCollection
Definition: SortedCollection.h:49
EcalTB07DaqFormatter::kCrystals
Definition: EcalTB07DaqFormatter.h:80
EcalTB07DaqFormatter::kChannelsPerTower
Definition: EcalTB07DaqFormatter.h:92
Ecal07UnpackerData_cfi.tbName
tbName
Definition: Ecal07UnpackerData_cfi.py:9
EcalTB07DaqFormatter::kCrystalsPerTower
Definition: EcalTB07DaqFormatter.h:84
EcalTB07DaqFormatter::rightTower
bool rightTower(int tower) const
Definition: EcalTB07DaqFormatter.cc:855
FEDRawData
Definition: FEDRawData.h:19
FileInPath.h
EcalTB07DaqFormatter::_expTowersIndex
unsigned _expTowersIndex
Definition: EcalTB07DaqFormatter.h:102
EcalTB07DaqFormatter::pnAllocated
bool pnAllocated
Definition: EcalTB07DaqFormatter.h:107
EcalRawDataCollections.h
EcalTB07DaqFormatter
Definition: EcalTB07DaqFormatter.h:27
EcalTB07DaqFormatter::tbTowerIDToLocation_
int tbTowerIDToLocation_[201]
Definition: EcalTB07DaqFormatter.h:69
EcalTB07DaqFormatter::tbStatusToLocation_
int tbStatusToLocation_[71]
Definition: EcalTB07DaqFormatter.h:68
Service.h
EcalTB07DaqFormatter::kPnPerTowerBlock
Definition: EcalTB07DaqFormatter.h:95
EcalTB07DaqFormatter::kTriggerTowersAndMem
Definition: EcalTB07DaqFormatter.h:96
EcalTB07DaqFormatter::kTowersInEta
Definition: EcalTB07DaqFormatter.h:79
EcalDigiCollections.h
EcalTB07DaqFormatter::kChannelsPerCard
Definition: EcalTB07DaqFormatter.h:86
EcalTB07DaqFormatter::cryIcMap_
int cryIcMap_[68][5][5]
Definition: EcalTB07DaqFormatter.h:67
b
double b
Definition: hdecay.h:118
EcalTB07DaqFormatter::SMGeom_t
SMGeom_t
Definition: EcalTB07DaqFormatter.h:75
DCCTBTowerBlock
Definition: DCCTowerBlock.h:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DCCTowerBlock.h
EcalTB07DaqFormatter::tbName_
std::string tbName_
Definition: EcalTB07DaqFormatter.h:70
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
a
double a
Definition: hdecay.h:119
EcalTB07DaqFormatter::~EcalTB07DaqFormatter
virtual ~EcalTB07DaqFormatter()
Definition: EcalTB07DaqFormatter.h:30
EcalTB07DaqFormatter::cellIndex
std::pair< int, int > cellIndex(int tower_id, int strip, int xtal)
Definition: EcalTB07DaqFormatter.cc:789
EcalTB07DaqFormatter::cryIc
int cryIc(int tower_id, int strip, int xtal)
Definition: EcalTB07DaqFormatter.cc:841
EBDigiCollection
Definition: EcalDigiCollections.h:32
EcalTB07DaqFormatter::kModules
Definition: EcalTB07DaqFormatter.h:76
EcalTB07DaqFormatter::DecodeMEM
void DecodeMEM(DCCTBTowerBlock *towerblock, EcalPnDiodeDigiCollection &pndigicollection, EcalElectronicsIdCollection &memttidcollection, EcalElectronicsIdCollection &memblocksizecollection, EcalElectronicsIdCollection &memgaincollection, EcalElectronicsIdCollection &memchidcollection)
Definition: EcalTB07DaqFormatter.cc:593
EEDigiCollection
Definition: EcalDigiCollections.h:45
EcalTB07DaqFormatter::kPns
Definition: EcalTB07DaqFormatter.h:81
EcalTB07DaqFormatter::_numExpectedTowers
unsigned _numExpectedTowers
Definition: EcalTB07DaqFormatter.h:100
EcalTB07DaqFormatter::pnIsOkInBlock
bool pnIsOkInBlock[kPnPerTowerBlock]
Definition: EcalTB07DaqFormatter.h:108
EcalTB07DaqFormatter::theParser_
DCCTBDataParser * theParser_
Definition: EcalTB07DaqFormatter.h:66
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
EcalTB07DaqFormatter::kChannelsPerStrip
Definition: EcalTB07DaqFormatter.h:94
edm::EDCollection
Definition: EDCollection.h:16
EcalTB07DaqFormatter::_ExpectedTowers
unsigned _ExpectedTowers[71]
Definition: EcalTB07DaqFormatter.h:101
EcalTB07DaqFormatter::EcalTB07DaqFormatter
EcalTB07DaqFormatter(std::string tbName, int a[68][5][5], int b[71], int c[201])
Definition: EcalTB07DaqFormatter.cc:34
EcalTB07DaqFormatter::getEE_iy
int getEE_iy(int tower, int strip, int ch)
Definition: EcalTB07DaqFormatter.cc:829
EcalTB07DaqFormatter::interpretRawData
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)
Definition: EcalTB07DaqFormatter.cc:67
EcalTB07DaqFormatter::kTriggerTowers
Definition: EcalTB07DaqFormatter.h:77
DCCTBDataParser
Definition: DCCDataParser.h:25
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EcalTB07DaqFormatter::kSamplesPerChannel
Definition: EcalTB07DaqFormatter.h:90
EcalTB07DaqFormatter::kTowersInPhi
Definition: EcalTB07DaqFormatter.h:78
EcalTB07DaqFormatter::kCrystalsInPhi
Definition: EcalTB07DaqFormatter.h:82
EcalTB07DaqFormatter::data_MEM
int data_MEM[500]
Definition: EcalTB07DaqFormatter.h:106