|
|
#include <EcalSimRawData.h>
|
void | analyze (const edm::Event &, const edm::EventSetup &) override |
|
| EcalSimRawData (const edm::ParameterSet &pset) |
|
| ~EcalSimRawData () override |
|
| EDAnalyzer ()=default |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const |
|
bool | wantsStreamRuns () const |
|
| ~EDAnalyzerBase () override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
void | checkGeometry (const edm::EventSetup &eventSetup) |
|
void | checkTriggerMap (const edm::EventSetup &eventSetup) |
|
int | cIndex2iTtEta (int iTtEta0) const |
|
int | cIndex2TtPhi (int iTtPhi0) const |
|
void | elec2GeomNum (int ittEta0, int ittPhi0, int strip1, int ch1, int &iEta0, int &iPhi0) const |
|
void | fwrite (std::ofstream &f, uint16_t data, int &iword, bool hpar=true) const |
|
void | genFeData (std::string basename, int iEvent, const std::vector< uint16_t > adcCount[nEbEta][nEbPhi]) const |
|
void | genSrData (std::string basename, int iEvent, int ttf[nEbTtEta][nTtPhi]) const |
|
void | genTccIn (std::string basename, int iEvent, const int tps[nTtEta][nTtPhi]) const |
|
void | genTccOut (std::string basename, int iEvent, const int tps[nTtEta][nTtPhi]) const |
|
void | getEbDigi (const edm::Event &event, std::vector< uint16_t > adc[nEbEta][nEbPhi]) const |
|
std::string | getExt () const |
|
void | getSrfs (const edm::Event &event, int ebSrf[nTtEta][nTtPhi], int eeSrf[nEndcaps][nScX][nScY]) const |
|
void | getTp (const edm::Event &event, const std::string &collName, int tp[nTtEta][nTtPhi]) const |
|
int | iEta2cIndex (int iEta) const |
|
int | iPhi2cIndex (int iPhi) const |
|
int | iTtEta2cIndex (int iTtEta) const |
|
int | iTtPhi2cIndex (int iTtPhi) const |
|
void | setHParity (uint16_t &a) const |
|
|
typedef EDAnalyzerBase | ModuleType |
|
typedef ProductLabels | Labels |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &descriptions) |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
The EcalSimRawData CMSSW module produces raw data from digis. The raw data are written into files which can be loaded into the TCC DCC and SRP boards in order to emulate the front-end. Only barrel is fully supported. The produced files for TCC assumes a special LUT in the TCC forged for FE emulation mode.
Module Parameters:
-
string digiProducer: digi label
-
string EBDigiCollection: EB crystal digi product instance name
-
string EEDigiCollection: EE crystal digi product instance name
-
string srProducer: sr flags digi label"
-
string EBSrFlagCollection: EB SR flags product instance name
-
string EESrFlagCollection: EE SR flags product instance name
-
string trigPrimProducer: trigger primitive digi label"
-
string trigPrimDigiCollection: trigger primitive digi product instance name
-
string tcpPrimDigiCollection: TCP FENIX output trigger primitive digi product instance name
-
string writeMode: output format. "write", "littleEndian", "bigEndian"
-
untracked bool tpVerbose: make verbose the trigger primitive processing
-
untracked bool xtalVerbose: make verbose the crystal digi processing
-
untracked int32 dccNum: Id of the dcc raw data must be produced for. -1 means every DCC
-
untracked int32 tccNum: Id of the tcc raw data must be produced for. -1 means every TCC
-
untracked bool tcc2dccData: switch for TCC->DCC data stream production
-
untracked bool srp2dccData: switch for SRP->DCC data stream production
-
untracked int32 tccInDefaultVal: default TriggerPrimitive values if the trigger tower is abscent
-
untracked string outputBaseName: basename for output files
Definition at line 42 of file EcalSimRawData.h.
◆ writeMode_t
Output format mode
littleEndian: little endian binary bigEndian: big endian binary ascii: ascii mode. The one accepted by the TCC, DCC and SRP board control software.
Enumerator |
---|
littleEndian | |
bigEndian | |
ascii | |
Definition at line 185 of file EcalSimRawData.h.
◆ EcalSimRawData()
◆ ~EcalSimRawData()
EcalSimRawData::~EcalSimRawData |
( |
| ) |
|
|
inlineoverride |
◆ analyze()
◆ checkGeometry()
call these once an event, to make sure everything is up-to-date
◆ checkTriggerMap()
◆ cIndex2iTtEta()
int EcalSimRawData::cIndex2iTtEta |
( |
int |
iTtEta0 | ) |
const |
|
inlineprivate |
Converse of iTtEta2cIndex
- Parameters
-
iTtEta0 | c eta index of TT |
std | CMSSW TT eta index |
Definition at line 235 of file EcalSimRawData.h.
235 {
return (iTtEta0 < 28) ? (iTtEta0 - 28) : (iTtEta0 - 27); }
◆ cIndex2TtPhi()
int EcalSimRawData::cIndex2TtPhi |
( |
int |
iTtPhi0 | ) |
const |
|
inlineprivate |
Converse of iTtPhi2cIndex
- Parameters
-
- Returns
- std CMSS TT index
Definition at line 241 of file EcalSimRawData.h.
241 {
return iTtPhi0 + 1; }
◆ elec2GeomNum()
void EcalSimRawData::elec2GeomNum |
( |
int |
ittEta0, |
|
|
int |
ittPhi0, |
|
|
int |
strip1, |
|
|
int |
ch1, |
|
|
int & |
iEta0, |
|
|
int & |
iPhi0 |
|
) |
| const |
|
private |
Converts electronic number of an ECAL barrel channel to geometrical indices
- Parameters
-
| ittEta0 | trigger tower c index |
| ittPhi0 | trigger tower c index |
| strip1 | strip index within the TT. Runs from 1 to 5. |
| ch1 | channel electronics number within the VFE. Runs from 1 to 5. |
[out] | iEta0 | eta c index of the channel |
[out] | iPhi0 | eta c index of the channel |
Definition at line 117 of file EcalSimRawData.cc.
References cms::cuda::assert().
◆ fwrite()
void EcalSimRawData::fwrite |
( |
std::ofstream & |
f, |
|
|
uint16_t |
data, |
|
|
int & |
iword, |
|
|
bool |
hpar = true |
|
) |
| const |
|
private |
Write a data 16-bit word into file according to selected format.
- Parameters
-
| f | the file stream to write to |
| data | the peace of data to write |
[in,out] | iword | pass zero when writing for the first time in a file, then the value returned by the previous call. Counts the number of words written into the file. |
| hpar | if true the horizontal odd word parity is set before writing the word into the file. |
Definition at line 129 of file EcalSimRawData.cc.
137 char c =
data & 0x00FF;
138 f.write(&
c,
sizeof(
c));
139 c = (
data >> 8) & 0x00FF;
140 f.write(&
c,
sizeof(
c));
143 char c = (
data >> 8) & 0x00FF;
144 f.write(&
c,
sizeof(
c));
146 f.write(&
c,
sizeof(
c));
149 f << ((iWord % 8 == 0 && iWord != 0) ?
"\n" :
"") <<
"0x" << setfill(
'0') << setw(4) << hex <<
data <<
"\t" <<
dec
References HltBtagPostValidation_cff::c, std::data(), TauDecayModes::dec, and f.
◆ genFeData()
void EcalSimRawData::genFeData |
( |
std::string |
basename, |
|
|
int |
iEvent, |
|
|
const std::vector< uint16_t > |
adcCount[nEbEta][nEbPhi] |
|
) |
| const |
|
private |
Generates FE crystal data
- Parameters
-
basename | base for the output file name. DCC number is appended to the name |
iEvent | event index |
adcCount | the payload, the ADC count of the channels. |
stripHeader |= parity(stripHeader) << 15;
Definition at line 169 of file EcalSimRawData.cc.
174 int chFrameLen = adcCount[0][0].size() + 1;
178 for (
int iZ0 = 0; iZ0 < 2; ++iZ0) {
179 for (
int iDccPhi0 = 0; iDccPhi0 <
nDccInPhi; ++iDccPhi0) {
188 s << basename <<
"_fe2dcc" << setfill(
'0') << setw(2) << iDcc1 << setfill(
' ') <<
ext;
189 ofstream
f(
s.str().c_str(), (
iEvent == 1 ? ios::ate : ios::app));
195 f << (
iEvent == 1 ?
"" :
"\n") <<
"[Event:" <<
iEvent <<
"]\n";
198 for (
int iTtEtaInSm0 = 0; iTtEtaInSm0 <
nTtSmEta; ++iTtEtaInSm0) {
199 int iTtEta0 = iZ0 *
nTtSmEta + iTtEtaInSm0;
200 for (
int iTtPhiInSm0 = 0; iTtPhiInSm0 <
nTtSmPhi; ++iTtPhiInSm0) {
205 for (
int stripId1 = 1; stripId1 <=
ttEdge; ++stripId1) {
206 uint16_t stripHeader =
207 0xF << 11 | (nPendingEvt & 0x3F) << 5 | (gmf & 0
x1) << 4 | (smf & 0x1) << 3 | (stripId1 & 0x7);
211 for (
int xtalId1 = 1; xtalId1 <=
ttEdge; ++xtalId1) {
212 uint16_t crystalHeader = 1 << 14 | (chFrameLen & 0xFF) << 4 | (monitorFlag & 0
x1) << 3 | (xtalId1 & 0x7);
214 fwrite(
f, crystalHeader, iWord);
218 elec2GeomNum(iTtEta0, iTtPhi0, stripId1, xtalId1, iEta0, iPhi0);
220 cout <<
dec <<
"iDcc1 = " << iDcc1 <<
"\t"
221 <<
"iEbTtEta0 = " << iTtEta0 <<
"\t"
222 <<
"iEbTtPhi0 = " << iTtPhi0 <<
"\t"
223 <<
"stripId1 = " << stripId1 <<
"\t"
224 <<
"xtalId1 = " << xtalId1 <<
"\t"
225 <<
"iEta0 = " << iEta0 <<
"\t"
226 <<
"iPhi0 = " << iPhi0 <<
"\t"
227 <<
"adc[5] = 0x" << hex << adcCount[iEta0][iPhi0][5] <<
dec <<
"\n";
230 const vector<uint16_t> &
adc = adcCount[iEta0][iPhi0];
231 for (
unsigned iSample = 0; iSample <
adc.size(); ++iSample) {
232 uint16_t
data =
adc[iSample] & 0x3FFF;
References ecalMGPA::adc(), gather_cfg::cout, std::data(), TauDecayModes::dec, f, iEvent, alignCSCRings::s, and testProducerWithPsetDescEmpty_cfi::x1.
◆ genSrData()
void EcalSimRawData::genSrData |
( |
std::string |
basename, |
|
|
int |
iEvent, |
|
|
int |
ttf[nEbTtEta][nTtPhi] |
|
) |
| const |
|
private |
Generates SR flags
- Parameters
-
basename | base for the output file name. DCC number is appended to the name |
iEvent | event index |
the | trigger tower flags |
Definition at line 244 of file EcalSimRawData.cc.
245 for (
int iZ0 = 0; iZ0 < 2; ++iZ0) {
246 for (
int iDccPhi0 = 0; iDccPhi0 <
nDccInPhi; ++iDccPhi0) {
252 s << basename <<
"_ab2dcc" << setfill(
'0') << setw(2) << iDcc1 << setfill(
' ') <<
getExt();
253 ofstream
f(
s.str().c_str(), (
iEvent == 1 ? ios::ate : ios::app));
256 throw cms::Exception(
string(
"Cannot create/open file ") +
s.str() +
".");
261 f << (
iEvent == 1 ?
"" :
"\n") <<
"[Event:" <<
iEvent <<
"]\n";
264 const uint16_t le1 = 0;
265 const uint16_t le0 = 0;
266 const uint16_t h1 = 1;
267 const uint16_t nFlags = 68;
268 uint16_t
data = (h1 & 0x1) << 14 | (le1 & 0
x1) << 12 | (le0 & 0x1) << 11 | (nFlags & 0x7F);
275 for (
int iTtEtaInSm0 = 0; iTtEtaInSm0 <
nTtSmEta; ++iTtEtaInSm0) {
278 for (
int iTtPhiInSm0 = 0; iTtPhiInSm0 <
nTtSmPhi; ++iTtPhiInSm0) {
287 const int field = iFlag % 4;
292 data |= srf[iTtEta0][iTtPhi0] << (field * 3);
References std::data(), f, iEvent, alignCSCRings::s, and testProducerWithPsetDescEmpty_cfi::x1.
◆ genTccIn()
void EcalSimRawData::genTccIn |
( |
std::string |
basename, |
|
|
int |
iEvent, |
|
|
const int |
tps[nTtEta][nTtPhi] |
|
) |
| const |
|
private |
Generates FE trigger primitives data
- Parameters
-
basename | base for the output file name. DCC number is appended to the name |
iEvent | event index |
tps | the payload, the trigger primitives |
Definition at line 307 of file EcalSimRawData.cc.
308 for (
int iZ0 = 0; iZ0 < 2; ++iZ0) {
309 for (
int iTccPhi0 = 0; iTccPhi0 <
nTccInPhi; ++iTccPhi0) {
317 const char *
ext =
".txt";
319 s << basename <<
"_tcc" << setfill(
'0') << setw(2) << iTcc1 << setfill(
' ') <<
ext;
320 ofstream fe2tcc(
s.str().c_str(), (
iEvent == 1 ? ios::ate : ios::app));
323 throw cms::Exception(
string(
"Failed to create file ") +
s.str() +
".");
327 for (
int iTtEtaInSm0 = 0; iTtEtaInSm0 <
nTtSmEta; ++iTtEtaInSm0) {
328 int iTtEta0 = (iZ0 == 0) ? 27 - iTtEtaInSm0 : 28 + iTtEtaInSm0;
329 for (
int iTtPhiInSm0 = 0; iTtPhiInSm0 <
nTtSmPhi; ++iTtPhiInSm0) {
335 uint16_t tp_fe2tcc = (tcp[iTtEta0][iTtPhi0] & 0x7ff);
338 cout <<
dec <<
"iTcc1 = " << iTcc1 <<
"\t"
339 <<
"iTtEta0 = " << iTtEta0 <<
"\t"
340 <<
"iTtPhi0 = " << iTtPhi0 <<
"\t"
341 <<
"iCh1 = " << iCh1 <<
"\t"
342 <<
"memPos = " << memPos <<
"\t"
343 <<
"tp = 0x" << setfill(
'0') << hex << setw(3) << tp_fe2tcc <<
dec << setfill(
' ') <<
"\n";
345 fe2tcc << iCh1 <<
"\t" << memPos <<
"\t" << setfill(
'0') << hex <<
"0x" << setw(4) << tp_fe2tcc <<
"\t"
346 <<
"0" <<
dec << setfill(
' ') <<
"\n";
350 fe2tcc << std::flush;
References gather_cfg::cout, TauDecayModes::dec, iEvent, and alignCSCRings::s.
◆ genTccOut()
void EcalSimRawData::genTccOut |
( |
std::string |
basename, |
|
|
int |
iEvent, |
|
|
const int |
tps[nTtEta][nTtPhi] |
|
) |
| const |
|
private |
Generates TCC->DCC data
- Parameters
-
basename | base for the output file name. DCC number is appended to the name |
iEvent | event index |
tps | the payload, the trigger primitives |
Definition at line 356 of file EcalSimRawData.cc.
359 for (
int iZ0 = 0; iZ0 < 2; ++iZ0) {
360 for (
int iTccPhi0 = 0; iTccPhi0 <
nTccInPhi; ++iTccPhi0) {
368 const char *
ext =
".txt";
370 s << basename <<
"_tcc" << setfill(
'0') << setw(2) << iTcc1 << setfill(
' ') <<
ext;
373 s << basename <<
"_tcc2dcc" << setfill(
'0') << setw(2) << iTcc1 << setfill(
' ') <<
getExt();
374 ofstream dccF(
s.str().c_str(), (
iEvent == 1 ? ios::ate : ios::app));
377 cout <<
"Warning: failed to create or open file " <<
s.str() <<
".\n";
381 const uint16_t h1 = 1;
382 const uint16_t le1 = 0;
383 const uint16_t le0 = 0;
385 const uint16_t nTts = 68;
386 const uint16_t
data =
387 (h1 & 0x1) << 14 | (le1 & 0
x1) << 12 | (le0 & 0x1) << 11 | (
nSamples & 0xF) << 7 | (nTts & 0x7F);
388 dccF << (
iEvent == 1 ?
"" :
"\n") <<
"[Event:" <<
iEvent <<
"]\n";
393 for (
int iTtEtaInSm0 = 0; iTtEtaInSm0 <
nTtSmEta; ++iTtEtaInSm0) {
395 for (
int iTtPhiInSm0 = 0; iTtPhiInSm0 <
nTtSmPhi; ++iTtPhiInSm0) {
402 cout <<
dec <<
"iTcc1 = " << iTcc1 <<
"\t"
403 <<
"iTtEta0 = " << iTtEta0 <<
"\t"
404 <<
"iTtPhi0 = " << iTtPhi0 <<
"\t"
405 <<
"iCh1 = " << iCh1 <<
"\t"
406 <<
"memPos = " << memPos <<
"\t"
407 <<
"tp = 0x" << hex << tps[iTtEta0][iTtPhi0] <<
dec <<
"\n";
409 fwrite(dccF, tps[iTtEta0][iTtPhi0], iDccWord,
false);
References gather_cfg::cout, std::data(), TauDecayModes::dec, iEvent, PresampleTask_cfi::nSamples, alignCSCRings::s, and testProducerWithPsetDescEmpty_cfi::x1.
◆ getEbDigi()
void EcalSimRawData::getEbDigi |
( |
const edm::Event & |
event, |
|
|
std::vector< uint16_t > |
adc[nEbEta][nEbPhi] |
|
) |
| const |
|
private |
Retrieves barrel digis (APD ADC count).
- Parameters
-
event | CMS event |
adc | [out] the adc counts: adc[iEta0][iPhi0][iTimeSample0] |
Definition at line 478 of file EcalSimRawData.cc.
487 const uint16_t suppressed = 0xFFFF;
489 adc[0][0] = vector<uint16_t>(
nSamples, suppressed);
491 for (
int iEbEta = 0; iEbEta <
nEbEta; ++iEbEta) {
492 for (
int iEbPhi = 0; iEbPhi <
nEbPhi; ++iEbPhi) {
493 adc[iEbEta][iEbPhi] =
adc[0][0];
498 cout << setfill(
'0');
509 if (iEta0 < 0 || iEta0 >=
nEbEta) {
510 cout <<
"iEta0 (= " << iEta0 <<
") is out of range ("
511 <<
"[0," <<
nEbEta - 1 <<
"])\n";
513 if (iPhi0 < 0 || iPhi0 >=
nEbPhi) {
514 cout <<
"iPhi0 (= " << iPhi0 <<
") is out of range ("
515 <<
"[0," <<
nEbPhi - 1 <<
"])\n";
519 cout << iEta0 <<
"\t" << iPhi0 <<
":\t";
525 "Found EB digis with different sample count! This "
526 "is not supported by EcalSimRawData.");
529 for (
int iSample = 0; iSample <
nSamples; ++iSample) {
531 uint16_t encodedAdc =
sample.raw();
532 adc[iEta0][iPhi0][iSample] = encodedAdc;
534 cout << (iSample > 0 ?
" " :
"") <<
"0x" << setw(4) << encodedAdc;
541 cout << setfill(
' ');
References ecalMGPA::adc(), edm::DataFrameContainer::begin(), gather_cfg::cout, TauDecayModes::dec, edm::DataFrameContainer::empty(), edm::DataFrameContainer::end(), Exception, amptDefault_cfi::frame, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, edm::HandleBase::isValid(), PresampleTask_cfi::nSamples, and simplePhotonAnalyzer_cfi::sample.
◆ getExt()
string EcalSimRawData::getExt |
( |
| ) |
const |
|
private |
Help function to get the file extension which depends on the output formats.
Definition at line 156 of file EcalSimRawData.cc.
◆ getSrfs()
void EcalSimRawData::getSrfs |
( |
const edm::Event & |
event, |
|
|
int |
ebSrf[nTtEta][nTtPhi], |
|
|
int |
eeSrf[nEndcaps][nScX][nScY] |
|
) |
| const |
|
private |
◆ getTp()
void EcalSimRawData::getTp |
( |
const edm::Event & |
event, |
|
|
const std::string & |
collName, |
|
|
int |
tp[nTtEta][nTtPhi] |
|
) |
| const |
|
private |
Extracts the trigger primitive (TP). The collection name parameter permits to select either the TCP Fenix output or the TCC output. Note: TCP output is only valid for the barrel.
- Parameters
-
event | CMS event |
collName | label of the EDM collection containing the TP. |
tp | [out] the trigger primitives |
Definition at line 545 of file EcalSimRawData.cc.
552 for (
int iTtEta0 = 0; iTtEta0 <
nTtEta; ++iTtEta0) {
553 for (
int iTtPhi0 = 0; iTtPhi0 <
nTtPhi; ++iTtPhi0) {
558 cout << setfill(
'0');
564 if (iTtEta0 < 0 || iTtEta0 >=
nTtEta) {
565 cout <<
"iTtEta0 (= " << iTtEta0 <<
") is out of range ("
568 if (iTtPhi0 < 0 || iTtPhi0 >=
nTtPhi) {
569 cout <<
"iTtPhi0 (= " << iTtPhi0 <<
") is out of range ("
570 <<
"[0," <<
nTtPhi - 1 <<
"])\n";
573 tcp[iTtEta0][iTtPhi0] =
tp[
tp.sampleOfInterest()].raw();
576 if (tcp[iTtEta0][iTtPhi0] != 0)
577 cout <<
collName << (
collName.empty() ?
"" :
" ") <<
"TP(" << setw(2) << iTtEta0 <<
"," << iTtPhi0 <<
") = "
578 <<
"0x" << setw(4) << tcp[iTtEta0][iTtPhi0] <<
"\tcmssw indices: " <<
tp.id().ieta() <<
" "
579 <<
tp.id().iphi() <<
"\n";
583 cout << setfill(
' ');
References edm::SortedCollection< T, SORT >::begin(), trigObjTnPSource_cfi::collName, gather_cfg::cout, edm::SortedCollection< T, SORT >::empty(), edm::SortedCollection< T, SORT >::end(), edm::HandleBase::isValid(), edm::Handle< T >::product(), and cmsswSequenceInfo::tp.
◆ iEta2cIndex()
int EcalSimRawData::iEta2cIndex |
( |
int |
iEta | ) |
const |
|
inlineprivate |
Converts std CMSSW crystal eta index into a c-index (contiguous integer starting from 0 and increasing with pseudo-rapidity).
- Parameters
-
iEta | std CMSSW crystal eta index |
- Returns
- the c-array index
Definition at line 209 of file EcalSimRawData.h.
References L1TowerCalibrationProducer_cfi::iEta.
◆ iPhi2cIndex()
int EcalSimRawData::iPhi2cIndex |
( |
int |
iPhi | ) |
const |
|
inlineprivate |
Converts std CMSSW crystal phi index into a c-index (contiguous integer starting from 0 at phi=0deg and increasing with phi).
- Parameters
-
iPhi | std CMSSW crystal phi index |
- Returns
- the c-array index
Definition at line 216 of file EcalSimRawData.h.
217 int iPhi0 = iPhi - 11;
References nEbPhi.
◆ iTtEta2cIndex()
int EcalSimRawData::iTtEta2cIndex |
( |
int |
iTtEta | ) |
const |
|
inlineprivate |
Converts std CMSSW ECAL trigger tower eta index into a c-index (contiguous integer starting from 0 and increasing with pseudo-rapidity).
- Parameters
-
iEta | std CMSSW trigger tower eta index |
- Returns
- the c-array index
Definition at line 229 of file EcalSimRawData.h.
229 {
return (iTtEta < 0) ? (iTtEta + 28) : (iTtEta + 27); }
◆ iTtPhi2cIndex()
int EcalSimRawData::iTtPhi2cIndex |
( |
int |
iTtPhi | ) |
const |
|
inlineprivate |
Converts std CMSSW ECAL trigger tower phi index into a c-index (contiguous integer starting from 0 at phi=0deg and increasing with phi).
- Parameters
-
iPhi | std CMSSW ECAL trigger tower phi index |
- Returns
- the c-array index
Definition at line 248 of file EcalSimRawData.h.
248 {
return iTtPhi - 1; }
◆ setHParity()
void EcalSimRawData::setHParity |
( |
uint16_t & |
a | ) |
const |
|
private |
Definition at line 417 of file EcalSimRawData.cc.
418 const int odd = 1 << 15;
423 const int p[16] = {even, odd, odd, even, odd, even, even, odd, odd, even, even, odd, even, odd, odd, even};
425 a ^=
p[
a & 0xF] ^
p[(
a >> 4) & 0xF] ^
p[(
a >> 8) & 0xF] ^
p[
a >> 12 & 0xF] ^ odd;
References a, and AlCaHLTBitMon_ParallelJobs::p.
◆ basename_
std::string EcalSimRawData::basename_ |
|
private |
◆ dccNum_
int EcalSimRawData::dccNum_ |
|
private |
Index of the DCC, FE data must be produced for. -1 for all TTCs
Definition at line 434 of file EcalSimRawData.h.
◆ digiProducer_
std::string EcalSimRawData::digiProducer_ |
|
private |
◆ ebDccPhiEdge
const int EcalSimRawData::ebDccPhiEdge = 20 |
|
staticprivate |
Number of barrel crystals along phi covered by a DCC
Definition at line 143 of file EcalSimRawData.h.
◆ ebDigiCollection_
std::string EcalSimRawData::ebDigiCollection_ |
|
private |
◆ ebSrFlagCollection_
std::string EcalSimRawData::ebSrFlagCollection_ |
|
private |
◆ ebTccPhiEdge
const int EcalSimRawData::ebTccPhiEdge = 20 |
|
staticprivate |
◆ eeDigiCollection_
std::string EcalSimRawData::eeDigiCollection_ |
|
private |
◆ eeSrFlagCollection_
std::string EcalSimRawData::eeSrFlagCollection_ |
|
private |
◆ esr_
◆ fe2dcc_
bool EcalSimRawData::fe2dcc_ |
|
private |
◆ fe2tcc_
bool EcalSimRawData::fe2tcc_ |
|
private |
◆ iEvent
int EcalSimRawData::iEvent |
|
private |
◆ nDccEndcap
const int EcalSimRawData::nDccEndcap = 9 |
|
staticprivate |
◆ nDccInPhi
const int EcalSimRawData::nDccInPhi = 18 |
|
staticprivate |
◆ nEbEta
const int EcalSimRawData::nEbEta = 170 |
|
staticprivate |
Number of crystals in ECAL barrel along eta
Definition at line 63 of file EcalSimRawData.h.
◆ nEbPhi
const int EcalSimRawData::nEbPhi = 360 |
|
staticprivate |
◆ nEbTtEta
◆ nEeTtEta
const int EcalSimRawData::nEeTtEta = 11 |
|
staticprivate |
◆ nEeX
const int EcalSimRawData::nEeX = 100 |
|
staticprivate |
◆ nEeY
const int EcalSimRawData::nEeY = 100 |
|
staticprivate |
◆ nEndcaps
const int EcalSimRawData::nEndcaps = 2 |
|
staticprivate |
◆ nScX
const int EcalSimRawData::nScX = 20 |
|
staticprivate |
Maximum number of supercrystal along x axis
Definition at line 87 of file EcalSimRawData.h.
◆ nScY
const int EcalSimRawData::nScY = 20 |
|
staticprivate |
Maximum number of supercrystal along y axis
Definition at line 91 of file EcalSimRawData.h.
◆ nTccEndcap
const int EcalSimRawData::nTccEndcap = 36 |
|
staticprivate |
◆ nTccInPhi
const int EcalSimRawData::nTccInPhi = 18 |
|
staticprivate |
◆ nTtEta
◆ nTtPhi
◆ nTtPhisPerEbDcc
const int EcalSimRawData::nTtPhisPerEbDcc = 4 |
|
staticprivate |
Number of trigger towers alng phi covered by a DCC
Definition at line 147 of file EcalSimRawData.h.
◆ nTtPhisPerEbTcc
const int EcalSimRawData::nTtPhisPerEbTcc = 4 |
|
staticprivate |
Number of trigger towers alng phi covered by a TCC
Definition at line 151 of file EcalSimRawData.h.
◆ nTtSmEta
const int EcalSimRawData::nTtSmEta = 17 |
|
staticprivate |
◆ nTtSmPhi
const int EcalSimRawData::nTtSmPhi = 4 |
|
staticprivate |
◆ nTtTypes
const int EcalSimRawData::nTtTypes = 2 |
|
staticprivate |
Number of barrel trigger tower types (in term of VFE card orientation)
Definition at line 155 of file EcalSimRawData.h.
◆ scEdge
const int EcalSimRawData::scEdge = 5 |
|
staticprivate |
◆ srDigiProducer_
std::string EcalSimRawData::srDigiProducer_ |
|
private |
◆ srfFile
std::ofstream EcalSimRawData::srfFile |
|
private |
◆ srp2dcc_
bool EcalSimRawData::srp2dcc_ |
|
private |
◆ strip2Eta
const int EcalSimRawData::strip2Eta |
|
staticprivate |
Initial value:= {
{4, 3, 2, 1, 0},
{0, 1, 2, 3, 4}
}
Maps strip_id to eta index within a TT. strip2Eta[iTtType][strip_id-1] will be the eta index of channels with strip_id 'strip_id'. The eta index runs from 0 to 4 and increasing with the eta of the std CMS coordinates.
Definition at line 176 of file EcalSimRawData.h.
◆ stripCh2Phi
const int EcalSimRawData::stripCh2Phi |
|
staticprivate |
Initial value:= {
{{4, 3, 2, 1, 0},
{0, 1, 2, 3, 4},
{4, 3, 2, 1, 0},
{0, 1, 2, 3, 4},
{4, 3, 2, 1, 0}},
{{0, 1, 2, 3, 4}, {4, 3, 2, 1, 0}, {0, 1, 2, 3, 4}, {4, 3, 2, 1, 0}, {0, 1, 2, 3, 4}}}
Maps (strip_id, channel_id) to phi index within a TT. stripCh2Phi[iTtType][strip_id-1][ch_id-1] will be the phi index of the TT of type iTtType with strip ID 'strip_id' and channel VFE id 'ch_id'. The phi runs from 0 to 4 and increases with the phi of std CMS coordinates.
Definition at line 169 of file EcalSimRawData.h.
◆ tcc2dcc_
bool EcalSimRawData::tcc2dcc_ |
|
private |
◆ tccInDefaultVal_
int EcalSimRawData::tccInDefaultVal_ |
|
private |
default TriggerPrimitive values if the trigger tower is abscent
Definition at line 438 of file EcalSimRawData.h.
◆ tccNum_
int EcalSimRawData::tccNum_ |
|
private |
Index of the TCC, FE data must be produced for. -1 for all TTCs
Definition at line 430 of file EcalSimRawData.h.
◆ tcpDigiCollection_
std::string EcalSimRawData::tcpDigiCollection_ |
|
private |
◆ theGeometry
◆ theTriggerTowerMap
◆ tpDigiCollection_
std::string EcalSimRawData::tpDigiCollection_ |
|
private |
◆ tpProducer_
std::string EcalSimRawData::tpProducer_ |
|
private |
◆ tpVerbose_
bool EcalSimRawData::tpVerbose_ |
|
private |
◆ ttEdge
const int EcalSimRawData::ttEdge = 5 |
|
staticprivate |
◆ ttfFile
std::ofstream EcalSimRawData::ttfFile |
|
private |
◆ ttType
const int EcalSimRawData::ttType |
|
staticprivate |
Initial value:= {
0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1,
0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1
}
Map of trigger tower types (in term of VFE card orientation). ttType[iTtEta0]: trigger tower type of TTs with eta 'c-arrary' index iTtEta0
Definition at line 161 of file EcalSimRawData.h.
◆ writeMode_
◆ xtalVerbose_
bool EcalSimRawData::xtalVerbose_ |
|
private |
int iPhi2cIndex(int iPhi) const
void fwrite(std::ofstream &f, uint16_t data, int &iword, bool hpar=true) const
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
static const int nTtSmEta
std::vector< T >::const_iterator const_iterator
static const int strip2Eta[nTtTypes][ttEdge]
T const * product() const
static const int nDccInPhi
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
static const int nTccInPhi
static const int nTccEndcap
static const int nTtSmPhi
void elec2GeomNum(int ittEta0, int ittPhi0, int strip1, int ch1, int &iEta0, int &iPhi0) const
std::string eeSrFlagCollection_
static const int nEndcaps
std::string digiProducer_
std::string getExt() const
void genTccOut(std::string basename, int iEvent, const int tps[nTtEta][nTtPhi]) const
const_iterator begin() const
std::string tcpDigiCollection_
std::string ebSrFlagCollection_
std::string eeDigiCollection_
void genSrData(std::string basename, int iEvent, int ttf[nEbTtEta][nTtPhi]) const
void setHParity(uint16_t &a) const
int iTtEta2cIndex(int iTtEta) const
void genTccIn(std::string basename, int iEvent, const int tps[nTtEta][nTtPhi]) const
void getSrfs(const edm::Event &event, int ebSrf[nTtEta][nTtPhi], int eeSrf[nEndcaps][nScX][nScY]) const
const_iterator end() const
static const int nTtPhisPerEbTcc
const_iterator begin() const
The iterator returned can not safely be used across threads.
int iTtPhi2cIndex(int iTtPhi) const
void getEbDigi(const edm::Event &event, std::vector< uint16_t > adc[nEbEta][nEbPhi]) const
std::string srDigiProducer_
std::string ebDigiCollection_
void genFeData(std::string basename, int iEvent, const std::vector< uint16_t > adcCount[nEbEta][nEbPhi]) const
static const int nTtPhisPerEbDcc
char data[epos_bytes_allocation]
int iEta2cIndex(int iEta) const
static const int nEbTtEta
static const int nDccEndcap
static const int stripCh2Phi[nTtTypes][ttEdge][ttEdge]
static const int ttType[nEbTtEta]
void getTp(const edm::Event &event, const std::string &collName, int tp[nTtEta][nTtPhi]) const
static const int nEeTtEta
std::string tpDigiCollection_
const_iterator end() const