80 using namespace edm::eventsetup;
82 std::cout <<
">>> EcalTrivialObjectAnalyzer: processing run "<<e.
id().
run() <<
" event: " << e.
id().
event() << std::endl;
91 std::cout <<
"Global ADC->GeV scale: EB " << std::setprecision(6) << agc->getEBValue() <<
" GeV/ADC count"
92 " EE " << std::setprecision(6) << agc->getEEValue() <<
" GeV/ADC count" << std::endl;
95 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
96 int ieta = int( 1 +
r1*85 );
97 r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
98 int iphi = int( 1 +
r1*20 );
101 std::cout <<
"EcalTrivialObjectAnalyzer: using EBDetId: " << ebid << std::endl;
105 if( it!=myped->end() ){
107 <<
" mean_x1: " << std::setprecision(8) << (*it).mean_x1 <<
" rms_x1: " << (*it).rms_x1
108 <<
" mean_x6: " <<(*it).mean_x6 <<
" rms_x6: " << (*it).rms_x6
109 <<
" mean_x12: " <<(*it).mean_x12 <<
" rms_x12: " << (*it).rms_x12
112 std::cout <<
"No pedestal found for this xtal! something wrong with EcalPedestals in your DB? "
123 if( git != grp->getMap().end() ) {
124 std::cout <<
"XtalGroupId.id() = " << std::setprecision(3) << (*git).id() << std:: endl;
127 std::cout <<
"No group id found for this crystal. something wrong with EcalWeightXtalGroups in your DB?"
138 if( grit!=gr->getMap().end() ){
142 <<
"gain 12/6 : " << std::setprecision(4) << mgpa.gain12Over6() <<
" gain 6/1: " << mgpa.gain6Over1()
145 std::cout <<
"No MGPA Gain Ratio found for this xtal! something wrong with EcalGainRatios in your DB? "
156 if( icalit!=ical->getMap().end() ){
157 icalconst = (*icalit);
160 <<std::setprecision(6)
164 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalIntercalibConstants in your DB? "
175 if( icalitErr!=icalErr->getMap().end() ){
176 icalconstErr = (*icalitErr);
179 <<std::setprecision(6)
183 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalIntercalibErrors in your DB? "
198 icalconst = (*icalit);
201 <<std::setprecision(6)
205 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalTimeCalibConstants in your DB? "
216 if( icalitErr!=icalErr->
getMap().
end() ){
217 icalconstErr = (*icalitErr);
220 <<std::setprecision(6)
224 std::cout <<
"No intercalib const found for this xtal! something wrong with EcalTimeCalibErrors in your DB? "
238 <<
" EB " << TOff->getEBValue()
239 <<
" EE " << TOff->getEEValue()
243 std::cout <<
"Fetching EcalTBWeights from DB " << std::endl;
247 std::cout <<
"EcalTBWeightMap.size(): " << std::setprecision(3) << wgts->getMap().size() << std::endl;
254 std::cout <<
"Lookup EcalWeightSet for groupid: " << std::setprecision(3)
255 << gid.id() <<
" and TDC id " << tdcid << std::endl;
256 EcalTBWeights::EcalTBWeightMap::const_iterator wit = wgts->getMap().find( std::make_pair(gid,tdcid) );
258 if( wit != wgts->getMap().end() ) {
260 std::cout <<
"check size of data members in EcalWeightSet" << std::endl;
272 CLHEP::HepMatrix clmat1(3,10,0);
273 CLHEP::HepMatrix clmat2(3,10,0);
274 for(
int irow=0; irow<3; irow++) {
275 for(
int icol=0; icol<10; icol++) {
276 clmat1[irow][icol] = mat1(irow,icol);
277 clmat2[irow][icol] = mat2(irow,icol);
280 std::cout <<
"weight matrix before gain switch:" << std::endl;
282 std::cout <<
"weight matrix after gain switch:" << std::endl;
286 std::cout <<
"No weights found for EcalGroupId: " << gid.id() <<
" and EcalTDCId: " << tdcid << std::endl;
294 for ( EcalFunctionParameters::const_iterator it = paramLocalCont->params().begin(); it != paramLocalCont->params().end(); ++it ) {
302 for ( EcalFunctionParameters::const_iterator it = paramCrack->params().begin(); it != paramCrack->params().end(); ++it ) {
309 std::cout <<
"EnergyCorrectionParameters:";
310 for ( EcalFunctionParameters::const_iterator it = paramEnergyCorrection->params().begin(); it != paramEnergyCorrection->params().end(); ++it ) {
317 std::cout <<
"EnergyCorrectionParameters:";
318 for ( EcalFunctionParameters::const_iterator it = paramEnergyUncertainty->params().begin(); it != paramEnergyUncertainty->params().end(); ++it ) {
325 std::cout <<
"EnergyCorrectionObjectSpecificParameters:";
326 for ( EcalFunctionParameters::const_iterator it = paramEnergyCorrectionObjectSpecific->params().begin(); it != paramEnergyCorrectionObjectSpecific->params().end(); ++it ) {
340 lalphait = lalpha->
getMap().
find(ebid.rawId());
341 if( lalphait!=lalpha->getMap().end() ){
343 <<std::setprecision(6)
347 std::cout <<
"No laser alpha found for this xtal! something wrong with EcalLaserAlphas in your DB? "
358 if( lrefit!=lref->getMap().end() ){
360 <<std::setprecision(6)
364 std::cout <<
"No laser apd/pn ref found for this xtal! something wrong with EcalLaserAPDPNRatiosRef in your DB? "
377 if( lratioit!=lratio->getLaserMap().end() ){
378 lratioconst = (*lratioit);
382 << std::setprecision(6)
383 << lratioconst.p1 <<
" " << lratioconst.p2
386 std::cout <<
"No laser apd/pn ratio found for this xtal! something wrong with EcalLaserAPDPNRatios in your DB? "
392 EcalLaserAPDPNRatios::EcalLaserTimeStampMap::const_iterator ltimeit;
393 for (
int i=1;
i<=92;
i++) {
394 ltimestamp = lratio->getTimeMap()[
i];
395 std::cout <<
"i = " << std::setprecision(6) <<
i
396 << ltimestamp.t1.value() <<
" " << ltimestamp.t2.value() <<
" : " ;
398 std::cout <<
"Tests finihed." << std::endl;
406 chit = ch_status->
getMap().
find(ebid.rawId());
407 if( chit != ch_status->getMap().end() ){
410 <<std::setprecision(6)
414 std::cout <<
"No channel status found for this xtal! something wrong with EcalChannelStatus in your DB? "
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