52 #include <gsl/gsl_sf_erf.h> 54 #include "CLHEP/Random/RandGaussQ.h" 55 #include "CLHEP/Random/RandFlat.h" 106 #define TP_DEBUG // protect all LogDebug with ifdef. Takes too much CPU 110 if(use_ineff_from_db_){
111 theSiPixelGainCalibrationService_->setESObjects( es );
113 if(use_deadmodule_DB_) {
116 if(use_LorentzAngle_DB_) {
130 makeDigiSimLinks_(conf.getUntrackedParameter<
bool>(
"makeDigiSimLinks",
true)),
131 use_ineff_from_db_(conf.getParameter<
bool>(
"useDB")),
132 use_module_killing_(conf.getParameter<
bool>(
"killModules")),
133 use_deadmodule_DB_(conf.getParameter<
bool>(
"DeadModules_DB")),
134 use_LorentzAngle_DB_(conf.getParameter<
bool>(
"LorentzAngle_DB")),
140 GeVperElectron(3.61E-09),
143 alpha2Order(conf.getParameter<
bool>(
"Alpha2Order")),
149 NumberOfBarrelLayers(conf.exists(
"NumPixelBarrel")?conf.getParameter<
int>(
"NumPixelBarrel"):3),
150 NumberOfEndcapDisks(conf.exists(
"NumPixelEndcap")?conf.getParameter<
int>(
"NumPixelEndcap"):2),
157 theElectronPerADC(conf.getParameter<double>(
"ElectronPerAdc")),
161 theAdcFullScale(conf.getParameter<
int>(
"AdcFullScale")),
162 theAdcFullScaleStack(conf.exists(
"AdcFullScaleStack")?conf.getParameter<
int>(
"AdcFullScaleStack"):255),
166 theNoiseInElectrons(conf.getParameter<double>(
"NoiseInElectrons")),
170 theReadoutNoise(conf.getParameter<double>(
"ReadoutNoiseInElec")),
175 theThresholdInE_FPix(conf.getParameter<double>(
"ThresholdInElectrons_FPix")),
176 theThresholdInE_BPix(conf.getParameter<double>(
"ThresholdInElectrons_BPix")),
177 theThresholdInE_BPix_L1(conf.exists(
"ThresholdInElectrons_BPix_L1")?conf.getParameter<double>(
"ThresholdInElectrons_BPix_L1"):theThresholdInE_BPix),
178 theThresholdInE_BPix_L2(conf.exists(
"ThresholdInElectrons_BPix_L2")?conf.getParameter<double>(
"ThresholdInElectrons_BPix_L2"):theThresholdInE_BPix),
181 theThresholdSmearing_FPix(conf.getParameter<double>(
"ThresholdSmearing_FPix")),
182 theThresholdSmearing_BPix(conf.getParameter<double>(
"ThresholdSmearing_BPix")),
183 theThresholdSmearing_BPix_L1(conf.exists(
"ThresholdSmearing_BPix_L1")?conf.getParameter<double>(
"ThresholdSmearing_BPix_L1"):theThresholdSmearing_BPix),
184 theThresholdSmearing_BPix_L2(conf.exists(
"ThresholdSmearing_BPix_L2")?conf.getParameter<double>(
"ThresholdSmearing_BPix_L2"):theThresholdSmearing_BPix),
187 electronsPerVCAL(conf.getParameter<double>(
"ElectronsPerVcal")),
188 electronsPerVCAL_Offset(conf.getParameter<double>(
"ElectronsPerVcal_Offset")),
189 electronsPerVCAL_L1(conf.exists(
"ElectronsPerVcal_L1")?conf.getParameter<double>(
"ElectronsPerVcal_L1"):electronsPerVCAL),
190 electronsPerVCAL_L1_Offset(conf.exists(
"ElectronsPerVcal_L1_Offset")?conf.getParameter<double>(
"ElectronsPerVcal_L1_Offset"):electronsPerVCAL_Offset),
194 theTofLowerCut(conf.getParameter<double>(
"TofLowerCut")),
195 theTofUpperCut(conf.getParameter<double>(
"TofUpperCut")),
198 tanLorentzAnglePerTesla_FPix(use_LorentzAngle_DB_ ? 0.0 : conf.getParameter<double>(
"TanLorentzAnglePerTesla_FPix")),
199 tanLorentzAnglePerTesla_BPix(use_LorentzAngle_DB_ ? 0.0 : conf.getParameter<double>(
"TanLorentzAnglePerTesla_BPix")),
202 FPix_p0(conf.getParameter<double>(
"FPix_SignalResponse_p0")),
203 FPix_p1(conf.getParameter<double>(
"FPix_SignalResponse_p1")),
204 FPix_p2(conf.getParameter<double>(
"FPix_SignalResponse_p2")),
205 FPix_p3(conf.getParameter<double>(
"FPix_SignalResponse_p3")),
207 BPix_p0(conf.getParameter<double>(
"BPix_SignalResponse_p0")),
208 BPix_p1(conf.getParameter<double>(
"BPix_SignalResponse_p1")),
209 BPix_p2(conf.getParameter<double>(
"BPix_SignalResponse_p2")),
210 BPix_p3(conf.getParameter<double>(
"BPix_SignalResponse_p3")),
213 addNoise(conf.getParameter<
bool>(
"AddNoise")),
217 addChargeVCALSmearing(conf.getParameter<
bool>(
"ChargeVCALSmearing")),
223 fluctuateCharge(conf.getUntrackedParameter<
bool>(
"FluctuateCharge",
true)),
229 addThresholdSmearing(conf.getParameter<
bool>(
"AddThresholdSmearing")),
232 doMissCalibrate(conf.getParameter<
bool>(
"MissCalibrate")),
233 theGainSmearing(conf.getParameter<double>(
"GainSmearing")),
234 theOffsetSmearing(conf.getParameter<double>(
"OffsetSmearing")),
237 AddPixelAging(conf.getParameter<
bool>(
"DoPixelAging")),
242 tMax(conf.getParameter<double>(
"deltaProductionCut")),
249 pixelAging_(conf,AddPixelAging,NumberOfBarrelLayers,NumberOfEndcapDisks)
251 LogInfo (
"PixelDigitizer ") <<
"SiPixelDigitizerAlgorithm constructed" 252 <<
"Configuration parameters:" 253 <<
"Threshold/Gain = " 254 <<
"threshold in electron FPix = " 256 <<
"threshold in electron BPix = " 258 <<
"threshold in electron BPix Layer1 = " 260 <<
"threshold in electron BPix Layer2 = " 263 <<
" The delta cut-off is set to " <<
tMax 268 std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> >
275 std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> >
calmap;
278 <<
" miss-calibrate the pixel amplitude ";
280 const bool ReadCalParameters =
false;
281 if(ReadCalParameters) {
284 char filename[80] =
"phCalibrationFit_C0.dat";
288 cout <<
" File not found " << endl;
291 cout <<
" file opened : " << filename << endl;
294 for (
int i = 0;
i < 3;
i++) {
295 in_file.getline(line, 500,
'\n');
299 cout <<
" test map" << endl;
305 for(
int i=0;
i<(52*80);
i++) {
306 in_file >> par0 >> par1 >> par2 >> par3 >> name >> colid >> rowid;
308 cerr <<
"Cannot read data file" << endl;
311 if( in_file.eof() != 0 ) {
312 cerr << in_file.eof() <<
" " << in_file.gcount() <<
" " 313 << in_file.fail() <<
" " << in_file.good() <<
" end of file " 329 calmap.insert(std::pair<int,CalParameters>(chan,onePix));
333 if(rowid!=p.first)
cout<<
" wrong channel row "<<rowid<<
" "<<p.first<<endl;
334 if(colid!=p.second)
cout<<
" wrong channel col "<<colid<<
" "<<p.second<<endl;
338 cout <<
" map size " << calmap.size() <<
" max "<<calmap.max_size() <<
" " 339 <<calmap.empty()<< endl;
362 LogDebug (
"PixelDigitizer")<<
"SiPixelDigitizerAlgorithm deleted";
371 if (AddPixelInefficiency){
373 conf.
exists(
"thePixelColEfficiency_BPix1") && conf.
exists(
"thePixelColEfficiency_BPix2") && conf.
exists(
"thePixelColEfficiency_BPix3") &&
374 conf.
exists(
"thePixelColEfficiency_FPix1") && conf.
exists(
"thePixelColEfficiency_FPix2") &&
375 conf.
exists(
"thePixelEfficiency_BPix1") && conf.
exists(
"thePixelEfficiency_BPix2") && conf.
exists(
"thePixelEfficiency_BPix3") &&
376 conf.
exists(
"thePixelEfficiency_FPix1") && conf.
exists(
"thePixelEfficiency_FPix2") &&
377 conf.
exists(
"thePixelChipEfficiency_BPix1") && conf.
exists(
"thePixelChipEfficiency_BPix2") && conf.
exists(
"thePixelChipEfficiency_BPix3") &&
378 conf.
exists(
"thePixelChipEfficiency_FPix1") && conf.
exists(
"thePixelChipEfficiency_FPix2");
379 if (NumberOfBarrelLayers==3) FromConfig = FromConfig && conf.
exists(
"theLadderEfficiency_BPix1") && conf.
exists(
"theLadderEfficiency_BPix2") && conf.
exists(
"theLadderEfficiency_BPix3") &&
380 conf.
exists(
"theModuleEfficiency_BPix1") && conf.
exists(
"theModuleEfficiency_BPix2") && conf.
exists(
"theModuleEfficiency_BPix3") &&
381 conf.
exists(
"thePUEfficiency_BPix1") && conf.
exists(
"thePUEfficiency_BPix2") && conf.
exists(
"thePUEfficiency_BPix3") &&
382 conf.
exists(
"theInnerEfficiency_FPix1") && conf.
exists(
"theInnerEfficiency_FPix2") &&
383 conf.
exists(
"theOuterEfficiency_FPix1") && conf.
exists(
"theOuterEfficiency_FPix2") &&
384 conf.
exists(
"thePUEfficiency_FPix_Inner") && conf.
exists(
"thePUEfficiency_FPix_Outer") &&
385 conf.
exists(
"theInstLumiScaleFactor");
386 if (NumberOfBarrelLayers>=4) FromConfig = FromConfig && conf.
exists(
"thePixelColEfficiency_BPix4") &&
387 conf.
exists(
"thePixelEfficiency_BPix4") && conf.
exists(
"thePixelChipEfficiency_BPix4");
388 if (NumberOfEndcapDisks>=3) FromConfig = FromConfig && conf.
exists(
"thePixelColEfficiency_FPix4") &&
389 conf.
exists(
"thePixelEfficiency_FPix3") && conf.
exists(
"thePixelChipEfficiency_FPix3");
391 LogInfo (
"PixelDigitizer ") <<
"The PixelDigitizer inefficiency configuration is read from the config file.\n";
392 theInstLumiScaleFactor = conf.
getParameter<
double>(
"theInstLumiScaleFactor");
394 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix1");
395 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix2");
396 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix3");
397 if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix4");}
400 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix1");
401 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix2");
402 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix3");
403 if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix4");}
406 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix1");
407 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix2");
408 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix3");
409 if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix4");}
411 if (NumberOfBarrelLayers==3){
413 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix1");
414 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix2");
415 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix3");
416 if ( ((theLadderEfficiency_BPix[0].
size()!=20) || (theLadderEfficiency_BPix[1].
size()!=32) ||
417 (theLadderEfficiency_BPix[2].
size()!=44)) && (NumberOfBarrelLayers==3) )
418 throw cms::Exception(
"Configuration") <<
"Wrong ladder number in efficiency config!";
421 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix1");
422 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix2");
423 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix3");
424 if ( ((theModuleEfficiency_BPix[0].
size()!=4) || (theModuleEfficiency_BPix[1].
size()!=4) ||
425 (theModuleEfficiency_BPix[2].
size()!=4)) && (NumberOfBarrelLayers==3) )
426 throw cms::Exception(
"Configuration") <<
"Wrong module number in efficiency config!";
428 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix1"));
429 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix2"));
430 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix3"));
431 if ( ((thePUEfficiency[0].
empty()) || (thePUEfficiency[1].
empty()) ||
432 (thePUEfficiency[2].
empty())) && (NumberOfBarrelLayers==3) )
433 throw cms::Exception(
"Configuration") <<
"At least one PU efficiency (BPix) number is needed in efficiency config!";
436 if (NumberOfBarrelLayers>=5){
437 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
440 thePixelColEfficiency[j-1]=0.999;
441 thePixelEfficiency[j-1]=0.999;
442 thePixelChipEfficiency[j-1]=0.999;
447 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix1");
448 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix2");
449 if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix3");}
451 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix1");
452 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix2");
453 if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix3");}
455 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix1");
456 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix2");
457 if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix3");}
459 if (NumberOfEndcapDisks>=4){
460 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
463 thePixelColEfficiency[j-1]=0.999;
464 thePixelEfficiency[j-1]=0.999;
465 thePixelChipEfficiency[j-1]=0.999;
469 if (NumberOfBarrelLayers==3){
471 theInnerEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theInnerEfficiency_FPix1");
472 theInnerEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theInnerEfficiency_FPix2");
474 theOuterEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theOuterEfficiency_FPix1");
475 theOuterEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theOuterEfficiency_FPix2");
476 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_FPix_Inner"));
477 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_FPix_Outer"));
478 if ( ((thePUEfficiency[3].
empty()) || (thePUEfficiency[4].
empty())) && (NumberOfEndcapDisks==2) )
479 throw cms::Exception(
"Configuration") <<
"At least one (FPix) PU efficiency number is needed in efficiency config!";
480 pu_scale.resize(thePUEfficiency.size());
483 else LogInfo (
"PixelDigitizer ") <<
"The PixelDigitizer inefficiency configuration is read from the database.\n";
501 const std::map<uint32_t, double>& PixelGeomFactorsDB = SiPixelDynamicInefficiency->
getPixelGeomFactors();
502 const std::map<uint32_t, double>& ColGeomFactorsDB = SiPixelDynamicInefficiency->
getColGeomFactors();
503 const std::map<uint32_t, double>& ChipGeomFactorsDB = SiPixelDynamicInefficiency->
getChipGeomFactors();
504 const std::map<uint32_t, std::vector<double> >& PUFactors = SiPixelDynamicInefficiency->
getPUFactors();
505 std::vector<uint32_t > DetIdmasks = SiPixelDynamicInefficiency->
getDetIdmasks();
508 for(
const auto& it_module : geom->
detUnits()) {
509 if( dynamic_cast<PixelGeomDetUnit const*>(it_module)==
nullptr)
continue;
510 const DetId detid = it_module->geographicalId();
511 uint32_t rawid = detid.
rawId();
512 PixelGeomFactors[rawid] = 1;
513 ColGeomFactors[rawid] = 1;
514 ChipGeomFactors[rawid] = 1;
515 for (
auto db_factor : PixelGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) PixelGeomFactors[rawid] *= db_factor.second;
516 for (
auto db_factor : ColGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) ColGeomFactors[rawid] *= db_factor.second;
517 for (
auto db_factor : ChipGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) ChipGeomFactors[rawid] *= db_factor.second;
523 for (
auto factor : PUFactors) {
525 for(
const auto& it_module : geom->
detUnits()) {
526 if( dynamic_cast<PixelGeomDetUnit const*>(it_module)==
nullptr)
continue;
527 const DetId detid = it_module->geographicalId();
528 if (!
matches(detid, db_id, DetIdmasks))
continue;
529 if (iPU.count(detid.
rawId())) {
530 throw cms::Exception(
"Database")<<
"Multiple db_ids match to same module in SiPixelDynamicInefficiency DB Object";
535 thePUEfficiency.push_back(factor.second);
538 pu_scale.resize(thePUEfficiency.size());
543 for (
size_t i=0;
i<DetIdmasks.size(); ++
i) {
560 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix1");
561 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix2");
562 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix3");
563 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix4");
566 if (NumberOfBarrelLayers>=5){
567 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
570 thePixelPseudoRadDamage[j-1]=0.;
575 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix1");
576 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix2");
577 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix3");
580 if (NumberOfEndcapDisks>=4){
581 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
584 thePixelPseudoRadDamage[j-1]=0.;
594 std::vector<PSimHit>::const_iterator inputEnd,
595 const size_t inputBeginGlobalIndex,
596 const unsigned int tofBin,
600 CLHEP::HepRandomEngine* engine) {
605 size_t simHitGlobalIndex=inputBeginGlobalIndex;
606 for (std::vector<PSimHit>::const_iterator ssbegin = inputBegin; ssbegin != inputEnd; ++ssbegin, ++simHitGlobalIndex) {
608 if((*ssbegin).detUnitId() != detId) {
614 << (*ssbegin).particleType() <<
" " << (*ssbegin).pabs() <<
" " 615 << (*ssbegin).energyLoss() <<
" " << (*ssbegin).tof() <<
" " 616 << (*ssbegin).trackId() <<
" " << (*ssbegin).processType() <<
" " 617 << (*ssbegin).detUnitId()
618 << (*ssbegin).entryPoint() <<
" " << (*ssbegin).exitPoint() ;
622 std::vector<EnergyDepositUnit> ionization_points;
623 std::vector<SignalPoint> collection_points;
630 drift(*ssbegin, pixdet, bfield, tTopo, ionization_points, collection_points);
632 induce_signal(*ssbegin, simHitGlobalIndex, tofBin, pixdet, collection_points);
648 std::vector<int>::const_iterator
pu;
649 std::vector<int>::const_iterator pu0 = bunchCrossing.end();
651 for (pu=bunchCrossing.begin(); pu!=bunchCrossing.end(); ++
pu) {
658 if (pu0!=bunchCrossing.end()) {
661 double instlumi_pow=1.;
665 instlumi_pow*=instlumi;
679 std::vector<PixelDigi>& digis,
680 std::vector<PixelDigiSimLink>& simlinks,
682 CLHEP::HepRandomEngine* engine) {
693 int numRows = topol->
nrows();
700 float thePixelThresholdInE = 0.;
704 int lay = tTopo->
layer(detID);
733 else {
throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;}
741 <<
" PixelDigitizer " 742 << numColumns <<
" " << numRows <<
" " << moduleThickness;
763 make_digis(thePixelThresholdInE, detID, pixdet, digis, simlinks, tTopo);
766 LogDebug (
"PixelDigitizer") <<
"[SiPixelDigitizerAlgorithm] converted " << digis.size() <<
" PixelDigis in DetUnit" << detID;
777 const float SegmentLength = 0.0010;
784 float length = direction.
mag();
786 int NumberOfSegments =
int ( length / SegmentLength);
787 if(NumberOfSegments < 1) NumberOfSegments = 1;
791 <<
" enter primary_ionzation " << NumberOfSegments
799 float* elossVector =
new float[NumberOfSegments];
806 float momentum = hit.
pabs();
809 elossVector, engine);
812 ionization_points.resize( NumberOfSegments);
815 for (
int i = 0;
i != NumberOfSegments;
i++) {
818 float((
i+0.5)/NumberOfSegments) * direction;
826 ionization_points[
i] = edu;
830 <<
i <<
" " << ionization_points[
i].x() <<
" " 831 << ionization_points[
i].y() <<
" " 832 << ionization_points[
i].z() <<
" " 833 << ionization_points[
i].energy();
838 delete[] elossVector;
846 float eloss,
float length,
847 int NumberOfSegs,
float elossVector[],
848 CLHEP::HepRandomEngine* engine)
const {
855 double particleMass = 139.6;
858 if(pid==11) particleMass = 0.511;
859 else if(pid==13) particleMass = 105.7;
860 else if(pid==321) particleMass = 493.7;
861 else if(pid==2212) particleMass = 938.3;
864 float segmentLength = length/NumberOfSegs;
869 double segmentEloss = (1000.*eloss)/NumberOfSegs;
870 for (
int i=0;
i<NumberOfSegs;
i++) {
876 double deltaCutoff =
tMax;
877 de =
fluctuate->SampleFluctuations(
double(particleMomentum*1000.),
878 particleMass, deltaCutoff,
879 double(segmentLength*10.),
880 segmentEloss, engine )/1000.;
887 float ratio = eloss/sum;
889 for (
int ii=0;
ii<NumberOfSegs;
ii++) elossVector[
ii]= ratio*elossVector[
ii];
891 float averageEloss = eloss/NumberOfSegs;
892 for (
int ii=0;
ii<NumberOfSegs;
ii++) elossVector[
ii]= averageEloss;
904 const std::vector<EnergyDepositUnit>& ionization_points,
905 std::vector<SignalPoint>& collection_points)
const {
908 LogDebug (
"Pixel Digitizer") <<
" enter drift " ;
911 collection_points.resize(ionization_points.size());
914 if(driftDir.
z() ==0.) {
915 LogWarning(
"Magnetic field") <<
" pxlx: drift in z is zero ";
923 float TanLorenzAngleX, TanLorenzAngleY,dir_z, CosLorenzAngleX,
926 TanLorenzAngleX = driftDir.
x();
927 TanLorenzAngleY = driftDir.
y();
928 dir_z = driftDir.
z();
929 CosLorenzAngleX = 1./
sqrt(1.+TanLorenzAngleX*TanLorenzAngleX);
930 CosLorenzAngleY = 1./
sqrt(1.+TanLorenzAngleY*TanLorenzAngleY);
933 TanLorenzAngleX = driftDir.
x();
934 TanLorenzAngleY = 0.;
935 dir_z = driftDir.
z();
936 CosLorenzAngleX = 1./
sqrt(1.+TanLorenzAngleX*TanLorenzAngleX);
937 CosLorenzAngleY = 1.;
943 <<
" Lorentz Tan " << TanLorenzAngleX <<
" " << TanLorenzAngleY <<
" " 944 << CosLorenzAngleX <<
" " << CosLorenzAngleY <<
" " 945 << moduleThickness*TanLorenzAngleX <<
" " << driftDir;
954 for (
unsigned int i = 0;
i != ionization_points.size();
i++) {
956 float SegX, SegY, SegZ;
957 SegX = ionization_points[
i].
x();
958 SegY = ionization_points[
i].y();
959 SegZ = ionization_points[
i].z();
964 DriftDistance = moduleThickness/2. - (dir_z * SegZ);
974 if( DriftDistance < 0.) {
976 }
else if( DriftDistance > moduleThickness )
977 DriftDistance = moduleThickness;
980 float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
981 float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
984 float CloudCenterX = SegX + XDriftDueToMagField;
985 float CloudCenterY = SegY + YDriftDueToMagField;
988 DriftLength =
sqrt( DriftDistance*DriftDistance +
989 XDriftDueToMagField*XDriftDueToMagField +
990 YDriftDueToMagField*YDriftDueToMagField );
996 Sigma_x = Sigma / CosLorenzAngleX ;
997 Sigma_y = Sigma / CosLorenzAngleY ;
1000 float energyOnCollector = ionization_points[
i].energy();
1005 energyOnCollector *=
exp( -1*kValue*DriftDistance/moduleThickness );
1010 <<
" Dift DistanceZ= "<<DriftDistance<<
" module thickness= "<<moduleThickness
1011 <<
" Start Energy= "<<ionization_points[
i].energy()<<
" Energy after loss= "<<energyOnCollector;
1014 Sigma_x, Sigma_y, hit.
tof(), energyOnCollector );
1017 collection_points[
i] = (sp);
1026 const size_t hitIndex,
1027 const unsigned int tofBin,
1029 const std::vector<SignalPoint>& collection_points) {
1040 <<
" enter induce_signal, " 1041 << topol->
pitch().first <<
" " << topol->
pitch().second;
1045 typedef std::map< int, float, std::less<int> > hit_map_type;
1046 hit_map_type hit_signal;
1049 std::map<int, float, std::less<int> >
x,
y;
1054 for ( std::vector<SignalPoint>::const_iterator
i=collection_points.begin();
1055 i != collection_points.end(); ++
i) {
1057 float CloudCenterX =
i->position().x();
1058 float CloudCenterY =
i->position().y();
1061 float Charge =
i->amplitude();
1072 <<
" cloud " <<
i->position().x() <<
" " <<
i->position().y() <<
" " 1073 <<
i->sigma_x() <<
" " <<
i->sigma_y() <<
" " <<
i->amplitude();
1096 int IPixRightUpX =
int( floor( mp.
x()));
1097 int IPixRightUpY =
int( floor( mp.
y()));
1100 LogDebug (
"Pixel Digitizer") <<
" right-up " << PointRightUp <<
" " 1101 << mp.
x() <<
" " << mp.
y() <<
" " 1102 << IPixRightUpX <<
" " << IPixRightUpY ;
1107 int IPixLeftDownX =
int( floor( mp.
x()));
1108 int IPixLeftDownY =
int( floor( mp.
y()));
1111 LogDebug (
"Pixel Digitizer") <<
" left-down " << PointLeftDown <<
" " 1112 << mp.
x() <<
" " << mp.
y() <<
" " 1113 << IPixLeftDownX <<
" " << IPixLeftDownY ;
1117 int numColumns = topol->
ncolumns();
1118 int numRows = topol->
nrows();
1120 IPixRightUpX = numRows>IPixRightUpX ? IPixRightUpX : numRows-1 ;
1121 IPixRightUpY = numColumns>IPixRightUpY ? IPixRightUpY : numColumns-1 ;
1122 IPixLeftDownX = 0<IPixLeftDownX ? IPixLeftDownX : 0 ;
1123 IPixLeftDownY = 0<IPixLeftDownY ? IPixLeftDownY : 0 ;
1130 for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) {
1131 float xUB, xLB, UpperBound, LowerBound;
1136 if(ix == 0 || SigmaX==0. )
1141 LowerBound = 1-
calcQ((xLB-CloudCenterX)/SigmaX);
1144 if(ix == numRows-1 || SigmaX==0. )
1149 UpperBound = 1. -
calcQ((xUB-CloudCenterX)/SigmaX);
1152 float TotalIntegrationRange = UpperBound - LowerBound;
1153 x[ix] = TotalIntegrationRange;
1161 for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) {
1162 float yUB, yLB, UpperBound, LowerBound;
1164 if(iy == 0 || SigmaY==0.)
1169 LowerBound = 1. -
calcQ((yLB-CloudCenterY)/SigmaY);
1172 if(iy == numColumns-1 || SigmaY==0. )
1177 UpperBound = 1. -
calcQ((yUB-CloudCenterY)/SigmaY);
1180 float TotalIntegrationRange = UpperBound - LowerBound;
1181 y[iy] = TotalIntegrationRange;
1188 for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) {
1189 for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) {
1191 float ChargeFraction = Charge*x[ix]*y[iy];
1193 if( ChargeFraction > 0. ) {
1196 hit_signal[
chan] += ChargeFraction;
1206 <<
" pixel " << ix <<
" " << iy <<
" - "<<
" " 1207 << chan <<
" " << ChargeFraction<<
" " 1208 << mp.
x() <<
" " << mp.
y() <<
" " 1209 << lp.
x() <<
" " << lp.
y() <<
" " 1239 for ( hit_map_type::const_iterator im = hit_signal.begin();
1240 im != hit_signal.end(); ++im) {
1241 int chan = (*im).first;
1242 theSignal[
chan] += (
makeDigiSimLinks_ ?
Amplitude( (*im).second, &hit, hitIndex, tofBin, (*im).second) : Amplitude( (*im).second, (*im).second) ) ;
1247 <<
" pixel " << ip.first <<
" " << ip.second <<
" " 1260 std::vector<PixelDigi>& digis,
1261 std::vector<PixelDigiSimLink>& simlinks,
1265 LogDebug (
"Pixel Digitizer") <<
" make digis "<<
" " 1270 <<
" List pixels passing threshold ";
1275 signalMaps::const_iterator it =
_signal.find(detID);
1284 std::map<TrackEventId, float> simi;
1288 float signalInElectrons = (*i).second ;
1295 if( signalInElectrons >= thePixelThresholdInE) {
1297 int chan = (*i).first;
1304 int col = ip.second;
1305 adc =
int(
missCalibrate(detID, tTopo, pixdet, col, row, signalInElectrons));
1321 << (*i).first <<
" " << (*i).second <<
" " << signalInElectrons
1322 <<
" " << adc << ip.first <<
" " << ip.second ;
1326 digis.emplace_back(ip.first, ip.second, adc);
1331 for(
const auto&
info: (*i).second.hitInfos()) {
1334 simi[std::make_pair(
info.trackId(),
info.eventId().rawId())] += (*i).second.individualampl()[il];
1339 for(
const auto&
info: (*i).second.hitInfos()) {
1341 auto found = simi.find(std::make_pair(
info.trackId(),
info.eventId().rawId()));
1342 if(
found == simi.end())
1345 float sum_samechannel =
found->second;
1346 float fraction=sum_samechannel/(*i).second;
1347 if(fraction>1.
f) fraction=1.f;
1363 float thePixelThreshold,
1364 CLHEP::HepRandomEngine* engine) {
1375 float theSmearedChargeRMS = 0.0;
1381 if((*i).second < 3000)
1383 theSmearedChargeRMS = 543.6 - (*i).second * 0.093;
1384 }
else if((*i).second < 6000){
1385 theSmearedChargeRMS = 307.6 - (*i).second * 0.01;
1387 theSmearedChargeRMS = -432.4 +(*i).second * 0.123;
1391 float noise_ChargeVCALSmearing = theSmearedChargeRMS * CLHEP::RandGaussQ::shoot(engine, 0., 1.);
1395 if(((*i).second +
Amplitude(noise+noise_ChargeVCALSmearing, -1.)) < 0. ) {
1396 (*i).second.set(0);}
1398 (*i).second +=
Amplitude(noise+noise_ChargeVCALSmearing, -1.);
1408 if(((*i).second +
Amplitude(noise, -1.)) < 0. ) {
1409 (*i).second.set(0);}
1421 int numColumns = topol->
ncolumns();
1422 int numRows = topol->
nrows();
1426 int numberOfPixels = (numRows * numColumns);
1427 std::map<int,float, std::less<int> > otherPixels;
1428 std::map<int,float, std::less<int> >::iterator mapI;
1438 <<
" Add noisy pixels " << numRows <<
" " 1441 << otherPixels.size() ;
1445 for (mapI = otherPixels.begin(); mapI!= otherPixels.end(); mapI++) {
1446 int iy = ((*mapI).first) / numRows;
1447 int ix = ((*mapI).first) - (iy*numRows);
1450 if( iy < 0 || iy > (numColumns-1) )
1451 LogWarning (
"Pixel Geometry") <<
" error in iy " << iy ;
1452 if( ix < 0 || ix > (numRows-1) )
1453 LogWarning (
"Pixel Geometry") <<
" error in ix " << ix ;
1459 <<
" Storing noise = " << (*mapI).first <<
" " << (*mapI).second
1460 <<
" " << ix <<
" " << iy <<
" " <<
chan ;
1463 if(theSignal[chan] == 0){
1465 int noise=
int( (*mapI).second );
1478 CLHEP::HepRandomEngine* engine) {
1483 int numColumns = topol->
ncolumns();
1484 int numRows = topol->
nrows();
1487 double pixelEfficiency = 1.0;
1488 double columnEfficiency = 1.0;
1489 double chipEfficiency = 1.0;
1495 int layerIndex=tTopo->
layer(detID);
1502 if(numColumns>416)
LogWarning (
"Pixel Geometry") <<
" wrong columns in barrel "<<numColumns;
1503 if(numRows>160)
LogWarning (
"Pixel Geometry") <<
" wrong rows in barrel "<<numRows;
1507 if (module<=4) module=5-
module;
1517 unsigned int panelIndex=tTopo->
pxfPanel(detID);
1518 unsigned int moduleIndex=tTopo->
pxfModule(detID);
1528 if(numColumns>260 || numRows>160) {
1529 if(numColumns>260)
LogWarning (
"Pixel Geometry") <<
" wrong columns in endcaps "<<numColumns;
1530 if(numRows>160)
LogWarning (
"Pixel Geometry") <<
" wrong rows in endcaps "<<numRows;
1533 if ((panelIndex==1 && (moduleIndex==1 || moduleIndex==2)) || (panelIndex==2 && moduleIndex==1)) {
1541 pixelEfficiency = 0.999;
1542 columnEfficiency = 0.999;
1543 chipEfficiency = 0.999;
1552 LogDebug (
"Pixel Digitizer") <<
" enter pixel_inefficiency " << pixelEfficiency <<
" " 1553 << columnEfficiency <<
" " << chipEfficiency;
1558 std::unique_ptr<PixelIndices> pIndexConverter(
new PixelIndices(numColumns,numRows));
1563 std::map<int, int, std::less<int> >chips,
columns;
1564 std::map<int, int, std::less<int> >::iterator iter;
1570 int chan =
i->first;
1573 int col = ip.second;
1575 pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1576 int dColInChip = pIndexConverter->DColumn(colROC);
1578 int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1581 columns[dColInDet]++;
1585 for ( iter = chips.begin(); iter != chips.end() ; iter++ ) {
1587 float rand = CLHEP::RandFlat::shoot(engine);
1588 if( rand > chipEfficiency ) chips[iter->first]=0;
1592 for ( iter = columns.begin(); iter != columns.end() ; iter++ ) {
1594 float rand = CLHEP::RandFlat::shoot(engine);
1595 if( rand > columnEfficiency ) columns[iter->first]=0;
1605 int col = ip.second;
1607 pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1608 int dColInChip = pIndexConverter->DColumn(colROC);
1610 int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1613 float rand = CLHEP::RandFlat::shoot(engine);
1614 if( chips[chipIndex]==0 || columns[dColInDet]==0
1615 || rand>pixelEfficiency ) {
1635 float pseudoRadDamage = 0.0;
1640 int layerIndex=tTopo->
layer(detID);
1658 pseudoRadDamage = 0.;
1664 return pseudoRadDamage;
1666 LogDebug (
"Pixel Digitizer") <<
" enter pixel_aging " << pseudoRadDamage;
1681 const float signalInElectrons)
const {
1708 throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;
1722 newAmp = p3 + p2 * tanh(p0*signal - p1);
1767 const DetId& detId)
const {
1804 dir_z = -(1 + alpha2_BPix* Bfield.z()*Bfield.z() );
1809 dir_z = -(1 + alpha2_FPix* Bfield.z()*Bfield.z() );
1812 throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;
1819 alpha2 = lorentzAngle * lorentzAngle;
1821 dir_x = -( lorentzAngle * Bfield.y() + alpha2 * Bfield.z()* Bfield.x() );
1822 dir_y = +( lorentzAngle * Bfield.x() - alpha2 * Bfield.z()* Bfield.y() );
1823 dir_z = -(1 + alpha2 * Bfield.z()*Bfield.z() );
1830 LogDebug (
"Pixel Digitizer") <<
" The drift direction in local coordinate is " 1831 << theDriftDirection ;
1834 return theDriftDirection;
1849 int col = ip.second;
1866 Parameters::const_iterator itDeadModules=
DeadModules.begin();
1869 for(; itDeadModules !=
DeadModules.end(); ++itDeadModules){
1870 int Dead_detID = itDeadModules->getParameter<
int>(
"Dead_detID");
1871 if(detid == Dead_detID){
1884 if(Module==
"whole"){
1893 if(Module==
"tbmA" && ip.first>=80 && ip.first<=159){
1897 if( Module==
"tbmB" && ip.first<=79){
1912 for (
size_t id=0;
id<disabledModules.size();
id++)
1914 if(detID==disabledModules[
id].DetID){
1916 badmodule = disabledModules[
id];
1936 std::vector<GlobalPixel> badrocpositions (0);
1937 for(
unsigned int j = 0; j < 16; j++){
1941 typedef std::vector<CablingPathToDetUnit>::const_iterator
IT;
1942 for (IT it = path.begin(); it != path.end(); ++it) {
1947 badrocpositions.push_back(global);
1958 for(std::vector<GlobalPixel>::const_iterator it = badrocpositions.begin(); it != badrocpositions.end(); ++it){
1959 if(it->row >= 80 && ip.first >= 80 ){
1960 if((
std::abs(ip.second - it->col) < 26) ) {
i->second.set(0.);}
1961 else if(it->row==120 && ip.second-it->col==26){
i->second.set(0.);}
1962 else if(it->row==119 && it->col-ip.second==26){
i->second.set(0.);}
1964 else if(it->row < 80 && ip.first < 80 ){
1965 if((
std::abs(ip.second - it->col) < 26) ){
i->second.set(0.);}
1966 else if(it->row==40 && ip.second-it->col==26){
i->second.set(0.);}
1967 else if(it->row==39 && it->col-ip.second==26){
i->second.set(0.);}
int adc(sample_type sample)
get the ADC sample (12 bits)
void init(const edm::EventSetup &es)
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)
signal_map_type::const_iterator signal_map_const_iterator
Local3DVector LocalVector
float tof() const
deprecated name for timeOfFlight()
const bool use_deadmodule_DB_
edm::ESHandle< SiPixelFedCablingMap > map_
void init_DynIneffDB(const edm::EventSetup &, const unsigned int &)
const float electronsPerVCAL
const double theThresholdSmearing_FPix
Point3DBase< Scalar, LocalTag > LocalPoint
std::map< int, CalParameters, std::less< int > > initCal() const
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
LocalVector DriftDirection(const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
SiPixelDigitizerAlgorithm(const edm::ParameterSet &conf)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
const std::vector< float > & getMix_TrueInteractions() 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())
const std::vector< int > & getMix_bunchCrossing() const
const double theThresholdSmearing_BPix_L1
unsigned int pxbLadder(const DetId &id) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual std::pair< float, float > pitch() const =0
const float theThresholdInE_FPix
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
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
const double theThresholdSmearing_BPix_L2
identify pixel inside single ROC
const bool use_ineff_from_db_
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)
uint32_t rawId() const
get the raw id
void induce_signal(const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const PixelGeomDetUnit *pixdet, const std::vector< SignalPoint > &collection_points)
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.
bunchspace
in terms of 25 ns
const std::map< int, CalParameters, std::less< int > > calmap
double theInstLumiScaleFactor
const Parameters DeadModules
float pixel_aging(const PixelAging &aging, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo) const
double thePixelChipEfficiency[20]
const float theTofUpperCut
const bool use_module_killing_
std::vector< double > pu_scale
void module_killing_DB(uint32_t detID)
static int pixelToChannelROC(const int rowROC, const int colROC)
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
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
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
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const float theThresholdInE_BPix_L1
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
const float electronsPerVCAL_L1_Offset
unsigned int pxfModule(const DetId &id) const
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_
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)
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 *)
const int theAdcFullScaleStack
row and collumn in ROC representation
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 int layer(const DetId &id) const
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
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
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]
std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const override
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
const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const override
std::map< uint32_t, double > PixelGeomFactors
std::map< uint32_t, double > ChipGeomFactors
Detector det() const
get the detector field from this detid
virtual SubDetector subDetector() const
Which subdetector.
const bool addNoisyPixels
const PixelAging pixelAging_
const PositionType & position() const
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
*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 *)
const std::map< unsigned int, double > & getChipGeomFactors() const