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),
180 theThresholdSmearing_FPix(conf.getParameter<double>(
"ThresholdSmearing_FPix")),
181 theThresholdSmearing_BPix(conf.getParameter<double>(
"ThresholdSmearing_BPix")),
182 theThresholdSmearing_BPix_L1(conf.exists(
"ThresholdSmearing_BPix_L1")?conf.getParameter<double>(
"ThresholdSmearing_BPix_L1"):theThresholdSmearing_BPix),
185 electronsPerVCAL(conf.getParameter<double>(
"ElectronsPerVcal")),
186 electronsPerVCAL_Offset(conf.getParameter<double>(
"ElectronsPerVcal_Offset")),
190 theTofLowerCut(conf.getParameter<double>(
"TofLowerCut")),
191 theTofUpperCut(conf.getParameter<double>(
"TofUpperCut")),
194 tanLorentzAnglePerTesla_FPix(use_LorentzAngle_DB_ ? 0.0 : conf.getParameter<double>(
"TanLorentzAnglePerTesla_FPix")),
195 tanLorentzAnglePerTesla_BPix(use_LorentzAngle_DB_ ? 0.0 : conf.getParameter<double>(
"TanLorentzAnglePerTesla_BPix")),
198 FPix_p0(conf.getParameter<double>(
"FPix_SignalResponse_p0")),
199 FPix_p1(conf.getParameter<double>(
"FPix_SignalResponse_p1")),
200 FPix_p2(conf.getParameter<double>(
"FPix_SignalResponse_p2")),
201 FPix_p3(conf.getParameter<double>(
"FPix_SignalResponse_p3")),
203 BPix_p0(conf.getParameter<double>(
"BPix_SignalResponse_p0")),
204 BPix_p1(conf.getParameter<double>(
"BPix_SignalResponse_p1")),
205 BPix_p2(conf.getParameter<double>(
"BPix_SignalResponse_p2")),
206 BPix_p3(conf.getParameter<double>(
"BPix_SignalResponse_p3")),
209 addNoise(conf.getParameter<bool>(
"AddNoise")),
213 addChargeVCALSmearing(conf.getParameter<bool>(
"ChargeVCALSmearing")),
219 fluctuateCharge(conf.getUntrackedParameter<bool>(
"FluctuateCharge",
true)),
225 addThresholdSmearing(conf.getParameter<bool>(
"AddThresholdSmearing")),
228 doMissCalibrate(conf.getParameter<bool>(
"MissCalibrate")),
229 theGainSmearing(conf.getParameter<double>(
"GainSmearing")),
230 theOffsetSmearing(conf.getParameter<double>(
"OffsetSmearing")),
233 AddPixelAging(conf.getParameter<bool>(
"DoPixelAging")),
238 tMax(conf.getParameter<double>(
"deltaProductionCut")),
245 pixelAging_(conf,AddPixelAging,NumberOfBarrelLayers,NumberOfEndcapDisks)
247 LogInfo (
"PixelDigitizer ") <<
"SiPixelDigitizerAlgorithm constructed" 248 <<
"Configuration parameters:" 249 <<
"Threshold/Gain = " 250 <<
"threshold in electron FPix = " 252 <<
"threshold in electron BPix = " 254 <<
"threshold in electron BPix Layer1 = " 257 <<
" The delta cut-off is set to " <<
tMax 262 std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> >
269 std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> >
calmap;
272 <<
" miss-calibrate the pixel amplitude ";
274 const bool ReadCalParameters =
false;
275 if(ReadCalParameters) {
278 char filename[80] =
"phCalibrationFit_C0.dat";
282 cout <<
" File not found " << endl;
285 cout <<
" file opened : " << filename << endl;
288 for (
int i = 0;
i < 3;
i++) {
289 in_file.getline(line, 500,
'\n');
293 cout <<
" test map" << endl;
299 for(
int i=0;
i<(52*80);
i++) {
300 in_file >> par0 >> par1 >> par2 >> par3 >> name >> colid >> rowid;
302 cerr <<
"Cannot read data file" << endl;
305 if( in_file.eof() != 0 ) {
306 cerr << in_file.eof() <<
" " << in_file.gcount() <<
" " 307 << in_file.fail() <<
" " << in_file.good() <<
" end of file " 323 calmap.insert(std::pair<int,CalParameters>(chan,onePix));
327 if(rowid!=p.first)
cout<<
" wrong channel row "<<rowid<<
" "<<p.first<<endl;
328 if(colid!=p.second)
cout<<
" wrong channel col "<<colid<<
" "<<p.second<<endl;
332 cout <<
" map size " << calmap.size() <<
" max "<<calmap.max_size() <<
" " 333 <<calmap.empty()<< endl;
356 LogDebug (
"PixelDigitizer")<<
"SiPixelDigitizerAlgorithm deleted";
365 if (AddPixelInefficiency){
367 conf.
exists(
"thePixelColEfficiency_BPix1") && conf.
exists(
"thePixelColEfficiency_BPix2") && conf.
exists(
"thePixelColEfficiency_BPix3") &&
368 conf.
exists(
"thePixelColEfficiency_FPix1") && conf.
exists(
"thePixelColEfficiency_FPix2") &&
369 conf.
exists(
"thePixelEfficiency_BPix1") && conf.
exists(
"thePixelEfficiency_BPix2") && conf.
exists(
"thePixelEfficiency_BPix3") &&
370 conf.
exists(
"thePixelEfficiency_FPix1") && conf.
exists(
"thePixelEfficiency_FPix2") &&
371 conf.
exists(
"thePixelChipEfficiency_BPix1") && conf.
exists(
"thePixelChipEfficiency_BPix2") && conf.
exists(
"thePixelChipEfficiency_BPix3") &&
372 conf.
exists(
"thePixelChipEfficiency_FPix1") && conf.
exists(
"thePixelChipEfficiency_FPix2");
373 if (NumberOfBarrelLayers==3) FromConfig = FromConfig && conf.
exists(
"theLadderEfficiency_BPix1") && conf.
exists(
"theLadderEfficiency_BPix2") && conf.
exists(
"theLadderEfficiency_BPix3") &&
374 conf.
exists(
"theModuleEfficiency_BPix1") && conf.
exists(
"theModuleEfficiency_BPix2") && conf.
exists(
"theModuleEfficiency_BPix3") &&
375 conf.
exists(
"thePUEfficiency_BPix1") && conf.
exists(
"thePUEfficiency_BPix2") && conf.
exists(
"thePUEfficiency_BPix3") &&
376 conf.
exists(
"theInnerEfficiency_FPix1") && conf.
exists(
"theInnerEfficiency_FPix2") &&
377 conf.
exists(
"theOuterEfficiency_FPix1") && conf.
exists(
"theOuterEfficiency_FPix2") &&
378 conf.
exists(
"thePUEfficiency_FPix_Inner") && conf.
exists(
"thePUEfficiency_FPix_Outer") &&
379 conf.
exists(
"theInstLumiScaleFactor");
380 if (NumberOfBarrelLayers>=4) FromConfig = FromConfig && conf.
exists(
"thePixelColEfficiency_BPix4") &&
381 conf.
exists(
"thePixelEfficiency_BPix4") && conf.
exists(
"thePixelChipEfficiency_BPix4");
382 if (NumberOfEndcapDisks>=3) FromConfig = FromConfig && conf.
exists(
"thePixelColEfficiency_FPix4") &&
383 conf.
exists(
"thePixelEfficiency_FPix3") && conf.
exists(
"thePixelChipEfficiency_FPix3");
385 LogInfo (
"PixelDigitizer ") <<
"The PixelDigitizer inefficiency configuration is read from the config file.\n";
386 theInstLumiScaleFactor = conf.
getParameter<
double>(
"theInstLumiScaleFactor");
388 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix1");
389 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix2");
390 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix3");
391 if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix4");}
394 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix1");
395 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix2");
396 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix3");
397 if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix4");}
400 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix1");
401 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix2");
402 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix3");
403 if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix4");}
405 if (NumberOfBarrelLayers==3){
407 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix1");
408 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix2");
409 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix3");
410 if ( ((theLadderEfficiency_BPix[0].
size()!=20) || (theLadderEfficiency_BPix[1].
size()!=32) ||
411 (theLadderEfficiency_BPix[2].
size()!=44)) && (NumberOfBarrelLayers==3) )
412 throw cms::Exception(
"Configuration") <<
"Wrong ladder number in efficiency config!";
415 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix1");
416 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix2");
417 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix3");
418 if ( ((theModuleEfficiency_BPix[0].
size()!=4) || (theModuleEfficiency_BPix[1].
size()!=4) ||
419 (theModuleEfficiency_BPix[2].
size()!=4)) && (NumberOfBarrelLayers==3) )
420 throw cms::Exception(
"Configuration") <<
"Wrong module number in efficiency config!";
422 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix1"));
423 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix2"));
424 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix3"));
425 if ( ((thePUEfficiency[0].
size()==0) || (thePUEfficiency[1].
size()==0) ||
426 (thePUEfficiency[2].
size()==0)) && (NumberOfBarrelLayers==3) )
427 throw cms::Exception(
"Configuration") <<
"At least one PU efficiency (BPix) number is needed in efficiency config!";
430 if (NumberOfBarrelLayers>=5){
431 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
434 thePixelColEfficiency[
j-1]=0.999;
435 thePixelEfficiency[
j-1]=0.999;
436 thePixelChipEfficiency[
j-1]=0.999;
441 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix1");
442 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix2");
443 if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix3");}
445 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix1");
446 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix2");
447 if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix3");}
449 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix1");
450 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix2");
451 if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix3");}
453 if (NumberOfEndcapDisks>=4){
454 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
457 thePixelColEfficiency[
j-1]=0.999;
458 thePixelEfficiency[
j-1]=0.999;
459 thePixelChipEfficiency[
j-1]=0.999;
463 if (NumberOfBarrelLayers==3){
465 theInnerEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theInnerEfficiency_FPix1");
466 theInnerEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theInnerEfficiency_FPix2");
468 theOuterEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theOuterEfficiency_FPix1");
469 theOuterEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theOuterEfficiency_FPix2");
470 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_FPix_Inner"));
471 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_FPix_Outer"));
472 if ( ((thePUEfficiency[3].
size()==0) || (thePUEfficiency[4].
size()==0)) && (NumberOfEndcapDisks==2) )
473 throw cms::Exception(
"Configuration") <<
"At least one (FPix) PU efficiency number is needed in efficiency config!";
474 pu_scale.resize(thePUEfficiency.size());
477 else LogInfo (
"PixelDigitizer ") <<
"The PixelDigitizer inefficiency configuration is read from the database.\n";
495 const std::map<uint32_t, double>& PixelGeomFactorsDB = SiPixelDynamicInefficiency->
getPixelGeomFactors();
496 const std::map<uint32_t, double>& ColGeomFactorsDB = SiPixelDynamicInefficiency->
getColGeomFactors();
497 const std::map<uint32_t, double>& ChipGeomFactorsDB = SiPixelDynamicInefficiency->
getChipGeomFactors();
498 const std::map<uint32_t, std::vector<double> >& PUFactors = SiPixelDynamicInefficiency->
getPUFactors();
499 std::vector<uint32_t > DetIdmasks = SiPixelDynamicInefficiency->
getDetIdmasks();
502 for(TrackerGeometry::DetUnitContainer::const_iterator it_module = geom->
detUnits().begin(); it_module != geom->
detUnits().end(); it_module++) {
503 if( dynamic_cast<PixelGeomDetUnit const*>((*it_module))==0)
continue;
504 const DetId detid = (*it_module)->geographicalId();
505 uint32_t rawid = detid.
rawId();
506 PixelGeomFactors[rawid] = 1;
507 ColGeomFactors[rawid] = 1;
508 ChipGeomFactors[rawid] = 1;
509 for (
auto db_factor : PixelGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) PixelGeomFactors[rawid] *= db_factor.second;
510 for (
auto db_factor : ColGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) ColGeomFactors[rawid] *= db_factor.second;
511 for (
auto db_factor : ChipGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) ChipGeomFactors[rawid] *= db_factor.second;
517 for (
auto factor : PUFactors) {
519 for(TrackerGeometry::DetUnitContainer::const_iterator it_module = geom->
detUnits().begin(); it_module != geom->
detUnits().end(); it_module++) {
520 if( dynamic_cast<PixelGeomDetUnit const*>((*it_module))==0)
continue;
521 const DetId detid = (*it_module)->geographicalId();
522 if (!
matches(detid, db_id, DetIdmasks))
continue;
523 if (iPU.count(detid.
rawId())) {
524 throw cms::Exception(
"Database")<<
"Multiple db_ids match to same module in SiPixelDynamicInefficiency DB Object";
529 thePUEfficiency.push_back(factor.second);
532 pu_scale.resize(thePUEfficiency.size());
537 for (
size_t i=0;
i<DetIdmasks.size(); ++
i) {
554 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix1");
555 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix2");
556 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix3");
557 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix4");
560 if (NumberOfBarrelLayers>=5){
561 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
564 thePixelPseudoRadDamage[
j-1]=0.;
569 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix1");
570 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix2");
571 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix3");
574 if (NumberOfEndcapDisks>=4){
575 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
578 thePixelPseudoRadDamage[
j-1]=0.;
588 std::vector<PSimHit>::const_iterator inputEnd,
589 const size_t inputBeginGlobalIndex,
590 const unsigned int tofBin,
594 CLHEP::HepRandomEngine* engine) {
599 size_t simHitGlobalIndex=inputBeginGlobalIndex;
600 for (std::vector<PSimHit>::const_iterator ssbegin = inputBegin; ssbegin != inputEnd; ++ssbegin, ++simHitGlobalIndex) {
602 if((*ssbegin).detUnitId() != detId) {
608 << (*ssbegin).particleType() <<
" " << (*ssbegin).pabs() <<
" " 609 << (*ssbegin).energyLoss() <<
" " << (*ssbegin).tof() <<
" " 610 << (*ssbegin).trackId() <<
" " << (*ssbegin).processType() <<
" " 611 << (*ssbegin).detUnitId()
612 << (*ssbegin).entryPoint() <<
" " << (*ssbegin).exitPoint() ;
616 std::vector<EnergyDepositUnit> ionization_points;
617 std::vector<SignalPoint> collection_points;
624 drift(*ssbegin, pixdet, bfield, tTopo, ionization_points, collection_points);
626 induce_signal(*ssbegin, simHitGlobalIndex, tofBin, pixdet, collection_points);
642 std::vector<int>::const_iterator
pu;
643 std::vector<int>::const_iterator pu0 = bunchCrossing.end();
645 for (pu=bunchCrossing.begin(); pu!=bunchCrossing.end(); ++
pu) {
652 if (pu0!=bunchCrossing.end()) {
655 double instlumi_pow=1.;
659 instlumi_pow*=instlumi;
673 std::vector<PixelDigi>& digis,
674 std::vector<PixelDigiSimLink>& simlinks,
676 CLHEP::HepRandomEngine* engine) {
687 int numRows = topol->
nrows();
694 float thePixelThresholdInE = 0.;
698 int lay = tTopo->
layer(detID);
719 else {
throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;}
727 <<
" PixelDigitizer " 728 << numColumns <<
" " << numRows <<
" " << moduleThickness;
749 make_digis(thePixelThresholdInE, detID, pixdet, digis, simlinks, tTopo);
752 LogDebug (
"PixelDigitizer") <<
"[SiPixelDigitizerAlgorithm] converted " << digis.size() <<
" PixelDigis in DetUnit" << detID;
763 const float SegmentLength = 0.0010;
770 float length = direction.
mag();
772 int NumberOfSegments =
int ( length / SegmentLength);
773 if(NumberOfSegments < 1) NumberOfSegments = 1;
777 <<
" enter primary_ionzation " << NumberOfSegments
785 float* elossVector =
new float[NumberOfSegments];
792 float momentum = hit.
pabs();
795 elossVector, engine);
798 ionization_points.resize( NumberOfSegments);
801 for (
int i = 0;
i != NumberOfSegments;
i++) {
804 float((
i+0.5)/NumberOfSegments) * direction;
812 ionization_points[
i] = edu;
816 <<
i <<
" " << ionization_points[
i].x() <<
" " 817 << ionization_points[
i].y() <<
" " 818 << ionization_points[
i].z() <<
" " 819 << ionization_points[
i].energy();
824 delete[] elossVector;
832 float eloss,
float length,
833 int NumberOfSegs,
float elossVector[],
834 CLHEP::HepRandomEngine* engine)
const {
841 double particleMass = 139.6;
844 if(pid==11) particleMass = 0.511;
845 else if(pid==13) particleMass = 105.7;
846 else if(pid==321) particleMass = 493.7;
847 else if(pid==2212) particleMass = 938.3;
850 float segmentLength = length/NumberOfSegs;
855 double segmentEloss = (1000.*eloss)/NumberOfSegs;
856 for (
int i=0;
i<NumberOfSegs;
i++) {
862 double deltaCutoff =
tMax;
863 de =
fluctuate->SampleFluctuations(
double(particleMomentum*1000.),
864 particleMass, deltaCutoff,
865 double(segmentLength*10.),
866 segmentEloss, engine )/1000.;
873 float ratio = eloss/sum;
875 for (
int ii=0;
ii<NumberOfSegs;
ii++) elossVector[
ii]= ratio*elossVector[
ii];
877 float averageEloss = eloss/NumberOfSegs;
878 for (
int ii=0;
ii<NumberOfSegs;
ii++) elossVector[
ii]= averageEloss;
890 const std::vector<EnergyDepositUnit>& ionization_points,
891 std::vector<SignalPoint>& collection_points)
const {
894 LogDebug (
"Pixel Digitizer") <<
" enter drift " ;
897 collection_points.resize(ionization_points.size());
900 if(driftDir.
z() ==0.) {
901 LogWarning(
"Magnetic field") <<
" pxlx: drift in z is zero ";
909 float TanLorenzAngleX, TanLorenzAngleY,dir_z, CosLorenzAngleX,
912 TanLorenzAngleX = driftDir.
x();
913 TanLorenzAngleY = driftDir.
y();
914 dir_z = driftDir.
z();
915 CosLorenzAngleX = 1./
sqrt(1.+TanLorenzAngleX*TanLorenzAngleX);
916 CosLorenzAngleY = 1./
sqrt(1.+TanLorenzAngleY*TanLorenzAngleY);
919 TanLorenzAngleX = driftDir.
x();
920 TanLorenzAngleY = 0.;
921 dir_z = driftDir.
z();
922 CosLorenzAngleX = 1./
sqrt(1.+TanLorenzAngleX*TanLorenzAngleX);
923 CosLorenzAngleY = 1.;
929 <<
" Lorentz Tan " << TanLorenzAngleX <<
" " << TanLorenzAngleY <<
" " 930 << CosLorenzAngleX <<
" " << CosLorenzAngleY <<
" " 931 << moduleThickness*TanLorenzAngleX <<
" " << driftDir;
940 for (
unsigned int i = 0;
i != ionization_points.size();
i++) {
942 float SegX, SegY, SegZ;
943 SegX = ionization_points[
i].
x();
944 SegY = ionization_points[
i].y();
945 SegZ = ionization_points[
i].z();
950 DriftDistance = moduleThickness/2. - (dir_z * SegZ);
960 if( DriftDistance < 0.) {
962 }
else if( DriftDistance > moduleThickness )
963 DriftDistance = moduleThickness;
966 float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
967 float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
970 float CloudCenterX = SegX + XDriftDueToMagField;
971 float CloudCenterY = SegY + YDriftDueToMagField;
974 DriftLength =
sqrt( DriftDistance*DriftDistance +
975 XDriftDueToMagField*XDriftDueToMagField +
976 YDriftDueToMagField*YDriftDueToMagField );
982 Sigma_x = Sigma / CosLorenzAngleX ;
983 Sigma_y = Sigma / CosLorenzAngleY ;
986 float energyOnCollector = ionization_points[
i].energy();
991 energyOnCollector *=
exp( -1*kValue*DriftDistance/moduleThickness );
996 <<
" Dift DistanceZ= "<<DriftDistance<<
" module thickness= "<<moduleThickness
997 <<
" Start Energy= "<<ionization_points[
i].energy()<<
" Energy after loss= "<<energyOnCollector;
1000 Sigma_x, Sigma_y, hit.
tof(), energyOnCollector );
1003 collection_points[
i] = (
sp);
1012 const size_t hitIndex,
1013 const unsigned int tofBin,
1015 const std::vector<SignalPoint>& collection_points) {
1026 <<
" enter induce_signal, " 1027 << topol->
pitch().first <<
" " << topol->
pitch().second;
1031 typedef std::map< int, float, std::less<int> > hit_map_type;
1032 hit_map_type hit_signal;
1035 std::map<int, float, std::less<int> >
x,
y;
1040 for ( std::vector<SignalPoint>::const_iterator
i=collection_points.begin();
1041 i != collection_points.end(); ++
i) {
1043 float CloudCenterX =
i->position().x();
1044 float CloudCenterY =
i->position().y();
1047 float Charge =
i->amplitude();
1058 <<
" cloud " <<
i->position().x() <<
" " <<
i->position().y() <<
" " 1059 <<
i->sigma_x() <<
" " <<
i->sigma_y() <<
" " <<
i->amplitude();
1082 int IPixRightUpX =
int( floor( mp.
x()));
1083 int IPixRightUpY =
int( floor( mp.
y()));
1086 LogDebug (
"Pixel Digitizer") <<
" right-up " << PointRightUp <<
" " 1087 << mp.
x() <<
" " << mp.
y() <<
" " 1088 << IPixRightUpX <<
" " << IPixRightUpY ;
1093 int IPixLeftDownX =
int( floor( mp.
x()));
1094 int IPixLeftDownY =
int( floor( mp.
y()));
1097 LogDebug (
"Pixel Digitizer") <<
" left-down " << PointLeftDown <<
" " 1098 << mp.
x() <<
" " << mp.
y() <<
" " 1099 << IPixLeftDownX <<
" " << IPixLeftDownY ;
1103 int numColumns = topol->
ncolumns();
1104 int numRows = topol->
nrows();
1106 IPixRightUpX = numRows>IPixRightUpX ? IPixRightUpX : numRows-1 ;
1107 IPixRightUpY = numColumns>IPixRightUpY ? IPixRightUpY : numColumns-1 ;
1108 IPixLeftDownX = 0<IPixLeftDownX ? IPixLeftDownX : 0 ;
1109 IPixLeftDownY = 0<IPixLeftDownY ? IPixLeftDownY : 0 ;
1116 for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) {
1117 float xUB, xLB, UpperBound, LowerBound;
1122 if(ix == 0 || SigmaX==0. )
1127 LowerBound = 1-
calcQ((xLB-CloudCenterX)/SigmaX);
1130 if(ix == numRows-1 || SigmaX==0. )
1135 UpperBound = 1. -
calcQ((xUB-CloudCenterX)/SigmaX);
1138 float TotalIntegrationRange = UpperBound - LowerBound;
1139 x[ix] = TotalIntegrationRange;
1147 for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) {
1148 float yUB, yLB, UpperBound, LowerBound;
1150 if(iy == 0 || SigmaY==0.)
1155 LowerBound = 1. -
calcQ((yLB-CloudCenterY)/SigmaY);
1158 if(iy == numColumns-1 || SigmaY==0. )
1163 UpperBound = 1. -
calcQ((yUB-CloudCenterY)/SigmaY);
1166 float TotalIntegrationRange = UpperBound - LowerBound;
1167 y[iy] = TotalIntegrationRange;
1174 for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) {
1175 for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) {
1177 float ChargeFraction = Charge*x[ix]*y[iy];
1179 if( ChargeFraction > 0. ) {
1182 hit_signal[
chan] += ChargeFraction;
1192 <<
" pixel " << ix <<
" " << iy <<
" - "<<
" " 1193 << chan <<
" " << ChargeFraction<<
" " 1194 << mp.
x() <<
" " << mp.
y() <<
" " 1195 << lp.
x() <<
" " << lp.
y() <<
" " 1225 for ( hit_map_type::const_iterator im = hit_signal.begin();
1226 im != hit_signal.end(); ++im) {
1227 int chan = (*im).first;
1228 theSignal[
chan] += (
makeDigiSimLinks_ ?
Amplitude( (*im).second, &hit, hitIndex, tofBin, (*im).second) : Amplitude( (*im).second, (*im).second) ) ;
1233 <<
" pixel " << ip.first <<
" " << ip.second <<
" " 1246 std::vector<PixelDigi>& digis,
1247 std::vector<PixelDigiSimLink>& simlinks,
1251 LogDebug (
"Pixel Digitizer") <<
" make digis "<<
" " 1255 <<
" List pixels passing threshold ";
1260 signalMaps::const_iterator it =
_signal.find(detID);
1269 std::map<TrackEventId, float> simi;
1273 float signalInElectrons = (*i).second ;
1280 if( signalInElectrons >= thePixelThresholdInE) {
1282 int chan = (*i).first;
1289 int col = ip.second;
1306 << (*i).first <<
" " << (*i).second <<
" " << signalInElectrons
1307 <<
" " << adc << ip.first <<
" " << ip.second ;
1311 digis.emplace_back(ip.first, ip.second, adc);
1316 for(
const auto&
info: (*i).second.hitInfos()) {
1319 simi[std::make_pair(
info.trackId(),
info.eventId().rawId())] += (*i).second.individualampl()[il];
1324 for(
const auto&
info: (*i).second.hitInfos()) {
1326 auto found = simi.find(std::make_pair(
info.trackId(),
info.eventId().rawId()));
1327 if(
found == simi.end())
1330 float sum_samechannel =
found->second;
1331 float fraction=sum_samechannel/(*i).second;
1332 if(fraction>1.
f) fraction=1.f;
1348 float thePixelThreshold,
1349 CLHEP::HepRandomEngine* engine) {
1360 float theSmearedChargeRMS = 0.0;
1366 if((*i).second < 3000)
1368 theSmearedChargeRMS = 543.6 - (*i).second * 0.093;
1369 }
else if((*i).second < 6000){
1370 theSmearedChargeRMS = 307.6 - (*i).second * 0.01;
1372 theSmearedChargeRMS = -432.4 +(*i).second * 0.123;
1376 float noise_ChargeVCALSmearing = theSmearedChargeRMS * CLHEP::RandGaussQ::shoot(engine, 0., 1.);
1380 if(((*i).second +
Amplitude(noise+noise_ChargeVCALSmearing, -1.)) < 0. ) {
1381 (*i).second.set(0);}
1383 (*i).second +=
Amplitude(noise+noise_ChargeVCALSmearing, -1.);
1393 if(((*i).second +
Amplitude(noise, -1.)) < 0. ) {
1394 (*i).second.set(0);}
1406 int numColumns = topol->
ncolumns();
1407 int numRows = topol->
nrows();
1411 int numberOfPixels = (numRows * numColumns);
1412 std::map<int,float, std::less<int> > otherPixels;
1413 std::map<int,float, std::less<int> >::iterator mapI;
1423 <<
" Add noisy pixels " << numRows <<
" " 1426 << otherPixels.size() ;
1430 for (mapI = otherPixels.begin(); mapI!= otherPixels.end(); mapI++) {
1431 int iy = ((*mapI).first) / numRows;
1432 int ix = ((*mapI).first) - (iy*numRows);
1435 if( iy < 0 || iy > (numColumns-1) )
1436 LogWarning (
"Pixel Geometry") <<
" error in iy " << iy ;
1437 if( ix < 0 || ix > (numRows-1) )
1438 LogWarning (
"Pixel Geometry") <<
" error in ix " << ix ;
1444 <<
" Storing noise = " << (*mapI).first <<
" " << (*mapI).second
1445 <<
" " << ix <<
" " << iy <<
" " <<
chan ;
1448 if(theSignal[chan] == 0){
1450 int noise=
int( (*mapI).second );
1463 CLHEP::HepRandomEngine* engine) {
1468 int numColumns = topol->
ncolumns();
1469 int numRows = topol->
nrows();
1472 double pixelEfficiency = 1.0;
1473 double columnEfficiency = 1.0;
1474 double chipEfficiency = 1.0;
1480 int layerIndex=tTopo->
layer(detID);
1487 if(numColumns>416)
LogWarning (
"Pixel Geometry") <<
" wrong columns in barrel "<<numColumns;
1488 if(numRows>160)
LogWarning (
"Pixel Geometry") <<
" wrong rows in barrel "<<numRows;
1492 if (module<=4) module=5-
module;
1502 unsigned int panelIndex=tTopo->
pxfPanel(detID);
1503 unsigned int moduleIndex=tTopo->
pxfModule(detID);
1513 if(numColumns>260 || numRows>160) {
1514 if(numColumns>260)
LogWarning (
"Pixel Geometry") <<
" wrong columns in endcaps "<<numColumns;
1515 if(numRows>160)
LogWarning (
"Pixel Geometry") <<
" wrong rows in endcaps "<<numRows;
1518 if ((panelIndex==1 && (moduleIndex==1 || moduleIndex==2)) || (panelIndex==2 && moduleIndex==1)) {
1526 pixelEfficiency = 0.999;
1527 columnEfficiency = 0.999;
1528 chipEfficiency = 0.999;
1537 LogDebug (
"Pixel Digitizer") <<
" enter pixel_inefficiency " << pixelEfficiency <<
" " 1538 << columnEfficiency <<
" " << chipEfficiency;
1543 std::unique_ptr<PixelIndices> pIndexConverter(
new PixelIndices(numColumns,numRows));
1548 std::map<int, int, std::less<int> >chips,
columns;
1549 std::map<int, int, std::less<int> >::iterator iter;
1555 int chan =
i->first;
1558 int col = ip.second;
1560 pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1561 int dColInChip = pIndexConverter->DColumn(colROC);
1563 int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1566 columns[dColInDet]++;
1570 for ( iter = chips.begin(); iter != chips.end() ; iter++ ) {
1572 float rand = CLHEP::RandFlat::shoot(engine);
1573 if( rand > chipEfficiency ) chips[iter->first]=0;
1577 for ( iter = columns.begin(); iter != columns.end() ; iter++ ) {
1579 float rand = CLHEP::RandFlat::shoot(engine);
1580 if( rand > columnEfficiency ) columns[iter->first]=0;
1590 int col = ip.second;
1592 pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1593 int dColInChip = pIndexConverter->DColumn(colROC);
1595 int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1598 float rand = CLHEP::RandFlat::shoot(engine);
1599 if( chips[chipIndex]==0 || columns[dColInDet]==0
1600 || rand>pixelEfficiency ) {
1620 float pseudoRadDamage = 0.0;
1625 int layerIndex=tTopo->
layer(detID);
1643 pseudoRadDamage = 0.;
1649 return pseudoRadDamage;
1651 LogDebug (
"Pixel Digitizer") <<
" enter pixel_aging " << pseudoRadDamage;
1666 const float signalInElectrons)
const {
1693 throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;
1704 newAmp = p3 + p2 * tanh(p0*signal - p1);
1749 const DetId& detId)
const {
1786 dir_z = -(1 + alpha2_BPix* Bfield.z()*Bfield.z() );
1791 dir_z = -(1 + alpha2_FPix* Bfield.z()*Bfield.z() );
1794 throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;
1801 alpha2 = lorentzAngle * lorentzAngle;
1803 dir_x = -( lorentzAngle * Bfield.y() + alpha2 * Bfield.z()* Bfield.x() );
1804 dir_y = +( lorentzAngle * Bfield.x() - alpha2 * Bfield.z()* Bfield.y() );
1805 dir_z = -(1 + alpha2 * Bfield.z()*Bfield.z() );
1812 LogDebug (
"Pixel Digitizer") <<
" The drift direction in local coordinate is " 1813 << theDriftDirection ;
1816 return theDriftDirection;
1831 int col = ip.second;
1848 Parameters::const_iterator itDeadModules=
DeadModules.begin();
1851 for(; itDeadModules !=
DeadModules.end(); ++itDeadModules){
1852 int Dead_detID = itDeadModules->getParameter<
int>(
"Dead_detID");
1853 if(detid == Dead_detID){
1866 if(Module==
"whole"){
1875 if(Module==
"tbmA" && ip.first>=80 && ip.first<=159){
1879 if( Module==
"tbmB" && ip.first<=79){
1894 for (
size_t id=0;
id<disabledModules.size();
id++)
1896 if(detID==disabledModules[
id].DetID){
1898 badmodule = disabledModules[
id];
1918 std::vector<GlobalPixel> badrocpositions (0);
1919 for(
unsigned int j = 0;
j < 16;
j++){
1923 typedef std::vector<CablingPathToDetUnit>::const_iterator
IT;
1924 for (IT it = path.begin(); it != path.end(); ++it) {
1929 badrocpositions.push_back(global);
1940 for(std::vector<GlobalPixel>::const_iterator it = badrocpositions.begin(); it != badrocpositions.end(); ++it){
1941 if(it->row >= 80 && ip.first >= 80 ){
1942 if((
std::abs(ip.second - it->col) < 26) ) {
i->second.set(0.);}
1943 else if(it->row==120 && ip.second-it->col==26){
i->second.set(0.);}
1944 else if(it->row==119 && it->col-ip.second==26){
i->second.set(0.);}
1946 else if(it->row < 80 && ip.first < 80 ){
1947 if((
std::abs(ip.second - it->col) < 26) ){
i->second.set(0.);}
1948 else if(it->row==40 && ip.second-it->col==26){
i->second.set(0.);}
1949 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
virtual int nrows() const =0
virtual 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 double theThresholdSmearing_FPix
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 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 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
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
float missCalibrate(uint32_t detID, const PixelGeomDetUnit *pixdet, int col, int row, float amp) const
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]
virtual std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const
DetId geographicalId() const
The label of this GeomDet.
const int NumberOfEndcapDisks
virtual int channel(const LocalPoint &p) const =0
virtual const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const
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_
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
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 double electronsPerVCAL_Offset
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
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
const double electronsPerVCAL
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
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
const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.