Main Page
Namespaces
Classes
Package Documentation
EventFilter
EcalTBRawToDigi
src
EcalTB07DaqFormatter.h
Go to the documentation of this file.
1
#ifndef EcalTB07DaqFormatter_H
2
#define EcalTB07DaqFormatter_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
#include "
FWCore/ParameterSet/interface/FileInPath.h
"
24
25
class
FEDRawData
;
26
class
DCCDataParser;
27
class
EcalTB07DaqFormatter
{
28
29
public
:
30
31
EcalTB07DaqFormatter
(
std::string
tbName,
int
a
[68][5][5],
int
b
[71],
int
c
[201]);
32
virtual
~EcalTB07DaqFormatter
(){
LogDebug
(
"EcalTB07RawToDigi"
) <<
"@SUB=EcalTB07DaqFormatter"
<<
"\n"
; };
33
34
void
interpretRawData
(
const
FEDRawData
&
data
,
EBDigiCollection
& digicollection ,
EEDigiCollection
& eeDigiCollection,
35
EcalPnDiodeDigiCollection
& pndigicollection,
36
EcalRawDataCollection
& DCCheaderCollection,
37
EBDetIdCollection
& dccsizecollection,
38
EcalElectronicsIdCollection
& ttidcollection ,
EcalElectronicsIdCollection
& blocksizecollection,
39
EBDetIdCollection
& chidcollection ,
EBDetIdCollection
& gaincollection,
40
EBDetIdCollection
& gainswitchcollection ,
41
EcalElectronicsIdCollection
& memttidcollection,
EcalElectronicsIdCollection
& memblocksizecollection,
42
EcalElectronicsIdCollection
& memgaincollection,
EcalElectronicsIdCollection
& memchidcollection,
43
EcalTrigPrimDigiCollection
&tpcollection);
44
45
46
private
:
47
48
void
DecodeMEM
(
DCCTBTowerBlock
* towerblock,
EcalPnDiodeDigiCollection
& pndigicollection ,
49
EcalElectronicsIdCollection
& memttidcollection,
EcalElectronicsIdCollection
& memblocksizecollection,
50
EcalElectronicsIdCollection
& memgaincollection,
EcalElectronicsIdCollection
& memchidcollection);
51
52
std::pair<int,int>
cellIndex
(
int
tower_id,
int
strip
,
int
xtal);
53
int
cryIc
(
int
tower_id,
int
strip,
int
xtal);
54
bool
leftTower
(
int
tower)
const
;
55
bool
rightTower
(
int
tower)
const
;
56
57
private
:
58
DCCTBDataParser
*
theParser_
;
59
int
cryIcMap_
[68][5][5];
60
int
tbStatusToLocation_
[71];
61
int
tbTowerIDToLocation_
[201];
62
std::string
tbName_
;
63
64
int
getEE_ix
(
int
tower,
int
strip,
int
ch);
65
int
getEE_iy
(
int
tower,
int
strip,
int
ch);
66
67
enum
SMGeom_t
{
68
kModules
= 4,
// Number of modules per supermodule
69
kTriggerTowers
= 68,
// Number of trigger towers per supermodule
70
kTowersInPhi
= 4,
// Number of trigger towers in phi
71
kTowersInEta
= 17,
// Number of trigger towers in eta
72
kCrystals
= 1700,
// Number of crystals per supermodule
73
kPns
= 10,
// Number of PN laser monitoring diodes per supermodule
74
kCrystalsInPhi
= 20,
// Number of crystals in phi
75
kCrystalsInEta
= 85,
// Number of crystals in eta
76
kCrystalsPerTower
= 25,
// Number of crystals per trigger tower
77
kCardsPerTower
= 5,
// Number of VFE cards per trigger tower
78
kChannelsPerCard
= 5
// Number of channels per VFE card
79
};
80
81
enum
SMElectronics_t
{
82
kSamplesPerChannel
= 10,
// Number of sample per channel, per event
83
kSamplesPerPn
= 50,
// Number of sample per PN, per event
84
kChannelsPerTower
= 25,
// Number of channels per trigger tower
85
kStripsPerTower
= 5,
// Number of VFE cards per trigger tower
86
kChannelsPerStrip
= 5,
// Number channels per VFE card
87
kPnPerTowerBlock
= 5,
// Number Pn diodes pertaining to 1 tower block = 1/2 mem box
88
kTriggerTowersAndMem
= 70
// Number of trigger towers block including mems
89
};
90
91
// index and container for expected towers (according to DCC status)
92
unsigned
_numExpectedTowers
;
93
unsigned
_ExpectedTowers
[71];
94
unsigned
_expTowersIndex
;
95
96
// used for mem boxes unpacking
97
int
memRawSample_
[
kStripsPerTower
][
kChannelsPerStrip
][
kSamplesPerChannel
+1];
// store raw data for one mem
98
int
data_MEM
[500];
// collects unpacked data for both mems
99
bool
pnAllocated
;
100
bool
pnIsOkInBlock
[
kPnPerTowerBlock
];
101
102
};
103
#endif
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:601
EBDigiCollection
Definition:
EcalDigiCollections.h:33
EEDigiCollection
Definition:
EcalDigiCollections.h:48
MessageLogger.h
edm::SortedCollection< EcalPnDiodeDigi >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
EcalTB07DaqFormatter::kStripsPerTower
Definition:
EcalTB07DaqFormatter.h:85
EcalTB07DaqFormatter::SMElectronics_t
SMElectronics_t
Definition:
EcalTB07DaqFormatter.h:81
edm::EDCollection< EBDetId >
EnergyCorrector.c
c
Definition:
EnergyCorrector.py:43
EcalTB07DaqFormatter::kCardsPerTower
Definition:
EcalTB07DaqFormatter.h:77
EcalTB07DaqFormatter::kCrystalsPerTower
Definition:
EcalTB07DaqFormatter.h:76
EcalTB07DaqFormatter::kSamplesPerPn
Definition:
EcalTB07DaqFormatter.h:83
EcalTB07DaqFormatter::kPnPerTowerBlock
Definition:
EcalTB07DaqFormatter.h:87
EcalTB07DaqFormatter::pnAllocated
bool pnAllocated
Definition:
EcalTB07DaqFormatter.h:99
EcalTB07DaqFormatter::SMGeom_t
SMGeom_t
Definition:
EcalTB07DaqFormatter.h:67
EcalTB07DaqFormatter::tbName_
std::string tbName_
Definition:
EcalTB07DaqFormatter.h:62
EcalTB07DaqFormatter::kTowersInEta
Definition:
EcalTB07DaqFormatter.h:71
EcalTB07DaqFormatter::_expTowersIndex
unsigned _expTowersIndex
Definition:
EcalTB07DaqFormatter.h:94
EcalTB07DaqFormatter::kCrystals
Definition:
EcalTB07DaqFormatter.h:72
EcalTB07DaqFormatter::kChannelsPerTower
Definition:
EcalTB07DaqFormatter.h:84
EcalTB07DaqFormatter::kChannelsPerCard
Definition:
EcalTB07DaqFormatter.h:78
FEDRawData
Definition:
FEDRawData.h:20
EcalTB07DaqFormatter::~EcalTB07DaqFormatter
virtual ~EcalTB07DaqFormatter()
Definition:
EcalTB07DaqFormatter.h:32
FileInPath.h
EcalTB07DaqFormatter::tbTowerIDToLocation_
int tbTowerIDToLocation_[201]
Definition:
EcalTB07DaqFormatter.h:61
Service.h
DCCTBTowerBlock
Definition:
DCCTowerBlock.h:21
EcalTB07DaqFormatter::kModules
Definition:
EcalTB07DaqFormatter.h:68
EcalTB07DaqFormatter::cryIc
int cryIc(int tower_id, int strip, int xtal)
Definition:
EcalTB07DaqFormatter.cc:947
EcalTB07DaqFormatter::_ExpectedTowers
unsigned _ExpectedTowers[71]
Definition:
EcalTB07DaqFormatter.h:93
EcalDigiCollections.h
EcalTB07DaqFormatter::cryIcMap_
int cryIcMap_[68][5][5]
Definition:
EcalTB07DaqFormatter.h:59
EcalTB07DaqFormatter::theParser_
DCCTBDataParser * theParser_
Definition:
EcalTB07DaqFormatter.h:58
EcalTB07DaqFormatter::_numExpectedTowers
unsigned _numExpectedTowers
Definition:
EcalTB07DaqFormatter.h:92
DCCTowerBlock.h
EcalTB07DaqFormatter::kTriggerTowersAndMem
Definition:
EcalTB07DaqFormatter.h:88
EcalTB07DaqFormatter::getEE_iy
int getEE_iy(int tower, int strip, int ch)
Definition:
EcalTB07DaqFormatter.cc:935
EcalTB07DaqFormatter::leftTower
bool leftTower(int tower) const
Definition:
EcalTB07DaqFormatter.cc:977
EcalTB07DaqFormatter::DecodeMEM
void DecodeMEM(DCCTBTowerBlock *towerblock, EcalPnDiodeDigiCollection &pndigicollection, EcalElectronicsIdCollection &memttidcollection, EcalElectronicsIdCollection &memblocksizecollection, EcalElectronicsIdCollection &memgaincollection, EcalElectronicsIdCollection &memchidcollection)
Definition:
EcalTB07DaqFormatter.cc:674
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:71
b
double b
Definition:
hdecay.h:120
digitizers_cfi.strip
strip
Definition:
digitizers_cfi.py:19
EcalTB07DaqFormatter::tbStatusToLocation_
int tbStatusToLocation_[71]
Definition:
EcalTB07DaqFormatter.h:60
EcalTB07DaqFormatter::pnIsOkInBlock
bool pnIsOkInBlock[kPnPerTowerBlock]
Definition:
EcalTB07DaqFormatter.h:100
EcalTB07DaqFormatter::kTowersInPhi
Definition:
EcalTB07DaqFormatter.h:70
EcalTB07DaqFormatter::kPns
Definition:
EcalTB07DaqFormatter.h:73
EcalTB07DaqFormatter::kTriggerTowers
Definition:
EcalTB07DaqFormatter.h:69
EcalTB07DaqFormatter::getEE_ix
int getEE_ix(int tower, int strip, int ch)
Definition:
EcalTB07DaqFormatter.cc:922
EcalTB07DaqFormatter::rightTower
bool rightTower(int tower) const
Definition:
EcalTB07DaqFormatter.cc:966
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:82
EcalTB07DaqFormatter::kCrystalsInPhi
Definition:
EcalTB07DaqFormatter.h:74
EcalTB07DaqFormatter::EcalTB07DaqFormatter
EcalTB07DaqFormatter(std::string tbName, int a[68][5][5], int b[71], int c[201])
Definition:
EcalTB07DaqFormatter.cc:35
EcalTB07DaqFormatter::cellIndex
std::pair< int, int > cellIndex(int tower_id, int strip, int xtal)
Definition:
EcalTB07DaqFormatter.cc:891
a
double a
Definition:
hdecay.h:121
EcalTB07DaqFormatter::kSamplesPerChannel
Definition:
EcalTB07DaqFormatter.h:82
EcalTB07DaqFormatter
Definition:
EcalTB07DaqFormatter.h:27
EcalTB07DaqFormatter::data_MEM
int data_MEM[500]
Definition:
EcalTB07DaqFormatter.h:98
EcalTB07DaqFormatter::kChannelsPerStrip
Definition:
EcalTB07DaqFormatter.h:86
EcalTB07DaqFormatter::kCrystalsInEta
Definition:
EcalTB07DaqFormatter.h:75
EcalRawDataCollections.h
EcalDetIdCollections.h
EcalTB07DaqFormatter::memRawSample_
int memRawSample_[kStripsPerTower][kChannelsPerStrip][kSamplesPerChannel+1]
Definition:
EcalTB07DaqFormatter.h:97
DCCTBDataParser
Definition:
DCCDataParser.h:27
Generated for CMSSW Reference Manual by
1.8.11