83 using namespace edm::eventsetup;
85 std::cout <<
">>> EcalTrivialObjectAnalyzer: processing run "<<e.
id().
run() <<
" event: " << e.
id().
event() << std::endl;
94 std::cout <<
"Global ADC->GeV scale: EB " << std::setprecision(6) << agc->getEBValue() <<
" GeV/ADC count"
95 " EE " << std::setprecision(6) << agc->getEEValue() <<
" GeV/ADC count" << std::endl;
98 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
99 int ieta = int( 1 +
r1*85 );
100 r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
101 int iphi = int( 1 +
r1*20 );
104 std::cout <<
"EcalTrivialObjectAnalyzer: using EBDetId: " << ebid << std::endl;
108 if( it!=myped->end() ){
110 <<
" mean_x1: " << std::setprecision(8) << (*it).mean_x1 <<
" rms_x1: " << (*it).rms_x1
111 <<
" mean_x6: " <<(*it).mean_x6 <<
" rms_x6: " << (*it).rms_x6
112 <<
" mean_x12: " <<(*it).mean_x12 <<
" rms_x12: " << (*it).rms_x12
115 std::cout <<
"No pedestal found for this xtal! something wrong with EcalPedestals in your DB? "
126 if( git != grp->getMap().end() ) {
127 std::cout <<
"XtalGroupId.id() = " << std::setprecision(3) << (*git).id() << std:: endl;
130 std::cout <<
"No group id found for this crystal. something wrong with EcalWeightXtalGroups in your DB?"
141 if( grit!=gr->getMap().end() ){
145 <<
"gain 12/6 : " << std::setprecision(4) << mgpa.gain12Over6() <<
" gain 6/1: " << mgpa.gain6Over1()
148 std::cout <<
"No MGPA Gain Ratio found for this xtal! something wrong with EcalGainRatios in your DB? "
159 if( icalit!=ical->getMap().end() ){
160 icalconst = (*icalit);
163 <<std::setprecision(6)
167 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalIntercalibConstants in your DB? "
178 if( icalitErr!=icalErr->getMap().end() ){
179 icalconstErr = (*icalitErr);
182 <<std::setprecision(6)
186 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalIntercalibErrors in your DB? "
201 icalconst = (*icalit);
204 <<std::setprecision(6)
208 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalTimeCalibConstants in your DB? "
219 if( icalitErr!=icalErr->
getMap().
end() ){
220 icalconstErr = (*icalitErr);
223 <<std::setprecision(6)
227 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalTimeCalibErrors in your DB? "
241 <<
" EB " << TOff->getEBValue()
242 <<
" EE " << TOff->getEEValue()
246 std::cout <<
"Fetching EcalTBWeights from DB " << std::endl;
250 std::cout <<
"EcalTBWeightMap.size(): " << std::setprecision(3) << wgts->getMap().size() << std::endl;
257 std::cout <<
"Lookup EcalWeightSet for groupid: " << std::setprecision(3)
258 << gid.id() <<
" and TDC id " << tdcid << std::endl;
259 EcalTBWeights::EcalTBWeightMap::const_iterator wit = wgts->getMap().find( std::make_pair(gid,tdcid) );
261 if( wit != wgts->getMap().end() ) {
263 std::cout <<
"check size of data members in EcalWeightSet" << std::endl;
275 CLHEP::HepMatrix clmat1(3,10,0);
276 CLHEP::HepMatrix clmat2(3,10,0);
277 for(
int irow=0; irow<3; irow++) {
278 for(
int icol=0; icol<10; icol++) {
279 clmat1[irow][icol] = mat1(irow,icol);
280 clmat2[irow][icol] = mat2(irow,icol);
283 std::cout <<
"weight matrix before gain switch:" << std::endl;
285 std::cout <<
"weight matrix after gain switch:" << std::endl;
289 std::cout <<
"No weights found for EcalGroupId: " << gid.id() <<
" and EcalTDCId: " << tdcid << std::endl;
297 for ( EcalFunctionParameters::const_iterator it = paramLocalCont->params().begin(); it != paramLocalCont->params().end(); ++it ) {
305 for ( EcalFunctionParameters::const_iterator it = paramCrack->params().begin(); it != paramCrack->params().end(); ++it ) {
312 std::cout <<
"EnergyCorrectionParameters:";
313 for ( EcalFunctionParameters::const_iterator it = paramEnergyCorrection->params().begin(); it != paramEnergyCorrection->params().end(); ++it ) {
320 std::cout <<
"EnergyCorrectionParameters:";
321 for ( EcalFunctionParameters::const_iterator it = paramEnergyUncertainty->params().begin(); it != paramEnergyUncertainty->params().end(); ++it ) {
328 std::cout <<
"EnergyCorrectionObjectSpecificParameters:";
329 for ( EcalFunctionParameters::const_iterator it = paramEnergyCorrectionObjectSpecific->params().begin(); it != paramEnergyCorrectionObjectSpecific->params().end(); ++it ) {
343 lalphait = lalpha->
getMap().
find(ebid.rawId());
344 if( lalphait!=lalpha->getMap().end() ){
346 <<std::setprecision(6)
350 std::cout <<
"No laser alpha found for this xtal! something wrong with EcalLaserAlphas in your DB? "
361 if( lrefit!=lref->getMap().end() ){
363 <<std::setprecision(6)
367 std::cout <<
"No laser apd/pn ref found for this xtal! something wrong with EcalLaserAPDPNRatiosRef in your DB? "
380 if( lratioit!=lratio->getLaserMap().end() ){
381 lratioconst = (*lratioit);
385 << std::setprecision(6)
386 << lratioconst.p1 <<
" " << lratioconst.p2
389 std::cout <<
"No laser apd/pn ratio found for this xtal! something wrong with EcalLaserAPDPNRatios in your DB? "
395 EcalLaserAPDPNRatios::EcalLaserTimeStampMap::const_iterator ltimeit;
396 for (
int i=1;
i<=92;
i++) {
397 ltimestamp = lratio->getTimeMap()[
i];
398 std::cout <<
"i = " << std::setprecision(6) <<
i
399 << ltimestamp.t1.value() <<
" " << ltimestamp.t2.value() <<
" : " ;
401 std::cout <<
"Tests finished." << std::endl;
409 chit = ch_status->
getMap().
find(ebid.rawId());
410 if( chit != ch_status->getMap().end() ){
413 <<std::setprecision(6)
417 std::cout <<
"No channel status found for this xtal! something wrong with EcalChannelStatus in your DB? "
428 std::cout <<
"Sample Mask EB " << std::hex << smask->getEcalSampleMaskRecordEB()
429 <<
" 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