Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Hcal FED instead of trigger FED to get HL1Id #7067

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 26 additions & 25 deletions DQMOffline/CalibCalo/src/DQMHcalPhiSymAlCaReco.cc
Original file line number Diff line number Diff line change
Expand Up @@ -330,45 +330,46 @@ void DQMHcalPhiSymAlCaReco::analyze(const Event& iEvent,

const FEDRawDataCollection *rdc=rawIn.product();

bool hcalIsZS = false ;
for (unsigned int k=0; k<selFEDs.size(); k++)
{
const FEDRawData & fedData = rdc->FEDData(selFEDs[k]);
// std::cout<<fedData.size()*std::pow(1024.,-1)<<std::endl;
hFEDsize->Fill(fedData.size()*std::pow(1024.,-1),1);

// get HCAL DCC Header for each FEDRawData
const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(fedData.data());

if (!dccHeader) continue;

bool hcalIsZS = false;
int lvl1ID = 0;
bool lvl1IDFound = false;
for (unsigned int k=0; k<selFEDs.size(); k++) {
const FEDRawData & fedData = rdc->FEDData(selFEDs[k]);
// std::cout<<fedData.size()*std::pow(1024.,-1)<<std::endl;
hFEDsize->Fill(fedData.size()*std::pow(1024.,-1),1);

// get HCAL DCC Header for each FEDRawData
const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(fedData.data());
if (dccHeader) {
// walk through the HTR data...
HcalHTRData htr;

int nspigot =0;
for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++) {
nspigot++;

if (!dccHeader->getSpigotPresent(spigot)) continue;
if (!dccHeader->getSpigotPresent(spigot)) continue;

// Load the given decoder with the pointer and length from this spigot.
dccHeader->getSpigotData(spigot,htr, fedData.size());
// Load the given decoder with the pointer and length from this spigot.
dccHeader->getSpigotData(spigot,htr, fedData.size());

if(k != 20 && nspigot !=14 ) {
if ( !htr.isUnsuppressed() ) { hcalIsZS = true; }
if ( !htr.isUnsuppressed() ) { hcalIsZS = true; }
}
}

} // loop over HcalFEDs
}

// try to get the lvl1ID from the HCAL fed
if (!lvl1IDFound && (fedData.size() > 0)) {
// get FED Header for FEDRawData
FEDHeader fedHeader(fedData.data());
lvl1ID = fedHeader.lvl1ID();
lvl1IDFound = true;
}
} // loop over HcalFEDs

hHcalIsZS->Fill( hcalIsZS );

// get Trigger FED-Id
const FEDRawData& fedData = rdc->FEDData(FEDNumbering::MINTriggerGTPFEDID) ;
FEDHeader header(fedData.data()) ;

/// Level-1 event number generated by the TTC system
hL1Id->Fill( (header.lvl1ID())%period_ );
hL1Id->Fill( lvl1ID%period_ );

edm::Handle<HBHERecHitCollection> hbheNS;
iEvent.getByToken(hbherecoNoise, hbheNS);
Expand Down