82 using namespace edm::eventsetup;
84 std::cout <<
">>> EcalTrivialObjectAnalyzer: processing run "<<e.
id().
run() <<
" event: " << e.
id().
event() << std::endl;
93 std::cout <<
"Global ADC->GeV scale: EB " << std::setprecision(6) << agc->getEBValue() <<
" GeV/ADC count"
94 " EE " << std::setprecision(6) << agc->getEEValue() <<
" GeV/ADC count" << std::endl;
97 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
98 int ieta = int( 1 +
r1*85 );
99 r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
100 int iphi = int( 1 +
r1*20 );
103 std::cout <<
"EcalTrivialObjectAnalyzer: using EBDetId: " << ebid << std::endl;
107 if( it!=myped->end() ){
109 <<
" mean_x1: " << std::setprecision(8) << (*it).mean_x1 <<
" rms_x1: " << (*it).rms_x1
110 <<
" mean_x6: " <<(*it).mean_x6 <<
" rms_x6: " << (*it).rms_x6
111 <<
" mean_x12: " <<(*it).mean_x12 <<
" rms_x12: " << (*it).rms_x12
114 std::cout <<
"No pedestal found for this xtal! something wrong with EcalPedestals in your DB? "
125 if( git != grp->getMap().end() ) {
126 std::cout <<
"XtalGroupId.id() = " << std::setprecision(3) << (*git).id() << std:: endl;
129 std::cout <<
"No group id found for this crystal. something wrong with EcalWeightXtalGroups in your DB?"
140 if( grit!=gr->getMap().end() ){
144 <<
"gain 12/6 : " << std::setprecision(4) << mgpa.gain12Over6() <<
" gain 6/1: " << mgpa.gain6Over1()
147 std::cout <<
"No MGPA Gain Ratio found for this xtal! something wrong with EcalGainRatios in your DB? "
158 if( icalit!=ical->getMap().end() ){
159 icalconst = (*icalit);
162 <<std::setprecision(6)
166 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalIntercalibConstants in your DB? "
177 if( icalitErr!=icalErr->getMap().end() ){
178 icalconstErr = (*icalitErr);
181 <<std::setprecision(6)
185 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalIntercalibErrors in your DB? "
200 icalconst = (*icalit);
203 <<std::setprecision(6)
207 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalTimeCalibConstants in your DB? "
218 if( icalitErr!=icalErr->
getMap().
end() ){
219 icalconstErr = (*icalitErr);
222 <<std::setprecision(6)
226 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalTimeCalibErrors in your DB? "
240 <<
" EB " << TOff->getEBValue()
241 <<
" EE " << TOff->getEEValue()
245 std::cout <<
"Fetching EcalTBWeights from DB " << std::endl;
249 std::cout <<
"EcalTBWeightMap.size(): " << std::setprecision(3) << wgts->getMap().size() << std::endl;
256 std::cout <<
"Lookup EcalWeightSet for groupid: " << std::setprecision(3)
257 << gid.id() <<
" and TDC id " << tdcid << std::endl;
258 EcalTBWeights::EcalTBWeightMap::const_iterator wit = wgts->getMap().find( std::make_pair(gid,tdcid) );
260 if( wit != wgts->getMap().end() ) {
262 std::cout <<
"check size of data members in EcalWeightSet" << std::endl;
274 CLHEP::HepMatrix clmat1(3,10,0);
275 CLHEP::HepMatrix clmat2(3,10,0);
276 for(
int irow=0; irow<3; irow++) {
277 for(
int icol=0; icol<10; icol++) {
278 clmat1[irow][icol] = mat1(irow,icol);
279 clmat2[irow][icol] = mat2(irow,icol);
282 std::cout <<
"weight matrix before gain switch:" << std::endl;
284 std::cout <<
"weight matrix after gain switch:" << std::endl;
288 std::cout <<
"No weights found for EcalGroupId: " << gid.id() <<
" and EcalTDCId: " << tdcid << std::endl;
296 for ( EcalFunctionParameters::const_iterator it = paramLocalCont->params().begin(); it != paramLocalCont->params().end(); ++it ) {
304 for ( EcalFunctionParameters::const_iterator it = paramCrack->params().begin(); it != paramCrack->params().end(); ++it ) {
311 std::cout <<
"EnergyCorrectionParameters:";
312 for ( EcalFunctionParameters::const_iterator it = paramEnergyCorrection->params().begin(); it != paramEnergyCorrection->params().end(); ++it ) {
319 std::cout <<
"EnergyCorrectionParameters:";
320 for ( EcalFunctionParameters::const_iterator it = paramEnergyUncertainty->params().begin(); it != paramEnergyUncertainty->params().end(); ++it ) {
327 std::cout <<
"EnergyCorrectionObjectSpecificParameters:";
328 for ( EcalFunctionParameters::const_iterator it = paramEnergyCorrectionObjectSpecific->params().begin(); it != paramEnergyCorrectionObjectSpecific->params().end(); ++it ) {
342 lalphait = lalpha->
getMap().
find(ebid.rawId());
343 if( lalphait!=lalpha->getMap().end() ){
345 <<std::setprecision(6)
349 std::cout <<
"No laser alpha found for this xtal! something wrong with EcalLaserAlphas in your DB? "
360 if( lrefit!=lref->getMap().end() ){
362 <<std::setprecision(6)
366 std::cout <<
"No laser apd/pn ref found for this xtal! something wrong with EcalLaserAPDPNRatiosRef in your DB? "
379 if( lratioit!=lratio->getLaserMap().end() ){
380 lratioconst = (*lratioit);
384 << std::setprecision(6)
385 << lratioconst.p1 <<
" " << lratioconst.p2
388 std::cout <<
"No laser apd/pn ratio found for this xtal! something wrong with EcalLaserAPDPNRatios in your DB? "
394 EcalLaserAPDPNRatios::EcalLaserTimeStampMap::const_iterator ltimeit;
395 for (
int i=1;
i<=92;
i++) {
396 ltimestamp = lratio->getTimeMap()[
i];
397 std::cout <<
"i = " << std::setprecision(6) <<
i
398 << ltimestamp.t1.value() <<
" " << ltimestamp.t2.value() <<
" : " ;
400 std::cout <<
"Tests finished." << std::endl;
408 chit = ch_status->
getMap().
find(ebid.rawId());
409 if( chit != ch_status->getMap().end() ){
412 <<std::setprecision(6)
416 std::cout <<
"No channel status found for this xtal! something wrong with EcalChannelStatus in your DB? "
427 std::cout <<
"Sample Mask EB " << std::hex << smask->getEcalSampleMaskRecordEB()
428 <<
" EE " << std::hex << smask->getEcalSampleMaskRecordEE() << std::endl;
EventNumber_t event() const
const self & getMap() const
const EcalLaserAPDPNRatiosMap & getLaserMap() const
uint16_t getStatusCode() const
float EcalIntercalibError
std::vector< Item >::const_iterator const_iterator
T const * product() const
float EcalTimeCalibConstant
const_iterator find(uint32_t rawId) const
math::Matrix< 3, 10 >::type EcalWeightMatrix
const_iterator end() const
float EcalIntercalibConstant