src
EventFilter
EcalTBRawToDigi
src
EcalTBDaqFormatter.h
Go to the documentation of this file.
1
#ifndef EcalTBDaqFormatter_H
2
#define EcalTBDaqFormatter_H
3
11
#include <
DataFormats/EcalDigi/interface/EcalDigiCollections.h
>
12
#include <
DataFormats/EcalRawData/interface/EcalRawDataCollections.h
>
13
#include <
DataFormats/EcalDetId/interface/EcalDetIdCollections.h
>
14
#include "
DCCTowerBlock.h
"
15
16
#include <vector>
17
#include <map>
18
#include <iostream>
19
20
#include "
FWCore/ServiceRegistry/interface/Service.h
"
21
22
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
23
24
class
FEDRawData
;
25
class
DCCTBDataParser
;
26
class
EcalTBDaqFormatter
{
27
public
:
28
EcalTBDaqFormatter
();
29
virtual
~EcalTBDaqFormatter
() {
30
LogDebug
(
"EcalTBRawToDigi"
) <<
"@SUB=EcalTBDaqFormatter"
31
<<
"\n"
;
32
};
33
34
void
interpretRawData
(
const
FEDRawData
&
data
,
35
EBDigiCollection
& digicollection,
36
EcalPnDiodeDigiCollection
& pndigicollection,
37
EcalRawDataCollection
& DCCheaderCollection,
38
EBDetIdCollection
& dccsizecollection,
39
EcalElectronicsIdCollection
& ttidcollection,
40
EcalElectronicsIdCollection
& blocksizecollection,
41
EBDetIdCollection
& chidcollection,
42
EBDetIdCollection
& gaincollection,
43
EBDetIdCollection
& gainswitchcollection,
44
EcalElectronicsIdCollection
& memttidcollection,
45
EcalElectronicsIdCollection
& memblocksizecollection,
46
EcalElectronicsIdCollection
& memgaincollection,
47
EcalElectronicsIdCollection
& memchidcollection,
48
EcalTrigPrimDigiCollection
& tpcollection);
49
50
private
:
51
void
DecodeMEM
(
DCCTBTowerBlock
* towerblock,
52
EcalPnDiodeDigiCollection
& pndigicollection,
53
EcalElectronicsIdCollection
& memttidcollection,
54
EcalElectronicsIdCollection
& memblocksizecollection,
55
EcalElectronicsIdCollection
& memgaincollection,
56
EcalElectronicsIdCollection
& memchidcollection);
57
58
std::pair<int, int>
cellIndex
(
int
tower_id,
int
strip
,
int
xtal);
59
int
cryIc
(
int
tower_id,
int
strip
,
int
xtal);
60
bool
leftTower
(
int
tower
)
const
;
61
bool
rightTower
(
int
tower
)
const
;
62
63
private
:
64
DCCTBDataParser
*
theParser_
;
65
66
enum
SMGeom_t
{
67
kModules
= 4,
// Number of modules per supermodule
68
kTriggerTowers
= 68,
// Number of trigger towers per supermodule
69
kTowersInPhi
= 4,
// Number of trigger towers in phi
70
kTowersInEta
= 17,
// Number of trigger towers in eta
71
kCrystals
= 1700,
// Number of crystals per supermodule
72
kPns
= 10,
// Number of PN laser monitoring diodes per supermodule
73
kCrystalsInPhi
= 20,
// Number of crystals in phi
74
kCrystalsInEta
= 85,
// Number of crystals in eta
75
kCrystalsPerTower
= 25,
// Number of crystals per trigger tower
76
kCardsPerTower
= 5,
// Number of VFE cards per trigger tower
77
kChannelsPerCard
= 5
// Number of channels per VFE card
78
};
79
80
enum
SMElectronics_t
{
81
kSamplesPerChannel
= 10,
// Number of sample per channel, per event
82
kSamplesPerPn
= 50,
// Number of sample per PN, per event
83
kChannelsPerTower
= 25,
// Number of channels per trigger tower
84
kStripsPerTower
= 5,
// Number of VFE cards per trigger tower
85
kChannelsPerStrip
= 5,
// Number channels per VFE card
86
kPnPerTowerBlock
= 5,
// Number Pn diodes pertaining to 1 tower block = 1/2 mem box
87
kTriggerTowersAndMem
= 70
// Number of trigger towers block including mems
88
};
89
90
// index and container for expected towers (according to DCC status)
91
unsigned
_numExpectedTowers
;
92
unsigned
_ExpectedTowers
[71];
93
unsigned
_expTowersIndex
;
94
95
// used for mem boxes unpacking
96
int
memRawSample_
[
kStripsPerTower
][
kChannelsPerStrip
][
kSamplesPerChannel
+ 1];
// store raw data for one mem
97
int
data_MEM
[500];
// collects unpacked data for both mems
98
bool
pnAllocated
;
99
bool
pnIsOkInBlock
[
kPnPerTowerBlock
];
100
};
101
#endif
EBDigiCollection
Definition:
EcalDigiCollections.h:61
EcalTBDaqFormatter::kTowersInEta
Definition:
EcalTBDaqFormatter.h:70
EcalTBDaqFormatter::rightTower
bool rightTower(int tower) const
Definition:
EcalTBDaqFormatter.cc:763
edm::SortedCollection
Definition:
SortedCollection.h:49
nano_mu_digi_cff.strip
strip
Definition:
nano_mu_digi_cff.py:40
MessageLogger.h
EcalTBDaqFormatter::theParser_
DCCTBDataParser * theParser_
Definition:
EcalTBDaqFormatter.h:64
EcalTBDaqFormatter::kTowersInPhi
Definition:
EcalTBDaqFormatter.h:69
EcalTBDaqFormatter::kCrystalsPerTower
Definition:
EcalTBDaqFormatter.h:75
EcalTBDaqFormatter::_numExpectedTowers
unsigned _numExpectedTowers
Definition:
EcalTBDaqFormatter.h:91
EcalTBDaqFormatter::cryIc
int cryIc(int tower_id, int strip, int xtal)
Definition:
EcalTBDaqFormatter.cc:751
edm::EDCollection
Definition:
EDCollection.h:16
EcalTBDaqFormatter::interpretRawData
void interpretRawData(const FEDRawData &data, EBDigiCollection &digicollection, 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:
EcalTBDaqFormatter.cc:47
EcalTBDaqFormatter::DecodeMEM
void DecodeMEM(DCCTBTowerBlock *towerblock, EcalPnDiodeDigiCollection &pndigicollection, EcalElectronicsIdCollection &memttidcollection, EcalElectronicsIdCollection &memblocksizecollection, EcalElectronicsIdCollection &memgaincollection, EcalElectronicsIdCollection &memchidcollection)
Definition:
EcalTBDaqFormatter.cc:525
EcalTBDaqFormatter::SMGeom_t
SMGeom_t
Definition:
EcalTBDaqFormatter.h:66
EcalTBDaqFormatter::kCardsPerTower
Definition:
EcalTBDaqFormatter.h:76
EcalTBDaqFormatter::data_MEM
int data_MEM[500]
Definition:
EcalTBDaqFormatter.h:97
EcalTBDaqFormatter::cellIndex
std::pair< int, int > cellIndex(int tower_id, int strip, int xtal)
Definition:
EcalTBDaqFormatter.cc:723
EcalTBDaqFormatter::pnIsOkInBlock
bool pnIsOkInBlock[kPnPerTowerBlock]
Definition:
EcalTBDaqFormatter.h:99
EcalTBDaqFormatter::kTriggerTowersAndMem
Definition:
EcalTBDaqFormatter.h:87
EcalTBDaqFormatter::kStripsPerTower
Definition:
EcalTBDaqFormatter.h:84
EcalTBDaqFormatter::kPnPerTowerBlock
Definition:
EcalTBDaqFormatter.h:86
FEDRawData
Definition:
FEDRawData.h:19
EcalTBDaqFormatter::~EcalTBDaqFormatter
virtual ~EcalTBDaqFormatter()
Definition:
EcalTBDaqFormatter.h:29
EcalTBDaqFormatter::_expTowersIndex
unsigned _expTowersIndex
Definition:
EcalTBDaqFormatter.h:93
EcalTBDaqFormatter::leftTower
bool leftTower(int tower) const
Definition:
EcalTBDaqFormatter.cc:771
Service.h
DCCTBTowerBlock
Definition:
DCCTowerBlock.h:19
EcalDigiCollections.h
EcalTBDaqFormatter::EcalTBDaqFormatter
EcalTBDaqFormatter()
Definition:
EcalTBDaqFormatter.cc:30
EcalTBDaqFormatter::kChannelsPerTower
Definition:
EcalTBDaqFormatter.h:83
DCCTowerBlock.h
EcalTBDaqFormatter::kModules
Definition:
EcalTBDaqFormatter.h:67
EcalTBDaqFormatter::kSamplesPerChannel
Definition:
EcalTBDaqFormatter.h:81
EcalTBDaqFormatter::kCrystalsInPhi
Definition:
EcalTBDaqFormatter.h:73
EcalTBDaqFormatter::kSamplesPerPn
Definition:
EcalTBDaqFormatter.h:82
EcalTBDaqFormatter::_ExpectedTowers
unsigned _ExpectedTowers[71]
Definition:
EcalTBDaqFormatter.h:92
EcalTBDaqFormatter::kChannelsPerCard
Definition:
EcalTBDaqFormatter.h:77
EcalTBDaqFormatter::kPns
Definition:
EcalTBDaqFormatter.h:72
EcalTBDaqFormatter::SMElectronics_t
SMElectronics_t
Definition:
EcalTBDaqFormatter.h:80
EcalTBDaqFormatter::kCrystals
Definition:
EcalTBDaqFormatter.h:71
EcalTBDaqFormatter::pnAllocated
bool pnAllocated
Definition:
EcalTBDaqFormatter.h:98
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:80
EcalTBDaqFormatter::kTriggerTowers
Definition:
EcalTBDaqFormatter.h:68
EcalTBDaqFormatter::memRawSample_
int memRawSample_[kStripsPerTower][kChannelsPerStrip][kSamplesPerChannel+1]
Definition:
EcalTBDaqFormatter.h:96
EcalTBDaqFormatter::kChannelsPerStrip
Definition:
EcalTBDaqFormatter.h:85
EcalRawDataCollections.h
EcalDetIdCollections.h
EcalTBDaqFormatter
Definition:
EcalTBDaqFormatter.h:26
EcalTBDaqFormatter::kCrystalsInEta
Definition:
EcalTBDaqFormatter.h:74
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:241
l1tHGCalTowerProducer_cfi.tower
tower
Definition:
l1tHGCalTowerProducer_cfi.py:4
DCCTBDataParser
Definition:
DCCDataParser.h:25
Generated for CMSSW Reference Manual by
1.8.14