54 #include <gsl/gsl_sf_erf.h> 56 #include "CLHEP/Random/RandGaussQ.h" 57 #include "CLHEP/Random/RandFlat.h" 58 #include "CLHEP/Random/RandGeneral.h" 117 if(use_ineff_from_db_){
118 theSiPixelGainCalibrationService_->setESObjects( es );
120 if(use_deadmodule_DB_) {
123 if(use_LorentzAngle_DB_) {
134 quality_map = PixelFEDChannelCollectionMapHandle.product();
137 std::vector<std::string> allScenarios;
141 std::back_inserter(allScenarios),
144 std::vector<std::string> allScenariosInProb;
146 for(
auto it = m_probabilities.begin(); it != m_probabilities.end() ; ++it){
148 for (
const auto &
entry : it->second){
150 auto probability =
entry.second;
152 if(
std::find(allScenariosInProb.begin(), allScenariosInProb.end(),
scenario) == allScenariosInProb.end()) {
153 allScenariosInProb.push_back(
scenario);
160 std::copy_if(allScenariosInProb.begin(), allScenariosInProb.end(), std::back_inserter(notFound),
162 {
return (
std::find(allScenarios.begin(),allScenarios.end(),
arg) == allScenarios.end());});
164 if(!notFound.empty()){
165 for(
const auto &
entry : notFound){
166 edm::LogError(
"SiPixelFEDChannelContainer") <<
"The requested scenario: " <<
entry <<
" is not found in the map!!"<<std::endl;
168 throw cms::Exception(
"SiPixelDigitizerAlgorithm")<<
"Found: " << notFound.size()<<
" missing scenario(s) in SiPixelStatusScenariosRcd while present in SiPixelStatusScenarioProbabilityRcd \n";
176 dbobject_den = SiPixel2DTemp_den.
product();
180 dbobject_num = SiPixel2DTemp_num.
product();
182 int numOfTemplates = dbobject_den->
numOfTempl()+dbobject_num->numOfTempl();
183 templateStores_.reserve(numOfTemplates);
197 makeDigiSimLinks_(conf.getUntrackedParameter<
bool>(
"makeDigiSimLinks",
true)),
198 use_ineff_from_db_(conf.getParameter<
bool>(
"useDB")),
199 use_module_killing_(conf.getParameter<
bool>(
"killModules")),
200 use_deadmodule_DB_(conf.getParameter<
bool>(
"DeadModules_DB")),
201 use_LorentzAngle_DB_(conf.getParameter<
bool>(
"LorentzAngle_DB")),
205 templ2D(templateStores_),
208 IDnum(conf.exists(
"TemplateIDnumerator")?conf.getParameter<
int>(
"TemplateIDnumerator"):0),
209 IDden(conf.exists(
"TemplateIDdenominator")?conf.getParameter<
int>(
"TemplateIDdenominator"):0),
213 GeVperElectron(3.61E-09),
216 alpha2Order(conf.getParameter<
bool>(
"Alpha2Order")),
222 NumberOfBarrelLayers(conf.exists(
"NumPixelBarrel")?conf.getParameter<
int>(
"NumPixelBarrel"):3),
223 NumberOfEndcapDisks(conf.exists(
"NumPixelEndcap")?conf.getParameter<
int>(
"NumPixelEndcap"):2),
230 theElectronPerADC(conf.getParameter<double>(
"ElectronPerAdc")),
234 theAdcFullScale(conf.getParameter<
int>(
"AdcFullScale")),
238 theNoiseInElectrons(conf.getParameter<double>(
"NoiseInElectrons")),
242 theReadoutNoise(conf.getParameter<double>(
"ReadoutNoiseInElec")),
247 theThresholdInE_FPix(conf.getParameter<double>(
"ThresholdInElectrons_FPix")),
248 theThresholdInE_BPix(conf.getParameter<double>(
"ThresholdInElectrons_BPix")),
249 theThresholdInE_BPix_L1(conf.exists(
"ThresholdInElectrons_BPix_L1")?conf.getParameter<double>(
"ThresholdInElectrons_BPix_L1"):theThresholdInE_BPix),
250 theThresholdInE_BPix_L2(conf.exists(
"ThresholdInElectrons_BPix_L2")?conf.getParameter<double>(
"ThresholdInElectrons_BPix_L2"):theThresholdInE_BPix),
253 theThresholdSmearing_FPix(conf.getParameter<double>(
"ThresholdSmearing_FPix")),
254 theThresholdSmearing_BPix(conf.getParameter<double>(
"ThresholdSmearing_BPix")),
255 theThresholdSmearing_BPix_L1(conf.exists(
"ThresholdSmearing_BPix_L1")?conf.getParameter<double>(
"ThresholdSmearing_BPix_L1"):theThresholdSmearing_BPix),
256 theThresholdSmearing_BPix_L2(conf.exists(
"ThresholdSmearing_BPix_L2")?conf.getParameter<double>(
"ThresholdSmearing_BPix_L2"):theThresholdSmearing_BPix),
259 electronsPerVCAL(conf.getParameter<double>(
"ElectronsPerVcal")),
260 electronsPerVCAL_Offset(conf.getParameter<double>(
"ElectronsPerVcal_Offset")),
261 electronsPerVCAL_L1(conf.exists(
"ElectronsPerVcal_L1")?conf.getParameter<double>(
"ElectronsPerVcal_L1"):electronsPerVCAL),
262 electronsPerVCAL_L1_Offset(conf.exists(
"ElectronsPerVcal_L1_Offset")?conf.getParameter<double>(
"ElectronsPerVcal_L1_Offset"):electronsPerVCAL_Offset),
266 theTofLowerCut(conf.getParameter<double>(
"TofLowerCut")),
267 theTofUpperCut(conf.getParameter<double>(
"TofUpperCut")),
270 tanLorentzAnglePerTesla_FPix(use_LorentzAngle_DB_ ? 0.0 : conf.getParameter<double>(
"TanLorentzAnglePerTesla_FPix")),
271 tanLorentzAnglePerTesla_BPix(use_LorentzAngle_DB_ ? 0.0 : conf.getParameter<double>(
"TanLorentzAnglePerTesla_BPix")),
274 FPix_p0(conf.getParameter<double>(
"FPix_SignalResponse_p0")),
275 FPix_p1(conf.getParameter<double>(
"FPix_SignalResponse_p1")),
276 FPix_p2(conf.getParameter<double>(
"FPix_SignalResponse_p2")),
277 FPix_p3(conf.getParameter<double>(
"FPix_SignalResponse_p3")),
279 BPix_p0(conf.getParameter<double>(
"BPix_SignalResponse_p0")),
280 BPix_p1(conf.getParameter<double>(
"BPix_SignalResponse_p1")),
281 BPix_p2(conf.getParameter<double>(
"BPix_SignalResponse_p2")),
282 BPix_p3(conf.getParameter<double>(
"BPix_SignalResponse_p3")),
285 addNoise(conf.getParameter<
bool>(
"AddNoise")),
289 addChargeVCALSmearing(conf.getParameter<
bool>(
"ChargeVCALSmearing")),
292 addNoisyPixels(conf.getParameter<
bool>(
"AddNoisyPixels")),
295 fluctuateCharge(conf.getUntrackedParameter<
bool>(
"FluctuateCharge",
true)),
302 addThresholdSmearing(conf.getParameter<
bool>(
"AddThresholdSmearing")),
305 doMissCalibrate(conf.getParameter<
bool>(
"MissCalibrate")),
306 theGainSmearing(conf.getParameter<double>(
"GainSmearing")),
307 theOffsetSmearing(conf.getParameter<double>(
"OffsetSmearing")),
310 AddPixelAging(conf.getParameter<
bool>(
"DoPixelAging")),
318 tMax(conf.getParameter<double>(
"deltaProductionCut")),
325 pixelAging_(conf,AddPixelAging,NumberOfBarrelLayers,NumberOfEndcapDisks)
327 LogInfo (
"PixelDigitizer ") <<
"SiPixelDigitizerAlgorithm constructed" 328 <<
"Configuration parameters:" 329 <<
"Threshold/Gain = " 330 <<
"threshold in electron FPix = " 332 <<
"threshold in electron BPix = " 334 <<
"threshold in electron BPix Layer1 = " 336 <<
"threshold in electron BPix Layer2 = " 339 <<
" The delta cut-off is set to " <<
tMax 344 std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> >
351 std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> >
calmap;
354 <<
" miss-calibrate the pixel amplitude ";
356 const bool ReadCalParameters =
false;
357 if(ReadCalParameters) {
360 char filename[80] =
"phCalibrationFit_C0.dat";
364 cout <<
" File not found " << endl;
367 cout <<
" file opened : " << filename << endl;
370 for (
int i = 0;
i < 3;
i++) {
371 in_file.getline(line, 500,
'\n');
375 cout <<
" test map" << endl;
381 for(
int i=0;
i<(52*80);
i++) {
382 in_file >> par0 >> par1 >> par2 >> par3 >> name >> colid >> rowid;
384 cerr <<
"Cannot read data file" << endl;
387 if( in_file.eof() != 0 ) {
388 cerr << in_file.eof() <<
" " << in_file.gcount() <<
" " 389 << in_file.fail() <<
" " << in_file.good() <<
" end of file " 405 calmap.insert(std::pair<int,CalParameters>(chan,onePix));
409 if(rowid!=p.first)
cout<<
" wrong channel row "<<rowid<<
" "<<p.first<<endl;
410 if(colid!=p.second)
cout<<
" wrong channel col "<<colid<<
" "<<p.second<<endl;
414 cout <<
" map size " << calmap.size() <<
" max "<<calmap.max_size() <<
" " 415 <<calmap.empty()<< endl;
438 LogDebug (
"PixelDigitizer")<<
"SiPixelDigitizerAlgorithm deleted";
447 if (AddPixelInefficiency){
449 conf.
exists(
"thePixelColEfficiency_BPix1") && conf.
exists(
"thePixelColEfficiency_BPix2") && conf.
exists(
"thePixelColEfficiency_BPix3") &&
450 conf.
exists(
"thePixelColEfficiency_FPix1") && conf.
exists(
"thePixelColEfficiency_FPix2") &&
451 conf.
exists(
"thePixelEfficiency_BPix1") && conf.
exists(
"thePixelEfficiency_BPix2") && conf.
exists(
"thePixelEfficiency_BPix3") &&
452 conf.
exists(
"thePixelEfficiency_FPix1") && conf.
exists(
"thePixelEfficiency_FPix2") &&
453 conf.
exists(
"thePixelChipEfficiency_BPix1") && conf.
exists(
"thePixelChipEfficiency_BPix2") && conf.
exists(
"thePixelChipEfficiency_BPix3") &&
454 conf.
exists(
"thePixelChipEfficiency_FPix1") && conf.
exists(
"thePixelChipEfficiency_FPix2");
455 if (NumberOfBarrelLayers==3) FromConfig = FromConfig && conf.
exists(
"theLadderEfficiency_BPix1") && conf.
exists(
"theLadderEfficiency_BPix2") && conf.
exists(
"theLadderEfficiency_BPix3") &&
456 conf.
exists(
"theModuleEfficiency_BPix1") && conf.
exists(
"theModuleEfficiency_BPix2") && conf.
exists(
"theModuleEfficiency_BPix3") &&
457 conf.
exists(
"thePUEfficiency_BPix1") && conf.
exists(
"thePUEfficiency_BPix2") && conf.
exists(
"thePUEfficiency_BPix3") &&
458 conf.
exists(
"theInnerEfficiency_FPix1") && conf.
exists(
"theInnerEfficiency_FPix2") &&
459 conf.
exists(
"theOuterEfficiency_FPix1") && conf.
exists(
"theOuterEfficiency_FPix2") &&
460 conf.
exists(
"thePUEfficiency_FPix_Inner") && conf.
exists(
"thePUEfficiency_FPix_Outer") &&
461 conf.
exists(
"theInstLumiScaleFactor");
462 if (NumberOfBarrelLayers>=4) FromConfig = FromConfig && conf.
exists(
"thePixelColEfficiency_BPix4") &&
463 conf.
exists(
"thePixelEfficiency_BPix4") && conf.
exists(
"thePixelChipEfficiency_BPix4");
464 if (NumberOfEndcapDisks>=3) FromConfig = FromConfig && conf.
exists(
"thePixelColEfficiency_FPix4") &&
465 conf.
exists(
"thePixelEfficiency_FPix3") && conf.
exists(
"thePixelChipEfficiency_FPix3");
467 LogInfo (
"PixelDigitizer ") <<
"The PixelDigitizer inefficiency configuration is read from the config file.\n";
468 theInstLumiScaleFactor = conf.
getParameter<
double>(
"theInstLumiScaleFactor");
470 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix1");
471 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix2");
472 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix3");
473 if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix4");}
476 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix1");
477 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix2");
478 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix3");
479 if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix4");}
482 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix1");
483 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix2");
484 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix3");
485 if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix4");}
487 if (NumberOfBarrelLayers==3){
489 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix1");
490 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix2");
491 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix3");
492 if ( ((theLadderEfficiency_BPix[0].
size()!=20) || (theLadderEfficiency_BPix[1].
size()!=32) ||
493 (theLadderEfficiency_BPix[2].
size()!=44)) && (NumberOfBarrelLayers==3) )
494 throw cms::Exception(
"Configuration") <<
"Wrong ladder number in efficiency config!";
497 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix1");
498 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix2");
499 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix3");
500 if ( ((theModuleEfficiency_BPix[0].
size()!=4) || (theModuleEfficiency_BPix[1].
size()!=4) ||
501 (theModuleEfficiency_BPix[2].
size()!=4)) && (NumberOfBarrelLayers==3) )
502 throw cms::Exception(
"Configuration") <<
"Wrong module number in efficiency config!";
504 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix1"));
505 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix2"));
506 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix3"));
507 if ( ((thePUEfficiency[0].
empty()) || (thePUEfficiency[1].
empty()) ||
508 (thePUEfficiency[2].
empty())) && (NumberOfBarrelLayers==3) )
509 throw cms::Exception(
"Configuration") <<
"At least one PU efficiency (BPix) number is needed in efficiency config!";
512 if (NumberOfBarrelLayers>=5){
513 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
516 thePixelColEfficiency[j-1]=0.999;
517 thePixelEfficiency[j-1]=0.999;
518 thePixelChipEfficiency[j-1]=0.999;
523 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix1");
524 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix2");
525 if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix3");}
527 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix1");
528 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix2");
529 if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix3");}
531 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix1");
532 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix2");
533 if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix3");}
535 if (NumberOfEndcapDisks>=4){
536 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
539 thePixelColEfficiency[j-1]=0.999;
540 thePixelEfficiency[j-1]=0.999;
541 thePixelChipEfficiency[j-1]=0.999;
545 if (NumberOfBarrelLayers==3){
547 theInnerEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theInnerEfficiency_FPix1");
548 theInnerEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theInnerEfficiency_FPix2");
550 theOuterEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theOuterEfficiency_FPix1");
551 theOuterEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theOuterEfficiency_FPix2");
552 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_FPix_Inner"));
553 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_FPix_Outer"));
554 if ( ((thePUEfficiency[3].
empty()) || (thePUEfficiency[4].
empty())) && (NumberOfEndcapDisks==2) )
555 throw cms::Exception(
"Configuration") <<
"At least one (FPix) PU efficiency number is needed in efficiency config!";
556 pu_scale.resize(thePUEfficiency.size());
559 else LogInfo (
"PixelDigitizer ") <<
"The PixelDigitizer inefficiency configuration is read from the database.\n";
577 const std::map<uint32_t, double>& PixelGeomFactorsDBIn = SiPixelDynamicInefficiency->
getPixelGeomFactors();
578 const std::map<uint32_t, double>& ColGeomFactorsDB = SiPixelDynamicInefficiency->
getColGeomFactors();
579 const std::map<uint32_t, double>& ChipGeomFactorsDB = SiPixelDynamicInefficiency->
getChipGeomFactors();
580 const std::map<uint32_t, std::vector<double> >& PUFactors = SiPixelDynamicInefficiency->
getPUFactors();
581 std::vector<uint32_t > DetIdmasks = SiPixelDynamicInefficiency->
getDetIdmasks();
584 for(
const auto& it_module : geom->
detUnits()) {
585 if( dynamic_cast<PixelGeomDetUnit const*>(it_module)==
nullptr)
continue;
586 const DetId detid = it_module->geographicalId();
587 uint32_t rawid = detid.
rawId();
588 PixelGeomFactors[rawid] = 1;
589 ColGeomFactors[rawid] = 1;
590 ChipGeomFactors[rawid] = 1;
591 PixelGeomFactorsROCStdPixels[rawid] = std::vector<double>(16,1);
592 PixelGeomFactorsROCBigPixels[rawid] = std::vector<double>(16,1);
596 std::map<uint32_t, double> PixelGeomFactorsDB;
600 for (
auto db_factor : PixelGeomFactorsDBIn){
603 unsigned int rocMask = rocIdMaskBits <<
shift;
604 unsigned int rocId = (((db_factor.first) & rocMask) >>
shift);
607 unsigned int rawid = db_factor.first & (~rocMask);
612 double factor = db_factor.second;
613 double badFraction = 1 - factor;
614 double bigPixelFraction =
static_cast<double> (nBigPixelsInROC)/nPixelsInROC;
615 double stdPixelFraction = 1. - bigPixelFraction;
617 double badFractionBig =
std::min(bigPixelFraction, badFraction);
618 double badFractionStd =
std::max(0., badFraction - badFractionBig);
619 double badFractionBigReNormalized = badFractionBig/bigPixelFraction;
620 double badFractionStdReNormalized = badFractionStd/stdPixelFraction;
621 PixelGeomFactorsROCStdPixels[rawid][rocId] *= (1. - badFractionStdReNormalized);
622 PixelGeomFactorsROCBigPixels[rawid][rocId] *= (1. - badFractionBigReNormalized);
625 PixelGeomFactorsDB[db_factor.first] = db_factor.second;
630 PixelGeomFactorsDB = PixelGeomFactorsDBIn;
634 for(
const auto& it_module : geom->
detUnits()) {
635 if( dynamic_cast<PixelGeomDetUnit const*>(it_module)==
nullptr)
continue;
636 const DetId detid = it_module->geographicalId();
637 uint32_t rawid = detid.
rawId();
638 for (
auto db_factor : PixelGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) PixelGeomFactors[rawid] *= db_factor.second;
639 for (
auto db_factor : ColGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) ColGeomFactors[rawid] *= db_factor.second;
640 for (
auto db_factor : ChipGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) ChipGeomFactors[rawid] *= db_factor.second;
646 for (
auto factor : PUFactors) {
648 for(
const auto& it_module : geom->
detUnits()) {
649 if( dynamic_cast<PixelGeomDetUnit const*>(it_module)==
nullptr)
continue;
650 const DetId detid = it_module->geographicalId();
651 if (!
matches(detid, db_id, DetIdmasks))
continue;
652 if (iPU.count(detid.
rawId())) {
653 throw cms::Exception(
"Database")<<
"Multiple db_ids match to same module in SiPixelDynamicInefficiency DB Object";
658 thePUEfficiency.push_back(factor.second);
661 pu_scale.resize(thePUEfficiency.size());
666 for (
size_t i=0;
i<DetIdmasks.size(); ++
i) {
683 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix1");
684 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix2");
685 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix3");
686 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix4");
689 if (NumberOfBarrelLayers>=5){
690 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
693 thePixelPseudoRadDamage[j-1]=0.;
698 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix1");
699 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix2");
700 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix3");
703 if (NumberOfEndcapDisks>=4){
704 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
707 thePixelPseudoRadDamage[j-1]=0.;
717 std::vector<PSimHit>::const_iterator inputEnd,
718 const size_t inputBeginGlobalIndex,
719 const unsigned int tofBin,
723 CLHEP::HepRandomEngine* engine) {
728 size_t simHitGlobalIndex=inputBeginGlobalIndex;
729 for (std::vector<PSimHit>::const_iterator ssbegin = inputBegin; ssbegin != inputEnd; ++ssbegin, ++simHitGlobalIndex) {
731 if((*ssbegin).detUnitId() != detId) {
737 << (*ssbegin).particleType() <<
" " << (*ssbegin).pabs() <<
" " 738 << (*ssbegin).energyLoss() <<
" " << (*ssbegin).tof() <<
" " 739 << (*ssbegin).trackId() <<
" " << (*ssbegin).processType() <<
" " 740 << (*ssbegin).detUnitId()
741 << (*ssbegin).entryPoint() <<
" " << (*ssbegin).exitPoint() ;
745 std::vector<EnergyDepositUnit> ionization_points;
746 std::vector<SignalPoint> collection_points;
753 drift(*ssbegin, pixdet, bfield, tTopo, ionization_points, collection_points);
755 induce_signal(inputBegin, inputEnd, *ssbegin, simHitGlobalIndex, tofBin, pixdet, collection_points);
771 std::vector<int>::const_iterator
pu;
772 std::vector<int>::const_iterator pu0 = bunchCrossing.end();
774 for (pu=bunchCrossing.begin(); pu!=bunchCrossing.end(); ++
pu) {
781 if (pu0!=bunchCrossing.end()) {
784 double instlumi_pow=1.;
788 instlumi_pow*=instlumi;
803 for(
unsigned int i=0;
i<ps.size();
i++)
804 if (ps[
i].getBunchCrossing() == 0)
810 double instlumi_pow=1.;
814 instlumi_pow*=instlumi;
830 const std::vector<PileupSummaryInfo>& ps, CLHEP::HepRandomEngine* engine) {
831 std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ =
nullptr;
834 std::vector<int> bunchCrossing;
835 std::vector<float> TrueInteractionList;
837 for (
unsigned int i = 0;
i < ps.size();
i++) {
838 bunchCrossing.push_back(ps[
i].getBunchCrossing());
839 TrueInteractionList.push_back(ps[
i].getTrueNumInteractions());
843 std::vector<int>::const_iterator
pu;
844 std::vector<int>::const_iterator pu0 = bunchCrossing.end();
846 for (pu = bunchCrossing.begin(); pu != bunchCrossing.end(); ++
pu) {
854 if (pu0 != bunchCrossing.end()) {
855 unsigned int PUBin = TrueInteractionList.at(
p);
857 std::vector<double> probabilities;
858 probabilities.reserve(theProbabilitiesPerScenario.size());
859 for (
auto it = theProbabilitiesPerScenario.begin(); it != theProbabilitiesPerScenario.end(); it++) {
860 probabilities.push_back(it->second);
863 CLHEP::RandGeneral randGeneral(*engine, &(probabilities.front()), probabilities.size());
864 double x = randGeneral.shoot();
865 unsigned int index = x * probabilities.size() - 1;
868 PixelFEDChannelCollection_ = std::make_unique<PixelFEDChannelCollection>(
quality_map->at(scenario));
870 std::make_unique<PixelFEDChannelCollection>(
quality_map->at(scenario));
873 return PixelFEDChannelCollection_;
877 CLHEP::HepRandomEngine* engine) {
880 std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ =
nullptr;
887 std::vector<int>::const_iterator
pu;
888 std::vector<int>::const_iterator pu0 = bunchCrossing.end();
890 for (pu=bunchCrossing.begin(); pu!=bunchCrossing.end(); ++
pu) {
898 if (pu0!=bunchCrossing.end()) {
900 unsigned int PUBin = TrueInteractionList.at(
p);
902 std::vector<double> probabilities;
903 probabilities.reserve(theProbabilitiesPerScenario.size());
904 for (
auto it = theProbabilitiesPerScenario.begin(); it != theProbabilitiesPerScenario.end(); it++){
905 probabilities.push_back(it->second);
908 CLHEP::RandGeneral randGeneral(*engine, &(probabilities.front()), probabilities.size());
909 double x = randGeneral.shoot();
910 unsigned int index = x * probabilities.size() - 1;
913 PixelFEDChannelCollection_ = std::make_unique<PixelFEDChannelCollection>(
quality_map->at(scenario));
917 return PixelFEDChannelCollection_;
922 for(
const auto& det: signalMap) {
923 auto& theSignal =
_signal[det.first];
924 for(
const auto&
chan: det.second) {
932 std::vector<PixelDigi>& digis,
933 std::vector<PixelDigiSimLink>& simlinks,
935 CLHEP::HepRandomEngine* engine) {
949 float thePixelThresholdInE = 0.;
953 int lay = tTopo->
layer(detID);
982 else {
throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;}
989 int numRows = topol->
nrows();
993 <<
" PixelDigitizer " 994 << numColumns <<
" " << numRows <<
" " << moduleThickness;
1015 make_digis(thePixelThresholdInE, detID, pixdet, digis, simlinks, tTopo);
1018 LogDebug (
"PixelDigitizer") <<
"[SiPixelDigitizerAlgorithm] converted " << digis.size() <<
" PixelDigis in DetUnit" << detID;
1029 const float SegmentLength = 0.0010;
1036 float length = direction.
mag();
1038 int NumberOfSegments =
int ( length / SegmentLength);
1039 if(NumberOfSegments < 1) NumberOfSegments = 1;
1043 <<
" enter primary_ionzation " << NumberOfSegments
1051 float* elossVector =
new float[NumberOfSegments];
1058 float momentum = hit.
pabs();
1061 elossVector, engine);
1064 ionization_points.resize( NumberOfSegments);
1067 for (
int i = 0;
i != NumberOfSegments;
i++) {
1070 float((
i+0.5)/NumberOfSegments) * direction;
1078 ionization_points[
i] = edu;
1082 <<
i <<
" " << ionization_points[
i].x() <<
" " 1083 << ionization_points[
i].y() <<
" " 1084 << ionization_points[
i].z() <<
" " 1085 << ionization_points[
i].energy();
1090 delete[] elossVector;
1098 float eloss,
float length,
1099 int NumberOfSegs,
float elossVector[],
1100 CLHEP::HepRandomEngine* engine)
const {
1107 double particleMass = 139.6;
1110 if(pid==11) particleMass = 0.511;
1111 else if(pid==13) particleMass = 105.7;
1112 else if(pid==321) particleMass = 493.7;
1113 else if(pid==2212) particleMass = 938.3;
1116 float segmentLength = length/NumberOfSegs;
1121 double segmentEloss = (1000.*eloss)/NumberOfSegs;
1122 for (
int i=0;
i<NumberOfSegs;
i++) {
1128 double deltaCutoff =
tMax;
1129 de =
fluctuate->SampleFluctuations(
double(particleMomentum*1000.),
1130 particleMass, deltaCutoff,
1131 double(segmentLength*10.),
1132 segmentEloss, engine )/1000.;
1139 float ratio = eloss/sum;
1141 for (
int ii=0;
ii<NumberOfSegs;
ii++) elossVector[
ii]= ratio*elossVector[
ii];
1143 float averageEloss = eloss/NumberOfSegs;
1144 for (
int ii=0;
ii<NumberOfSegs;
ii++) elossVector[
ii]= averageEloss;
1156 const std::vector<EnergyDepositUnit>& ionization_points,
1157 std::vector<SignalPoint>& collection_points)
const {
1160 LogDebug (
"Pixel Digitizer") <<
" enter drift " ;
1163 collection_points.resize(ionization_points.size());
1166 if(driftDir.
z() ==0.) {
1167 LogWarning(
"Magnetic field") <<
" pxlx: drift in z is zero ";
1175 float TanLorenzAngleX, TanLorenzAngleY,dir_z, CosLorenzAngleX,
1178 TanLorenzAngleX = driftDir.
x();
1179 TanLorenzAngleY = driftDir.
y();
1180 dir_z = driftDir.
z();
1181 CosLorenzAngleX = 1./
sqrt(1.+TanLorenzAngleX*TanLorenzAngleX);
1182 CosLorenzAngleY = 1./
sqrt(1.+TanLorenzAngleY*TanLorenzAngleY);
1185 TanLorenzAngleX = driftDir.
x();
1186 TanLorenzAngleY = 0.;
1187 dir_z = driftDir.
z();
1188 CosLorenzAngleX = 1./
sqrt(1.+TanLorenzAngleX*TanLorenzAngleX);
1189 CosLorenzAngleY = 1.;
1195 <<
" Lorentz Tan " << TanLorenzAngleX <<
" " << TanLorenzAngleY <<
" " 1196 << CosLorenzAngleX <<
" " << CosLorenzAngleY <<
" " 1197 << moduleThickness*TanLorenzAngleX <<
" " << driftDir;
1202 float DriftDistance;
1206 for (
unsigned int i = 0;
i != ionization_points.size();
i++) {
1208 float SegX, SegY, SegZ;
1209 SegX = ionization_points[
i].
x();
1210 SegY = ionization_points[
i].y();
1211 SegZ = ionization_points[
i].z();
1216 DriftDistance = moduleThickness/2. - (dir_z * SegZ);
1226 if( DriftDistance < 0.) {
1228 }
else if( DriftDistance > moduleThickness )
1229 DriftDistance = moduleThickness;
1232 float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
1233 float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
1236 float CloudCenterX = SegX + XDriftDueToMagField;
1237 float CloudCenterY = SegY + YDriftDueToMagField;
1240 DriftLength =
sqrt( DriftDistance*DriftDistance +
1241 XDriftDueToMagField*XDriftDueToMagField +
1242 YDriftDueToMagField*YDriftDueToMagField );
1248 Sigma_x = Sigma / CosLorenzAngleX ;
1249 Sigma_y = Sigma / CosLorenzAngleY ;
1252 float energyOnCollector = ionization_points[
i].energy();
1257 energyOnCollector *=
exp( -1*kValue*DriftDistance/moduleThickness );
1262 <<
" Dift DistanceZ= "<<DriftDistance<<
" module thickness= "<<moduleThickness
1263 <<
" Start Energy= "<<ionization_points[
i].energy()<<
" Energy after loss= "<<energyOnCollector;
1266 Sigma_x, Sigma_y, hit.
tof(), energyOnCollector );
1269 collection_points[
i] = (sp);
1278 std::vector<PSimHit>::const_iterator inputEnd,
1280 const size_t hitIndex,
1281 const unsigned int tofBin,
1283 const std::vector<SignalPoint>& collection_points) {
1294 <<
" enter induce_signal, " 1295 << topol->
pitch().first <<
" " << topol->
pitch().second;
1299 typedef std::map< int, float, std::less<int> > hit_map_type;
1300 hit_map_type hit_signal;
1303 std::map<int, float, std::less<int> >
x,
y;
1308 for ( std::vector<SignalPoint>::const_iterator
i=collection_points.begin();
1309 i != collection_points.end(); ++
i) {
1311 float CloudCenterX =
i->position().x();
1312 float CloudCenterY =
i->position().y();
1315 float Charge =
i->amplitude();
1326 <<
" cloud " <<
i->position().x() <<
" " <<
i->position().y() <<
" " 1327 <<
i->sigma_x() <<
" " <<
i->sigma_y() <<
" " <<
i->amplitude();
1350 int IPixRightUpX =
int( floor( mp.
x()));
1351 int IPixRightUpY =
int( floor( mp.
y()));
1354 LogDebug (
"Pixel Digitizer") <<
" right-up " << PointRightUp <<
" " 1355 << mp.
x() <<
" " << mp.
y() <<
" " 1356 << IPixRightUpX <<
" " << IPixRightUpY ;
1361 int IPixLeftDownX =
int( floor( mp.
x()));
1362 int IPixLeftDownY =
int( floor( mp.
y()));
1365 LogDebug (
"Pixel Digitizer") <<
" left-down " << PointLeftDown <<
" " 1366 << mp.
x() <<
" " << mp.
y() <<
" " 1367 << IPixLeftDownX <<
" " << IPixLeftDownY ;
1371 int numColumns = topol->
ncolumns();
1372 int numRows = topol->
nrows();
1374 IPixRightUpX = numRows>IPixRightUpX ? IPixRightUpX : numRows-1 ;
1375 IPixRightUpY = numColumns>IPixRightUpY ? IPixRightUpY : numColumns-1 ;
1376 IPixLeftDownX = 0<IPixLeftDownX ? IPixLeftDownX : 0 ;
1377 IPixLeftDownY = 0<IPixLeftDownY ? IPixLeftDownY : 0 ;
1384 for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) {
1385 float xUB, xLB, UpperBound, LowerBound;
1390 if(ix == 0 || SigmaX==0. )
1395 LowerBound = 1-
calcQ((xLB-CloudCenterX)/SigmaX);
1398 if(ix == numRows-1 || SigmaX==0. )
1403 UpperBound = 1. -
calcQ((xUB-CloudCenterX)/SigmaX);
1406 float TotalIntegrationRange = UpperBound - LowerBound;
1407 x[ix] = TotalIntegrationRange;
1415 for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) {
1416 float yUB, yLB, UpperBound, LowerBound;
1418 if(iy == 0 || SigmaY==0.)
1423 LowerBound = 1. -
calcQ((yLB-CloudCenterY)/SigmaY);
1426 if(iy == numColumns-1 || SigmaY==0. )
1431 UpperBound = 1. -
calcQ((yUB-CloudCenterY)/SigmaY);
1434 float TotalIntegrationRange = UpperBound - LowerBound;
1435 y[iy] = TotalIntegrationRange;
1442 for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) {
1443 for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) {
1445 float ChargeFraction = Charge*x[ix]*y[iy];
1447 if( ChargeFraction > 0. ) {
1450 hit_signal[
chan] += ChargeFraction;
1458 <<
" pixel " << ix <<
" " << iy <<
" - "<<
" " 1459 << chan <<
" " << ChargeFraction<<
" " 1460 << mp.
x() <<
" " << mp.
y() <<
" " 1461 << lp.
x() <<
" " << lp.
y() <<
" " 1473 bool reweighted =
false;
1483 for ( hit_map_type::const_iterator im = hit_signal.begin();
1484 im != hit_signal.end(); ++im) {
1485 int chan = (*im).first;
1486 theSignal[
chan] += (
makeDigiSimLinks_ ?
Amplitude( (*im).second, &hit, hitIndex, tofBin, (*im).second) : Amplitude( (*im).second, (*im).second) ) ;
1491 <<
" pixel " << ip.first <<
" " << ip.second <<
" " 1505 std::vector<PixelDigi>& digis,
1506 std::vector<PixelDigiSimLink>& simlinks,
1510 LogDebug (
"Pixel Digitizer") <<
" make digis "<<
" " 1515 <<
" List pixels passing threshold ";
1520 signalMaps::const_iterator it =
_signal.find(detID);
1529 std::map<TrackEventId, float> simi;
1533 float signalInElectrons = (*i).second ;
1540 if( signalInElectrons >= thePixelThresholdInE && signalInElectrons > 0.) {
1542 int chan = (*i).first;
1549 int col = ip.second;
1550 adc =
int(
missCalibrate(detID, tTopo, pixdet, col, row, signalInElectrons));
1557 << (*i).first <<
" " << (*i).second <<
" " << signalInElectrons
1558 <<
" " << adc << ip.first <<
" " << ip.second ;
1562 digis.emplace_back(ip.first, ip.second, adc);
1567 for(
const auto&
info: (*i).second.hitInfos()) {
1570 simi[std::make_pair(
info.trackId(),
info.eventId().rawId())] += (*i).second.individualampl()[il];
1575 for(
const auto&
info: (*i).second.hitInfos()) {
1577 auto found = simi.find(std::make_pair(
info.trackId(),
info.eventId().rawId()));
1578 if(
found == simi.end())
1581 float sum_samechannel =
found->second;
1582 float fraction=sum_samechannel/(*i).second;
1583 if(fraction>1.
f) fraction=1.f;
1599 float thePixelThreshold,
1600 CLHEP::HepRandomEngine* engine) {
1611 float theSmearedChargeRMS = 0.0;
1617 if((*i).second < 3000)
1619 theSmearedChargeRMS = 543.6 - (*i).second * 0.093;
1620 }
else if((*i).second < 6000){
1621 theSmearedChargeRMS = 307.6 - (*i).second * 0.01;
1623 theSmearedChargeRMS = -432.4 +(*i).second * 0.123;
1627 float noise_ChargeVCALSmearing = theSmearedChargeRMS * CLHEP::RandGaussQ::shoot(engine, 0., 1.);
1631 if(((*i).second +
Amplitude(noise+noise_ChargeVCALSmearing, -1.)) < 0. ) {
1632 (*i).second.set(0);}
1634 (*i).second +=
Amplitude(noise+noise_ChargeVCALSmearing, -1.);
1644 if(((*i).second +
Amplitude(noise, -1.)) < 0. ) {
1645 (*i).second.set(0);}
1657 int numColumns = topol->
ncolumns();
1658 int numRows = topol->
nrows();
1662 int numberOfPixels = (numRows * numColumns);
1663 std::map<int,float, std::less<int> > otherPixels;
1664 std::map<int,float, std::less<int> >::iterator mapI;
1674 <<
" Add noisy pixels " << numRows <<
" " 1677 << otherPixels.size() ;
1681 for (mapI = otherPixels.begin(); mapI!= otherPixels.end(); mapI++) {
1682 int iy = ((*mapI).first) / numRows;
1683 int ix = ((*mapI).first) - (iy*numRows);
1686 if( iy < 0 || iy > (numColumns-1) )
1687 LogWarning (
"Pixel Geometry") <<
" error in iy " << iy ;
1688 if( ix < 0 || ix > (numRows-1) )
1689 LogWarning (
"Pixel Geometry") <<
" error in ix " << ix ;
1695 <<
" Storing noise = " << (*mapI).first <<
" " << (*mapI).second
1696 <<
" " << ix <<
" " << iy <<
" " <<
chan ;
1699 if(theSignal[chan] == 0){
1701 int noise=
int( (*mapI).second );
1714 CLHEP::HepRandomEngine* engine) {
1719 int numColumns = topol->
ncolumns();
1720 int numRows = topol->
nrows();
1724 double pixelEfficiency = 1.0;
1725 double columnEfficiency = 1.0;
1726 double chipEfficiency = 1.0;
1727 std::vector<double> pixelEfficiencyROCStdPixels(16,1);
1728 std::vector<double> pixelEfficiencyROCBigPixels(16,1);
1730 auto pIndexConverter =
PixelIndices(numColumns,numRows);
1732 std::vector<int> badRocsFromFEDChannels(16,0);
1738 for(
const auto& ch: *it) {
1739 for (
unsigned int i_roc = ch.roc_first; i_roc <= ch.roc_last; ++i_roc){
1740 for(
const auto p : path){
1742 if( myroc->
idInDetUnit() ==
static_cast<unsigned int>(i_roc)) {
1745 int chipIndex(0), colROC(0), rowROC(0);
1746 pIndexConverter.transformToROC(global.
col,global.
row,chipIndex,colROC,rowROC);
1747 badRocsFromFEDChannels.at(chipIndex) = 1;
1760 int layerIndex=tTopo->
layer(detID);
1767 if(numColumns>416)
LogWarning (
"Pixel Geometry") <<
" wrong columns in barrel "<<numColumns;
1768 if(numRows>160)
LogWarning (
"Pixel Geometry") <<
" wrong rows in barrel "<<numRows;
1772 if (module<=4) module=5-module;
1782 unsigned int panelIndex=tTopo->
pxfPanel(detID);
1783 unsigned int moduleIndex=tTopo->
pxfModule(detID);
1793 if(numColumns>260 || numRows>160) {
1794 if(numColumns>260)
LogWarning (
"Pixel Geometry") <<
" wrong columns in endcaps "<<numColumns;
1795 if(numRows>160)
LogWarning (
"Pixel Geometry") <<
" wrong rows in endcaps "<<numRows;
1798 if ((panelIndex==1 && (moduleIndex==1 || moduleIndex==2)) || (panelIndex==2 && moduleIndex==1)) {
1806 pixelEfficiency = 0.999;
1807 columnEfficiency = 0.999;
1808 chipEfficiency = 0.999;
1823 LogDebug (
"Pixel Digitizer") <<
" enter pixel_inefficiency " << pixelEfficiency <<
" " 1824 << columnEfficiency <<
" " << chipEfficiency;
1833 std::map<int, int, std::less<int> >chips,
columns, pixelStd, pixelBig;
1834 std::map<int, int, std::less<int> >::iterator iter;
1840 int chan =
i->first;
1843 int col = ip.second;
1845 pIndexConverter.transformToROC(col,row,chipIndex,colROC,rowROC);
1846 int dColInChip = pIndexConverter.DColumn(colROC);
1848 int dColInDet = pIndexConverter.DColumnInModule(dColInChip,chipIndex);
1851 columns[dColInDet]++;
1854 pixelBig[chipIndex]++;
1856 pixelStd[chipIndex]++;
1861 for ( iter = chips.begin(); iter != chips.end() ; iter++ ) {
1863 float rand = CLHEP::RandFlat::shoot(engine);
1864 if( rand > chipEfficiency ) chips[iter->first]=0;
1868 for ( iter = columns.begin(); iter != columns.end() ; iter++ ) {
1870 float rand = CLHEP::RandFlat::shoot(engine);
1871 if( rand > columnEfficiency ) columns[iter->first]=0;
1876 for ( iter = pixelStd.begin(); iter != pixelStd.end() ; iter++ ) {
1877 float rand = CLHEP::RandFlat::shoot(engine);
1878 if( rand > pixelEfficiencyROCStdPixels[iter->first]) pixelStd[iter->first] = 0;
1881 for ( iter = pixelBig.begin(); iter != pixelBig.end() ; iter++ ) {
1882 float rand = CLHEP::RandFlat::shoot(engine);
1883 if( rand > pixelEfficiencyROCBigPixels[iter->first]) pixelBig[iter->first] = 0;
1894 int col = ip.second;
1896 pIndexConverter.transformToROC(col,row,chipIndex,colROC,rowROC);
1897 int dColInChip = pIndexConverter.DColumn(colROC);
1899 int dColInDet = pIndexConverter.DColumnInModule(dColInChip,chipIndex);
1902 float rand = CLHEP::RandFlat::shoot(engine);
1903 if( chips[chipIndex]==0 || columns[dColInDet]==0
1904 || rand>pixelEfficiency
1905 || (pixelStd.count(chipIndex) && pixelStd[chipIndex] == 0)
1906 || (pixelBig.count(chipIndex) && pixelBig[chipIndex] == 0)) {
1911 if((pixelStd.count(chipIndex) && pixelStd[chipIndex] == 0)
1912 || (pixelBig.count(chipIndex) && pixelBig[chipIndex] == 0)
1913 || (badRocsFromFEDChannels.at(chipIndex) == 1))
1938 float pseudoRadDamage = 0.0f;
1943 int layerIndex=tTopo->
layer(detID);
1961 pseudoRadDamage = 0.f;
1967 return pseudoRadDamage;
1969 LogDebug (
"Pixel Digitizer") <<
" enter pixel_aging " << pseudoRadDamage;
1984 const float signalInElectrons)
const {
2011 throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;
2025 newAmp = p3 + p2 * tanh(p0*signal - p1);
2070 const DetId& detId)
const {
2107 dir_z = -(1 + alpha2_BPix* Bfield.z()*Bfield.z() );
2112 dir_z = -(1 + alpha2_FPix* Bfield.z()*Bfield.z() );
2115 throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;
2122 alpha2 = lorentzAngle * lorentzAngle;
2124 dir_x = -( lorentzAngle * Bfield.y() + alpha2 * Bfield.z()* Bfield.x() );
2125 dir_y = +( lorentzAngle * Bfield.x() - alpha2 * Bfield.z()* Bfield.y() );
2126 dir_z = -(1 + alpha2 * Bfield.z()*Bfield.z() );
2133 LogDebug (
"Pixel Digitizer") <<
" The drift direction in local coordinate is " 2134 << theDriftDirection ;
2137 return theDriftDirection;
2152 int col = ip.second;
2169 Parameters::const_iterator itDeadModules=
DeadModules.begin();
2172 for(; itDeadModules !=
DeadModules.end(); ++itDeadModules){
2173 int Dead_detID = itDeadModules->getParameter<
int>(
"Dead_detID");
2174 if(detid == Dead_detID){
2187 if(Module==
"whole"){
2196 if(Module==
"tbmA" && ip.first>=80 && ip.first<=159){
2200 if( Module==
"tbmB" && ip.first<=79){
2215 for (
size_t id=0;
id<disabledModules.size();
id++)
2217 if(detID==disabledModules[
id].DetID){
2219 badmodule = disabledModules[
id];
2239 std::vector<GlobalPixel> badrocpositions (0);
2240 for(
unsigned int j = 0; j < 16; j++){
2244 typedef std::vector<CablingPathToDetUnit>::const_iterator
IT;
2245 for (IT it = path.begin(); it != path.end(); ++it) {
2250 badrocpositions.push_back(global);
2261 for(std::vector<GlobalPixel>::const_iterator it = badrocpositions.begin(); it != badrocpositions.end(); ++it){
2262 if(it->row >= 80 && ip.first >= 80 ){
2263 if((
std::abs(ip.second - it->col) < 26) ) {
i->second.set(0.);}
2264 else if(it->row==120 && ip.second-it->col==26){
i->second.set(0.);}
2265 else if(it->row==119 && it->col-ip.second==26){
i->second.set(0.);}
2267 else if(it->row < 80 && ip.first < 80 ){
2268 if((
std::abs(ip.second - it->col) < 26) ){
i->second.set(0.);}
2269 else if(it->row==40 && ip.second-it->col==26){
i->second.set(0.);}
2270 else if(it->row==39 && it->col-ip.second==26){
i->second.set(0.);}
2280 std::map<
int,
float, std::less<int> >& hit_signal,
2281 const size_t hitIndex,
2282 const unsigned int tofBin,
2286 unsigned short int processType){
2288 int irow_min = topol->
nrows();
2293 float chargeBefore = 0;
2294 float chargeAfter = 0;
2298 for (
std::map<
int,
float, std::less<int> >::const_iterator im = hit_signal.begin(); im != hit_signal.end(); ++im) {
2299 int chan = (*im).first;
2303 hitSignal[
chan] += (
makeDigiSimLinks_ ?
Amplitude( (*im).second, &hit, hitIndex, tofBin, (*im).second) : Amplitude( (*im).second, (*im).second) ) ;
2304 chargeBefore += (*im).second;
2306 if(pixelWithCharge.first < irow_min)
2307 irow_min = pixelWithCharge.first;
2308 if(pixelWithCharge.first > irow_max)
2309 irow_max = pixelWithCharge.first;
2310 if(pixelWithCharge.second < icol_min)
2311 icol_min = pixelWithCharge.second;
2312 if(pixelWithCharge.second > icol_max)
2313 icol_max = pixelWithCharge.second;
2318 float trajectoryScaleToPosition = hitEntryPoint.
z()/direction.
z();
2320 if( (hitEntryPoint.
z() > 0 && direction.
z() < 0) || (hitEntryPoint.
z() < 0 && direction.
z() > 0) ){
2321 trajectoryScaleToPosition *= -1;
2324 LocalPoint hitPosition = hitEntryPoint + trajectoryScaleToPosition * direction;
2327 std::pair<int,int> hitPixel = std::pair<int,int>(
int( floor(hitPositionPixel.
x() ) ),
int ( floor(hitPositionPixel.
y() ) ));
2334 std::pair<int,int> entryPixel = std::pair<int,int>(
int( floor(hitEntryPointPixel.
x() ) ),
int ( floor(hitEntryPointPixel.
y() ) ));
2335 std::pair<int,int> exitPixel = std::pair<int,int>(
int( floor(hitExitPointPixel.
x() ) ),
int ( floor(hitExitPointPixel.
y() ) ));
2337 int hitcol_min, hitcol_max, hitrow_min, hitrow_max;
2338 if(entryPixel.first>exitPixel.first){
2339 hitrow_min = exitPixel.first;
2340 hitrow_max = entryPixel.first;
2342 hitrow_min = entryPixel.first;
2343 hitrow_max = exitPixel.first;
2346 if(entryPixel.second>exitPixel.second){
2347 hitcol_min = exitPixel.second;
2348 hitcol_max = entryPixel.second;
2350 hitcol_min = entryPixel.second;
2351 hitcol_max = exitPixel.second;
2362 <<
"HitPosition:" <<
"\n" 2366 <<
"Pixel Pos - X: " << hitPositionPixel.
x() <<
" Y: " << hitPositionPixel.
y() <<
"\n" 2367 <<
"Cart.Cor. - X: " << CMSSWhitPosition.
x() <<
" Y: " << CMSSWhitPosition.
y() <<
"\n" 2368 <<
"Z=0 Pos - X: " << hitPosition.
x() <<
" Y: " << hitPosition.
y() <<
"\n" 2370 <<
"Origin of the template:" <<
"\n" 2371 <<
"Pixel Pos - X: " << originPixel.x() <<
" Y: " << originPixel.y() <<
"\n" 2372 <<
"Cart.Cor. - X: " << origin.
x() <<
" Y: " << origin.
y() <<
"\n" 2374 <<
"Entry/Exit:" <<
"\n" 2378 <<
"Entry - X Pixel: " << hitEntryPointPixel.
x() <<
" Y Pixel: " << hitEntryPointPixel.
y() <<
"\n" 2379 <<
"Exit - X Pixel: " << hitExitPointPixel.
x() <<
" Y Pixel: " << hitExitPointPixel.
y() <<
"\n" 2381 <<
"row min: " << irow_min <<
" col min: " << icol_min <<
"\n";
2384 if(!(irow_min<=hitrow_max && irow_max>=hitrow_min && icol_min<=hitcol_max && icol_max>=hitcol_min)){
2390 float cmToMicrons = 10000.f;
2392 track[0] = (hitPosition.
x() - origin.
x() )*cmToMicrons;
2393 track[1] = (hitPosition.
y() - origin.
y() )*cmToMicrons;
2395 track[3] = direction.x();
2396 track[4] = direction.y();
2397 track[5] = direction.z();
2401 for(
int row = 0; row <
TXSIZE; ++row) {
2403 pixrewgt[row][
col] = 0;
2407 for(
int row = 0; row <
TXSIZE; ++row) {
2415 for(
int row = 0; row <
TXSIZE; ++row) {
2424 std::cout <<
"Cluster before reweighting: " << std::endl;
2445 LogDebug (
"PixelDigitizer ") <<
"Cluster Charge Reweighting did not work properly.";
2451 std::cout <<
"Cluster after reweighting: " << std::endl;
2455 for(
int row = 0; row <
TXSIZE; ++row) {
2458 charge = pixrewgt[row][
col];
2459 if( (hitPixel.first + row -
THX) >= 0 && (hitPixel.first + row -
THX) < topol->
nrows() && (hitPixel.second +
col -
THY) >= 0 && (hitPixel.second +
col -
THY) < topol->
ncolumns() && charge > 0){
2466 if(chargeBefore!=0. && chargeAfter==0.){
2472 std::cout <<
"Charges (before->after): " << chargeBefore <<
" -> " << chargeAfter << std::endl;
2473 std::cout <<
"Charge loss: " << (1 - chargeAfter/chargeBefore)*100 <<
" %" << std::endl << std::endl;
2492 int i, j,
k,
l, kclose;
2494 float xsize,
ysize, q50i, q100i, q50r, q10r, q100r, xhit2D, yhit2D, qclust, dist2, dmin2;
2497 int goodWeightsUsed, nearbyWeightsUsed, noWeightsUsed;
2498 float cotalpha, cotbeta;
2516 LogDebug (
"Pixel Digitizer") <<
"Reweighting angle is not good!" << std::endl;
2533 for(i=0; i<
BYM2; ++
i) {
2534 for(j=0; j<
BXM2; ++j) {
2536 xy_rewgt[j][
i] = 0.f;
2545 LogDebug(
"Pixel Digitizer") <<
"No matching template found" << std::endl;
2551 std::cout <<
"Template unirrad: " << std::endl;
2561 if(cluster.num_dimensions() != 2) {
2562 LogWarning (
"Pixel Digitizer") <<
"Cluster is not 2-dimensional. Return." << std::endl;
2565 nclusx = (
int)cluster.shape()[0];
2566 nclusy = (
int)cluster.shape()[1];
2568 LogWarning (
"Pixel Digitizer") <<
"Sizes in x do not match: nclusx=" << nclusx <<
" xdoubleSize=" <<
xdouble.size() <<
" TXSIZE=" <<
TXSIZE <<
". Return." << std::endl;
2572 LogWarning (
"Pixel Digitizer") <<
"Sizes in y do not match. Return." << std::endl;
2580 for(j=0; j<
TXSIZE; ++j) {
2581 xy_clust[j][
i] = 0.f;
2582 denx_clust[j][
i] = 0;
2583 deny_clust[j][
i] = 0;
2584 if(cluster[j][i] > q100i) {
2585 qclust += cluster[j][
i];
2595 std::cout <<
"Template irrad: " << std::endl;
2607 std::vector<int> ytclust;
2608 std::vector<int> xtclust;
2609 std::vector<int> ycclust;
2610 std::vector<int> xcclust;
2613 for(j=0; j<
TXSIZE; ++j) {
2614 if(xy_in[j+1][i+1] > q100i) {
2616 ytclust.push_back(i);
2617 xtclust.push_back(j);
2618 xy_clust[j][
i] = xy_rewgt[j+1][i+1]/xy_in[j+1][i+1];
2619 denx_clust[j][
i] = j;
2620 deny_clust[j][
i] =
i;
2628 for(j=0; j<
TXSIZE; ++j) {
2629 if(xy_rewgt[j+1][i+1] > q10r && xy_clust[j][i] == 0.
f && ntpix>0) {
2631 dmin2 = 10000.f; kclose = 0;
2632 for(k=0; k<ntpix; ++
k) {
2633 dist2=(i-ytclust[
k])*(i-ytclust[k])+0.44444f*(j-xtclust[
k])*(j-xtclust[k]);
2639 xy_clust[j][
i] = xy_rewgt[j+1][i+1]/xy_in[xtclust[kclose]+1][ytclust[kclose]+1];
2640 denx_clust[j][
i] = xtclust[kclose];
2641 deny_clust[j][
i] = ytclust[kclose];
2654 goodWeightsUsed = 0;
2655 nearbyWeightsUsed = 0;
2659 for(j=0; j<
TXSIZE; ++j) {
2660 if(xy_clust[j][i] > 0.
f) {
2661 cluster[j][
i] = xy_clust[j][
i]*clust[denx_clust[j][
i]][deny_clust[j][
i]];
2662 if(cluster[j][i] > q100r) {
2663 qclust += cluster[j][
i];
2665 if(cluster[j][i] > 0) {
2669 if(clust[j][i] > 0.
f) {
2671 ycclust.push_back(i);
2672 xcclust.push_back(j);
2681 for(l=0; l<ncpix; ++
l) {
2682 i=ycclust[
l]; j=xcclust[
l];
2683 dmin2 = 10000.f; kclose = 0;
2684 for(k=0; k<ntpix; ++
k) {
2685 dist2=(i-ytclust[
k])*(i-ytclust[k])+0.44444f*(j-xtclust[
k])*(j-xtclust[k]);
2692 nearbyWeightsUsed++;
2693 cluster[j][
i] *= xy_clust[xtclust[kclose]][ytclust[kclose]];
2694 if(cluster[j][i] > q100r) {
2695 qclust += cluster[j][
i];
2699 cluster[j][
i] = 0.f;
2710 for(
int row = 0; row <
TXSIZE; ++row) {
2722 for(
int row = 0; row <
BXM2; ++row) {
2734 for(
int row = 0; row <
TXSIZE; ++row) {
void init(const edm::EventSetup &es)
const SiPixel2DTemplateDBObject * dbobject_den
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
const float theThresholdInE_BPix_L2
virtual int nrows() const =0
const GeomDetType & type() const override
double theOuterEfficiency_FPix[20]
void pixel_inefficiency_db(uint32_t detID)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
signal_map_type::const_iterator signal_map_const_iterator
Local3DVector LocalVector
float tof() const
deprecated name for timeOfFlight()
const bool use_deadmodule_DB_
float xsize()
pixel x-size (microns)
edm::ESHandle< SiPixelFedCablingMap > map_
void init_DynIneffDB(const edm::EventSetup &, const unsigned int &)
const float electronsPerVCAL
const double theThresholdSmearing_FPix
virtual int rowsperroc() const =0
Point3DBase< Scalar, LocalTag > LocalPoint
std::map< int, CalParameters, std::less< int > > initCal() const
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
bool xytemp(float xhit, float yhit, bool ydouble[21+2], bool xdouble[13+2], float template2d[13+2][21+2], bool dervatives, float dpdx2d[2][13+2][21+2], float &QTemplate)
std::vector< float > track
LocalVector DriftDirection(const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
void induce_signal(std::vector< PSimHit >::const_iterator inputBegin, std::vector< PSimHit >::const_iterator inputEnd, const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const PixelGeomDetUnit *pixdet, const std::vector< SignalPoint > &collection_points)
SiPixelDigitizerAlgorithm(const edm::ParameterSet &conf)
CaloTopology const * topology(0)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
const std::vector< float > & getMix_TrueInteractions() const
probabilityVec getProbabilities(const unsigned int puBin) const
const float tanLorentzAnglePerTesla_FPix
PixelEfficiencies pixelEfficiencies_
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
const int theAdcFullScale
PixelEfficiencies(const edm::ParameterSet &conf, bool AddPixelInefficiency, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
edm::ESHandle< SiPixelQualityProbabilities > scenarioProbabilityHandle
const std::vector< int > & getMix_bunchCrossing() const
const double theThresholdSmearing_BPix_L1
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual std::pair< float, float > pitch() const =0
bool killBadFEDChannels() const
const float theThresholdInE_FPix
std::unique_ptr< PixelFEDChannelCollection > PixelFEDChannelCollection_
const double theThresholdSmearing_BPix
const Bounds & bounds() const
std::vector< std::vector< double > > thePUEfficiency
unsigned int pxbModule(const DetId &id) const
const float electronsPerVCAL_Offset
const bool addThresholdSmearing
void module_killing_conf(uint32_t detID)
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
const bool fluctuateCharge
virtual bool isItBigPixelInX(int ixbin) const =0
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
float thePixelPseudoRadDamage[20]
edm::ESHandle< TrackerGeometry > geom_
~SiPixelDigitizerAlgorithm()
double calcQ(float x) const
const Plane & surface() const
The nominal surface of the GeomDet.
const float GeVperElectron
float s50()
1/2 of the pixel threshold signal in adc units
const double theThresholdSmearing_BPix_L2
identify pixel inside single ROC
const bool use_ineff_from_db_
const SiPixel2DTemplateDBObject * dbobject_num
void make_digis(float thePixelThresholdInE, uint32_t detID, const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo) const
static int pixelToChannel(int row, int col)
global coordinates (row and column in DetUnit, as in PixelDigi)
bool isThere(GeomDetEnumerators::SubDetector subdet) const
const bool use_LorentzAngle_DB_
const std::vector< uint32_t > getDetIdmasks() const
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Container::value_type value_type
bunchspace
in terms of 25 ns
const PixelFEDChannelCollectionMap * quality_map
const std::map< int, CalParameters, std::less< int > > calmap
virtual int colsperroc() const =0
double theInstLumiScaleFactor
const Parameters DeadModules
boost::multi_array< float, 2 > array_2d
Local3DPoint localPosition() const
float pixel_aging(const PixelAging &aging, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo) const
std::map< uint32_t, std::vector< double > > PixelGeomFactorsROCBigPixels
double thePixelChipEfficiency[20]
const float theTofUpperCut
SiPixelTemplate2D templ2D
const bool use_module_killing_
std::vector< double > pu_scale
void printCluster(array_2d &cluster)
void module_killing_DB(uint32_t detID)
static int pixelToChannelROC(const int rowROC, const int colROC)
const bool PrintTemplates
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
static std::pair< int, int > channelToPixelROC(const int chan)
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual bool isItBigPixelInY(int iybin) const =0
void digitize(const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
Abs< T >::type abs(const T &t)
const float theThresholdInE_BPix
double theInnerEfficiency_FPix[20]
DetId geographicalId() const
The label of this GeomDet.
const int NumberOfEndcapDisks
virtual int channel(const LocalPoint &p) const =0
std::vector< double > theModuleEfficiency_BPix[20]
const std::vector< disabledModuleType > getBadComponentList() const
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
std::vector< LinkConnSpec >::const_iterator IT
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
bool isTrackerPixel() const
signal_map_type::iterator signal_map_iterator
std::unique_ptr< PixelFEDChannelCollection > chooseScenario(PileupMixingContent *puInfo, CLHEP::HepRandomEngine *)
const float theThresholdInE_BPix_L1
std::map< unsigned int, probabilityVec > probabilityMap
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
const float electronsPerVCAL_L1_Offset
unsigned int pxfModule(const DetId &id) const
void setSimAccumulator(const std::map< uint32_t, std::map< int, int > > &signalMap)
const bool UseReweighting
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[], CLHEP::HepRandomEngine *) const
const bool doMissCalibrate
unsigned int pxbLayer(const DetId &id) const
const bool AddPixelInefficiency
const bool addChargeVCALSmearing
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser
const float theNoiseInElectrons
std::map< int, Amplitude, std::less< int > > signal_map_type
const float electronsPerVCAL_L1
edm::ESHandle< SiPixelQuality > SiPixelBadModule_
short getTemplateID(const uint32_t &detid) const
std::map< uint32_t, std::vector< double > > PixelGeomFactorsROCStdPixels
virtual float thickness() const =0
void primary_ionization(const PSimHit &hit, std::vector< EnergyDepositUnit > &ionization_points, CLHEP::HepRandomEngine *) const
void init_from_db(const edm::ESHandle< TrackerGeometry > &, const edm::ESHandle< SiPixelDynamicInefficiency > &)
double thePixelColEfficiency[20]
void calculateInstlumiFactor(PileupMixingContent *puInfo)
std::vector< bool > ydouble
static std::pair< int, int > channelToPixel(int ch)
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
void accumulateSimHits(const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, const size_t inputBeginGlobalIndex, const unsigned int tofBin, const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
row and collumn in ROC representation
static bool pushfile(int filenum, std::vector< SiPixelTemplateStore2D > &pixelTemp, std::string dir="")
const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const final
static const GlobalPoint notFound(0, 0, 0)
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
const float tanLorentzAnglePerTesla_BPix
edm::ESHandle< SiPixelDynamicInefficiency > SiPixelDynamicInefficiency_
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
unsigned short processType() const
float ysize()
pixel y-size (microns)
unsigned int layer(const DetId &id) const
std::vector< bool > xdouble
std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const final
float missCalibrate(uint32_t detID, const TrackerTopology *tTopo, const PixelGeomDetUnit *pixdet, int col, int row, float amp) const
bool matches(const DetId &, const DetId &, const std::vector< uint32_t > &)
std::vector< edm::ParameterSet > Parameters
const bool KillBadFEDChannels
std::vector< double > theLadderEfficiency_BPix[20]
double gettheInstLumiScaleFactor() const
float energyLoss() const
The energy deposit in the PSimHit, in ???.
virtual int ncolumns() const =0
const float theReadoutNoise
const TrackerGeomDet * idToDet(DetId) const override
static unsigned int const shift
float getLorentzAngle(const uint32_t &) const
std::map< uint32_t, double > ColGeomFactors
const std::map< unsigned int, std::vector< double > > & getPUFactors() const
const RotationType & rotation() const
double thePixelEfficiency[20]
PixelAging(const edm::ParameterSet &conf, bool AddPixelAging, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
const float theTofLowerCut
void drift(const PSimHit &hit, const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const TrackerTopology *tTopo, const std::vector< EnergyDepositUnit > &ionization_points, std::vector< SignalPoint > &collection_points) const
std::map< uint32_t, double > PixelGeomFactors
std::map< uint32_t, double > ChipGeomFactors
virtual SubDetector subDetector() const
Which subdetector.
const bool addNoisyPixels
const PixelAging pixelAging_
const PositionType & position() const
int PixelTempRewgt2D(int id_gen, int id_rewgt, array_2d &cluster)
std::map< uint32_t, size_t > iPU
T const * product() const
const float theElectronPerADC
Local3DPoint entryPoint() const
Entry point in the local Det frame.
unsigned int pxfPanel(const DetId &id) const
const bool makeDigiSimLinks_
const std::map< unsigned int, double > & getColGeomFactors() const
bool hitSignalReweight(const PSimHit &hit, std::map< int, float, std::less< int > > &hit_signal, const size_t hitIndex, const unsigned int tofBin, const PixelTopology *topol, uint32_t detID, signal_map_type &theSignal, unsigned short int processType)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
unsigned int detUnitId() const
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
const std::map< unsigned int, double > & getPixelGeomFactors() const
const int NumberOfBarrelLayers
GlobalPixel toGlobal(const LocalPixel &loc) const
void add_noise(const PixelGeomDetUnit *pixdet, float thePixelThreshold, CLHEP::HepRandomEngine *)
void pixel_inefficiency(const PixelEfficiencies &eff, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
constexpr Detector det() const
get the detector field from this detid
const std::map< unsigned int, double > & getChipGeomFactors() const