#include <EESelectiveReadoutTask.h>
Public Member Functions | |
EESelectiveReadoutTask (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~EESelectiveReadoutTask () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginJob (void) |
BeginJob. | |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
BeginRun. | |
void | cleanup (void) |
Cleanup. | |
void | endJob (void) |
EndJob. | |
void | endRun (const edm::Run &r, const edm::EventSetup &c) |
EndRun. | |
void | reset (void) |
Reset. | |
void | setup (void) |
Setup. | |
Protected Attributes | |
int | nCrySC [20][20][2] |
To store the readout crystals / SC. | |
int | nCryTT [108][41] |
int | nEvtAnyInterest [100][100][2] |
To store the events with any interest. | |
int | nEvtAnyReadout [20][20][2] |
To store the events with any readout. | |
int | nEvtCompleteReadoutIfZS [20][20][2] |
To store the events with complete readout when ZS is requested. | |
int | nEvtDroppedReadoutIfFR [20][20][2] |
To store the events with 0 channels readout when FR is requested. | |
int | nEvtFullReadout [20][20][2] |
To store the events with full readout. | |
int | nEvtHighInterest [100][100][2] |
To store the events with high interest TT. | |
int | nEvtLowInterest [100][100][2] |
To store the events with low interest TT. | |
int | nEvtMediumInterest [100][100][2] |
To store the events with medium interest TT. | |
int | nEvtRUForced [20][20][2] |
To store the events with RU forced. | |
int | nEvtZS1Readout [20][20][2] |
To store the events with ZS1 readout. | |
int | nEvtZSReadout [20][20][2] |
To store the events with ZS1 or ZS2 readout. | |
Static Protected Attributes | |
static const int | bytesPerCrystal = 24 |
Number of bytes per crystal. | |
static const int | kByte = 1024 |
static const int | nDccChs = 68 |
maximum number of RUs read by a DCC | |
static const int | nEBDcc = 36 |
static const int | nECALDcc = 54 |
Constants. | |
static const int | nEEDcc = 18 |
static const int | nEeRus = 2*(34+32+33+33+32+34+33+34+33) |
number of RUs for EE | |
static const int | nEeX = 100 |
EE crystal grid size along X. | |
static const int | nEeY = 100 |
EE crystal grid size along Y. | |
static const int | nEndcaps = 2 |
number of endcaps | |
static const int | nTtEta = 56 |
Number of Trigger Towers along Eta. | |
static const int | nTtPhi = 72 |
Number of Trigger Towers along Phi. | |
static const int | scEdge = 5 |
Number of crystals along a supercrystal edge. | |
Private Types | |
enum | subdet_t { EB, EE } |
distinguishes barral and endcap of ECAL. More... | |
Private Member Functions | |
void | anaDigi (const EEDataFrame &frame, const EESrFlagCollection &srFlagColl, uint16_t statusCode) |
void | anaDigiInit () |
int | cIndex2iXY (int iX0) const |
void | configFirWeights (std::vector< double > weightsForZsFIR) |
int | dccIndex (int iDet, int i, int j) const |
unsigned | dccNum (const DetId &xtalId) const |
unsigned | dccNumOfRU (const EcalScDetId &scId) const |
int | dccPhiIndex (int i, int j) const |
int | dccPhiIndexOfRU (int i, int j) const |
int | getCrystalCount (int iDcc, int iDccCh) |
double | getDccEventSize (int iDcc0, double nReadXtals) const |
double | getDccOverhead (subdet_t subdet) const |
double | getEeEventSize (double nReadXtals) const |
int | iXY2cIndex (int iX) const |
const EcalScDetId | readOutUnitOf (const EEDetId &xtalId) const |
Static Private Member Functions | |
static int | dccZsFIR (const EcalDataFrame &frame, const std::vector< int > &firWeights, int firstFIRSample, bool *saturated=0) |
static std::vector< int > | getFIRWeights (const std::vector< double > &normalizedWeights) |
Private Attributes | |
DQMStore * | dqmStore_ |
edm::InputTag | EcalRecHitCollection_ |
edm::InputTag | EcalTrigPrimDigiCollection_ |
MonitorElement * | EECompleteZSCount_ [2] |
MonitorElement * | EECompleteZSMap_ [2] |
MonitorElement * | EEDccEventSize_ |
MonitorElement * | EEDccEventSizeMap_ |
edm::InputTag | EEDigiCollection_ |
MonitorElement * | EEDroppedFRCount_ [2] |
MonitorElement * | EEDroppedFRMap_ [2] |
MonitorElement * | EEEventSize_ [2] |
MonitorElement * | EEFullReadoutSRFlagCount_ [2] |
MonitorElement * | EEFullReadoutSRFlagMap_ [2] |
MonitorElement * | EEHighInterestPayload_ [2] |
MonitorElement * | EEHighInterestTriggerTowerFlagMap_ [2] |
MonitorElement * | EEHighInterestZsFIR_ [2] |
MonitorElement * | EELowInterestPayload_ [2] |
MonitorElement * | EELowInterestTriggerTowerFlagMap_ [2] |
MonitorElement * | EELowInterestZsFIR_ [2] |
MonitorElement * | EEMediumInterestTriggerTowerFlagMap_ [2] |
MonitorElement * | EEReadoutUnitForcedBitMap_ [2] |
bool | eeRuActive_ [nEndcaps][nEeX/scEdge][nEeY/scEdge] |
edm::InputTag | EESRFlagCollection_ |
MonitorElement * | EETowerSize_ [2] |
MonitorElement * | EETTFlags_ [2] |
MonitorElement * | EETTFMismatch_ [2] |
edm::InputTag | EEUnsuppressedDigiCollection_ |
MonitorElement * | EEZeroSuppression1SRFlagMap_ [2] |
bool | enableCleanup_ |
edm::InputTag | FEDRawDataCollection_ |
int | firstFIRSample_ |
std::vector< int > | firWeights_ |
int | ievt_ |
bool | init_ |
bool | mergeRuns_ |
int | nEe_ [2] |
int | nEeHI_ [2] |
int | nEeLI_ [2] |
int | nPerDcc_ [nECALDcc] |
int | nPerRu_ [nECALDcc][nDccChs] |
int | nRuPerDcc_ [nECALDcc] |
std::string | prefixME_ |
const EcalSRSettings * | settings_ |
bool | useCondDb_ |
float | xbins [19] |
float | ybins [133] |
Definition at line 46 of file EESelectiveReadoutTask.h.
enum EESelectiveReadoutTask::subdet_t [private] |
distinguishes barral and endcap of ECAL.
Definition at line 159 of file EESelectiveReadoutTask.h.
EESelectiveReadoutTask::EESelectiveReadoutTask | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 44 of file EESelectiveReadoutTask.cc.
References configFirWeights(), dqmStore_, EcalTrigPrimDigiCollection_, EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDigiCollection_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EEHighInterestZsFIR_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EELowInterestZsFIR_, EEMediumInterestTriggerTowerFlagMap_, EEReadoutUnitForcedBitMap_, EESRFlagCollection_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEUnsuppressedDigiCollection_, EEZeroSuppression1SRFlagMap_, enableCleanup_, FEDRawDataCollection_, firstFIRSample_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, mergeRuns_, cmsCodeRules::cppFunctionSkipper::operator, prefixME_, useCondDb_, xbins, and ybins.
{ init_ = false; dqmStore_ = edm::Service<DQMStore>().operator->(); prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", ""); enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false); mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false); // parameters... EEDigiCollection_ = ps.getParameter<edm::InputTag>("EEDigiCollection"); EEUnsuppressedDigiCollection_ = ps.getParameter<edm::InputTag>("EEUsuppressedDigiCollection"); EESRFlagCollection_ = ps.getParameter<edm::InputTag>("EESRFlagCollection"); EcalTrigPrimDigiCollection_ = ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollection"); FEDRawDataCollection_ = ps.getParameter<edm::InputTag>("FEDRawDataCollection"); firstFIRSample_ = ps.getParameter<int>("ecalDccZs1stSample"); useCondDb_ = ps.getParameter<bool>("configFromCondDB"); if(!useCondDb_) configFirWeights(ps.getParameter<std::vector<double> >("dccWeights")); // histograms... EEDccEventSize_ = 0; EEDccEventSizeMap_ = 0; for(int i=0; i<2; i++) { EETowerSize_[i] = 0; EETTFMismatch_[i] = 0; EEReadoutUnitForcedBitMap_[i] = 0; EEFullReadoutSRFlagMap_[i] = 0; EEFullReadoutSRFlagCount_[i] = 0; EEZeroSuppression1SRFlagMap_[i] = 0; EEHighInterestTriggerTowerFlagMap_[i] = 0; EEMediumInterestTriggerTowerFlagMap_[i] = 0; EELowInterestTriggerTowerFlagMap_[i] = 0; EETTFlags_[i] = 0; EECompleteZSMap_[i] = 0; EECompleteZSCount_[i] = 0; EEDroppedFRMap_[i] = 0; EEDroppedFRCount_[i] = 0; EEEventSize_[i] = 0; EEHighInterestPayload_[i] = 0; EELowInterestPayload_[i] = 0; EEHighInterestZsFIR_[i] = 0; EELowInterestZsFIR_[i] = 0; } // initialize variable binning for DCC size... float ZSthreshold = 0.608; // kBytes of 1 TT fully readout float zeroBinSize = ZSthreshold / 20.; for(int i=0; i<20; i++) ybins[i] = i*zeroBinSize; for(int i=20; i<133; i++) ybins[i] = ZSthreshold * (i-19); for(int i=0; i<=18; i++) xbins[i] = i+1; }
EESelectiveReadoutTask::~EESelectiveReadoutTask | ( | ) | [virtual] |
void EESelectiveReadoutTask::anaDigi | ( | const EEDataFrame & | frame, |
const EESrFlagCollection & | srFlagColl, | ||
uint16_t | statusCode | ||
) | [private] |
Accumulates statitics for data volume analysis. To be called for each ECAL digi. See anaDigiInit().
Definition at line 977 of file EESelectiveReadoutTask.cc.
References dccNum(), dccZsFIR(), EcalEndcap, EEHighInterestZsFIR_, EELowInterestZsFIR_, eeRuActive_, edm::SortedCollection< T, SORT >::end(), Reference_intrackfit_cff::endcap, MonitorElement::Fill(), edm::SortedCollection< T, SORT >::find(), firstFIRSample_, firWeights_, EEDataFrame::id(), Numbers::iSC(), Numbers::iSM(), ecalpyutils::ism(), Numbers::iTCC(), Numbers::iTT(), iXY2cIndex(), nCrySC, nCryTT, nEe_, nEeHI_, nEeLI_, nPerDcc_, nPerRu_, nRuPerDcc_, readOutUnitOf(), scEdge, and EcalSrFlag::SRF_FULL.
Referenced by analyze().
{ EEDetId id = frame.id(); int ism = Numbers::iSM( id ); bool endcap = (id.subdetId()==EcalEndcap); if(endcap) { if ( ism >= 1 && ism <= 9 ) { ++nEe_[0]; } else { ++nEe_[1]; } int ix = id.ix(); int iy = id.iy(); int iX0 = iXY2cIndex(ix); int iY0 = iXY2cIndex(iy); int iZ0 = id.zside()>0?1:0; if(!eeRuActive_[iZ0][iX0/scEdge][iY0/scEdge]){ ++nRuPerDcc_[dccNum(id)]; eeRuActive_[iZ0][iX0/scEdge][iY0/scEdge] = true; } EESrFlagCollection::const_iterator srf = srFlagColl.find(readOutUnitOf(id)); if(srf == srFlagColl.end()){ return; } int ttix = srf->id().ix(); int ttiy = srf->id().iy(); int zside = srf->id().zside(); int ttiz = ( zside < 0 ) ? 0 : 1; nCrySC[ttix-1][ttiy-1][ttiz]++; int itcc = Numbers::iTCC( ism, EcalEndcap, ix, iy ); int itt = Numbers::iTT( ism, EcalEndcap, ix, iy ); nCryTT[itcc-1][itt-1]++; bool highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK) == EcalSrFlag::SRF_FULL); int dccZsFIRval = dccZsFIR(frame, firWeights_, firstFIRSample_, 0); if ( ism >= 1 && ism <= 9 ) { if(highInterest) { ++nEeHI_[0]; // if(statusCode != 9) EEHighInterestZsFIR_[0]->Fill( dccZsFIRval ); EEHighInterestZsFIR_[0]->Fill( dccZsFIRval ); } else{ //low interest ++nEeLI_[0]; // if(statusCode != 9) EELowInterestZsFIR_[0]->Fill( dccZsFIRval ); EELowInterestZsFIR_[0]->Fill( dccZsFIRval ); } } else { if(highInterest) { ++nEeHI_[1]; EEHighInterestZsFIR_[1]->Fill( dccZsFIRval ); } else{ //low interest ++nEeLI_[1]; EELowInterestZsFIR_[1]->Fill( dccZsFIRval ); } } int isc = Numbers::iSC( ism, EcalEndcap, ix, iy ); ++nPerDcc_[dccNum(id)-1]; ++nPerRu_[dccNum(id)-1][isc]; } }
void EESelectiveReadoutTask::anaDigiInit | ( | ) | [private] |
Initializes statistics accumalator for data volume analysis. To be call at start of each event analysis.
Definition at line 1053 of file EESelectiveReadoutTask.cc.
References eeRuActive_, nCrySC, nCryTT, nDccChs, nECALDcc, nEe_, nEeHI_, nEeLI_, nPerDcc_, nPerRu_, and nRuPerDcc_.
Referenced by analyze().
{ nEe_[0] = 0; nEeLI_[0] = 0; nEeHI_[0] = 0; nEe_[1] = 0; nEeLI_[1] = 0; nEeHI_[1] = 0; bzero(nPerDcc_, sizeof(nPerDcc_)); bzero(nRuPerDcc_, sizeof(nRuPerDcc_)); bzero(eeRuActive_, sizeof(eeRuActive_)); for(int idcc=0; idcc<nECALDcc; idcc++) { for(int isc=0; isc<nDccChs; isc++) { nPerRu_[idcc][isc] = 0; } } for(int iz = 0; iz<2; iz++) { for(int ix = 0; ix < 20; ix++ ) { for(int iy = 0; iy < 20; iy++ ) { nCrySC[ix][iy][iz] = 0; } } } for (int itcc = 0; itcc < 108; itcc++) { for (int itt = 0; itt < 41; itt++) nCryTT[itcc][itt] = 0; } }
void EESelectiveReadoutTask::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 587 of file EESelectiveReadoutTask.cc.
References anaDigi(), anaDigiInit(), bytesPerCrystal, Numbers::crystals(), dccNumOfRU(), EcalEndcap, EcalTrigPrimDigiCollection_, EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDigiCollection_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EEMediumInterestTriggerTowerFlagMap_, EEReadoutUnitForcedBitMap_, EESRFlagCollection_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, error, FEDRawDataCollection_, MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::get(), edm::Event::getByLabel(), getCrystalCount(), getEeEventSize(), EcalCondObjectContainer< T >::getMap(), EcalChannelStatusCode::getStatusCode(), MonitorElement::getTH2F(), i, EEDataFrame::id(), ievt_, init_, Numbers::iSC(), Numbers::iSM(), ecalpyutils::ism(), Numbers::iTCC(), Numbers::iTT(), EEDetId::ix(), EcalScDetId::ix(), kByte, nCrySC, nCryTT, nEe_, nEeHI_, nEeLI_, nEvtAnyInterest, nEvtAnyReadout, nEvtCompleteReadoutIfZS, nEvtDroppedReadoutIfFR, nEvtFullReadout, nEvtHighInterest, nEvtLowInterest, nEvtMediumInterest, nEvtRUForced, nEvtZS1Readout, nEvtZSReadout, nPerRu_, edm::ESHandle< T >::product(), runTheMatrix::raw, MonitorElement::setBinContent(), MonitorElement::setBinError(), setup(), findQualityFiles::size, mathSSE::sqrt(), EcalSrFlag::SRF_FORCED_MASK, EcalSrFlag::SRF_FULL, EcalSrFlag::SRF_ZS1, EcalSrFlag::SRF_ZS2, ntuplemaker::status, Numbers::subDet(), and ecalTPGAnalyzer_cfg::TPCollection.
{ if ( ! init_ ) this->setup(); ievt_++; edm::Handle<FEDRawDataCollection> raw; if ( e.getByLabel(FEDRawDataCollection_, raw) ) { int EEFirstFED[2]; EEFirstFED[0] = 601; // EE- EEFirstFED[1] = 646; // EE+ for(int zside=0; zside<2; zside++) { int firstFedOnSide=EEFirstFED[zside]; for ( int iDcc = 0; iDcc < 9; ++iDcc ) { int ism = 0; if ( zside == 0 ) ism = iDcc+1; else ism = 10+iDcc; EEDccEventSize_->Fill( ism, ((double)raw->FEDData(firstFedOnSide+iDcc).size())/kByte ); EEDccEventSizeMap_->Fill( ism, ((double)raw->FEDData(firstFedOnSide+iDcc).size())/kByte ); } } } else { edm::LogWarning("EESelectiveReadoutTask") << FEDRawDataCollection_ << " not available"; } // Selective Readout Flags int nFRO[2], nCompleteZS[2], nDroppedFRO[2]; nFRO[0] = nFRO[1] = 0; nCompleteZS[0] = nCompleteZS[1] = 0; nDroppedFRO[0] = nDroppedFRO[1] = 0; edm::Handle<EESrFlagCollection> eeSrFlags; if ( e.getByLabel(EESRFlagCollection_,eeSrFlags) ) { // Data Volume double aLowInterest[2]; double aHighInterest[2]; double aAnyInterest[2]; aLowInterest[0]=0; aHighInterest[0]=0; aAnyInterest[0]=0; aLowInterest[1]=0; aHighInterest[1]=0; aAnyInterest[1]=0; edm::Handle<EEDigiCollection> eeDigis; if ( e.getByLabel(EEDigiCollection_ , eeDigis) ) { anaDigiInit(); // channel status edm::ESHandle<EcalChannelStatus> pChannelStatus; c.get<EcalChannelStatusRcd>().get(pChannelStatus); const EcalChannelStatus* chStatus = pChannelStatus.product(); for (unsigned int digis=0; digis<eeDigis->size(); ++digis) { EEDataFrame eedf = (*eeDigis)[digis]; EEDetId id = eedf.id(); EcalChannelStatusMap::const_iterator chit; chit = chStatus->getMap().find(id.rawId()); uint16_t statusCode = 0; if( chit != chStatus->getMap().end() ) { EcalChannelStatusCode ch_code = (*chit); statusCode = ch_code.getStatusCode(); } anaDigi(eedf, *eeSrFlags, statusCode); } //low interest channels: aLowInterest[0] = nEeLI_[0]*bytesPerCrystal/kByte; EELowInterestPayload_[0]->Fill(aLowInterest[0]); aLowInterest[1] = nEeLI_[1]*bytesPerCrystal/kByte; EELowInterestPayload_[1]->Fill(aLowInterest[1]); //low interest channels: aHighInterest[0] = nEeHI_[0]*bytesPerCrystal/kByte; EEHighInterestPayload_[0]->Fill(aHighInterest[0]); aHighInterest[1] = nEeHI_[1]*bytesPerCrystal/kByte; EEHighInterestPayload_[1]->Fill(aHighInterest[1]); //any-interest channels: aAnyInterest[0] = getEeEventSize(nEe_[0])/kByte; EEEventSize_[0]->Fill(aAnyInterest[0]); aAnyInterest[1] = getEeEventSize(nEe_[1])/kByte; EEEventSize_[1]->Fill(aAnyInterest[1]); //event size by tower: for(int ix = 0; ix < 20; ix++ ) { for(int iy = 0; iy < 20; iy++ ) { for(int iz = 0; iz < 2; iz++) { double towerSize = nCrySC[ix][iy][iz] * bytesPerCrystal; float xix = ix; if ( iz == 0 ) xix = 19 - xix; xix += 0.5; float xiy = iy+0.5; EETowerSize_[iz]->Fill(xix, xiy, towerSize); } } } } else { edm::LogWarning("EESelectiveReadoutTask") << EEDigiCollection_ << " not available"; } // initialize dcchs_ to mask disabled towers std::map< int, std::vector<short> > towersStatus; edm::Handle<EcalRawDataCollection> dcchs; if( e.getByLabel(FEDRawDataCollection_, dcchs) ) { for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) { if ( Numbers::subDet( *dcchItr ) != EcalEndcap ) continue; int ism = Numbers::iSM( *dcchItr, EcalEndcap ); towersStatus.insert(std::make_pair(ism, dcchItr->getFEStatus())); } } for ( EESrFlagCollection::const_iterator it = eeSrFlags->begin(); it != eeSrFlags->end(); ++it ) { EcalScDetId id = it->id(); if ( Numbers::subDet( id ) != EcalEndcap ) continue; int ix = id.ix(); int iy = id.iy(); int iDcc = dccNumOfRU(id); int ism = Numbers::iSM( id ); int isc = Numbers::iSC( id ); int zside = id.zside(); int iz = ( zside < 0 ) ? 0 : 1; if ( zside < 0 ) ix = 21 - ix; nEvtAnyReadout[ix-1][iy-1][iz]++; int flag = it->value() & ~EcalSrFlag::SRF_FORCED_MASK; int status=0; if( towersStatus[ism].size() > 0 ) status = (towersStatus[ism])[isc]; if(flag == EcalSrFlag::SRF_FULL) { nEvtFullReadout[ix-1][iy-1][iz]++; nFRO[iz]++; if(nPerRu_[iDcc-1][isc] == 0) { if(status != 1) nEvtDroppedReadoutIfFR[ix-1][iy-1][iz]++; nDroppedFRO[iz]++; } } if(flag == EcalSrFlag::SRF_ZS1) nEvtZS1Readout[ix-1][iy-1][iz]++; if(it->value() & EcalSrFlag::SRF_FORCED_MASK) nEvtRUForced[ix-1][iy-1][iz]++; if(flag == EcalSrFlag::SRF_ZS1 || flag == EcalSrFlag::SRF_ZS2) { nEvtZSReadout[ix-1][iy-1][iz]++; if(nPerRu_[iDcc-1][isc] == getCrystalCount(iDcc,isc)) { if(status != 1) nEvtCompleteReadoutIfZS[ix-1][iy-1][iz]++; nCompleteZS[iz]++; } } } } else { edm::LogWarning("EESelectiveReadoutTask") << EESRFlagCollection_ << " not available"; } for(int ix = 0; ix < 20; ix++ ) { for(int iy = 0; iy < 20; iy++ ) { for(int iz = 0; iz < 2; iz++) { if( nEvtAnyReadout[ix][iy][iz] ) { float xix = ix; if ( iz == 0 ) xix = 19 - xix; xix += 0.5; float xiy = iy+0.5; float fraction = float(nEvtFullReadout[ix][iy][iz]) / float(nEvtAnyReadout[ix][iy][iz]); float error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz])); TH2F *h2d = EEFullReadoutSRFlagMap_[iz]->getTH2F(); int binx=0, biny=0; if( h2d ) { binx = h2d->GetXaxis()->FindBin(xix); biny = h2d->GetYaxis()->FindBin(xiy); } EEFullReadoutSRFlagMap_[iz]->setBinContent(binx, biny, fraction); EEFullReadoutSRFlagMap_[iz]->setBinError(binx, biny, error); fraction = float(nEvtZS1Readout[ix][iy][iz]) / float(nEvtAnyReadout[ix][iy][iz]); error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz])); h2d = EEZeroSuppression1SRFlagMap_[iz]->getTH2F(); if( h2d ) { binx = h2d->GetXaxis()->FindBin(xix); biny = h2d->GetYaxis()->FindBin(xiy); } EEZeroSuppression1SRFlagMap_[iz]->setBinContent(binx, biny, fraction); EEZeroSuppression1SRFlagMap_[iz]->setBinError(binx, biny, error); fraction = float(nEvtRUForced[ix][iy][iz]) / float(nEvtAnyReadout[ix][iy][iz]); error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz])); h2d = EEReadoutUnitForcedBitMap_[iz]->getTH2F(); if( h2d ) { binx = h2d->GetXaxis()->FindBin(xix); biny = h2d->GetYaxis()->FindBin(xiy); } EEReadoutUnitForcedBitMap_[iz]->setBinContent(binx, biny, fraction); EEReadoutUnitForcedBitMap_[iz]->setBinError(binx, biny, error); if( nEvtZSReadout[ix][iy][iz] ) { fraction = float(nEvtCompleteReadoutIfZS[ix][iy][iz]) / float(nEvtZSReadout[ix][iy][iz]); error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz])); h2d = EECompleteZSMap_[iz]->getTH2F(); if( h2d ) { binx = h2d->GetXaxis()->FindBin(xix); biny = h2d->GetYaxis()->FindBin(xiy); } EECompleteZSMap_[iz]->setBinContent(binx, biny, fraction); EECompleteZSMap_[iz]->setBinError(binx, biny, error); } if( nEvtFullReadout[ix][iy][iz] ) { fraction = float(nEvtDroppedReadoutIfFR[ix][iy][iz]) / float(nEvtFullReadout[ix][iy][iz]); error = sqrt(fraction*(1-fraction)/float(nEvtAnyReadout[ix][iy][iz])); h2d = EEDroppedFRMap_[iz]->getTH2F(); if( h2d ) { binx = h2d->GetXaxis()->FindBin(xix); biny = h2d->GetYaxis()->FindBin(xiy); } EEDroppedFRMap_[iz]->setBinContent(binx, biny, fraction); EEDroppedFRMap_[iz]->setBinError(binx, biny, error); } } } } } for(int iz = 0; iz < 2; iz++) { EEFullReadoutSRFlagCount_[iz]->Fill( nFRO[iz] ); EECompleteZSCount_[iz]->Fill( nCompleteZS[iz] ); EEDroppedFRCount_[iz]->Fill( nDroppedFRO[iz] ); } edm::Handle<EcalTrigPrimDigiCollection> TPCollection; if ( e.getByLabel(EcalTrigPrimDigiCollection_, TPCollection) ) { // Trigger Primitives EcalTrigPrimDigiCollection::const_iterator TPdigi; for ( TPdigi = TPCollection->begin(); TPdigi != TPCollection->end(); ++TPdigi ) { if ( Numbers::subDet( TPdigi->id() ) != EcalEndcap ) continue; int ismt = Numbers::iSM( TPdigi->id() ); int zside = TPdigi->id().zside(); int iz = ( zside < 0 ) ? 0 : 1; EETTFlags_[iz]->Fill( TPdigi->ttFlag() ); std::vector<DetId>* crystals = Numbers::crystals( TPdigi->id() ); for ( unsigned int i=0; i<crystals->size(); i++ ) { EEDetId id = (*crystals)[i]; int ix = id.ix(); int iy = id.iy(); int ism = Numbers::iSM( id ); int itcc = Numbers::iTCC( ism, EcalEndcap, ix, iy ); int itt = Numbers::iTT( ism, EcalEndcap, ix, iy ); if ( ismt >= 1 && ismt <= 9 ) ix = 101 - ix; nEvtAnyInterest[ix-1][iy-1][iz]++; if ( (TPdigi->ttFlag() & 0x3) == 0 ) nEvtLowInterest[ix-1][iy-1][iz]++; if ( (TPdigi->ttFlag() & 0x3) == 1 ) nEvtMediumInterest[ix-1][iy-1][iz]++; if ( (TPdigi->ttFlag() & 0x3) == 3 ) nEvtHighInterest[ix-1][iy-1][iz]++; float xix = ix-0.5; if ( iz == 0 ) xix = 100 - xix; float xiy = iy-0.5; if ( ((TPdigi->ttFlag() & 0x3) == 1 || (TPdigi->ttFlag() & 0x3) == 3) && nCryTT[itcc-1][itt-1] != (int)crystals->size() ) EETTFMismatch_[iz]->Fill(xix, xiy); } } } else { edm::LogWarning("EESelectiveReadoutTask") << EcalTrigPrimDigiCollection_ << " not available"; } for(int ix = 0; ix < 100; ix++ ) { for(int iy = 0; iy < 100; iy++ ) { for(int iz = 0; iz < 2; iz++) { if( nEvtAnyInterest[ix][iy][iz] ) { float xix = ix; if ( iz == 0 ) xix = 99 - xix; xix += 0.5; float xiy = iy+0.5; float fraction = float(nEvtHighInterest[ix][iy][iz]) / float(nEvtAnyInterest[ix][iy][iz]); float error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[ix][iy][iz])); TH2F *h2d = EEHighInterestTriggerTowerFlagMap_[iz]->getTH2F(); int binx=0, biny=0; if( h2d ) { binx = h2d->GetXaxis()->FindBin(xix); biny = h2d->GetYaxis()->FindBin(xiy); } EEHighInterestTriggerTowerFlagMap_[iz]->setBinContent(binx, biny, fraction); EEHighInterestTriggerTowerFlagMap_[iz]->setBinError(binx, biny, error); fraction = float(nEvtMediumInterest[ix][iy][iz]) / float(nEvtAnyInterest[ix][iy][iz]); error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[ix][iy][iz])); h2d = EEMediumInterestTriggerTowerFlagMap_[iz]->getTH2F(); if( h2d ) { binx = h2d->GetXaxis()->FindBin(xix); biny = h2d->GetYaxis()->FindBin(xiy); } EEMediumInterestTriggerTowerFlagMap_[iz]->setBinContent(binx, biny, fraction); EEMediumInterestTriggerTowerFlagMap_[iz]->setBinError(binx, biny, error); fraction = float(nEvtLowInterest[ix][iy][iz]) / float(nEvtAnyInterest[ix][iy][iz]); error = sqrt(fraction*(1-fraction)/float(nEvtAnyInterest[ix][iy][iz])); h2d = EELowInterestTriggerTowerFlagMap_[iz]->getTH2F(); if( h2d ) { binx = h2d->GetXaxis()->FindBin(xix); biny = h2d->GetYaxis()->FindBin(xiy); } EELowInterestTriggerTowerFlagMap_[iz]->setBinContent(binx, biny, fraction); EELowInterestTriggerTowerFlagMap_[iz]->setBinError(binx, biny, error); } } } } }
void EESelectiveReadoutTask::beginJob | ( | void | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 106 of file EESelectiveReadoutTask.cc.
References dqmStore_, ievt_, prefixME_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().
void EESelectiveReadoutTask::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
BeginRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 117 of file EESelectiveReadoutTask.cc.
References begin, configFirWeights(), EcalSRSettings::dccNormalizedWeights_, edm::EventSetup::get(), Numbers::initGeometry(), mergeRuns_, nEvtAnyInterest, nEvtAnyReadout, nEvtCompleteReadoutIfZS, nEvtDroppedReadoutIfFR, nEvtFullReadout, nEvtHighInterest, nEvtLowInterest, nEvtMediumInterest, nEvtRUForced, nEvtZS1Readout, nEvtZSReadout, edm::ESHandle< T >::product(), reset(), settings_, and useCondDb_.
{ Numbers::initGeometry(c, false); if ( ! mergeRuns_ ) this->reset(); for(int ix = 0; ix < 20; ix++ ) { for(int iy = 0; iy < 20; iy++ ) { for(int iz = 0; iz < 2; iz++) { nEvtFullReadout[ix][iy][iz] = 0; nEvtZS1Readout[ix][iy][iz] = 0; nEvtZSReadout[ix][iy][iz] = 0; nEvtCompleteReadoutIfZS[ix][iy][iz] = 0; nEvtDroppedReadoutIfFR[ix][iy][iz] = 0; nEvtRUForced[ix][iy][iz] = 0; nEvtAnyReadout[ix][iy][iz] = 0; } } } for(int ix = 0; ix < 100; ix++ ) { for(int iy = 0; iy < 100; iy++ ) { for(int iz = 0; iz < 2; iz++) { nEvtHighInterest[ix][iy][iz] = 0; nEvtMediumInterest[ix][iy][iz] = 0; nEvtLowInterest[ix][iy][iz] = 0; nEvtAnyInterest[ix][iy][iz] = 0; } } } //getting selective readout configuration if(useCondDb_) { edm::ESHandle<EcalSRSettings> hSr; c.get<EcalSRSettingsRcd>().get(hSr); settings_ = hSr.product(); std::vector<double> wsFromDB; std::vector<std::vector<float> > dccs = settings_->dccNormalizedWeights_; int nws = dccs.size(); if(nws == 1) { for(std::vector<float>::const_iterator it = dccs[0].begin(); it != dccs[0].end(); it++) { wsFromDB.push_back(*it); } } else edm::LogWarning("EESelectiveReadoutTask") << "DCC weight set is not exactly 1."; configFirWeights(wsFromDB); } }
int EESelectiveReadoutTask::cIndex2iXY | ( | int | iX0 | ) | const [inline, private] |
converse of iXY2cIndex() method.
Definition at line 199 of file EESelectiveReadoutTask.h.
{
return iX0+1;
}
void EESelectiveReadoutTask::cleanup | ( | void | ) | [protected] |
Cleanup.
Definition at line 452 of file EESelectiveReadoutTask.cc.
References dqmStore_, EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EEHighInterestZsFIR_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EELowInterestZsFIR_, EEReadoutUnitForcedBitMap_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, edm::getName(), MonitorElement::getName(), init_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().
Referenced by endJob().
{ if ( ! init_ ) return; if ( dqmStore_ ) { dqmStore_->setCurrentFolder(prefixME_ + "/EESelectiveReadoutTask"); if ( EETowerSize_[0] ) dqmStore_->removeElement( EETowerSize_[0]->getName() ); EETowerSize_[0] = 0; if ( EETowerSize_[1] ) dqmStore_->removeElement( EETowerSize_[1]->getName() ); EETowerSize_[1] = 0; if ( EETTFMismatch_[0] ) dqmStore_->removeElement( EETTFMismatch_[0]->getName() ); EETTFMismatch_[0] = 0; if ( EETTFMismatch_[1] ) dqmStore_->removeElement( EETTFMismatch_[1]->getName() ); EETTFMismatch_[1] = 0; if ( EEDccEventSize_ ) dqmStore_->removeElement( EEDccEventSize_->getName() ); EEDccEventSize_ = 0; if ( EEDccEventSizeMap_ ) dqmStore_->removeElement( EEDccEventSizeMap_->getName() ); EEDccEventSizeMap_ = 0; if ( EEReadoutUnitForcedBitMap_[0] ) dqmStore_->removeElement( EEReadoutUnitForcedBitMap_[0]->getName() ); EEReadoutUnitForcedBitMap_[0] = 0; if ( EEReadoutUnitForcedBitMap_[1] ) dqmStore_->removeElement( EEReadoutUnitForcedBitMap_[1]->getName() ); EEReadoutUnitForcedBitMap_[1] = 0; if ( EEFullReadoutSRFlagMap_[0] ) dqmStore_->removeElement( EEFullReadoutSRFlagMap_[0]->getName() ); EEFullReadoutSRFlagMap_[0] = 0; if ( EEFullReadoutSRFlagMap_[1] ) dqmStore_->removeElement( EEFullReadoutSRFlagMap_[1]->getName() ); EEFullReadoutSRFlagMap_[1] = 0; if ( EEFullReadoutSRFlagCount_[0] ) dqmStore_->removeElement( EEFullReadoutSRFlagCount_[0]->getName() ); EEFullReadoutSRFlagCount_[0] = 0; if ( EEFullReadoutSRFlagCount_[1] ) dqmStore_->removeElement( EEFullReadoutSRFlagCount_[1]->getName() ); EEFullReadoutSRFlagCount_[1] = 0; if ( EEZeroSuppression1SRFlagMap_[0] ) dqmStore_->removeElement( EEZeroSuppression1SRFlagMap_[0]->getName() ); EEZeroSuppression1SRFlagMap_[0] = 0; if ( EEZeroSuppression1SRFlagMap_[1] ) dqmStore_->removeElement( EEZeroSuppression1SRFlagMap_[1]->getName() ); EEZeroSuppression1SRFlagMap_[1] = 0; if ( EEHighInterestTriggerTowerFlagMap_[0] ) dqmStore_->removeElement( EEHighInterestTriggerTowerFlagMap_[0]->getName() ); EEHighInterestTriggerTowerFlagMap_[0] = 0; if ( EEHighInterestTriggerTowerFlagMap_[1] ) dqmStore_->removeElement( EEHighInterestTriggerTowerFlagMap_[1]->getName() ); EEHighInterestTriggerTowerFlagMap_[1] = 0; if ( EELowInterestTriggerTowerFlagMap_[0] ) dqmStore_->removeElement( EELowInterestTriggerTowerFlagMap_[0]->getName() ); EELowInterestTriggerTowerFlagMap_[0] = 0; if ( EELowInterestTriggerTowerFlagMap_[1] ) dqmStore_->removeElement( EELowInterestTriggerTowerFlagMap_[1]->getName() ); EELowInterestTriggerTowerFlagMap_[1] = 0; if ( EETTFlags_[0] ) dqmStore_->removeElement( EETTFlags_[0]->getName() ); EETTFlags_[0] = 0; if ( EETTFlags_[1] ) dqmStore_->removeElement( EETTFlags_[1]->getName() ); EETTFlags_[1] = 0; if ( EECompleteZSMap_[0] ) dqmStore_->removeElement( EECompleteZSMap_[0]->getName() ); EECompleteZSMap_[0] = 0; if ( EECompleteZSMap_[1] ) dqmStore_->removeElement( EECompleteZSMap_[1]->getName() ); EECompleteZSMap_[1] = 0; if ( EECompleteZSCount_[0] ) dqmStore_->removeElement( EECompleteZSCount_[0]->getName() ); EECompleteZSCount_[0] = 0; if ( EECompleteZSCount_[1] ) dqmStore_->removeElement( EECompleteZSCount_[1]->getName() ); EECompleteZSCount_[1] = 0; if ( EEDroppedFRMap_[0] ) dqmStore_->removeElement( EEDroppedFRMap_[0]->getName() ); EEDroppedFRMap_[0] = 0; if ( EEDroppedFRMap_[1] ) dqmStore_->removeElement( EEDroppedFRMap_[1]->getName() ); EEDroppedFRMap_[1] = 0; if ( EEDroppedFRCount_[0] ) dqmStore_->removeElement( EEDroppedFRCount_[0]->getName() ); EEDroppedFRCount_[0] = 0; if ( EEDroppedFRCount_[1] ) dqmStore_->removeElement( EEDroppedFRCount_[1]->getName() ); EEDroppedFRCount_[1] = 0; if ( EEEventSize_[0] ) dqmStore_->removeElement( EEEventSize_[0]->getName() ); EEEventSize_[0] = 0; if ( EEEventSize_[1] ) dqmStore_->removeElement( EEEventSize_[1]->getName() ); EEEventSize_[1] = 0; if ( EEHighInterestPayload_[0] ) dqmStore_->removeElement( EEHighInterestPayload_[0]->getName() ); EEHighInterestPayload_[0] = 0; if ( EEHighInterestPayload_[1] ) dqmStore_->removeElement( EEHighInterestPayload_[1]->getName() ); EEHighInterestPayload_[1] = 0; if ( EELowInterestPayload_[0] ) dqmStore_->removeElement( EELowInterestPayload_[0]->getName() ); EELowInterestPayload_[0] = 0; if ( EELowInterestPayload_[1] ) dqmStore_->removeElement( EELowInterestPayload_[1]->getName() ); EELowInterestPayload_[1] = 0; if ( EEHighInterestZsFIR_[0] ) dqmStore_->removeElement( EEHighInterestZsFIR_[0]->getName() ); EEHighInterestZsFIR_[0] = 0; if ( EEHighInterestZsFIR_[1] ) dqmStore_->removeElement( EEHighInterestZsFIR_[1]->getName() ); EEHighInterestZsFIR_[1] = 0; if ( EELowInterestZsFIR_[0] ) dqmStore_->removeElement( EELowInterestZsFIR_[0]->getName() ); EELowInterestZsFIR_[0] = 0; if ( EELowInterestZsFIR_[1] ) dqmStore_->removeElement( EELowInterestZsFIR_[1]->getName() ); EELowInterestZsFIR_[1] = 0; } init_ = false; }
void EESelectiveReadoutTask::configFirWeights | ( | std::vector< double > | weightsForZsFIR | ) | [private] |
Configure DCC ZS FIR weights. Heuristic is used to determine if input weights are normalized weights or integer weights in the hardware representation.
weightsForZsFIR | weights from configuration file |
Definition at line 1240 of file EESelectiveReadoutTask.cc.
References Exception, firstFIRSample_, firWeights_, getFIRWeights(), i, funct::log(), indexGen::s2, and mathSSE::sqrt().
Referenced by beginRun(), and EESelectiveReadoutTask().
{ bool notNormalized = false; bool notInt = false; for(unsigned i=0; i < weightsForZsFIR.size(); ++i){ if(weightsForZsFIR[i] > 1.) notNormalized = true; if((int)weightsForZsFIR[i]!=weightsForZsFIR[i]) notInt = true; } if(notInt && notNormalized){ throw cms::Exception("InvalidParameter") << "weigtsForZsFIR paramater values are not valid: they " << "must either be integer and uses the hardware representation " << "of the weights or less or equal than 1 and used the normalized " << "representation."; } edm::LogInfo log("DccFir"); if(notNormalized){ firWeights_ = std::vector<int>(weightsForZsFIR.size()); for(unsigned i = 0; i< weightsForZsFIR.size(); ++i){ firWeights_[i] = (int)weightsForZsFIR[i]; } } else{ firWeights_ = getFIRWeights(weightsForZsFIR); } log << "Input weights for FIR: "; for(unsigned i = 0; i < weightsForZsFIR.size(); ++i){ log << weightsForZsFIR[i] << "\t"; } double s2 = 0.; log << "\nActual FIR weights: "; for(unsigned i = 0; i < firWeights_.size(); ++i){ log << firWeights_[i] << "\t"; s2 += firWeights_[i]*firWeights_[i]; } s2 = sqrt(s2); log << "\nNormalized FIR weights after hw representation rounding: "; for(unsigned i = 0; i < firWeights_.size(); ++i){ log << firWeights_[i] / (double)(1<<10) << "\t"; } log <<"\nFirst FIR sample: " << firstFIRSample_; }
int EESelectiveReadoutTask::dccIndex | ( | int | iDet, |
int | i, | ||
int | j | ||
) | const [private] |
Gets the index of the DCC reading a crystal
i | iX |
j | iY |
Definition at line 1165 of file EESelectiveReadoutTask.cc.
References dccPhiIndex().
Referenced by dccNum().
{ int iPhi = dccPhiIndex(i, j); if(iPhi<0) return -1; //34 DCCs in barrel and 8 in EE-=>in EE+ DCC numbering starts at 45, //iDet/2 is 0 for EE- and 1 for EE+: return iPhi+iDet/2*45; }
unsigned EESelectiveReadoutTask::dccNum | ( | const DetId & | xtalId | ) | const [private] |
Retrieve the logical number of the DCC reading a given crystal channel.
xtarId | crystal channel identifier |
Definition at line 1095 of file EESelectiveReadoutTask.cc.
References dccIndex(), DetId::det(), DetId::Ecal, EcalEndcap, Exception, EEDetId::ix(), iXY2cIndex(), EEDetId::iy(), j, gen::k, nECALDcc, DetId::subdetId(), and EEDetId::zside().
Referenced by anaDigi().
{ int j; int k; if ( xtalId.det()!=DetId::Ecal ) { throw cms::Exception("EESelectiveReadoutTask") << "Crystal does not belong to ECAL"; } int iDet = 0; if(xtalId.subdetId()==EcalEndcap){ EEDetId eeDetId(xtalId); j = iXY2cIndex(eeDetId.ix()); k = iXY2cIndex(eeDetId.iy()); int zside = eeDetId.zside(); if ( zside < 0 ) iDet = 0; else iDet = 2; } else { throw cms::Exception("EESelectiveReadoutTask") << "Not ECAL endcap."; } int iDcc0 = dccIndex(iDet,j,k); assert(iDcc0>=0 && iDcc0<nECALDcc); return iDcc0+1; }
unsigned EESelectiveReadoutTask::dccNumOfRU | ( | const EcalScDetId & | scId | ) | const [private] |
Retrieve the logical number of the DCC reading a given SC channel.
scId | SC channel identifier |
Definition at line 1120 of file EESelectiveReadoutTask.cc.
References dccPhiIndexOfRU(), DetId::det(), DetId::Ecal, EcalEndcap, Exception, EcalScDetId::ix(), EcalScDetId::iy(), j, gen::k, nECALDcc, DetId::subdetId(), and EcalScDetId::zside().
Referenced by analyze().
{ int j; int k; if ( scId.det()!=DetId::Ecal ) { throw cms::Exception("EESelectiveReadoutTask") << "SuperCrystal does not belong to ECAL"; } int iDet = 0; if(scId.subdetId()==EcalEndcap){ j = scId.ix()-1; k = scId.iy()-1; int zside = scId.zside(); if ( zside < 0 ) iDet = 0; else iDet = 2; } else { throw cms::Exception("EESelectiveReadoutTask") << "Not ECAL endcap."; } int iDcc0 = 0; int iPhi = dccPhiIndexOfRU(j,k); if(iPhi<0) iDcc0 = -1; else iDcc0 = iPhi+iDet/2*45; assert(iDcc0>=0 && iDcc0<nECALDcc); return iDcc0+1; }
int EESelectiveReadoutTask::dccPhiIndex | ( | int | i, |
int | j | ||
) | const [inline, private] |
Gets the phi index of the DCC reading a crystal
i | iX |
j | iY |
Definition at line 244 of file EESelectiveReadoutTask.h.
References dccPhiIndexOfRU().
Referenced by dccIndex().
{ return dccPhiIndexOfRU(i/5, j/5); }
int EESelectiveReadoutTask::dccPhiIndexOfRU | ( | int | i, |
int | j | ||
) | const [private] |
Gets the phi index of the DCC reading a RU (SC or TT)
i | iX |
j | iY |
Definition at line 1160 of file EESelectiveReadoutTask.cc.
References endcapDccMap.
Referenced by dccNumOfRU(), and dccPhiIndex().
{ char flag=endcapDccMap[i+j*20]; return (flag==' ')?-1:(flag-'0'); }
int EESelectiveReadoutTask::dccZsFIR | ( | const EcalDataFrame & | frame, |
const std::vector< int > & | firWeights, | ||
int | firstFIRSample, | ||
bool * | saturated = 0 |
||
) | [static, private] |
Emulates the DCC zero suppression FIR filter. If one of the time sample is not in gain 12, numeric_limits<int>::max() is returned.
frame | data frame |
firWeights | TAP weights |
firstFIRSample | index (starting from 1) of the first time sample to be used in the filter |
saturated | if not null, *saturated is set to true if all the time sample are not in gain 12 and set to false otherwise. |
Definition at line 1176 of file EESelectiveReadoutTask.cc.
References EcalMGPASample::adc(), EcalMGPASample::gainId(), LogTrace, max(), and EcalDataFrame::size().
Referenced by anaDigi().
{ const int nFIRTaps = 6; //FIR filter weights: const std::vector<int>& w = firWeights; //accumulator used to compute weighted sum of samples int acc = 0; bool gain12saturated = false; const int gain12 = 0x01; const int lastFIRSample = firstFIRSample + nFIRTaps - 1; //LogDebug("DccFir") << "DCC FIR operation: "; int iWeight = 0; for(int iSample=firstFIRSample-1; iSample<lastFIRSample; ++iSample, ++iWeight){ if(iSample>=0 && iSample < frame.size()){ EcalMGPASample sample(frame[iSample]); if(sample.gainId()!=gain12) gain12saturated = true; LogTrace("DccFir") << (iSample>=firstFIRSample?"+":"") << sample.adc() << "*(" << w[iWeight] << ")"; acc+=sample.adc()*w[iWeight]; } else{ edm::LogWarning("DccFir") << __FILE__ << ":" << __LINE__ << ": Not enough samples in data frame or 'ecalDccZs1stSample' module " "parameter is not valid..."; } } LogTrace("DccFir") << "\n"; //discards the 8 LSBs //(shift operator cannot be used on negative numbers because // the result depends on compilator implementation) acc = (acc>=0)?(acc >> 8):-(-acc >> 8); //ZS passed if weighted sum acc above ZS threshold or if //one sample has a lower gain than gain 12 (that is gain 12 output //is saturated) LogTrace("DccFir") << "acc: " << acc << "\n" << "saturated: " << (gain12saturated?"yes":"no") << "\n"; if(saturated){ *saturated = gain12saturated; } return gain12saturated?std::numeric_limits<int>::max():acc; }
void EESelectiveReadoutTask::endJob | ( | void | ) | [protected, virtual] |
EndJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 579 of file EESelectiveReadoutTask.cc.
References cleanup(), enableCleanup_, and ievt_.
{ edm::LogInfo("EESelectiveReadoutTask") << "analyzed " << ievt_ << " events"; if ( enableCleanup_ ) this->cleanup(); }
void EESelectiveReadoutTask::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
EndRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 168 of file EESelectiveReadoutTask.cc.
{ }
int EESelectiveReadoutTask::getCrystalCount | ( | int | iDcc, |
int | iDccCh | ||
) | [private] |
Retrieves number of crystal channel read out by a DCC channel
iDcc | DCC ID starting from 1 |
iDccCh | DCC channel starting from 1 |
Definition at line 1285 of file EESelectiveReadoutTask.cc.
Referenced by analyze().
{ if(iDcc<1 || iDcc>54) { // invalid DCC return 0; } else if (10 <= iDcc && iDcc <= 45) { // EB return 25; } else { // EE int iDccPhi; if(iDcc < 10) { iDccPhi = iDcc; } else { iDccPhi = iDcc - 45; } switch(iDccPhi*100+iDccCh){ case 110: case 232: case 312: case 412: case 532: case 610: case 830: case 806: //inner partials at 12, 3, and 9 o'clock return 20; case 134: case 634: case 827: case 803: return 10; case 330: case 430: return 20; case 203: case 503: case 721: case 921: return 21; default: return 25; } } }
double EESelectiveReadoutTask::getDccEventSize | ( | int | iDcc0, |
double | nReadXtals | ||
) | const [inline, private] |
Gets the size of an DCC event fragment.
iDcc0 | the DCC logical number starting from 0. |
nReadXtals | number of read crystal channels. |
Definition at line 222 of file EESelectiveReadoutTask.h.
References bytesPerCrystal, EB, EE, getDccOverhead(), and nRuPerDcc_.
{ subdet_t subdet; if(iDcc0<9 || iDcc0>=45){ subdet = EE; } else{ subdet = EB; } return getDccOverhead(subdet)+nReadXtals*bytesPerCrystal+nRuPerDcc_[iDcc0]*8; }
double EESelectiveReadoutTask::getDccOverhead | ( | subdet_t | subdet | ) | const [inline, private] |
Gets the size in bytes fixed-size part of a DCC event fragment.
Definition at line 212 of file EESelectiveReadoutTask.h.
References EB.
Referenced by getDccEventSize(), and getEeEventSize().
{ // return (subdet==EB?34:25)*8; return (subdet==EB?34:52)*8; }
double EESelectiveReadoutTask::getEeEventSize | ( | double | nReadXtals | ) | const [private] |
Computes the size of an ECAL endcap event fragment.
nReadXtals | number of read crystal channels |
Definition at line 1147 of file EESelectiveReadoutTask.cc.
References bytesPerCrystal, EE, getDccOverhead(), nEBDcc, nECALDcc, nEEDcc, and nRuPerDcc_.
Referenced by analyze().
{ double ruHeaderPayload = 0.; const int firstEbDcc0 = nEEDcc/2; for ( int iDcc0 = 0; iDcc0 < nECALDcc; ++iDcc0 ) { //skip barrel: if(iDcc0 == firstEbDcc0) iDcc0 += nEBDcc; ruHeaderPayload += nRuPerDcc_[iDcc0]*8.; } return getDccOverhead(EE)*nEEDcc + nReadXtals*bytesPerCrystal + ruHeaderPayload; }
std::vector< int > EESelectiveReadoutTask::getFIRWeights | ( | const std::vector< double > & | normalizedWeights | ) | [static, private] |
Computes the ZS FIR filter weights from the normalized weights.
normalizedWeights | the normalized weights |
Definition at line 1225 of file EESelectiveReadoutTask.cc.
Referenced by configFirWeights().
{ const int nFIRTaps = 6; std::vector<int> firWeights(nFIRTaps, 0); //default weight: 0; const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits for(unsigned i=0; i < std::min((size_t)nFIRTaps,normalizedWeights.size()); ++i){ firWeights[i] = lround(normalizedWeights[i] * (1<<10)); if(std::abs(firWeights[i])>maxWeight){//overflow firWeights[i] = firWeights[i]<0?-maxWeight:maxWeight; } } return firWeights; }
int EESelectiveReadoutTask::iXY2cIndex | ( | int | iX | ) | const [inline, private] |
Converts a std CMSSW crystal x or y index to a c-array index (starting from zero and without hole).
Definition at line 193 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), and dccNum().
{
return iX-1;
}
const EcalScDetId EESelectiveReadoutTask::readOutUnitOf | ( | const EEDetId & | xtalId | ) | const [private] |
Retrives the readout unit, a trigger tower in the barrel case, and a supercrystal in the endcap case, a given crystal belongs to.
xtalId | identifier of the crystal |
Definition at line 1085 of file EESelectiveReadoutTask.cc.
References Numbers::getEcalScDetId(), EEDetId::ix(), EEDetId::iy(), and EEDetId::zside().
Referenced by anaDigi().
{ if (xtalId.ix() > 40 && xtalId.ix() < 61 && xtalId.iy() > 40 && xtalId.iy() < 61) { // crystal belongs to an inner partial supercrystal return Numbers::getEcalScDetId(xtalId); } else { return EcalScDetId((xtalId.ix()-1)/5+1, (xtalId.iy()-1)/5+1, xtalId.zside()); } }
void EESelectiveReadoutTask::reset | ( | void | ) | [protected] |
Reset.
Definition at line 172 of file EESelectiveReadoutTask.cc.
References EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EEHighInterestZsFIR_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EELowInterestZsFIR_, EEMediumInterestTriggerTowerFlagMap_, EEReadoutUnitForcedBitMap_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, and MonitorElement::Reset().
Referenced by beginRun().
{ if ( EETowerSize_[0] ) EETowerSize_[0]->Reset(); if ( EETowerSize_[1] ) EETowerSize_[1]->Reset(); if ( EETTFMismatch_[0] ) EETTFMismatch_[0]->Reset(); if ( EETTFMismatch_[1] ) EETTFMismatch_[1]->Reset(); if ( EEDccEventSize_ ) EEDccEventSize_->Reset(); if ( EEDccEventSizeMap_ ) EEDccEventSizeMap_->Reset(); if ( EEReadoutUnitForcedBitMap_[0] ) EEReadoutUnitForcedBitMap_[0]->Reset(); if ( EEReadoutUnitForcedBitMap_[1] ) EEReadoutUnitForcedBitMap_[1]->Reset(); if ( EEFullReadoutSRFlagMap_[0] ) EEFullReadoutSRFlagMap_[0]->Reset(); if ( EEFullReadoutSRFlagMap_[1] ) EEFullReadoutSRFlagMap_[1]->Reset(); if ( EEFullReadoutSRFlagCount_[0] ) EEFullReadoutSRFlagCount_[0]->Reset(); if ( EEFullReadoutSRFlagCount_[1] ) EEFullReadoutSRFlagCount_[1]->Reset(); if ( EEZeroSuppression1SRFlagMap_[0] ) EEZeroSuppression1SRFlagMap_[0]->Reset(); if ( EEZeroSuppression1SRFlagMap_[1] ) EEZeroSuppression1SRFlagMap_[1]->Reset(); if ( EEHighInterestTriggerTowerFlagMap_[0] ) EEHighInterestTriggerTowerFlagMap_[0]->Reset(); if ( EEHighInterestTriggerTowerFlagMap_[1] ) EEHighInterestTriggerTowerFlagMap_[1]->Reset(); if ( EEMediumInterestTriggerTowerFlagMap_[0] ) EEMediumInterestTriggerTowerFlagMap_[0]->Reset(); if ( EEMediumInterestTriggerTowerFlagMap_[1] ) EEMediumInterestTriggerTowerFlagMap_[1]->Reset(); if ( EELowInterestTriggerTowerFlagMap_[0] ) EELowInterestTriggerTowerFlagMap_[0]->Reset(); if ( EELowInterestTriggerTowerFlagMap_[1] ) EELowInterestTriggerTowerFlagMap_[1]->Reset(); if ( EETTFlags_[0] ) EETTFlags_[0]->Reset(); if ( EETTFlags_[1] ) EETTFlags_[1]->Reset(); if ( EECompleteZSMap_[0] ) EECompleteZSMap_[0]->Reset(); if ( EECompleteZSMap_[1] ) EECompleteZSMap_[1]->Reset(); if ( EECompleteZSCount_[0] ) EECompleteZSCount_[0]->Reset(); if ( EECompleteZSCount_[1] ) EECompleteZSCount_[1]->Reset(); if ( EEDroppedFRMap_[0] ) EEDroppedFRMap_[0]->Reset(); if ( EEDroppedFRMap_[1] ) EEDroppedFRMap_[1]->Reset(); if ( EEDroppedFRCount_[0] ) EEDroppedFRCount_[0]->Reset(); if ( EEDroppedFRCount_[1] ) EEDroppedFRCount_[1]->Reset(); if ( EEEventSize_[0] ) EEEventSize_[0]->Reset(); if ( EEEventSize_[1] ) EEEventSize_[1]->Reset(); if ( EEHighInterestPayload_[0] ) EEHighInterestPayload_[0]->Reset(); if ( EEHighInterestPayload_[1] ) EEHighInterestPayload_[1]->Reset(); if ( EELowInterestPayload_[0] ) EELowInterestPayload_[0]->Reset(); if ( EELowInterestPayload_[1] ) EELowInterestPayload_[1]->Reset(); if ( EEHighInterestZsFIR_[0] ) EEHighInterestZsFIR_[0]->Reset(); if ( EEHighInterestZsFIR_[1] ) EEHighInterestZsFIR_[1]->Reset(); if ( EELowInterestZsFIR_[0] ) EELowInterestZsFIR_[0]->Reset(); if ( EELowInterestZsFIR_[1] ) EELowInterestZsFIR_[1]->Reset(); }
void EESelectiveReadoutTask::setup | ( | void | ) | [protected] |
Setup.
Definition at line 237 of file EESelectiveReadoutTask.cc.
References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), dqmStore_, EECompleteZSCount_, EECompleteZSMap_, EEDccEventSize_, EEDccEventSizeMap_, EEDroppedFRCount_, EEDroppedFRMap_, EEEventSize_, EEFullReadoutSRFlagCount_, EEFullReadoutSRFlagMap_, EEHighInterestPayload_, EEHighInterestTriggerTowerFlagMap_, EEHighInterestZsFIR_, EELowInterestPayload_, EELowInterestTriggerTowerFlagMap_, EELowInterestZsFIR_, EEMediumInterestTriggerTowerFlagMap_, EEReadoutUnitForcedBitMap_, EETowerSize_, EETTFlags_, EETTFMismatch_, EEZeroSuppression1SRFlagMap_, i, init_, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEE(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), xbins, and ybins.
Referenced by analyze().
{ init_ = true; std::string name; if ( dqmStore_ ) { dqmStore_->setCurrentFolder(prefixME_ + "/EESelectiveReadoutTask"); name = "EESRT tower event size EE -"; EETowerSize_[0] = dqmStore_->bookProfile2D(name, name, 20, 0., 20., 20, 0., 20., 100, 0., 200., "s"); EETowerSize_[0]->setAxisTitle("jx", 1); EETowerSize_[0]->setAxisTitle("jy", 2); name = "EESRT tower event size EE +"; EETowerSize_[1] = dqmStore_->bookProfile2D(name, name, 20, 0., 20., 20, 0., 20., 100, 0., 200., "s"); EETowerSize_[1]->setAxisTitle("jx", 1); EETowerSize_[1]->setAxisTitle("jy", 2); name = "EESRT TT flag mismatch EE -"; EETTFMismatch_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.); EETTFMismatch_[0]->setAxisTitle("jx", 1); EETTFMismatch_[0]->setAxisTitle("jy", 2); name = "EESRT TT flag mismatch EE +"; EETTFMismatch_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.); EETTFMismatch_[1]->setAxisTitle("jx", 1); EETTFMismatch_[1]->setAxisTitle("jy", 2); name = "EESRT DCC event size"; EEDccEventSize_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 200., "s"); EEDccEventSize_->setAxisTitle("event size (kB)", 2); for (int i = 0; i < 18; i++) { EEDccEventSize_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1); } name = "EESRT event size vs DCC"; EEDccEventSizeMap_ = dqmStore_->book2D(name, name, 18, xbins, 132, ybins); EEDccEventSizeMap_->setAxisTitle("event size (kB)", 2); for (int i = 0; i < 18; i++) { EEDccEventSizeMap_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1); } name = "EESRT readout unit with SR forced EE -"; EEReadoutUnitForcedBitMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EEReadoutUnitForcedBitMap_[0]->setAxisTitle("jx", 1); EEReadoutUnitForcedBitMap_[0]->setAxisTitle("jy", 2); EEReadoutUnitForcedBitMap_[0]->setAxisTitle("rate", 3); name = "EESRT readout unit with SR forced EE +"; EEReadoutUnitForcedBitMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EEReadoutUnitForcedBitMap_[1]->setAxisTitle("jx", 1); EEReadoutUnitForcedBitMap_[1]->setAxisTitle("jy", 2); EEReadoutUnitForcedBitMap_[1]->setAxisTitle("rate", 3); name = "EESRT full readout SR Flags EE -"; EEFullReadoutSRFlagMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EEFullReadoutSRFlagMap_[0]->setAxisTitle("jx", 1); EEFullReadoutSRFlagMap_[0]->setAxisTitle("jy", 2); EEFullReadoutSRFlagMap_[0]->setAxisTitle("rate", 3); name = "EESRT full readout SR Flags EE +"; EEFullReadoutSRFlagMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EEFullReadoutSRFlagMap_[1]->setAxisTitle("jx", 1); EEFullReadoutSRFlagMap_[1]->setAxisTitle("jy", 2); EEFullReadoutSRFlagMap_[1]->setAxisTitle("rate", 3); name = "EESRT full readout SR Flags Number EE -"; EEFullReadoutSRFlagCount_[0] = dqmStore_->book1D(name, name, 200, 0., 200.); EEFullReadoutSRFlagCount_[0]->setAxisTitle("Readout Units number", 1); name = "EESRT full readout SR Flags Number EE +"; EEFullReadoutSRFlagCount_[1] = dqmStore_->book1D(name, name, 200, 0., 200.); EEFullReadoutSRFlagCount_[1]->setAxisTitle("Fully readout RU number", 1); name = "EESRT zero suppression 1 SR Flags EE -"; EEZeroSuppression1SRFlagMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EEZeroSuppression1SRFlagMap_[0]->setAxisTitle("jx", 1); EEZeroSuppression1SRFlagMap_[0]->setAxisTitle("jy", 2); EEZeroSuppression1SRFlagMap_[0]->setAxisTitle("rate", 3); name = "EESRT zero suppression 1 SR Flags EE +"; EEZeroSuppression1SRFlagMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EEZeroSuppression1SRFlagMap_[1]->setAxisTitle("jx", 1); EEZeroSuppression1SRFlagMap_[1]->setAxisTitle("jy", 2); EEZeroSuppression1SRFlagMap_[1]->setAxisTitle("rate", 3); name = "EESRT high interest TT Flags EE -"; EEHighInterestTriggerTowerFlagMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.); EEHighInterestTriggerTowerFlagMap_[0]->setAxisTitle("jx", 1); EEHighInterestTriggerTowerFlagMap_[0]->setAxisTitle("jy", 2); EEHighInterestTriggerTowerFlagMap_[0]->setAxisTitle("rate", 3); name = "EESRT high interest TT Flags EE +"; EEHighInterestTriggerTowerFlagMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.); EEHighInterestTriggerTowerFlagMap_[1]->setAxisTitle("jx", 1); EEHighInterestTriggerTowerFlagMap_[1]->setAxisTitle("jy", 2); EEHighInterestTriggerTowerFlagMap_[1]->setAxisTitle("rate", 3); name = "EESRT medium interest TT Flags EE -"; EEMediumInterestTriggerTowerFlagMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.); EEMediumInterestTriggerTowerFlagMap_[0]->setAxisTitle("jx", 1); EEMediumInterestTriggerTowerFlagMap_[0]->setAxisTitle("jy", 2); EEMediumInterestTriggerTowerFlagMap_[0]->setAxisTitle("rate", 3); name = "EESRT medium interest TT Flags EE +"; EEMediumInterestTriggerTowerFlagMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.); EEMediumInterestTriggerTowerFlagMap_[1]->setAxisTitle("jx", 1); EEMediumInterestTriggerTowerFlagMap_[1]->setAxisTitle("jy", 2); EEMediumInterestTriggerTowerFlagMap_[1]->setAxisTitle("rate", 3); name = "EESRT low interest TT Flags EE -"; EELowInterestTriggerTowerFlagMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.); EELowInterestTriggerTowerFlagMap_[0]->setAxisTitle("jx", 1); EELowInterestTriggerTowerFlagMap_[0]->setAxisTitle("jy", 2); EELowInterestTriggerTowerFlagMap_[0]->setAxisTitle("rate", 3); name = "EESRT low interest TT Flags EE +"; EELowInterestTriggerTowerFlagMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.); EELowInterestTriggerTowerFlagMap_[1]->setAxisTitle("jx", 1); EELowInterestTriggerTowerFlagMap_[1]->setAxisTitle("jy", 2); EELowInterestTriggerTowerFlagMap_[1]->setAxisTitle("rate", 3); name = "EESRT TT Flags EE -"; EETTFlags_[0] = dqmStore_->book1D(name, name, 8, 0., 8.); EETTFlags_[0]->setAxisTitle("TT Flag value", 1); name = "EESRT TT Flags EE +"; EETTFlags_[1] = dqmStore_->book1D(name, name, 8, 0., 8.); EETTFlags_[1]->setAxisTitle("TT Flag value", 1); name = "EESRT ZS Flagged Fully Readout EE -"; EECompleteZSMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EECompleteZSMap_[0]->setAxisTitle("jphi", 1); EECompleteZSMap_[0]->setAxisTitle("jeta", 2); EECompleteZSMap_[0]->setAxisTitle("rate", 3); name = "EESRT ZS Flagged Fully Readout EE +"; EECompleteZSMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EECompleteZSMap_[1]->setAxisTitle("jphi", 1); EECompleteZSMap_[1]->setAxisTitle("jeta", 2); EECompleteZSMap_[1]->setAxisTitle("rate", 3); name = "EESRT ZS Flagged Fully Readout Number EE -"; EECompleteZSCount_[0] = dqmStore_->book1D(name, name, 20, 0., 20.); EECompleteZSCount_[0]->setAxisTitle("Readout Units number", 1); name = "EESRT ZS Flagged Fully Readout Number EE +"; EECompleteZSCount_[1] = dqmStore_->book1D(name, name, 20, 0., 20.); EECompleteZSCount_[1]->setAxisTitle("Readout Units number", 1); name = "EESRT FR Flagged Dropped Readout EE -"; EEDroppedFRMap_[0] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EEDroppedFRMap_[0]->setAxisTitle("jphi", 1); EEDroppedFRMap_[0]->setAxisTitle("jeta", 2); EEDroppedFRMap_[0]->setAxisTitle("rate", 3); name = "EESRT FR Flagged Dropped Readout EE +"; EEDroppedFRMap_[1] = dqmStore_->book2D(name, name, 20, 0., 20., 20, 0., 20.); EEDroppedFRMap_[1]->setAxisTitle("jphi", 1); EEDroppedFRMap_[1]->setAxisTitle("jeta", 2); EEDroppedFRMap_[1]->setAxisTitle("rate", 3); name = "EESRT FR Flagged Dropped Readout Number EE -"; EEDroppedFRCount_[0] = dqmStore_->book1D(name, name, 20, 0., 20.); EEDroppedFRCount_[0]->setAxisTitle("Readout Units number", 1); name = "EESRT FR Flagged Dropped Readout Number EE +"; EEDroppedFRCount_[1] = dqmStore_->book1D(name, name, 20, 0., 20.); EEDroppedFRCount_[1]->setAxisTitle("Readout Units number", 1); name = "EESRT event size EE -"; EEEventSize_[0] = dqmStore_->book1D(name, name, 100, 0, 200); EEEventSize_[0]->setAxisTitle("event size (kB)",1); name = "EESRT event size EE +"; EEEventSize_[1] = dqmStore_->book1D(name, name, 100, 0, 200); EEEventSize_[1]->setAxisTitle("event size (kB)",1); name = "EESRT high interest payload EE -"; EEHighInterestPayload_[0] = dqmStore_->book1D(name, name, 100, 0, 200); EEHighInterestPayload_[0]->setAxisTitle("event size (kB)",1); name = "EESRT high interest payload EE +"; EEHighInterestPayload_[1] = dqmStore_->book1D(name, name, 100, 0, 200); EEHighInterestPayload_[1]->setAxisTitle("event size (kB)",1); name = "EESRT low interest payload EE -"; EELowInterestPayload_[0] = dqmStore_->book1D(name, name, 100, 0, 200); EELowInterestPayload_[0]->setAxisTitle("event size (kB)",1); name = "EESRT low interest payload EE +"; EELowInterestPayload_[1] = dqmStore_->book1D(name, name, 100, 0, 200); EELowInterestPayload_[1]->setAxisTitle("event size (kB)",1); name = "EESRT high interest ZS filter output EE -"; EEHighInterestZsFIR_[0] = dqmStore_->book1D(name, name, 60, -30, 30); EEHighInterestZsFIR_[0]->setAxisTitle("ADC counts*4",1); name = "EESRT high interest ZS filter output EE +"; EEHighInterestZsFIR_[1] = dqmStore_->book1D(name, name, 60, -30, 30); EEHighInterestZsFIR_[1]->setAxisTitle("ADC counts*4",1); name = "EESRT low interest ZS filter output EE -"; EELowInterestZsFIR_[0] = dqmStore_->book1D(name, name, 60, -30, 30); EELowInterestZsFIR_[0]->setAxisTitle("ADC counts*4",1); name = "EESRT low interest ZS filter output EE +"; EELowInterestZsFIR_[1] = dqmStore_->book1D(name, name, 60, -30, 30); EELowInterestZsFIR_[1]->setAxisTitle("ADC counts*4",1); } }
const int EESelectiveReadoutTask::bytesPerCrystal = 24 [static, protected] |
Number of bytes per crystal.
Definition at line 113 of file EESelectiveReadoutTask.h.
Referenced by analyze(), getDccEventSize(), and getEeEventSize().
DQMStore* EESelectiveReadoutTask::dqmStore_ [private] |
Definition at line 332 of file EESelectiveReadoutTask.h.
Referenced by beginJob(), cleanup(), EESelectiveReadoutTask(), and setup().
Definition at line 342 of file EESelectiveReadoutTask.h.
Definition at line 344 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and EESelectiveReadoutTask().
MonitorElement* EESelectiveReadoutTask::EECompleteZSCount_[2] [private] |
Definition at line 363 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EECompleteZSMap_[2] [private] |
Definition at line 362 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 350 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 351 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 340 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and EESelectiveReadoutTask().
MonitorElement* EESelectiveReadoutTask::EEDroppedFRCount_[2] [private] |
Definition at line 365 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EEDroppedFRMap_[2] [private] |
Definition at line 364 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EEEventSize_[2] [private] |
Definition at line 366 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 356 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 355 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EEHighInterestPayload_[2] [private] |
Definition at line 367 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 358 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EEHighInterestZsFIR_[2] [private] |
Definition at line 369 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EELowInterestPayload_[2] [private] |
Definition at line 368 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 360 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EELowInterestZsFIR_[2] [private] |
Definition at line 370 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 359 of file EESelectiveReadoutTask.h.
Referenced by analyze(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 354 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
For book keeping of RU actually read out (not fully zero suppressed)
Definition at line 319 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), and anaDigiInit().
Definition at line 343 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and EESelectiveReadoutTask().
MonitorElement* EESelectiveReadoutTask::EETowerSize_[2] [private] |
Definition at line 352 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EETTFlags_[2] [private] |
Definition at line 361 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
MonitorElement* EESelectiveReadoutTask::EETTFMismatch_[2] [private] |
Definition at line 353 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
Definition at line 341 of file EESelectiveReadoutTask.h.
Referenced by EESelectiveReadoutTask().
Definition at line 357 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), reset(), and setup().
bool EESelectiveReadoutTask::enableCleanup_ [private] |
Definition at line 336 of file EESelectiveReadoutTask.h.
Referenced by EESelectiveReadoutTask(), and endJob().
Definition at line 345 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and EESelectiveReadoutTask().
int EESelectiveReadoutTask::firstFIRSample_ [private] |
Time position of the first sample to use in zero suppession FIR filter. Numbering starts at 0.
Definition at line 328 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), configFirWeights(), and EESelectiveReadoutTask().
std::vector<int> EESelectiveReadoutTask::firWeights_ [private] |
Weights to be used for the ZS FIR filter
Definition at line 323 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), and configFirWeights().
int EESelectiveReadoutTask::ievt_ [private] |
Definition at line 330 of file EESelectiveReadoutTask.h.
Referenced by analyze(), beginJob(), and endJob().
bool EESelectiveReadoutTask::init_ [private] |
Definition at line 372 of file EESelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EESelectiveReadoutTask(), and setup().
const int EESelectiveReadoutTask::kByte = 1024 [static, protected] |
Definition at line 86 of file EESelectiveReadoutTask.h.
Referenced by analyze().
bool EESelectiveReadoutTask::mergeRuns_ [private] |
Definition at line 338 of file EESelectiveReadoutTask.h.
Referenced by beginRun(), and EESelectiveReadoutTask().
int EESelectiveReadoutTask::nCrySC[20][20][2] [protected] |
To store the readout crystals / SC.
Definition at line 116 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
int EESelectiveReadoutTask::nCryTT[108][41] [protected] |
To store the readout crystals / iTT indexes are [iTTC][iTT]
Definition at line 120 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
const int EESelectiveReadoutTask::nDccChs = 68 [static, protected] |
maximum number of RUs read by a DCC
Definition at line 89 of file EESelectiveReadoutTask.h.
Referenced by anaDigiInit().
const int EESelectiveReadoutTask::nEBDcc = 36 [static, protected] |
Definition at line 85 of file EESelectiveReadoutTask.h.
Referenced by getEeEventSize().
const int EESelectiveReadoutTask::nECALDcc = 54 [static, protected] |
Constants.
Definition at line 83 of file EESelectiveReadoutTask.h.
Referenced by anaDigiInit(), dccNum(), dccNumOfRU(), and getEeEventSize().
int EESelectiveReadoutTask::nEe_[2] [private] |
ECAL endcap read channel count
Definition at line 295 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
const int EESelectiveReadoutTask::nEEDcc = 18 [static, protected] |
Definition at line 84 of file EESelectiveReadoutTask.h.
Referenced by getEeEventSize().
int EESelectiveReadoutTask::nEeHI_[2] [private] |
ECAL endcap high interest read channel count
Definition at line 303 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
int EESelectiveReadoutTask::nEeLI_[2] [private] |
ECAL endcap low interest read channel count
Definition at line 299 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
const int EESelectiveReadoutTask::nEeRus = 2*(34+32+33+33+32+34+33+34+33) [static, protected] |
number of RUs for EE
Definition at line 92 of file EESelectiveReadoutTask.h.
const int EESelectiveReadoutTask::nEeX = 100 [static, protected] |
EE crystal grid size along X.
Definition at line 98 of file EESelectiveReadoutTask.h.
const int EESelectiveReadoutTask::nEeY = 100 [static, protected] |
EE crystal grid size along Y.
Definition at line 101 of file EESelectiveReadoutTask.h.
const int EESelectiveReadoutTask::nEndcaps = 2 [static, protected] |
number of endcaps
Definition at line 95 of file EESelectiveReadoutTask.h.
int EESelectiveReadoutTask::nEvtAnyInterest[100][100][2] [protected] |
To store the events with any interest.
Definition at line 153 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtAnyReadout[20][20][2] [protected] |
To store the events with any readout.
Definition at line 141 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtCompleteReadoutIfZS[20][20][2] [protected] |
To store the events with complete readout when ZS is requested.
Definition at line 135 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtDroppedReadoutIfFR[20][20][2] [protected] |
To store the events with 0 channels readout when FR is requested.
Definition at line 138 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtFullReadout[20][20][2] [protected] |
To store the events with full readout.
Definition at line 123 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtHighInterest[100][100][2] [protected] |
To store the events with high interest TT.
Definition at line 144 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtLowInterest[100][100][2] [protected] |
To store the events with low interest TT.
Definition at line 150 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtMediumInterest[100][100][2] [protected] |
To store the events with medium interest TT.
Definition at line 147 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtRUForced[20][20][2] [protected] |
To store the events with RU forced.
Definition at line 126 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtZS1Readout[20][20][2] [protected] |
To store the events with ZS1 readout.
Definition at line 129 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nEvtZSReadout[20][20][2] [protected] |
To store the events with ZS1 or ZS2 readout.
Definition at line 132 of file EESelectiveReadoutTask.h.
Referenced by analyze(), and beginRun().
int EESelectiveReadoutTask::nPerDcc_[nECALDcc] [private] |
ECAL read channel count for each DCC:
Definition at line 307 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), and anaDigiInit().
int EESelectiveReadoutTask::nPerRu_[nECALDcc][nDccChs] [private] |
Number of crystal read for each DCC channel (aka readout unit).
Definition at line 311 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
int EESelectiveReadoutTask::nRuPerDcc_[nECALDcc] [private] |
Count for each DCC of RUs with at leat one channel read out:
Definition at line 315 of file EESelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), getDccEventSize(), and getEeEventSize().
const int EESelectiveReadoutTask::nTtEta = 56 [static, protected] |
Number of Trigger Towers along Eta.
Definition at line 107 of file EESelectiveReadoutTask.h.
const int EESelectiveReadoutTask::nTtPhi = 72 [static, protected] |
Number of Trigger Towers along Phi.
Definition at line 110 of file EESelectiveReadoutTask.h.
std::string EESelectiveReadoutTask::prefixME_ [private] |
Definition at line 334 of file EESelectiveReadoutTask.h.
Referenced by beginJob(), cleanup(), EESelectiveReadoutTask(), and setup().
const int EESelectiveReadoutTask::scEdge = 5 [static, protected] |
Number of crystals along a supercrystal edge.
Definition at line 104 of file EESelectiveReadoutTask.h.
Referenced by anaDigi().
const EcalSRSettings* EESelectiveReadoutTask::settings_ [private] |
Definition at line 375 of file EESelectiveReadoutTask.h.
Referenced by beginRun().
bool EESelectiveReadoutTask::useCondDb_ [private] |
Definition at line 374 of file EESelectiveReadoutTask.h.
Referenced by beginRun(), and EESelectiveReadoutTask().
float EESelectiveReadoutTask::xbins[19] [private] |
Definition at line 347 of file EESelectiveReadoutTask.h.
Referenced by EESelectiveReadoutTask(), and setup().
float EESelectiveReadoutTask::ybins[133] [private] |
Definition at line 348 of file EESelectiveReadoutTask.h.
Referenced by EESelectiveReadoutTask(), and setup().