76 localContCorrParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"localContCorrParameters", std::vector<double>(0) );
77 crackCorrParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"crackCorrParameters", std::vector<double>(0) );
78 energyCorrectionParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"energyCorrectionParameters", std::vector<double>(0) );
79 energyUncertaintyParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"energyUncertaintyParameters", std::vector<double>(0) );
80 energyCorrectionObjectSpecificParameters_ = ps.
getUntrackedParameter< std::vector<double> >(
"energyCorrectionObjectSpecificParameters", std::vector<double>(0) );
108 std::cout <<
" EcalTrivialConditionRetriever " << std::endl;
114 std::cout <<
" EcalTrivialConditionRetriever going to create conditions based on the damage deu to "<<totLumi_<<
115 " fb-1 integrated luminosity" << std::endl;
119 if (weightsForAsynchronousRunning_)
121 getWeightsFromFile_ =
true;
128 std::ostringstream str;
130 if (!weightsForAsynchronousRunning_)
135 weightType = str.str();
146 amplWeights_.resize(nTDCbins_);
147 amplWeightsAft_.resize(nTDCbins_);
148 pedWeights_.resize(nTDCbins_);
149 pedWeightsAft_.resize(nTDCbins_);
150 jittWeights_.resize(nTDCbins_);
151 jittWeightsAft_.resize(nTDCbins_);
152 chi2Matrix_.resize(nTDCbins_);
153 chi2MatrixAft_.resize(nTDCbins_);
156 getWeightsFromConfiguration(ps);
164 producedEcalMappingElectronics_ = ps.
getUntrackedParameter<
bool>(
"producedEcalMappingElectronics",
true);
167 if ( producedEcalMappingElectronics_ ) {
168 if ( mappingFile_ !=
"" ) {
173 findingRecord<EcalMappingElectronicsRcd>();
177 if(getEBAlignmentFromFile_) {
182 if(getEEAlignmentFromFile_) {
187 if(getESAlignmentFromFile_)
194 if (producedEcalPedestals_)
197 if (producedEcalWeights_) {
202 if (producedEcalGainRatios_)
205 if (producedEcalADCToGeVConstant_)
209 producedEcalTimeOffsetConstant_ = ps.
getUntrackedParameter<
bool>(
"producedEcalTimeOffsetConstant",
true);
211 if (producedEcalTimeOffsetConstant_) {
213 findingRecord<EcalTimeOffsetConstantRcd>();
217 producedEcalLinearCorrections_ = ps.
getUntrackedParameter<
bool>(
"producedEcalLinearCorrections",
true);
220 if (producedEcalLinearCorrections_) {
221 if(linearCorrectionsFile_ !=
"") {
226 findingRecord<EcalLinearCorrectionsRcd> () ;
232 producedEcalIntercalibConstants_ = ps.
getUntrackedParameter<
bool>(
"producedEcalIntercalibConstants",
true);
237 if (producedEcalIntercalibConstants_) {
238 if(intercalibConstantsFile_ !=
"") {
243 findingRecord<EcalIntercalibConstantsRcd> () ;
246 producedEcalIntercalibConstantsMC_ = ps.
getUntrackedParameter<
bool>(
"producedEcalIntercalibConstantsMC",
true);
248 if (producedEcalIntercalibConstantsMC_) {
249 if(intercalibConstantsMCFile_ !=
"") {
254 findingRecord<EcalIntercalibConstantsMCRcd> () ;
261 if (producedEcalIntercalibErrors_) {
262 if(intercalibErrorsFile_ !=
"") {
267 findingRecord<EcalIntercalibErrorsRcd> () ;
271 producedEcalTimeCalibConstants_ = ps.
getUntrackedParameter<
bool>(
"producedEcalTimeCalibConstants",
true);
274 if (producedEcalTimeCalibConstants_) {
275 if(timeCalibConstantsFile_ !=
"") {
280 findingRecord<EcalTimeCalibConstantsRcd> () ;
287 if (producedEcalTimeCalibErrors_) {
288 if(timeCalibErrorsFile_ !=
"") {
293 findingRecord<EcalTimeCalibErrorsRcd> () ;
297 producedEcalClusterLocalContCorrParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterLocalContCorrParameters",
false);
298 producedEcalClusterCrackCorrParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterCrackCorrParameters",
false);
299 producedEcalClusterEnergyCorrectionParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyCorrectionParameters",
false);
300 producedEcalClusterEnergyUncertaintyParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyUncertaintyParameters",
false);
301 producedEcalClusterEnergyCorrectionObjectSpecificParameters_ = ps.
getUntrackedParameter<
bool>(
"producedEcalClusterEnergyCorrectionObjectSpecificParameters",
false);
302 if ( producedEcalClusterLocalContCorrParameters_ ) {
304 findingRecord<EcalClusterLocalContCorrParametersRcd>();
306 if ( producedEcalClusterCrackCorrParameters_ ) {
308 findingRecord<EcalClusterCrackCorrParametersRcd>();
310 if ( producedEcalClusterEnergyCorrectionParameters_ ) {
312 findingRecord<EcalClusterEnergyCorrectionParametersRcd>();
314 if ( producedEcalClusterEnergyUncertaintyParameters_ ) {
316 findingRecord<EcalClusterEnergyUncertaintyParametersRcd>();
318 if ( producedEcalClusterEnergyCorrectionObjectSpecificParameters_ ) {
320 findingRecord<EcalClusterEnergyCorrectionObjectSpecificParametersRcd>();
325 if (producedEcalLaserCorrection_) {
328 findingRecord<EcalLaserAlphasRcd> () ;
330 std::cout <<
" getLaserAlphaFromFile_ " << getLaserAlphaFromFile_ << std::endl;
331 if(getLaserAlphaFromFile_) {
334 std::cout <<
" EELaserAlphaFile_ " << EELaserAlphaFile_.c_str() << std::endl;
337 findingRecord<EcalLaserAPDPNRatiosRefRcd> () ;
339 findingRecord<EcalLaserAPDPNRatiosRcd> () ;
346 if ( producedEcalChannelStatus_ ) {
347 if ( channelStatusFile_ !=
"" ) {
352 findingRecord<EcalChannelStatusRcd>();
356 if ( producedEcalDQMChannelStatus_ ) {
358 findingRecord<EcalDQMChannelStatusRcd>();
362 if ( producedEcalDCSTowerStatus_ ) {
364 findingRecord<EcalDCSTowerStatusRcd>();
368 if ( producedEcalDAQTowerStatus_ ) {
370 findingRecord<EcalDAQTowerStatusRcd>();
374 if ( producedEcalDQMTowerStatus_ ) {
376 findingRecord<EcalDQMTowerStatusRcd>();
383 if ( producedEcalTrgChannelStatus_ ) {
384 if ( trgChannelStatusFile_ !=
"" ) {
389 findingRecord<EcalTPGCrystalStatusRcd>();
394 if ( producedEcalAlignmentEB_ ) {
396 findingRecord<EBAlignmentRcd>();
399 if ( producedEcalAlignmentEE_ ) {
401 findingRecord<EEAlignmentRcd>();
404 if ( producedEcalAlignmentES_ ) {
406 findingRecord<ESAlignmentRcd>();
409 if (producedEcalPedestals_) findingRecord<EcalPedestalsRcd>();
411 if (producedEcalWeights_) {
412 findingRecord<EcalWeightXtalGroupsRcd>();
413 findingRecord<EcalTBWeightsRcd>();
416 if (producedEcalGainRatios_) findingRecord<EcalGainRatiosRcd>();
418 if (producedEcalADCToGeVConstant_) findingRecord<EcalADCToGeVConstantRcd>();
421 if (producedEcalSampleMask_) {
423 findingRecord<EcalSampleMaskRcd>();
439 if(verbose_>=1)
std::cout <<
"EcalTrivialConditionRetriever::setIntervalFor(): record key = " << rk.
name() <<
"\ttime: " << iTime.
time().
value() << std::endl;
445 std::auto_ptr<EcalPedestals>
447 std::auto_ptr<EcalPedestals> peds = std::auto_ptr<EcalPedestals>(
new EcalPedestals() );
451 EBitem.mean_x1 = EBpedMeanX1_;
452 EBitem.rms_x1 = EBpedRMSX1_;
453 EBitem.mean_x6 = EBpedMeanX6_;
454 EBitem.rms_x6 = EBpedRMSX6_;
455 EBitem.mean_x12 = EBpedMeanX12_;
456 EBitem.rms_x12 = EBpedRMSX12_;
458 EEitem.mean_x1 = EEpedMeanX1_;
459 EEitem.rms_x1 = EEpedRMSX1_;
460 EEitem.mean_x6 = EEpedMeanX6_;
461 EEitem.rms_x6 = EEpedRMSX6_;
462 EEitem.mean_x12 = EEpedMeanX12_;
463 EEitem.rms_x12 = EEpedRMSX12_;
470 if(iEta==0)
continue;
482 EBitem.rms_x1 = EBpedRMSX1_*noisefactor;
483 EBitem.rms_x6 = EBpedRMSX6_*noisefactor;
484 EBitem.rms_x12 = EBpedRMSX12_*noisefactor;
485 std::cout <<
"rms ped at eta:"<< eta<<
" ="<< EBitem.rms_x12 << std::endl;
495 peds->insert(std::make_pair(ebdetid.
rawId(),EBitem));
506 peds->insert(std::make_pair(eedetidpos.
rawId(),EEitem));
511 peds->insert(std::make_pair(eedetidneg.
rawId(),EEitem));
522 std::auto_ptr<EcalWeightXtalGroups>
525 std::auto_ptr<EcalWeightXtalGroups> xtalGroups = std::auto_ptr<EcalWeightXtalGroups>(
new EcalWeightXtalGroups() );
528 if(ieta==0)
continue;
535 xtalGroups->setValue(ebid.
rawId(), defaultGroupId );
546 xtalGroups->setValue(eedetidpos.
rawId(), defaultGroupId );
551 xtalGroups->setValue(eedetidneg.
rawId(), defaultGroupId );
559 std::auto_ptr<EcalLinearCorrections>
562 std::auto_ptr<EcalLinearCorrections> ical = std::auto_ptr<EcalLinearCorrections>(
new EcalLinearCorrections() );
565 if(ieta==0)
continue;
569 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
572 pairAPDPN.
p1 = linCorrMean_ + r*linCorrSigma_;
573 pairAPDPN.
p2 = linCorrMean_ + r*linCorrSigma_;
574 pairAPDPN.
p3 = linCorrMean_ + r*linCorrSigma_;
575 ical->setValue( ebid, pairAPDPN );
584 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
588 pairAPDPN.
p1 = linCorrMean_ + r*linCorrSigma_;
589 pairAPDPN.
p2 = linCorrMean_ + r*linCorrSigma_;
590 pairAPDPN.
p3 = linCorrMean_ + r*linCorrSigma_;
592 ical->setValue( eedetidpos, pairAPDPN );
596 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
600 pairAPDPN.
p1 = linCorrMean_ + r1*linCorrSigma_;
601 pairAPDPN.
p2 = linCorrMean_ + r1*linCorrSigma_;
602 pairAPDPN.
p3 = linCorrMean_ + r1*linCorrSigma_;
604 ical->setValue( eedetidneg, pairAPDPN );
611 for(
int i=0;
i<92;
i++){
613 if(linearTime2_ == 0 ){
618 if(linearTime3_ == 0 ){
624 ical->setTime(
i, TimeStamp );
633 std::auto_ptr<EcalIntercalibConstants>
636 std::auto_ptr<EcalIntercalibConstants> ical = std::auto_ptr<EcalIntercalibConstants>(
new EcalIntercalibConstants() );
639 if(ieta==0)
continue;
645 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
646 ical->setValue( ebid.
rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
656 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
658 ical->setValue( eedetidpos.
rawId(), intercalibConstantMean_ + r*intercalibConstantSigma_ );
662 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
664 ical->setValue( eedetidneg.
rawId(), intercalibConstantMean_ + r1*intercalibConstantSigma_ );
672 std::auto_ptr<EcalIntercalibConstantsMC>
675 std::auto_ptr<EcalIntercalibConstantsMC> ical = std::auto_ptr<EcalIntercalibConstantsMC>(
new EcalIntercalibConstantsMC() );
678 if(ieta==0)
continue;
684 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
685 ical->setValue( ebid.
rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
695 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
697 ical->setValue( eedetidpos.
rawId(), intercalibConstantMeanMC_ + r*intercalibConstantSigmaMC_ );
701 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
703 ical->setValue( eedetidneg.
rawId(), intercalibConstantMeanMC_ + r1*intercalibConstantSigmaMC_ );
711 std::auto_ptr<EcalIntercalibErrors>
714 std::auto_ptr<EcalIntercalibErrors> ical = std::auto_ptr<EcalIntercalibErrors>(
new EcalIntercalibErrors() );
717 if(ieta==0)
continue;
723 ical->setValue( ebid.
rawId(), intercalibErrorMean_);
734 ical->setValue( eedetidpos.
rawId(), intercalibErrorMean_ );
739 ical->setValue( eedetidneg.
rawId(), intercalibErrorMean_ );
747 std::auto_ptr<EcalTimeCalibConstants>
750 std::auto_ptr<EcalTimeCalibConstants> ical = std::auto_ptr<EcalTimeCalibConstants>(
new EcalTimeCalibConstants() );
753 if(ieta==0)
continue;
759 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
760 ical->setValue( ebid.
rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
770 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
772 ical->setValue( eedetidpos.
rawId(), timeCalibConstantMean_ + r*timeCalibConstantSigma_ );
776 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
778 ical->setValue( eedetidneg.
rawId(), timeCalibConstantMean_ + r1*timeCalibConstantSigma_ );
786 std::auto_ptr<EcalTimeCalibErrors>
789 std::auto_ptr<EcalTimeCalibErrors> ical = std::auto_ptr<EcalTimeCalibErrors>(
new EcalTimeCalibErrors() );
792 if(ieta==0)
continue;
798 ical->setValue( ebid.
rawId(), timeCalibErrorMean_);
809 ical->setValue( eedetidpos.
rawId(), timeCalibErrorMean_ );
814 ical->setValue( eedetidneg.
rawId(), timeCalibErrorMean_ );
822 std::auto_ptr<EcalTimeOffsetConstant>
825 std::cout <<
" produceEcalTimeOffsetConstant: " << std::endl;
826 std::cout <<
" EB " << timeOffsetEBConstant_ <<
" EE " << timeOffsetEEConstant_<< std::endl;
827 return std::auto_ptr<EcalTimeOffsetConstant>(
new EcalTimeOffsetConstant(timeOffsetEBConstant_,timeOffsetEEConstant_) );
830 std::auto_ptr<EcalGainRatios>
833 std::auto_ptr<EcalGainRatios> gratio = std::auto_ptr<EcalGainRatios>(
new EcalGainRatios() );
836 gr.setGain6Over1( gainRatio6over1_ );
839 if(ieta==0)
continue;
844 gratio->setValue( ebid.
rawId(), gr );
855 gratio->setValue( eedetidpos.
rawId(), gr );
860 gratio->setValue( eedetidneg.
rawId(), gr );
868 std::auto_ptr<EcalADCToGeVConstant>
871 return std::auto_ptr<EcalADCToGeVConstant>(
new EcalADCToGeVConstant(adcToGeVEBConstant_,adcToGeVEEConstant_) );
874 std::auto_ptr<EcalTBWeights>
878 std::auto_ptr<EcalTBWeights> tbwgt = std::auto_ptr<EcalTBWeights>(
new EcalTBWeights() );
885 for(
int itdc=1; itdc<=nTDCbins_; ++itdc) {
916 mat1.Place_in_row(amplWeights_[itdc-1],0,0);
917 mat1.Place_in_row(pedWeights_[itdc-1],1,0);
918 mat1.Place_in_row(jittWeights_[itdc-1],2,0);
921 mat2.Place_in_row(amplWeightsAft_[itdc-1],0,0);
922 mat2.Place_in_row(pedWeightsAft_[itdc-1],1,0);
923 mat2.Place_in_row(jittWeightsAft_[itdc-1],2,0);
929 mat3=chi2Matrix_[itdc-1];
930 mat4=chi2MatrixAft_[itdc-1];
955 tbwgt->setValue(std::make_pair(igrp,itdc), wgt);
963 std::auto_ptr<EcalClusterLocalContCorrParameters>
967 for (
size_t i = 0;
i < localContCorrParameters_.size(); ++
i ) {
968 ipar->params().push_back( localContCorrParameters_[
i] );
972 std::auto_ptr<EcalClusterCrackCorrParameters>
976 for (
size_t i = 0;
i < crackCorrParameters_.size(); ++
i ) {
977 ipar->params().push_back( crackCorrParameters_[
i] );
981 std::auto_ptr<EcalClusterEnergyCorrectionParameters>
985 for (
size_t i = 0;
i < energyCorrectionParameters_.size(); ++
i ) {
986 ipar->params().push_back( energyCorrectionParameters_[
i] );
990 std::auto_ptr<EcalClusterEnergyUncertaintyParameters>
994 for (
size_t i = 0;
i < energyUncertaintyParameters_.size(); ++
i ) {
995 ipar->params().push_back( energyUncertaintyParameters_[
i] );
999 std::auto_ptr<EcalClusterEnergyCorrectionObjectSpecificParameters>
1003 for (
size_t i = 0;
i < energyCorrectionObjectSpecificParameters_.size(); ++
i ) {
1004 ipar->params().push_back( energyCorrectionObjectSpecificParameters_[
i] );
1011 std::auto_ptr<EcalLaserAlphas>
1015 std::cout <<
" produceEcalLaserAlphas " << std::endl;
1016 std::auto_ptr<EcalLaserAlphas> ical = std::auto_ptr<EcalLaserAlphas>(
new EcalLaserAlphas() );
1017 if(getLaserAlphaFromFile_) {
1018 std::ifstream fEB(
edm::FileInPath(EBLaserAlphaFile_).fullPath().c_str());
1019 int SMpos[36] = {-10, 4, -7, -16, 6, -9, 11, -17, 5, 18, 3, -8, 1, -3, -13, 14, -6, 2,
1020 15, -18, 8, 17, -2, 9, -1, 10, -5, 7, -12, -11, 16, -4, -15, -14, 12, 13};
1022 int SMCal[36] = {12,17,10, 1, 8, 4,27,20,23,25, 6,34,35,15,18,30,21, 9,
1023 24,22,13,31,26,16, 2,11, 5, 0,29,28,14,33,32, 3, 7,19};
1030 for(
int SMcons = 0; SMcons < 36; SMcons++) {
1031 int SM = SMpos[SMcons];
1032 if(SM < 0) SM = 17 +
abs(SM);
1034 if(SMCal[SM] != SMcons)
1035 std::cout <<
" SM pb : read SM " << SMcons<<
" SMpos " << SM
1036 <<
" SMCal " << SMCal[SM] << std::endl;
1040 int readSM,
pos, bar, bar2;
1042 for(
int SMcons = 0; SMcons < 36; SMcons++) {
1043 int SM = SMpos[SMcons];
1044 for(
int ic = 0; ic < 1700; ic++) {
1045 fEB >> readSM >> pos >> bar >> bar2 >> type >>
batch;
1048 if(readSM != SMcons || pos != ic + 1)
1049 std::cout <<
" barrel read pb read SM " << readSM <<
" const SM " << SMcons
1050 <<
" read pos " << pos <<
" ic " << ic << std::endl;
1051 if(SM < 0) SM = 18 +
abs(SM);
1053 if(bar == 33101 || bar == 30301 )
1055 else if(bar == 33106) {
1059 std::cout <<
" problem with barcode first " << bar <<
" last " << bar2
1060 <<
" read SM " << readSM <<
" read pos " << pos << std::endl;
1064 ical->setValue( ebdetid, alpha );
1070 if(ieta==0)
continue;
1074 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1075 ical->setValue( ebid, laserAlphaMean_ + r*laserAlphaSigma_ );
1081 std::cout <<
" produceEcalLaserAlphas EE" << std::endl;
1082 if(getLaserAlphaFromFile_) {
1083 std::ifstream fEE(
edm::FileInPath(EELaserAlphaFile_).fullPath().c_str());
1084 int check[101][101];
1085 for(
int x = 1;
x < 101;
x++)
1086 for(
int y = 1;
y < 101;
y++)
1088 for(
int crystal = 0; crystal < 14648; crystal++) {
1089 int x,
y ,
z, bid, bar, bar2;
1090 float LY,
alpha = 0;
1091 fEE >> z >> x >> y >> LY >> bid >> bar >> bar2;
1092 if(x < 1 || x > 100 || y < 1 || y > 100)
1093 std::cout <<
" wrong coordinates for barcode " << bar
1094 <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1096 if(z == 1) check[
x][
y] = 1;
1097 else check[
x][
y] = 0;
1098 if(bar == 33201 || (bar == 30399 && bar2 < 568))
1100 else if((bar == 33106 && bar2 > 2000 && bar2 < 4669)
1101 || (bar == 30399 && bar2 > 567))
1104 std::cout <<
" problem with barcode " << bar <<
" " << bar2
1105 <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1111 ical->setValue( eedetidpos, alpha );
1114 std::cout <<
" problem with EEDetId " <<
" x " << x <<
" y " << y <<
" z " << z << std::endl;
1116 for(
int x = 1;
x < 101;
x++)
1117 for(
int y = 1;
y < 101;
y++)
1118 if(check[
x][
y] == 1)
std::cout <<
" missing x " <<
x <<
" y " <<
y << std::endl;
1125 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1127 ical->setValue( eedetidpos, laserAlphaMean_ + r*laserAlphaSigma_ );
1131 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1133 ical->setValue( eedetidneg, laserAlphaMean_ + r1*laserAlphaSigma_ );
1143 std::auto_ptr<EcalLaserAPDPNRatiosRef>
1146 std::auto_ptr<EcalLaserAPDPNRatiosRef> ical = std::auto_ptr<EcalLaserAPDPNRatiosRef>(
new EcalLaserAPDPNRatiosRef() );
1148 if(ieta==0)
continue;
1152 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1153 ical->setValue( ebid, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1162 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1164 ical->setValue( eedetidpos, laserAPDPNRefMean_ + r*laserAPDPNRefSigma_ );
1168 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1170 ical->setValue( eedetidneg, laserAPDPNRefMean_ + r1*laserAPDPNRefSigma_ );
1179 std::auto_ptr<EcalLaserAPDPNRatios>
1187 std::auto_ptr<EcalLaserAPDPNRatios> ical = std::auto_ptr<EcalLaserAPDPNRatios>(
new EcalLaserAPDPNRatios() );
1189 if(ieta==0)
continue;
1197 std::cout<<
"EB at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1202 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1205 pairAPDPN.
p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1206 pairAPDPN.
p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1207 pairAPDPN.
p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1208 ical->setValue( ebid, pairAPDPN );
1222 double r = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1232 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1236 pairAPDPN.
p1 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1237 pairAPDPN.
p2 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1238 pairAPDPN.
p3 = laserAPDPNMean_*drop + r*laserAPDPNSigma_;
1239 ical->setValue( eedetidpos, pairAPDPN );
1243 double r1 = (double)
std::rand()/( double(RAND_MAX)+double(1) );
1246 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
1249 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" dropping by "<<drop<<std::endl;
1253 pairAPDPN.
p1 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1254 pairAPDPN.
p2 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1255 pairAPDPN.
p3 = laserAPDPNMean_*drop + r1*laserAPDPNSigma_;
1256 ical->setValue( eedetidneg, pairAPDPN );
1263 for(
int i=0;
i<92;
i++){
1265 if(laserAPDPNTime2_ == 0 ){
1270 if(laserAPDPNTime3_ == 0 ){
1276 ical->setTime(
i, TimeStamp );
1287 std::vector < std::vector<double> > amplwgtv(nTDCbins_);
1289 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1291 std::vector<double> vampl;
1293 vampl.push_back( -0.33333 );
1294 vampl.push_back( -0.33333 );
1295 vampl.push_back( -0.33333 );
1296 vampl.push_back( 0. );
1297 vampl.push_back( 0. );
1298 vampl.push_back( 1. );
1299 vampl.push_back( 0. );
1300 vampl.push_back( 0. );
1301 vampl.push_back( 0. );
1302 vampl.push_back( 0. );
1305 else if (getWeightsFromFile_)
1308 std::ifstream amplFile(
edm::FileInPath(amplWeightsFile_).fullPath().c_str());
1310 while (!amplFile.eof() && tdcBin < nTDCbins_)
1312 for(
int j = 0;
j < 10; ++
j) {
1315 amplwgtv[tdcBin].push_back(ww);
1319 assert (tdcBin == nTDCbins_);
1325 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1330 for (
int i=0;
i<nTDCbins_;
i++)
1332 assert(amplwgtv[
i].
size() == 10);
1334 for(std::vector<double>::const_iterator it = amplwgtv[
i].
begin(); it != amplwgtv[
i].end(); ++it)
1336 (amplWeights_[
i])[j]=*it;
1342 std::vector < std::vector<double> > amplwgtvAftGain(nTDCbins_);
1344 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1346 std::vector<double> vamplAftGain;
1347 vamplAftGain.push_back( 0. );
1348 vamplAftGain.push_back( 0. );
1349 vamplAftGain.push_back( 0. );
1350 vamplAftGain.push_back( 0. );
1351 vamplAftGain.push_back( 0. );
1352 vamplAftGain.push_back( 1. );
1353 vamplAftGain.push_back( 0. );
1354 vamplAftGain.push_back( 0. );
1355 vamplAftGain.push_back( 0. );
1356 vamplAftGain.push_back( 0. );
1357 amplwgtvAftGain[0] = ps.
getUntrackedParameter< std::vector<double> >(
"amplWeightsAftGain", vamplAftGain);
1359 else if (getWeightsFromFile_)
1363 std::ifstream amplFile(
edm::FileInPath(amplWeightsAftFile_).fullPath().c_str());
1365 while (!amplFile.eof() && tdcBin < nTDCbins_)
1367 for(
int j = 0;
j < 10; ++
j) {
1370 amplwgtvAftGain[tdcBin].push_back(ww);
1374 assert (tdcBin == nTDCbins_);
1379 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1383 for (
int i=0;
i<nTDCbins_;
i++)
1385 assert(amplwgtvAftGain[
i].
size() == 10);
1387 for(std::vector<double>::const_iterator it = amplwgtvAftGain[
i].
begin(); it != amplwgtvAftGain[
i].end(); ++it) {
1388 (amplWeightsAft_[
i])[j]=*it;
1395 std::vector< std::vector<double> > pedwgtv(nTDCbins_);
1397 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1399 std::vector<double> vped;
1400 vped.push_back( 0.33333 );
1401 vped.push_back( 0.33333 );
1402 vped.push_back( 0.33333 );
1403 vped.push_back( 0. );
1404 vped.push_back( 0. );
1405 vped.push_back( 0. );
1406 vped.push_back( 0. );
1407 vped.push_back( 0. );
1408 vped.push_back( 0. );
1409 vped.push_back( 0. );
1412 else if (getWeightsFromFile_)
1416 std::ifstream pedFile(
edm::FileInPath(pedWeightsFile_).fullPath().c_str());
1418 while (!pedFile.eof() && tdcBin < nTDCbins_)
1420 for(
int j = 0;
j < 10; ++
j) {
1423 pedwgtv[tdcBin].push_back(ww);
1427 assert (tdcBin == nTDCbins_);
1432 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1436 for (
int i=0;
i<nTDCbins_;
i++)
1438 assert(pedwgtv[
i].
size() == 10);
1440 for(std::vector<double>::const_iterator it = pedwgtv[
i].
begin(); it != pedwgtv[
i].end(); ++it) {
1441 (pedWeights_[
i])[j] = *it;
1446 std::vector< std::vector<double> > pedwgtvaft(nTDCbins_);
1448 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1450 std::vector<double> vped;
1451 vped.push_back( 0. );
1452 vped.push_back( 0. );
1453 vped.push_back( 0. );
1454 vped.push_back( 0. );
1455 vped.push_back( 0. );
1456 vped.push_back( 0. );
1457 vped.push_back( 0. );
1458 vped.push_back( 0. );
1459 vped.push_back( 0. );
1460 vped.push_back( 0. );
1463 else if (getWeightsFromFile_)
1467 std::ifstream pedFile(
edm::FileInPath(pedWeightsAftFile_).fullPath().c_str());
1469 while (!pedFile.eof() && tdcBin < nTDCbins_)
1471 for(
int j = 0;
j < 10; ++
j) {
1474 pedwgtvaft[tdcBin].push_back(ww);
1478 assert (tdcBin == nTDCbins_);
1483 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1487 for (
int i=0;
i<nTDCbins_;
i++)
1489 assert(pedwgtvaft[
i].
size() == 10);
1491 for(std::vector<double>::const_iterator it = pedwgtvaft[
i].
begin(); it != pedwgtvaft[
i].end(); ++it) {
1492 (pedWeightsAft_[
i])[j]=*it;
1501 std::vector< std::vector<double> > jittwgtv(nTDCbins_);
1503 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1505 std::vector<double> vjitt;
1506 vjitt.push_back( 0.04066309 );
1507 vjitt.push_back( 0.04066309 );
1508 vjitt.push_back( 0.04066309 );
1509 vjitt.push_back( 0.000 );
1510 vjitt.push_back( 1.325176 );
1511 vjitt.push_back( -0.04997078 );
1512 vjitt.push_back( -0.504338 );
1513 vjitt.push_back( -0.5024844 );
1514 vjitt.push_back( -0.3903718 );
1515 vjitt.push_back( 0.000 );
1518 else if (getWeightsFromFile_)
1522 std::ifstream jittFile(
edm::FileInPath(jittWeightsFile_).fullPath().c_str());
1524 while (!jittFile.eof() && tdcBin < nTDCbins_)
1526 for(
int j = 0;
j < 10; ++
j) {
1529 jittwgtv[tdcBin].push_back(ww);
1533 assert (tdcBin == nTDCbins_);
1538 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1542 for (
int i=0;
i<nTDCbins_;
i++)
1544 assert(jittwgtv[
i].
size() == 10);
1546 for(std::vector<double>::const_iterator it = jittwgtv[
i].
begin(); it != jittwgtv[
i].end(); ++it) {
1547 (jittWeights_[
i])[j]= *it;
1552 std::vector< std::vector<double> > jittwgtvaft(nTDCbins_);
1554 if (!getWeightsFromFile_ && nTDCbins_ == 1)
1556 std::vector<double> vjitt;
1557 vjitt.push_back( 0. );
1558 vjitt.push_back( 0. );
1559 vjitt.push_back( 0. );
1560 vjitt.push_back( 0. );
1561 vjitt.push_back( 1.097871 );
1562 vjitt.push_back( -0.04551035 );
1563 vjitt.push_back( -0.4159156 );
1564 vjitt.push_back( -0.4185352 );
1565 vjitt.push_back( -0.3367127 );
1566 vjitt.push_back( 0. );
1569 else if (getWeightsFromFile_)
1573 std::ifstream jittFile(
edm::FileInPath(jittWeightsAftFile_).fullPath().c_str());
1575 while (!jittFile.eof() && tdcBin < nTDCbins_)
1577 for(
int j = 0;
j < 10; ++
j) {
1580 jittwgtvaft[tdcBin].push_back(ww);
1584 assert (tdcBin == nTDCbins_);
1589 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1593 for (
int i=0;
i<nTDCbins_;
i++)
1595 assert(jittwgtvaft[
i].
size() == 10);
1597 for(std::vector<double>::const_iterator it = jittwgtvaft[
i].
begin(); it != jittwgtvaft[
i].end(); ++it) {
1598 (jittWeightsAft_[
i])[j]= *it;
1604 std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2Matrix(nTDCbins_);
1605 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1611 chi2Matrix[0](0,0) = 0.694371;
1612 chi2Matrix[0](0,1) = -0.305629;
1613 chi2Matrix[0](0,2) = -0.305629;
1614 chi2Matrix[0](0,3) = 0.;
1615 chi2Matrix[0](0,4) = 0.;
1616 chi2Matrix[0](0,5) = 0.;
1617 chi2Matrix[0](0,6) = 0.;
1618 chi2Matrix[0](0,7) = 0.;
1619 chi2Matrix[0](0,8) = 0.;
1620 chi2Matrix[0](0,9) = 0.;
1621 chi2Matrix[0](1,0) = -0.305629;
1622 chi2Matrix[0](1,1) = 0.694371;
1623 chi2Matrix[0](1,2) = -0.305629;
1624 chi2Matrix[0](1,3) = 0.;
1625 chi2Matrix[0](1,4) = 0.;
1626 chi2Matrix[0](1,5) = 0.;
1627 chi2Matrix[0](1,6) = 0.;
1628 chi2Matrix[0](1,7) = 0.;
1629 chi2Matrix[0](1,8) = 0.;
1630 chi2Matrix[0](1,9) = 0.;
1631 chi2Matrix[0](2,0) = -0.305629;
1632 chi2Matrix[0](2,1) = -0.305629;
1633 chi2Matrix[0](2,2) = 0.694371;
1634 chi2Matrix[0](2,3) = 0.;
1635 chi2Matrix[0](2,4) = 0.;
1636 chi2Matrix[0](2,5) = 0.;
1637 chi2Matrix[0](2,6) = 0.;
1638 chi2Matrix[0](2,7) = 0.;
1639 chi2Matrix[0](2,8) = 0.;
1640 chi2Matrix[0](2,9) = 0.;
1641 chi2Matrix[0](3,0) = 0.;
1642 chi2Matrix[0](3,1) = 0.;
1643 chi2Matrix[0](3,2) = 0.;
1644 chi2Matrix[0](3,3) = 0.;
1645 chi2Matrix[0](3,4) = 0.;
1646 chi2Matrix[0](3,5) = 0.;
1647 chi2Matrix[0](3,6) = 0.;
1648 chi2Matrix[0](3,7) = 0.;
1649 chi2Matrix[0](3,8) = 0.;
1650 chi2Matrix[0](3,9) = 0.;
1651 chi2Matrix[0](4,0) = 0.;
1652 chi2Matrix[0](4,1) = 0.;
1653 chi2Matrix[0](4,2) = 0.;
1654 chi2Matrix[0](4,3) = 0.;
1655 chi2Matrix[0](4,4) = 0.8027116;
1656 chi2Matrix[0](4,5) = -0.2517103;
1657 chi2Matrix[0](4,6) = -0.2232882;
1658 chi2Matrix[0](4,7) = -0.1716192;
1659 chi2Matrix[0](4,8) = -0.1239006;
1660 chi2Matrix[0](4,9) = 0.;
1661 chi2Matrix[0](5,0) = 0.;
1662 chi2Matrix[0](5,1) = 0.;
1663 chi2Matrix[0](5,2) = 0.;
1664 chi2Matrix[0](5,3) = 0.;
1665 chi2Matrix[0](5,4) = -0.2517103;
1666 chi2Matrix[0](5,5) = 0.6528964;
1667 chi2Matrix[0](5,6) = -0.2972839;
1668 chi2Matrix[0](5,7) = -0.2067162;
1669 chi2Matrix[0](5,8) = -0.1230729;
1670 chi2Matrix[0](5,9) = 0.;
1671 chi2Matrix[0](6,0) = 0.;
1672 chi2Matrix[0](6,1) = 0.;
1673 chi2Matrix[0](6,2) = 0.;
1674 chi2Matrix[0](6,3) = 0.;
1675 chi2Matrix[0](6,4) = -0.2232882;
1676 chi2Matrix[0](6,5) = -0.2972839;
1677 chi2Matrix[0](6,6) = 0.7413607;
1678 chi2Matrix[0](6,7) = -0.1883866;
1679 chi2Matrix[0](6,8) = -0.1235052;
1680 chi2Matrix[0](6,9) = 0.;
1681 chi2Matrix[0](7,0) = 0.;
1682 chi2Matrix[0](7,1) = 0.;
1683 chi2Matrix[0](7,2) = 0.;
1684 chi2Matrix[0](7,3) = 0.;
1685 chi2Matrix[0](7,4) = -0.1716192;
1686 chi2Matrix[0](7,5) = -0.2067162;
1687 chi2Matrix[0](7,6) = -0.1883866;
1688 chi2Matrix[0](7,7) = 0.844935;
1689 chi2Matrix[0](7,8) = -0.124291;
1690 chi2Matrix[0](7,9) = 0.;
1691 chi2Matrix[0](8,0) = 0.;
1692 chi2Matrix[0](8,1) = 0.;
1693 chi2Matrix[0](8,2) = 0.;
1694 chi2Matrix[0](8,3) = 0.;
1695 chi2Matrix[0](8,4) = -0.1239006;
1696 chi2Matrix[0](8,5) = -0.1230729;
1697 chi2Matrix[0](8,6) = -0.1235052;
1698 chi2Matrix[0](8,7) = -0.124291;
1699 chi2Matrix[0](8,8) = 0.8749833;
1700 chi2Matrix[0](8,9) = 0.;
1701 chi2Matrix[0](9,0) = 0.;
1702 chi2Matrix[0](9,1) = 0.;
1703 chi2Matrix[0](9,2) = 0.;
1704 chi2Matrix[0](9,3) = 0.;
1705 chi2Matrix[0](9,4) = 0.;
1706 chi2Matrix[0](9,5) = 0.;
1707 chi2Matrix[0](9,6) = 0.;
1708 chi2Matrix[0](9,7) = 0.;
1709 chi2Matrix[0](9,8) = 0.;
1710 chi2Matrix[0](9,9) = 0.;
1712 else if (getWeightsFromFile_)
1716 std::ifstream chi2MatrixFile(
edm::FileInPath(chi2MatrixFile_).fullPath().c_str());
1718 while (!chi2MatrixFile.eof() && tdcBin < nTDCbins_)
1721 for(
int j = 0;
j < 10; ++
j) {
1722 for(
int l = 0;
l < 10; ++
l) {
1724 chi2MatrixFile >> ww;
1725 chi2Matrix[tdcBin](
j,
l)=ww;
1730 assert (tdcBin == nTDCbins_);
1735 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1742 chi2Matrix_ = chi2Matrix;
1745 std::vector< EcalWeightSet::EcalChi2WeightMatrix > chi2MatrixAft(nTDCbins_);
1746 if (!getWeightsFromFile_ && nTDCbins_ == 1 )
1752 chi2MatrixAft[0](0,0) = 0.;
1753 chi2MatrixAft[0](0,1) = 0.;
1754 chi2MatrixAft[0](0,2) = 0.;
1755 chi2MatrixAft[0](0,3) = 0.;
1756 chi2MatrixAft[0](0,4) = 0.;
1757 chi2MatrixAft[0](0,5) = 0.;
1758 chi2MatrixAft[0](0,6) = 0.;
1759 chi2MatrixAft[0](0,7) = 0.;
1760 chi2MatrixAft[0](0,8) = 0.;
1761 chi2MatrixAft[0](0,9) = 0.;
1762 chi2MatrixAft[0](1,0) = 0.;
1763 chi2MatrixAft[0](1,1) = 0.;
1764 chi2MatrixAft[0](1,2) = 0.;
1765 chi2MatrixAft[0](1,3) = 0.;
1766 chi2MatrixAft[0](1,4) = 0.;
1767 chi2MatrixAft[0](1,5) = 0.;
1768 chi2MatrixAft[0](1,6) = 0.;
1769 chi2MatrixAft[0](1,7) = 0.;
1770 chi2MatrixAft[0](1,8) = 0.;
1771 chi2MatrixAft[0](1,9) = 0.;
1772 chi2MatrixAft[0](2,0) = 0.;
1773 chi2MatrixAft[0](2,1) = 0.;
1774 chi2MatrixAft[0](2,2) = 0.;
1775 chi2MatrixAft[0](2,3) = 0.;
1776 chi2MatrixAft[0](2,4) = 0.;
1777 chi2MatrixAft[0](2,5) = 0.;
1778 chi2MatrixAft[0](2,6) = 0.;
1779 chi2MatrixAft[0](2,7) = 0.;
1780 chi2MatrixAft[0](2,8) = 0.;
1781 chi2MatrixAft[0](2,9) = 0.;
1782 chi2MatrixAft[0](3,0) = 0.;
1783 chi2MatrixAft[0](3,1) = 0.;
1784 chi2MatrixAft[0](3,2) = 0.;
1785 chi2MatrixAft[0](3,3) = 0.;
1786 chi2MatrixAft[0](3,4) = 0.;
1787 chi2MatrixAft[0](3,5) = 0.;
1788 chi2MatrixAft[0](3,6) = 0.;
1789 chi2MatrixAft[0](3,7) = 0.;
1790 chi2MatrixAft[0](3,8) = 0.;
1791 chi2MatrixAft[0](3,9) = 0.;
1792 chi2MatrixAft[0](4,0) = 0.;
1793 chi2MatrixAft[0](4,1) = 0.;
1794 chi2MatrixAft[0](4,2) = 0.;
1795 chi2MatrixAft[0](4,3) = 0.;
1796 chi2MatrixAft[0](4,4) = 0.8030884;
1797 chi2MatrixAft[0](4,5) = -0.2543541;
1798 chi2MatrixAft[0](4,6) = -0.2243544;
1799 chi2MatrixAft[0](4,7) = -0.1698177;
1800 chi2MatrixAft[0](4,8) = -0.1194506;
1801 chi2MatrixAft[0](4,9) = 0.;
1802 chi2MatrixAft[0](5,0) = 0.;
1803 chi2MatrixAft[0](5,1) = 0.;
1804 chi2MatrixAft[0](5,2) = 0.;
1805 chi2MatrixAft[0](5,3) = 0.;
1806 chi2MatrixAft[0](5,4) = -0.2543541;
1807 chi2MatrixAft[0](5,5) = 0.6714465;
1808 chi2MatrixAft[0](5,6) = -0.2898025;
1809 chi2MatrixAft[0](5,7) = -0.2193564;
1810 chi2MatrixAft[0](5,8) = -0.1542964;
1811 chi2MatrixAft[0](5,9) = 0.;
1812 chi2MatrixAft[0](6,0) = 0.;
1813 chi2MatrixAft[0](6,1) = 0.;
1814 chi2MatrixAft[0](6,2) = 0.;
1815 chi2MatrixAft[0](6,3) = 0.;
1816 chi2MatrixAft[0](6,4) = -0.2243544;
1817 chi2MatrixAft[0](6,5) = -0.2898025;
1818 chi2MatrixAft[0](6,6) = 0.7443781;
1819 chi2MatrixAft[0](6,7) = -0.1934846;
1820 chi2MatrixAft[0](6,8) = -0.136098;
1821 chi2MatrixAft[0](6,9) = 0.;
1822 chi2MatrixAft[0](7,0) = 0.;
1823 chi2MatrixAft[0](7,1) = 0.;
1824 chi2MatrixAft[0](7,2) = 0.;
1825 chi2MatrixAft[0](7,3) = 0.;
1826 chi2MatrixAft[0](7,4) = -0.1698177;
1827 chi2MatrixAft[0](7,5) = -0.2193564;
1828 chi2MatrixAft[0](7,6) = -0.1934846;
1829 chi2MatrixAft[0](7,7) = 0.8535482;
1830 chi2MatrixAft[0](7,8) = -0.1030149;
1831 chi2MatrixAft[0](7,9) = 0.;
1832 chi2MatrixAft[0](8,0) = 0.;
1833 chi2MatrixAft[0](8,1) = 0.;
1834 chi2MatrixAft[0](8,2) = 0.;
1835 chi2MatrixAft[0](8,3) = 0.;
1836 chi2MatrixAft[0](8,4) = -0.1194506;
1837 chi2MatrixAft[0](8,5) = -0.1542964;
1838 chi2MatrixAft[0](8,6) = -0.136098;
1839 chi2MatrixAft[0](8,7) = -0.1030149;
1840 chi2MatrixAft[0](8,8) = 0.9275388;
1841 chi2MatrixAft[0](8,9) = 0.;
1842 chi2MatrixAft[0](9,0) = 0.;
1843 chi2MatrixAft[0](9,1) = 0.;
1844 chi2MatrixAft[0](9,2) = 0.;
1845 chi2MatrixAft[0](9,3) = 0.;
1846 chi2MatrixAft[0](9,4) = 0.;
1847 chi2MatrixAft[0](9,5) = 0.;
1848 chi2MatrixAft[0](9,6) = 0.;
1849 chi2MatrixAft[0](9,7) = 0.;
1850 chi2MatrixAft[0](9,8) = 0.;
1851 chi2MatrixAft[0](9,9) = 0.;
1853 else if (getWeightsFromFile_)
1857 std::ifstream chi2MatrixAftFile(
edm::FileInPath(chi2MatrixAftFile_).fullPath().c_str());
1859 while (!chi2MatrixAftFile.eof() && tdcBin < nTDCbins_)
1862 for(
int j = 0;
j < 10; ++
j) {
1863 for(
int l = 0;
l < 10; ++
l) {
1865 chi2MatrixAftFile >> ww;
1866 chi2MatrixAft[tdcBin](
j,
l)=ww;
1871 assert (tdcBin == nTDCbins_);
1876 edm::LogError(
"EcalTrivialConditionRetriever") <<
"Configuration not supported. Exception is raised ";
1883 chi2MatrixAft_ = chi2MatrixAft;
1891 std::auto_ptr<EcalChannelStatus>
1894 std::auto_ptr<EcalChannelStatus> ecalStatus = std::auto_ptr<EcalChannelStatus>(
new EcalChannelStatus() );
1901 if(ieta==0)
continue;
1905 ecalStatus->setValue( ebid, 0 );
1915 ecalStatus->setValue( eedetidpos, 0 );
1919 ecalStatus->setValue( eedetidneg, 0 );
1929 std::ifstream statusFile(
edm::FileInPath(channelStatusFile_).fullPath().c_str());
1930 if ( !statusFile.good() ) {
1932 <<
"*** Problems opening file: " << channelStatusFile_ ;
1941 while (!statusFile.eof())
1943 statusFile >> EcalSubDet;
1946 std::getline(statusFile,str);
1951 statusFile>> hashIndex >>
status;
1958 ecalStatus->setValue( ebid, status );
1963 ecalStatus->setValue( eedetid, status );
1968 <<
" *** " << EcalSubDet <<
" is neither EB nor EE ";
1981 std::auto_ptr<EcalChannelStatus>
1985 std::auto_ptr<EcalChannelStatus> ical = std::auto_ptr<EcalChannelStatus>(
new EcalChannelStatus() );
1988 if(ieta==0)
continue;
1992 ical->setValue( ebid, 0 );
2002 ical->setValue( eedetidpos, 0 );
2006 ical->setValue( eedetidneg, 0 );
2014 std::auto_ptr<EcalDQMChannelStatus>
2019 std::auto_ptr<EcalDQMChannelStatus> ical = std::auto_ptr<EcalDQMChannelStatus>(
new EcalDQMChannelStatus() );
2022 if(ieta==0)
continue;
2026 ical->setValue( ebid, sta );
2036 ical->setValue( eedetidpos, sta );
2040 ical->setValue( eedetidneg, sta );
2048 std::auto_ptr<EcalDQMTowerStatus>
2052 std::auto_ptr<EcalDQMTowerStatus> ical = std::auto_ptr<EcalDQMTowerStatus>(
new EcalDQMTowerStatus() );
2058 for(
int k=0 ;
k<2;
k++ ) {
2061 for(
int i=1 ;
i<73;
i++) {
2062 for(
int j=1 ;
j<18;
j++) {
2066 ical->setValue( ebid, sta );
2074 for(
int k=0 ;
k<2;
k++ ) {
2077 for(
int i=1 ;
i<21;
i++) {
2078 for(
int j=1 ;
j<21;
j++) {
2081 ical->setValue( eeid, sta );
2091 std::auto_ptr<EcalDCSTowerStatus>
2095 std::auto_ptr<EcalDCSTowerStatus> ical = std::auto_ptr<EcalDCSTowerStatus>(
new EcalDCSTowerStatus() );
2101 for(
int k=0 ;
k<2;
k++ ) {
2104 for(
int i=1 ;
i<73;
i++) {
2105 for(
int j=1 ;
j<18;
j++) {
2109 ical->setValue( ebid, status );
2117 for(
int k=0 ;
k<2;
k++ ) {
2120 for(
int i=1 ;
i<21;
i++) {
2121 for(
int j=1 ;
j<21;
j++) {
2124 ical->setValue( eeid, status );
2134 std::auto_ptr<EcalDAQTowerStatus>
2138 std::auto_ptr<EcalDAQTowerStatus> ical = std::auto_ptr<EcalDAQTowerStatus>(
new EcalDAQTowerStatus() );
2144 for(
int k=0 ;
k<2;
k++ ) {
2147 for(
int i=1 ;
i<73;
i++) {
2148 for(
int j=1 ;
j<18;
j++) {
2152 ical->setValue( ebid, status );
2160 for(
int k=0 ;
k<2;
k++ ) {
2163 for(
int i=1 ;
i<21;
i++) {
2164 for(
int j=1 ;
j<21;
j++) {
2167 ical->setValue( eeid, status );
2177 std::auto_ptr<EcalTPGCrystalStatus>
2180 std::auto_ptr<EcalTPGCrystalStatus> ecalStatus = std::auto_ptr<EcalTPGCrystalStatus>(
new EcalTPGCrystalStatus() );
2187 if(ieta==0)
continue;
2191 ecalStatus->setValue( ebid, 0 );
2201 ecalStatus->setValue( eedetidpos, 0 );
2205 ecalStatus->setValue( eedetidneg, 0 );
2215 std::ifstream statusFile(
edm::FileInPath(channelStatusFile_).fullPath().c_str());
2216 if ( !statusFile.good() ) {
2218 <<
"*** Problems opening file: " << channelStatusFile_ ;
2227 while (!statusFile.eof())
2229 statusFile >> EcalSubDet;
2232 std::getline(statusFile,str);
2237 statusFile>> hashIndex >>
status;
2244 ecalStatus->setValue( ebid, status );
2249 ecalStatus->setValue( eedetid, status );
2254 <<
" *** " << EcalSubDet <<
" is neither EB nor EE ";
2267 std::auto_ptr<EcalTPGCrystalStatus>
2271 std::auto_ptr<EcalTPGCrystalStatus> ical = std::auto_ptr<EcalTPGCrystalStatus>(
new EcalTPGCrystalStatus() );
2274 if(ieta==0)
continue;
2278 ical->setValue( ebid, 0 );
2288 ical->setValue( eedetidpos, 0 );
2292 ical->setValue( eedetidneg, 0 );
2302 std::auto_ptr<EcalIntercalibConstants>
2306 std::auto_ptr<EcalIntercalibConstants> ical;
2312 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants from file "
2313 << intercalibConstantsFile_.c_str() ;
2315 if(intercalibConstantsFile_.find(
".xml")!= std::string::npos) {
2317 std::cout<<
"generating Intercalib from xml file"<<std::endl;
2324 if(totLumi_ !=0 || instLumi_!=0) {
2325 std::cout<<
"implementing ageing for intercalib"<<std::endl;
2329 if(intercalibConstantsMCFile_.find(
".xml")!= std::string::npos) {
2331 std::cout<<
"generating IntercalibMC from xml file"<<std::endl;
2337 std::cout<<
"please provide the xml file of the EcalIntercalibConstantsMC"<<std::endl;
2341 TRandom3 * gRandom =
new TRandom3();
2352 if(ieta==0)
continue;
2357 std::cout<<
"EB at eta="<<eta<<
" constant term is "<<constantTerm<<std::endl;
2366 if(idref!=mymap.
end())icalconstant=(*idref);
2370 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2372 double r = gRandom->Gaus(0,constantTerm);
2374 if(iphi==10)
std::cout<<
"EB at eta="<<eta<<
" IC="<<icalconstant<<
" ICMC="<<icalconstantMC<<
" smear="<<r<<
" ";
2376 icalconstant = icalconstant + r*1.29*icalconstantMC;
2379 if(iphi==10)
std::cout<<
"newIC="<<icalconstant<<std::endl;
2382 if(icalconstant !=icalconstant2)
std::cout<<
">>>> error in smearing intercalib"<<std::endl;
2394 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2397 if(iX==50)
std::cout<<
"EE at eta="<<eta<<
" constant term is "<<constantTerm<<std::endl;
2404 if(idref!=mymap.
end())icalconstant=(*idref);
2408 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2410 double r = gRandom->Gaus(0,constantTerm);
2412 if(iX==10)
std::cout<<
"EE at eta="<<eta<<
" IC="<<icalconstant<<
" ICMC="<<icalconstantMC<<
" smear="<<r<<
" ";
2413 icalconstant = icalconstant + r*1.29*icalconstantMC;
2415 if(iX==10)
std::cout<<
"newIC="<<icalconstant<<std::endl;
2424 double eta= -
log(
tan(0.5*atan(
sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
2433 if(idrefMC!=mymapMC.
end())icalconstantMC=(*idrefMC);
2435 double r = gRandom->Gaus(0,constantTerm);
2436 icalconstant = icalconstant + r*1.29*icalconstantMC;
2444 ical = std::auto_ptr<EcalIntercalibConstants> (rcd);
2456 inpFile = fopen (intercalibConstantsFile_.c_str (),
"r") ;
2460 <<
"*** Can not open file: " << intercalibConstantsFile_ ;
2461 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2465 std::ostringstream str ;
2466 fgets (line,255,inpFile) ;
2467 int sm_number=atoi (line) ;
2468 str <<
"sm: " << sm_number ;
2470 fgets (line,255,inpFile) ;
2473 fgets (line,255,inpFile) ;
2475 str <<
"gen tag: " << gen_tag ;
2477 fgets (line,255,inpFile) ;
2479 str <<
"cali method: " << cali_method << std::endl ;
2481 fgets (line,255,inpFile) ;
2483 str <<
"cali version: " << cali_version << std::endl ;
2485 fgets (line,255,inpFile) ;
2487 str <<
"cali type: " << cali_type ;
2490 <<
"[PIETRO] Intercalibration file - "
2491 << str.str () << std::endl ;
2493 float calib[1700]={1} ;
2494 int calib_status[1700]={0} ;
2498 while (fgets (line,255,inpFile))
2502 float dmy_calib = 0. ;
2503 float dmy_RMS = 0. ;
2504 int dmy_events = 0 ;
2505 int dmy_status = 0 ;
2506 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2507 &dmy_RMS, &dmy_events,
2509 assert (dmy_num >= 1) ;
2510 assert (dmy_num <= 1700) ;
2511 calib[dmy_num-1] = dmy_calib ;
2512 calib_status[dmy_num-1] = dmy_status ;
2524 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read intercalibrations for " << ii <<
" xtals " ;
2526 <<
"Some crystals missing, set to 1" << std::endl ;
2534 for (
int i=0 ;
i<1700 ;
i++)
2545 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2546 else ical->setValue (ebid.
rawId (), 1.) ;
2561 std::auto_ptr<EcalIntercalibConstantsMC>
2565 std::auto_ptr<EcalIntercalibConstantsMC> ical;
2571 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants MC from file "
2572 << intercalibConstantsMCFile_.c_str() ;
2574 if(intercalibConstantsMCFile_.find(
".xml")!= std::string::npos) {
2576 std::cout<<
"generating Intercalib MC from xml file"<<std::endl;
2582 ical = std::auto_ptr<EcalIntercalibConstants> (rcd);
2586 std::cout <<
"ERROR>>> please provide a xml file"<<std::endl;
2595 std::auto_ptr<EcalIntercalibErrors>
2599 std::auto_ptr<EcalIntercalibErrors> ical =
2605 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading intercalibration constants from file "
2606 << intercalibErrorsFile_.c_str() ;
2609 inpFile = fopen (intercalibErrorsFile_.c_str (),
"r") ;
2613 <<
"*** Can not open file: " << intercalibErrorsFile_ ;
2614 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2618 std::ostringstream str ;
2619 fgets (line,255,inpFile) ;
2620 int sm_number=atoi (line) ;
2621 str <<
"sm: " << sm_number ;
2623 fgets (line,255,inpFile) ;
2626 fgets (line,255,inpFile) ;
2628 str <<
"gen tag: " << gen_tag ;
2630 fgets (line,255,inpFile) ;
2632 str <<
"cali method: " << cali_method << std::endl ;
2634 fgets (line,255,inpFile) ;
2636 str <<
"cali version: " << cali_version << std::endl ;
2638 fgets (line,255,inpFile) ;
2640 str <<
"cali type: " << cali_type ;
2643 <<
"[PIETRO] Intercalibration file - "
2644 << str.str () << std::endl ;
2646 float calib[1700]={1} ;
2647 int calib_status[1700]={0} ;
2651 while (fgets (line,255,inpFile))
2655 float dmy_calib = 0. ;
2656 float dmy_RMS = 0. ;
2657 int dmy_events = 0 ;
2658 int dmy_status = 0 ;
2659 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2660 &dmy_RMS, &dmy_events,
2662 assert (dmy_num >= 1) ;
2663 assert (dmy_num <= 1700) ;
2664 calib[dmy_num-1] = dmy_calib ;
2665 calib_status[dmy_num-1] = dmy_status ;
2677 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read intercalibrations for " << ii <<
" xtals " ;
2679 <<
"Some crystals missing, set to 1" << std::endl ;
2687 for (
int i=0 ;
i<1700 ;
i++)
2698 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2699 else ical->setValue (ebid.
rawId (), 1.) ;
2716 std::auto_ptr<EcalTimeCalibConstants>
2720 std::auto_ptr<EcalTimeCalibConstants> ical =
2726 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading time calibration constants from file "
2727 << timeCalibConstantsFile_.c_str() ;
2730 inpFile = fopen (timeCalibConstantsFile_.c_str (),
"r") ;
2734 <<
"*** Can not open file: " << timeCalibConstantsFile_ ;
2735 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2739 std::ostringstream str ;
2740 fgets (line,255,inpFile) ;
2741 int sm_number=atoi (line) ;
2742 str <<
"sm: " << sm_number ;
2744 fgets (line,255,inpFile) ;
2747 fgets (line,255,inpFile) ;
2749 str <<
"gen tag: " << gen_tag ;
2751 fgets (line,255,inpFile) ;
2753 str <<
"cali method: " << cali_method << std::endl ;
2755 fgets (line,255,inpFile) ;
2757 str <<
"cali version: " << cali_version << std::endl ;
2759 fgets (line,255,inpFile) ;
2761 str <<
"cali type: " << cali_type ;
2764 <<
"TimeCalibration file - "
2765 << str.str () << std::endl ;
2767 float calib[1700]={1} ;
2768 int calib_status[1700]={0} ;
2772 while (fgets (line,255,inpFile))
2776 float dmy_calib = 0. ;
2777 float dmy_RMS = 0. ;
2778 int dmy_events = 0 ;
2779 int dmy_status = 0 ;
2780 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2781 &dmy_RMS, &dmy_events,
2783 assert (dmy_num >= 1) ;
2784 assert (dmy_num <= 1700) ;
2785 calib[dmy_num-1] = dmy_calib ;
2786 calib_status[dmy_num-1] = dmy_status ;
2798 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read timeCalibrations for " << ii <<
" xtals " ;
2800 <<
"Some crystals missing, set to 1" << std::endl ;
2808 for (
int i=0 ;
i<1700 ;
i++)
2819 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2820 else ical->setValue (ebid.
rawId (), 1.) ;
2830 std::auto_ptr<EcalTimeCalibErrors>
2834 std::auto_ptr<EcalTimeCalibErrors> ical =
2840 edm::LogInfo(
"EcalTrivialConditionRetriever") <<
"Reading timeCalibration constants from file "
2841 << timeCalibErrorsFile_.c_str() ;
2844 inpFile = fopen (timeCalibErrorsFile_.c_str (),
"r") ;
2848 <<
"*** Can not open file: " << timeCalibErrorsFile_ ;
2849 throw cms::Exception (
"Cannot open inter-calibration coefficients txt file") ;
2853 std::ostringstream str ;
2854 fgets (line,255,inpFile) ;
2855 int sm_number=atoi (line) ;
2856 str <<
"sm: " << sm_number ;
2858 fgets (line,255,inpFile) ;
2861 fgets (line,255,inpFile) ;
2863 str <<
"gen tag: " << gen_tag ;
2865 fgets (line,255,inpFile) ;
2867 str <<
"cali method: " << cali_method << std::endl ;
2869 fgets (line,255,inpFile) ;
2871 str <<
"cali version: " << cali_version << std::endl ;
2873 fgets (line,255,inpFile) ;
2875 str <<
"cali type: " << cali_type ;
2878 <<
"TimeCalibration file - "
2879 << str.str () << std::endl ;
2881 float calib[1700]={1} ;
2882 int calib_status[1700]={0} ;
2886 while (fgets (line,255,inpFile))
2890 float dmy_calib = 0. ;
2891 float dmy_RMS = 0. ;
2892 int dmy_events = 0 ;
2893 int dmy_status = 0 ;
2894 sscanf (line,
"%d %f %f %d %d", &dmy_num, &dmy_calib,
2895 &dmy_RMS, &dmy_events,
2897 assert (dmy_num >= 1) ;
2898 assert (dmy_num <= 1700) ;
2899 calib[dmy_num-1] = dmy_calib ;
2900 calib_status[dmy_num-1] = dmy_status ;
2912 edm::LogInfo (
"EcalTrivialConditionRetriever") <<
"Read time calibrations for " << ii <<
" xtals " ;
2914 <<
"Some crystals missing, set to 1" << std::endl ;
2922 for (
int i=0 ;
i<1700 ;
i++)
2933 if (calib_status[
i]) ical->setValue (ebid.
rawId (), calib[
i]) ;
2934 else ical->setValue (ebid.
rawId (), 1.) ;
2945 std::auto_ptr<EcalMappingElectronics>
2948 std::auto_ptr<EcalMappingElectronics> mapping = std::auto_ptr<EcalMappingElectronics>(
new EcalMappingElectronics() );
2954 edm::LogError(
"EcalTrivialConditionRetriever") <<
"File not found";
2963 int dccid, towerid, pseudostrip_in_SC, xtal_in_pseudostrip;
2964 int tccid, tower, pseudostrip_in_TCC, pseudostrip_in_TT;
2969 f >> ix >> iy >> iz >> CL >> dccid >> towerid >> pseudostrip_in_SC >> xtal_in_pseudostrip >> tccid >> tower >>
2970 pseudostrip_in_TCC >> pseudostrip_in_TT ;
2977 EcalElectronicsId elecid(dccid,towerid, pseudostrip_in_SC, xtal_in_pseudostrip);
2983 (*mapping).setValue(detid, aElement);
2992 std::auto_ptr<EcalMappingElectronics>
2996 std::auto_ptr<EcalMappingElectronics> ical = std::auto_ptr<EcalMappingElectronics>(
new EcalMappingElectronics() );
3002 std::auto_ptr<Alignments>
3004 double mytrans[3] = {0., 0., 0.};
3005 double myeuler[3] = {0., 0., 0.};
3007 if(getEBAlignmentFromFile_)
3009 std::vector<AlignTransform> my_align;
3012 for(
int SM = 1 ; SM < 37; SM++ ) {
3015 iphi = 1 + (SM - 19) * 20;
3021 if(getEBAlignmentFromFile_) {
3022 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3023 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3024 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3026 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3027 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3029 my_align.push_back(transform);
3055 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3059 std::auto_ptr<Alignments>
3061 double mytrans[3] = {0., 0., 0.};
3062 double myeuler[3] = {0., 0., 0.};
3064 if(getEEAlignmentFromFile_)
3066 std::vector<AlignTransform> my_align;
3070 for(
int Dee = 0 ; Dee < 4; Dee++ ) {
3072 if(Dee == 1 || Dee == 3)
3077 EEDetId eedetId(ix, iy, side);
3078 if(getEEAlignmentFromFile_) {
3079 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3080 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3081 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3083 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3084 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3086 my_align.push_back(transform);
3090 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3094 std::auto_ptr<Alignments>
3096 double mytrans[3] = {0., 0., 0.};
3097 double myeuler[3] = {0., 0., 0.};
3099 if(getESAlignmentFromFile_)
3101 std::vector<AlignTransform> my_align;
3103 int pl_vect[10] = {2, 2, 1, 1, 1, 1, 2, 2};
3107 for(
int layer = 0 ; layer < 8; layer++ ) {
3109 int ix = 10 + (layer%2) * 20;
3110 int plane = pl_vect[layer];
3111 if(layer > 3) side = 1;
3112 ESDetId esdetId(strip, ix, iy, plane, side);
3113 if(getESAlignmentFromFile_) {
3114 f >> myeuler[0] >> myeuler[1] >> myeuler[2] >> mytrans[0] >> mytrans[1] >> mytrans[2];
3115 std::cout <<
" translation " << mytrans[0] <<
" " << mytrans[1] <<
" " << mytrans[2] <<
"\n"
3116 <<
" euler " << myeuler[0] <<
" " << myeuler[1] <<
" " << myeuler[2] << std::endl;
3118 CLHEP::Hep3Vector translation( mytrans[0], mytrans[1], mytrans[2]);
3119 CLHEP::HepEulerAngles euler( myeuler[0], myeuler[1], myeuler[2]);
3121 my_align.push_back(transform);
3125 std::auto_ptr<Alignments> ical = std::auto_ptr<Alignments>(
new Alignments(a) );
3129 std::auto_ptr<EcalSampleMask>
3132 return std::auto_ptr<EcalSampleMask>(
new EcalSampleMask(sampleMaskEB_, sampleMaskEE_) );
EcalChi2WeightMatrix & getChi2WeightsBeforeGainSwitch()
EcalDAQTowerStatusMap EcalDAQTowerStatus
virtual std::auto_ptr< EcalTimeCalibConstants > produceEcalTimeCalibConstants(const EcalTimeCalibConstantsRcd &)
static bool validDetId(int ix, int iy, int iz)
virtual std::auto_ptr< EcalChannelStatus > produceEcalChannelStatus(const EcalChannelStatusRcd &)
virtual std::auto_ptr< EcalIntercalibConstants > getIntercalibConstantsFromConfiguration(const EcalIntercalibConstantsRcd &)
EcalIntercalibConstantMCMap EcalIntercalibConstantsMC
T getUntrackedParameter(std::string const &, T const &) const
static const int MIN_IPHI
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
virtual std::auto_ptr< EcalClusterCrackCorrParameters > produceEcalClusterCrackCorrParameters(const EcalClusterCrackCorrParametersRcd &)
EcalFunParams EcalClusterCrackCorrParameters
virtual std::auto_ptr< EcalTPGCrystalStatus > produceEcalTrgChannelStatus(const EcalTPGCrystalStatusRcd &)
virtual std::auto_ptr< EcalIntercalibConstantsMC > getIntercalibConstantsMCFromConfiguration(const EcalIntercalibConstantsMCRcd &)
const self & getMap() const
virtual std::auto_ptr< EcalChannelStatus > getChannelStatusFromConfiguration(const EcalChannelStatusRcd &)
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
virtual std::auto_ptr< EcalTBWeights > produceEcalTBWeights(const EcalTBWeightsRcd &)
virtual std::auto_ptr< EcalMappingElectronics > produceEcalMappingElectronics(const EcalMappingElectronicsRcd &)
tuple batch
Use ROOT's batch mode, unless outputting to C macros, since there is a bug in pyROOT that fails to ex...
static const IOVSyncValue & endOfTime()
EcalTimeCalibErrorMap EcalTimeCalibErrors
EcalCondObjectContainer< EcalXtalGroupId > EcalWeightXtalGroups
EcalLaserAPDPNRatiosRefMap EcalLaserAPDPNRatiosRef
std::pair< Time_t, Time_t > ValidityInterval
void getWeightsFromConfiguration(const edm::ParameterSet &ps)
double calcresolutitonConstantTerm(double eta)
static EEDetId unhashIndex(int hi)
virtual std::auto_ptr< EcalPedestals > produceEcalPedestals(const EcalPedestalsRcd &)
virtual std::auto_ptr< EcalLaserAPDPNRatios > produceEcalLaserAPDPNRatios(const EcalLaserAPDPNRatiosRcd &)
EcalTimeDependentCorrections EcalLinearCorrections
std::vector< AlignTransform > m_align
void setInstLumi(double x)
static int readXML(const std::string &filename, EcalCondHeader &header, EcalFloatCondObjectContainer &record)
virtual std::auto_ptr< EcalLaserAlphas > produceEcalLaserAlphas(const EcalLaserAlphasRcd &)
static bool validDetId(int i, int j)
check if a valid index combination
void setGain12Over6(const float &g)
uint32_t rawId() const
get the raw id
virtual std::auto_ptr< EcalTimeCalibConstants > getTimeCalibConstantsFromConfiguration(const EcalTimeCalibConstantsRcd &)
void setValue(const uint32_t id, const Item &item)
virtual std::auto_ptr< EcalDAQTowerStatus > produceEcalDAQTowerStatus(const EcalDAQTowerStatusRcd &)
virtual std::auto_ptr< Alignments > produceEcalAlignmentEE(const EEAlignmentRcd &)
EcalDQMChannelStatusMap EcalDQMChannelStatus
MVATrainerComputer * calib
EcalMappingElectronicsMap EcalMappingElectronics
EcalChannelStatusMap EcalChannelStatus
EcalGainRatioMap EcalGainRatios
virtual std::auto_ptr< EcalADCToGeVConstant > produceEcalADCToGeVConstant(const EcalADCToGeVConstantRcd &)
static const IOVSyncValue & beginOfTime()
virtual std::auto_ptr< EcalClusterLocalContCorrParameters > produceEcalClusterLocalContCorrParameters(const EcalClusterLocalContCorrParametersRcd &)
EcalLaserAlphaMap EcalLaserAlphas
double calcnoiseIncreaseADC(double eta)
EcalDCSTowerStatusMap EcalDCSTowerStatus
EcalDQMTowerStatusMap EcalDQMTowerStatus
virtual std::auto_ptr< EcalWeightXtalGroups > produceEcalWeightXtalGroups(const EcalWeightXtalGroupsRcd &)
const char * name() const
virtual std::auto_ptr< EcalIntercalibErrors > getIntercalibErrorsFromConfiguration(const EcalIntercalibErrorsRcd &)
virtual std::auto_ptr< Alignments > produceEcalAlignmentEB(const EBAlignmentRcd &)
Tan< T >::type tan(const T &t)
EcalTPGCrystalStatusMap EcalTPGCrystalStatus
EcalChi2WeightMatrix & getChi2WeightsAfterGainSwitch()
virtual std::auto_ptr< EcalDQMTowerStatus > produceEcalDQMTowerStatus(const EcalDQMTowerStatusRcd &)
EcalFunParams EcalClusterEnergyCorrectionObjectSpecificParameters
virtual std::auto_ptr< EcalClusterEnergyUncertaintyParameters > produceEcalClusterEnergyUncertaintyParameters(const EcalClusterEnergyUncertaintyParametersRcd &)
virtual std::auto_ptr< EcalMappingElectronics > getMappingFromConfiguration(const EcalMappingElectronicsRcd &)
virtual std::auto_ptr< EcalIntercalibErrors > produceEcalIntercalibErrors(const EcalIntercalibErrorsRcd &)
virtual std::auto_ptr< EcalTimeCalibErrors > produceEcalTimeCalibErrors(const EcalTimeCalibErrorsRcd &)
virtual std::auto_ptr< EcalTPGCrystalStatus > getTrgChannelStatusFromConfiguration(const EcalTPGCrystalStatusRcd &)
virtual std::auto_ptr< EcalClusterEnergyCorrectionParameters > produceEcalClusterEnergyCorrectionParameters(const EcalClusterEnergyCorrectionParametersRcd &)
virtual ~EcalTrivialConditionRetriever()
virtual std::auto_ptr< EcalSampleMask > produceEcalSampleMask(const EcalSampleMaskRcd &)
EcalWeightMatrix & getWeightsAfterGainSwitch()
EcalIntercalibErrorMap EcalIntercalibErrors
math::Matrix< 10, 10 >::type EcalChi2WeightMatrix
EcalFunParams EcalClusterEnergyUncertaintyParameters
virtual std::auto_ptr< EcalDCSTowerStatus > produceEcalDCSTowerStatus(const EcalDCSTowerStatusRcd &)
TimeValue_t value() const
virtual std::auto_ptr< EcalIntercalibConstants > produceEcalIntercalibConstants(const EcalIntercalibConstantsRcd &)
virtual std::auto_ptr< EcalIntercalibConstantsMC > produceEcalIntercalibConstantsMC(const EcalIntercalibConstantsMCRcd &)
EcalPedestalsMap EcalPedestals
static const int MAX_IPHI
EcalWeightMatrix & getWeightsBeforeGainSwitch()
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
EcalTimeCalibConstantMap EcalTimeCalibConstants
static void check(Principal const &p, std::string const &id)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
EcalTrivialConditionRetriever(const edm::ParameterSet &pset)
std::vector< Item >::const_iterator const_iterator
static const int MAX_IETA
virtual std::auto_ptr< EcalLaserAPDPNRatiosRef > produceEcalLaserAPDPNRatiosRef(const EcalLaserAPDPNRatiosRefRcd &)
EcalFunParams EcalClusterLocalContCorrParameters
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
EcalIntercalibConstantMap EcalIntercalibConstants
static bool validDetId(int iz, EcalSubdetector sd, int i, int j)
check if a valid index combination
static Timestamp const & endOfTime()
EcalFunParams EcalClusterEnergyCorrectionParameters
const_iterator find(uint32_t rawId) const
math::Matrix< 3, 10 >::type EcalWeightMatrix
virtual std::auto_ptr< Alignments > produceEcalAlignmentES(const ESAlignmentRcd &)
virtual std::auto_ptr< EcalTimeCalibErrors > getTimeCalibErrorsFromConfiguration(const EcalTimeCalibErrorsRcd &)
const Timestamp & time() const
virtual std::auto_ptr< EcalTimeOffsetConstant > produceEcalTimeOffsetConstant(const EcalTimeOffsetConstantRcd &)
virtual std::auto_ptr< EcalClusterEnergyCorrectionObjectSpecificParameters > produceEcalClusterEnergyCorrectionObjectSpecificParameters(const EcalClusterEnergyCorrectionObjectSpecificParametersRcd &)
virtual std::auto_ptr< EcalLinearCorrections > produceEcalLinearCorrections(const EcalLinearCorrectionsRcd &)
const_iterator end() const
float EcalIntercalibConstantMC
std::string fullPath() const
virtual std::auto_ptr< EcalDQMChannelStatus > produceEcalDQMChannelStatus(const EcalDQMChannelStatusRcd &)
static const int SMCRYSTALMODE
double calcampDropTotal(double eta)
virtual std::auto_ptr< EcalGainRatios > produceEcalGainRatios(const EcalGainRatiosRcd &)
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
tuple size
Write out results.
float EcalIntercalibConstant