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