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")),
187 electronsPerVCAL_L1(conf.exists(
"ElectronsPerVcal_L1")?conf.getParameter<double>(
"ElectronsPerVcal_L1"):electronsPerVCAL),
188 electronsPerVCAL_L1_Offset(conf.exists(
"ElectronsPerVcal_L1_Offset")?conf.getParameter<double>(
"ElectronsPerVcal_L1_Offset"):electronsPerVCAL_Offset),
192 theTofLowerCut(conf.getParameter<double>(
"TofLowerCut")),
193 theTofUpperCut(conf.getParameter<double>(
"TofUpperCut")),
196 tanLorentzAnglePerTesla_FPix(use_LorentzAngle_DB_ ? 0.0 : conf.getParameter<double>(
"TanLorentzAnglePerTesla_FPix")),
197 tanLorentzAnglePerTesla_BPix(use_LorentzAngle_DB_ ? 0.0 : conf.getParameter<double>(
"TanLorentzAnglePerTesla_BPix")),
200 FPix_p0(conf.getParameter<double>(
"FPix_SignalResponse_p0")),
201 FPix_p1(conf.getParameter<double>(
"FPix_SignalResponse_p1")),
202 FPix_p2(conf.getParameter<double>(
"FPix_SignalResponse_p2")),
203 FPix_p3(conf.getParameter<double>(
"FPix_SignalResponse_p3")),
205 BPix_p0(conf.getParameter<double>(
"BPix_SignalResponse_p0")),
206 BPix_p1(conf.getParameter<double>(
"BPix_SignalResponse_p1")),
207 BPix_p2(conf.getParameter<double>(
"BPix_SignalResponse_p2")),
208 BPix_p3(conf.getParameter<double>(
"BPix_SignalResponse_p3")),
211 addNoise(conf.getParameter<bool>(
"AddNoise")),
215 addChargeVCALSmearing(conf.getParameter<bool>(
"ChargeVCALSmearing")),
221 fluctuateCharge(conf.getUntrackedParameter<bool>(
"FluctuateCharge",
true)),
227 addThresholdSmearing(conf.getParameter<bool>(
"AddThresholdSmearing")),
230 doMissCalibrate(conf.getParameter<bool>(
"MissCalibrate")),
231 theGainSmearing(conf.getParameter<double>(
"GainSmearing")),
232 theOffsetSmearing(conf.getParameter<double>(
"OffsetSmearing")),
235 AddPixelAging(conf.getParameter<bool>(
"DoPixelAging")),
240 tMax(conf.getParameter<double>(
"deltaProductionCut")),
247 pixelAging_(conf,AddPixelAging,NumberOfBarrelLayers,NumberOfEndcapDisks)
249 LogInfo (
"PixelDigitizer ") <<
"SiPixelDigitizerAlgorithm constructed" 250 <<
"Configuration parameters:" 251 <<
"Threshold/Gain = " 252 <<
"threshold in electron FPix = " 254 <<
"threshold in electron BPix = " 256 <<
"threshold in electron BPix Layer1 = " 259 <<
" The delta cut-off is set to " <<
tMax 264 std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> >
271 std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> >
calmap;
274 <<
" miss-calibrate the pixel amplitude ";
276 const bool ReadCalParameters =
false;
277 if(ReadCalParameters) {
280 char filename[80] =
"phCalibrationFit_C0.dat";
284 cout <<
" File not found " << endl;
287 cout <<
" file opened : " << filename << endl;
290 for (
int i = 0;
i < 3;
i++) {
291 in_file.getline(line, 500,
'\n');
295 cout <<
" test map" << endl;
301 for(
int i=0;
i<(52*80);
i++) {
302 in_file >> par0 >> par1 >> par2 >> par3 >> name >> colid >> rowid;
304 cerr <<
"Cannot read data file" << endl;
307 if( in_file.eof() != 0 ) {
308 cerr << in_file.eof() <<
" " << in_file.gcount() <<
" " 309 << in_file.fail() <<
" " << in_file.good() <<
" end of file " 325 calmap.insert(std::pair<int,CalParameters>(chan,onePix));
329 if(rowid!=p.first)
cout<<
" wrong channel row "<<rowid<<
" "<<p.first<<endl;
330 if(colid!=p.second)
cout<<
" wrong channel col "<<colid<<
" "<<p.second<<endl;
334 cout <<
" map size " << calmap.size() <<
" max "<<calmap.max_size() <<
" " 335 <<calmap.empty()<< endl;
358 LogDebug (
"PixelDigitizer")<<
"SiPixelDigitizerAlgorithm deleted";
367 if (AddPixelInefficiency){
369 conf.
exists(
"thePixelColEfficiency_BPix1") && conf.
exists(
"thePixelColEfficiency_BPix2") && conf.
exists(
"thePixelColEfficiency_BPix3") &&
370 conf.
exists(
"thePixelColEfficiency_FPix1") && conf.
exists(
"thePixelColEfficiency_FPix2") &&
371 conf.
exists(
"thePixelEfficiency_BPix1") && conf.
exists(
"thePixelEfficiency_BPix2") && conf.
exists(
"thePixelEfficiency_BPix3") &&
372 conf.
exists(
"thePixelEfficiency_FPix1") && conf.
exists(
"thePixelEfficiency_FPix2") &&
373 conf.
exists(
"thePixelChipEfficiency_BPix1") && conf.
exists(
"thePixelChipEfficiency_BPix2") && conf.
exists(
"thePixelChipEfficiency_BPix3") &&
374 conf.
exists(
"thePixelChipEfficiency_FPix1") && conf.
exists(
"thePixelChipEfficiency_FPix2");
375 if (NumberOfBarrelLayers==3) FromConfig = FromConfig && conf.
exists(
"theLadderEfficiency_BPix1") && conf.
exists(
"theLadderEfficiency_BPix2") && conf.
exists(
"theLadderEfficiency_BPix3") &&
376 conf.
exists(
"theModuleEfficiency_BPix1") && conf.
exists(
"theModuleEfficiency_BPix2") && conf.
exists(
"theModuleEfficiency_BPix3") &&
377 conf.
exists(
"thePUEfficiency_BPix1") && conf.
exists(
"thePUEfficiency_BPix2") && conf.
exists(
"thePUEfficiency_BPix3") &&
378 conf.
exists(
"theInnerEfficiency_FPix1") && conf.
exists(
"theInnerEfficiency_FPix2") &&
379 conf.
exists(
"theOuterEfficiency_FPix1") && conf.
exists(
"theOuterEfficiency_FPix2") &&
380 conf.
exists(
"thePUEfficiency_FPix_Inner") && conf.
exists(
"thePUEfficiency_FPix_Outer") &&
381 conf.
exists(
"theInstLumiScaleFactor");
382 if (NumberOfBarrelLayers>=4) FromConfig = FromConfig && conf.
exists(
"thePixelColEfficiency_BPix4") &&
383 conf.
exists(
"thePixelEfficiency_BPix4") && conf.
exists(
"thePixelChipEfficiency_BPix4");
384 if (NumberOfEndcapDisks>=3) FromConfig = FromConfig && conf.
exists(
"thePixelColEfficiency_FPix4") &&
385 conf.
exists(
"thePixelEfficiency_FPix3") && conf.
exists(
"thePixelChipEfficiency_FPix3");
387 LogInfo (
"PixelDigitizer ") <<
"The PixelDigitizer inefficiency configuration is read from the config file.\n";
388 theInstLumiScaleFactor = conf.
getParameter<
double>(
"theInstLumiScaleFactor");
390 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix1");
391 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix2");
392 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix3");
393 if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_BPix4");}
396 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix1");
397 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix2");
398 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix3");
399 if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_BPix4");}
402 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix1");
403 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix2");
404 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix3");
405 if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_BPix4");}
407 if (NumberOfBarrelLayers==3){
409 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix1");
410 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix2");
411 theLadderEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theLadderEfficiency_BPix3");
412 if ( ((theLadderEfficiency_BPix[0].
size()!=20) || (theLadderEfficiency_BPix[1].
size()!=32) ||
413 (theLadderEfficiency_BPix[2].
size()!=44)) && (NumberOfBarrelLayers==3) )
414 throw cms::Exception(
"Configuration") <<
"Wrong ladder number in efficiency config!";
417 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix1");
418 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix2");
419 theModuleEfficiency_BPix[i++] = conf.
getParameter<std::vector<double> >(
"theModuleEfficiency_BPix3");
420 if ( ((theModuleEfficiency_BPix[0].
size()!=4) || (theModuleEfficiency_BPix[1].
size()!=4) ||
421 (theModuleEfficiency_BPix[2].
size()!=4)) && (NumberOfBarrelLayers==3) )
422 throw cms::Exception(
"Configuration") <<
"Wrong module number in efficiency config!";
424 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix1"));
425 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix2"));
426 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_BPix3"));
427 if ( ((thePUEfficiency[0].
size()==0) || (thePUEfficiency[1].
size()==0) ||
428 (thePUEfficiency[2].
size()==0)) && (NumberOfBarrelLayers==3) )
429 throw cms::Exception(
"Configuration") <<
"At least one PU efficiency (BPix) number is needed in efficiency config!";
432 if (NumberOfBarrelLayers>=5){
433 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
436 thePixelColEfficiency[j-1]=0.999;
437 thePixelEfficiency[j-1]=0.999;
438 thePixelChipEfficiency[j-1]=0.999;
443 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix1");
444 thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix2");
445 if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++] = conf.
getParameter<
double>(
"thePixelColEfficiency_FPix3");}
447 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix1");
448 thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix2");
449 if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++] = conf.
getParameter<
double>(
"thePixelEfficiency_FPix3");}
451 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix1");
452 thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix2");
453 if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++] = conf.
getParameter<
double>(
"thePixelChipEfficiency_FPix3");}
455 if (NumberOfEndcapDisks>=4){
456 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
459 thePixelColEfficiency[j-1]=0.999;
460 thePixelEfficiency[j-1]=0.999;
461 thePixelChipEfficiency[j-1]=0.999;
465 if (NumberOfBarrelLayers==3){
467 theInnerEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theInnerEfficiency_FPix1");
468 theInnerEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theInnerEfficiency_FPix2");
470 theOuterEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theOuterEfficiency_FPix1");
471 theOuterEfficiency_FPix[i++] = conf.
getParameter<
double>(
"theOuterEfficiency_FPix2");
472 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_FPix_Inner"));
473 thePUEfficiency.push_back(conf.
getParameter<std::vector<double> >(
"thePUEfficiency_FPix_Outer"));
474 if ( ((thePUEfficiency[3].
size()==0) || (thePUEfficiency[4].
size()==0)) && (NumberOfEndcapDisks==2) )
475 throw cms::Exception(
"Configuration") <<
"At least one (FPix) PU efficiency number is needed in efficiency config!";
476 pu_scale.resize(thePUEfficiency.size());
479 else LogInfo (
"PixelDigitizer ") <<
"The PixelDigitizer inefficiency configuration is read from the database.\n";
497 const std::map<uint32_t, double>& PixelGeomFactorsDB = SiPixelDynamicInefficiency->
getPixelGeomFactors();
498 const std::map<uint32_t, double>& ColGeomFactorsDB = SiPixelDynamicInefficiency->
getColGeomFactors();
499 const std::map<uint32_t, double>& ChipGeomFactorsDB = SiPixelDynamicInefficiency->
getChipGeomFactors();
500 const std::map<uint32_t, std::vector<double> >& PUFactors = SiPixelDynamicInefficiency->
getPUFactors();
501 std::vector<uint32_t > DetIdmasks = SiPixelDynamicInefficiency->
getDetIdmasks();
504 for(TrackerGeometry::DetUnitContainer::const_iterator it_module = geom->
detUnits().begin(); it_module != geom->
detUnits().end(); it_module++) {
505 if( dynamic_cast<PixelGeomDetUnit const*>((*it_module))==0)
continue;
506 const DetId detid = (*it_module)->geographicalId();
507 uint32_t rawid = detid.
rawId();
508 PixelGeomFactors[rawid] = 1;
509 ColGeomFactors[rawid] = 1;
510 ChipGeomFactors[rawid] = 1;
511 for (
auto db_factor : PixelGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) PixelGeomFactors[rawid] *= db_factor.second;
512 for (
auto db_factor : ColGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) ColGeomFactors[rawid] *= db_factor.second;
513 for (
auto db_factor : ChipGeomFactorsDB)
if (
matches(detid,
DetId(db_factor.first), DetIdmasks)) ChipGeomFactors[rawid] *= db_factor.second;
519 for (
auto factor : PUFactors) {
521 for(TrackerGeometry::DetUnitContainer::const_iterator it_module = geom->
detUnits().begin(); it_module != geom->
detUnits().end(); it_module++) {
522 if( dynamic_cast<PixelGeomDetUnit const*>((*it_module))==0)
continue;
523 const DetId detid = (*it_module)->geographicalId();
524 if (!
matches(detid, db_id, DetIdmasks))
continue;
525 if (iPU.count(detid.
rawId())) {
526 throw cms::Exception(
"Database")<<
"Multiple db_ids match to same module in SiPixelDynamicInefficiency DB Object";
531 thePUEfficiency.push_back(factor.second);
534 pu_scale.resize(thePUEfficiency.size());
539 for (
size_t i=0;
i<DetIdmasks.size(); ++
i) {
556 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix1");
557 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix2");
558 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix3");
559 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_BPix4");
562 if (NumberOfBarrelLayers>=5){
563 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
566 thePixelPseudoRadDamage[j-1]=0.;
571 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix1");
572 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix2");
573 thePixelPseudoRadDamage[i++] = conf.
getParameter<
double>(
"thePixelPseudoRadDamage_FPix3");
576 if (NumberOfEndcapDisks>=4){
577 if (NumberOfTotLayers>20){
throw cms::Exception(
"Configuration") <<
"SiPixelDigitizer was given more layers than it can handle";}
580 thePixelPseudoRadDamage[j-1]=0.;
590 std::vector<PSimHit>::const_iterator inputEnd,
591 const size_t inputBeginGlobalIndex,
592 const unsigned int tofBin,
596 CLHEP::HepRandomEngine* engine) {
601 size_t simHitGlobalIndex=inputBeginGlobalIndex;
602 for (std::vector<PSimHit>::const_iterator ssbegin = inputBegin; ssbegin != inputEnd; ++ssbegin, ++simHitGlobalIndex) {
604 if((*ssbegin).detUnitId() != detId) {
610 << (*ssbegin).particleType() <<
" " << (*ssbegin).pabs() <<
" " 611 << (*ssbegin).energyLoss() <<
" " << (*ssbegin).tof() <<
" " 612 << (*ssbegin).trackId() <<
" " << (*ssbegin).processType() <<
" " 613 << (*ssbegin).detUnitId()
614 << (*ssbegin).entryPoint() <<
" " << (*ssbegin).exitPoint() ;
618 std::vector<EnergyDepositUnit> ionization_points;
619 std::vector<SignalPoint> collection_points;
626 drift(*ssbegin, pixdet, bfield, tTopo, ionization_points, collection_points);
628 induce_signal(*ssbegin, simHitGlobalIndex, tofBin, pixdet, collection_points);
644 std::vector<int>::const_iterator
pu;
645 std::vector<int>::const_iterator pu0 = bunchCrossing.end();
647 for (pu=bunchCrossing.begin(); pu!=bunchCrossing.end(); ++
pu) {
654 if (pu0!=bunchCrossing.end()) {
657 double instlumi_pow=1.;
661 instlumi_pow*=instlumi;
675 std::vector<PixelDigi>& digis,
676 std::vector<PixelDigiSimLink>& simlinks,
678 CLHEP::HepRandomEngine* engine) {
689 int numRows = topol->
nrows();
696 float thePixelThresholdInE = 0.;
700 int lay = tTopo->
layer(detID);
721 else {
throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;}
729 <<
" PixelDigitizer " 730 << numColumns <<
" " << numRows <<
" " << moduleThickness;
751 make_digis(thePixelThresholdInE, detID, pixdet, digis, simlinks, tTopo);
754 LogDebug (
"PixelDigitizer") <<
"[SiPixelDigitizerAlgorithm] converted " << digis.size() <<
" PixelDigis in DetUnit" << detID;
765 const float SegmentLength = 0.0010;
772 float length = direction.
mag();
774 int NumberOfSegments =
int ( length / SegmentLength);
775 if(NumberOfSegments < 1) NumberOfSegments = 1;
779 <<
" enter primary_ionzation " << NumberOfSegments
787 float* elossVector =
new float[NumberOfSegments];
794 float momentum = hit.
pabs();
797 elossVector, engine);
800 ionization_points.resize( NumberOfSegments);
803 for (
int i = 0;
i != NumberOfSegments;
i++) {
806 float((
i+0.5)/NumberOfSegments) * direction;
814 ionization_points[
i] = edu;
818 <<
i <<
" " << ionization_points[
i].x() <<
" " 819 << ionization_points[
i].y() <<
" " 820 << ionization_points[
i].z() <<
" " 821 << ionization_points[
i].energy();
826 delete[] elossVector;
834 float eloss,
float length,
835 int NumberOfSegs,
float elossVector[],
836 CLHEP::HepRandomEngine* engine)
const {
843 double particleMass = 139.6;
846 if(pid==11) particleMass = 0.511;
847 else if(pid==13) particleMass = 105.7;
848 else if(pid==321) particleMass = 493.7;
849 else if(pid==2212) particleMass = 938.3;
852 float segmentLength = length/NumberOfSegs;
857 double segmentEloss = (1000.*eloss)/NumberOfSegs;
858 for (
int i=0;
i<NumberOfSegs;
i++) {
864 double deltaCutoff =
tMax;
865 de =
fluctuate->SampleFluctuations(
double(particleMomentum*1000.),
866 particleMass, deltaCutoff,
867 double(segmentLength*10.),
868 segmentEloss, engine )/1000.;
875 float ratio = eloss/sum;
877 for (
int ii=0;
ii<NumberOfSegs;
ii++) elossVector[
ii]= ratio*elossVector[
ii];
879 float averageEloss = eloss/NumberOfSegs;
880 for (
int ii=0;
ii<NumberOfSegs;
ii++) elossVector[
ii]= averageEloss;
892 const std::vector<EnergyDepositUnit>& ionization_points,
893 std::vector<SignalPoint>& collection_points)
const {
896 LogDebug (
"Pixel Digitizer") <<
" enter drift " ;
899 collection_points.resize(ionization_points.size());
902 if(driftDir.
z() ==0.) {
903 LogWarning(
"Magnetic field") <<
" pxlx: drift in z is zero ";
911 float TanLorenzAngleX, TanLorenzAngleY,dir_z, CosLorenzAngleX,
914 TanLorenzAngleX = driftDir.
x();
915 TanLorenzAngleY = driftDir.
y();
916 dir_z = driftDir.
z();
917 CosLorenzAngleX = 1./
sqrt(1.+TanLorenzAngleX*TanLorenzAngleX);
918 CosLorenzAngleY = 1./
sqrt(1.+TanLorenzAngleY*TanLorenzAngleY);
921 TanLorenzAngleX = driftDir.
x();
922 TanLorenzAngleY = 0.;
923 dir_z = driftDir.
z();
924 CosLorenzAngleX = 1./
sqrt(1.+TanLorenzAngleX*TanLorenzAngleX);
925 CosLorenzAngleY = 1.;
931 <<
" Lorentz Tan " << TanLorenzAngleX <<
" " << TanLorenzAngleY <<
" " 932 << CosLorenzAngleX <<
" " << CosLorenzAngleY <<
" " 933 << moduleThickness*TanLorenzAngleX <<
" " << driftDir;
942 for (
unsigned int i = 0;
i != ionization_points.size();
i++) {
944 float SegX, SegY, SegZ;
945 SegX = ionization_points[
i].
x();
946 SegY = ionization_points[
i].y();
947 SegZ = ionization_points[
i].z();
952 DriftDistance = moduleThickness/2. - (dir_z * SegZ);
962 if( DriftDistance < 0.) {
964 }
else if( DriftDistance > moduleThickness )
965 DriftDistance = moduleThickness;
968 float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
969 float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
972 float CloudCenterX = SegX + XDriftDueToMagField;
973 float CloudCenterY = SegY + YDriftDueToMagField;
976 DriftLength =
sqrt( DriftDistance*DriftDistance +
977 XDriftDueToMagField*XDriftDueToMagField +
978 YDriftDueToMagField*YDriftDueToMagField );
984 Sigma_x = Sigma / CosLorenzAngleX ;
985 Sigma_y = Sigma / CosLorenzAngleY ;
988 float energyOnCollector = ionization_points[
i].energy();
993 energyOnCollector *=
exp( -1*kValue*DriftDistance/moduleThickness );
998 <<
" Dift DistanceZ= "<<DriftDistance<<
" module thickness= "<<moduleThickness
999 <<
" Start Energy= "<<ionization_points[
i].energy()<<
" Energy after loss= "<<energyOnCollector;
1002 Sigma_x, Sigma_y, hit.
tof(), energyOnCollector );
1005 collection_points[
i] = (
sp);
1014 const size_t hitIndex,
1015 const unsigned int tofBin,
1017 const std::vector<SignalPoint>& collection_points) {
1028 <<
" enter induce_signal, " 1029 << topol->
pitch().first <<
" " << topol->
pitch().second;
1033 typedef std::map< int, float, std::less<int> > hit_map_type;
1034 hit_map_type hit_signal;
1037 std::map<int, float, std::less<int> >
x,
y;
1042 for ( std::vector<SignalPoint>::const_iterator
i=collection_points.begin();
1043 i != collection_points.end(); ++
i) {
1045 float CloudCenterX =
i->position().x();
1046 float CloudCenterY =
i->position().y();
1049 float Charge =
i->amplitude();
1060 <<
" cloud " <<
i->position().x() <<
" " <<
i->position().y() <<
" " 1061 <<
i->sigma_x() <<
" " <<
i->sigma_y() <<
" " <<
i->amplitude();
1084 int IPixRightUpX =
int( floor( mp.
x()));
1085 int IPixRightUpY =
int( floor( mp.
y()));
1088 LogDebug (
"Pixel Digitizer") <<
" right-up " << PointRightUp <<
" " 1089 << mp.
x() <<
" " << mp.
y() <<
" " 1090 << IPixRightUpX <<
" " << IPixRightUpY ;
1095 int IPixLeftDownX =
int( floor( mp.
x()));
1096 int IPixLeftDownY =
int( floor( mp.
y()));
1099 LogDebug (
"Pixel Digitizer") <<
" left-down " << PointLeftDown <<
" " 1100 << mp.
x() <<
" " << mp.
y() <<
" " 1101 << IPixLeftDownX <<
" " << IPixLeftDownY ;
1105 int numColumns = topol->
ncolumns();
1106 int numRows = topol->
nrows();
1108 IPixRightUpX = numRows>IPixRightUpX ? IPixRightUpX : numRows-1 ;
1109 IPixRightUpY = numColumns>IPixRightUpY ? IPixRightUpY : numColumns-1 ;
1110 IPixLeftDownX = 0<IPixLeftDownX ? IPixLeftDownX : 0 ;
1111 IPixLeftDownY = 0<IPixLeftDownY ? IPixLeftDownY : 0 ;
1118 for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) {
1119 float xUB, xLB, UpperBound, LowerBound;
1124 if(ix == 0 || SigmaX==0. )
1129 LowerBound = 1-
calcQ((xLB-CloudCenterX)/SigmaX);
1132 if(ix == numRows-1 || SigmaX==0. )
1137 UpperBound = 1. -
calcQ((xUB-CloudCenterX)/SigmaX);
1140 float TotalIntegrationRange = UpperBound - LowerBound;
1141 x[ix] = TotalIntegrationRange;
1149 for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) {
1150 float yUB, yLB, UpperBound, LowerBound;
1152 if(iy == 0 || SigmaY==0.)
1157 LowerBound = 1. -
calcQ((yLB-CloudCenterY)/SigmaY);
1160 if(iy == numColumns-1 || SigmaY==0. )
1165 UpperBound = 1. -
calcQ((yUB-CloudCenterY)/SigmaY);
1168 float TotalIntegrationRange = UpperBound - LowerBound;
1169 y[iy] = TotalIntegrationRange;
1176 for (ix=IPixLeftDownX; ix<=IPixRightUpX; ix++) {
1177 for (iy=IPixLeftDownY; iy<=IPixRightUpY; iy++) {
1179 float ChargeFraction = Charge*x[ix]*y[iy];
1181 if( ChargeFraction > 0. ) {
1184 hit_signal[
chan] += ChargeFraction;
1194 <<
" pixel " << ix <<
" " << iy <<
" - "<<
" " 1195 << chan <<
" " << ChargeFraction<<
" " 1196 << mp.
x() <<
" " << mp.
y() <<
" " 1197 << lp.
x() <<
" " << lp.
y() <<
" " 1227 for ( hit_map_type::const_iterator im = hit_signal.begin();
1228 im != hit_signal.end(); ++im) {
1229 int chan = (*im).first;
1230 theSignal[
chan] += (
makeDigiSimLinks_ ?
Amplitude( (*im).second, &hit, hitIndex, tofBin, (*im).second) : Amplitude( (*im).second, (*im).second) ) ;
1235 <<
" pixel " << ip.first <<
" " << ip.second <<
" " 1248 std::vector<PixelDigi>& digis,
1249 std::vector<PixelDigiSimLink>& simlinks,
1253 LogDebug (
"Pixel Digitizer") <<
" make digis "<<
" " 1257 <<
" List pixels passing threshold ";
1262 signalMaps::const_iterator it =
_signal.find(detID);
1271 std::map<TrackEventId, float> simi;
1275 float signalInElectrons = (*i).second ;
1282 if( signalInElectrons >= thePixelThresholdInE) {
1284 int chan = (*i).first;
1291 int col = ip.second;
1292 adc =
int(
missCalibrate(detID, tTopo, pixdet, col, row, signalInElectrons));
1308 << (*i).first <<
" " << (*i).second <<
" " << signalInElectrons
1309 <<
" " << adc << ip.first <<
" " << ip.second ;
1313 digis.emplace_back(ip.first, ip.second, adc);
1318 for(
const auto&
info: (*i).second.hitInfos()) {
1321 simi[std::make_pair(
info.trackId(),
info.eventId().rawId())] += (*i).second.individualampl()[il];
1326 for(
const auto&
info: (*i).second.hitInfos()) {
1328 auto found = simi.find(std::make_pair(
info.trackId(),
info.eventId().rawId()));
1329 if(
found == simi.end())
1332 float sum_samechannel =
found->second;
1333 float fraction=sum_samechannel/(*i).second;
1334 if(fraction>1.
f) fraction=1.f;
1350 float thePixelThreshold,
1351 CLHEP::HepRandomEngine* engine) {
1362 float theSmearedChargeRMS = 0.0;
1368 if((*i).second < 3000)
1370 theSmearedChargeRMS = 543.6 - (*i).second * 0.093;
1371 }
else if((*i).second < 6000){
1372 theSmearedChargeRMS = 307.6 - (*i).second * 0.01;
1374 theSmearedChargeRMS = -432.4 +(*i).second * 0.123;
1378 float noise_ChargeVCALSmearing = theSmearedChargeRMS * CLHEP::RandGaussQ::shoot(engine, 0., 1.);
1382 if(((*i).second +
Amplitude(noise+noise_ChargeVCALSmearing, -1.)) < 0. ) {
1383 (*i).second.set(0);}
1385 (*i).second +=
Amplitude(noise+noise_ChargeVCALSmearing, -1.);
1395 if(((*i).second +
Amplitude(noise, -1.)) < 0. ) {
1396 (*i).second.set(0);}
1408 int numColumns = topol->
ncolumns();
1409 int numRows = topol->
nrows();
1413 int numberOfPixels = (numRows * numColumns);
1414 std::map<int,float, std::less<int> > otherPixels;
1415 std::map<int,float, std::less<int> >::iterator mapI;
1425 <<
" Add noisy pixels " << numRows <<
" " 1428 << otherPixels.size() ;
1432 for (mapI = otherPixels.begin(); mapI!= otherPixels.end(); mapI++) {
1433 int iy = ((*mapI).first) / numRows;
1434 int ix = ((*mapI).first) - (iy*numRows);
1437 if( iy < 0 || iy > (numColumns-1) )
1438 LogWarning (
"Pixel Geometry") <<
" error in iy " << iy ;
1439 if( ix < 0 || ix > (numRows-1) )
1440 LogWarning (
"Pixel Geometry") <<
" error in ix " << ix ;
1446 <<
" Storing noise = " << (*mapI).first <<
" " << (*mapI).second
1447 <<
" " << ix <<
" " << iy <<
" " <<
chan ;
1450 if(theSignal[chan] == 0){
1452 int noise=
int( (*mapI).second );
1465 CLHEP::HepRandomEngine* engine) {
1470 int numColumns = topol->
ncolumns();
1471 int numRows = topol->
nrows();
1474 double pixelEfficiency = 1.0;
1475 double columnEfficiency = 1.0;
1476 double chipEfficiency = 1.0;
1482 int layerIndex=tTopo->
layer(detID);
1489 if(numColumns>416)
LogWarning (
"Pixel Geometry") <<
" wrong columns in barrel "<<numColumns;
1490 if(numRows>160)
LogWarning (
"Pixel Geometry") <<
" wrong rows in barrel "<<numRows;
1494 if (module<=4) module=5-
module;
1504 unsigned int panelIndex=tTopo->
pxfPanel(detID);
1505 unsigned int moduleIndex=tTopo->
pxfModule(detID);
1515 if(numColumns>260 || numRows>160) {
1516 if(numColumns>260)
LogWarning (
"Pixel Geometry") <<
" wrong columns in endcaps "<<numColumns;
1517 if(numRows>160)
LogWarning (
"Pixel Geometry") <<
" wrong rows in endcaps "<<numRows;
1520 if ((panelIndex==1 && (moduleIndex==1 || moduleIndex==2)) || (panelIndex==2 && moduleIndex==1)) {
1528 pixelEfficiency = 0.999;
1529 columnEfficiency = 0.999;
1530 chipEfficiency = 0.999;
1539 LogDebug (
"Pixel Digitizer") <<
" enter pixel_inefficiency " << pixelEfficiency <<
" " 1540 << columnEfficiency <<
" " << chipEfficiency;
1545 std::unique_ptr<PixelIndices> pIndexConverter(
new PixelIndices(numColumns,numRows));
1550 std::map<int, int, std::less<int> >chips,
columns;
1551 std::map<int, int, std::less<int> >::iterator iter;
1557 int chan =
i->first;
1560 int col = ip.second;
1562 pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1563 int dColInChip = pIndexConverter->DColumn(colROC);
1565 int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1568 columns[dColInDet]++;
1572 for ( iter = chips.begin(); iter != chips.end() ; iter++ ) {
1574 float rand = CLHEP::RandFlat::shoot(engine);
1575 if( rand > chipEfficiency ) chips[iter->first]=0;
1579 for ( iter = columns.begin(); iter != columns.end() ; iter++ ) {
1581 float rand = CLHEP::RandFlat::shoot(engine);
1582 if( rand > columnEfficiency ) columns[iter->first]=0;
1592 int col = ip.second;
1594 pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
1595 int dColInChip = pIndexConverter->DColumn(colROC);
1597 int dColInDet = pIndexConverter->DColumnInModule(dColInChip,chipIndex);
1600 float rand = CLHEP::RandFlat::shoot(engine);
1601 if( chips[chipIndex]==0 || columns[dColInDet]==0
1602 || rand>pixelEfficiency ) {
1622 float pseudoRadDamage = 0.0;
1627 int layerIndex=tTopo->
layer(detID);
1645 pseudoRadDamage = 0.;
1651 return pseudoRadDamage;
1653 LogDebug (
"Pixel Digitizer") <<
" enter pixel_aging " << pseudoRadDamage;
1668 const float signalInElectrons)
const {
1695 throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;
1709 newAmp = p3 + p2 * tanh(p0*signal - p1);
1754 const DetId& detId)
const {
1791 dir_z = -(1 + alpha2_BPix* Bfield.z()*Bfield.z() );
1796 dir_z = -(1 + alpha2_FPix* Bfield.z()*Bfield.z() );
1799 throw cms::Exception(
"NotAPixelGeomDetUnit") <<
"Not a pixel geomdet unit" << detID;
1806 alpha2 = lorentzAngle * lorentzAngle;
1808 dir_x = -( lorentzAngle * Bfield.y() + alpha2 * Bfield.z()* Bfield.x() );
1809 dir_y = +( lorentzAngle * Bfield.x() - alpha2 * Bfield.z()* Bfield.y() );
1810 dir_z = -(1 + alpha2 * Bfield.z()*Bfield.z() );
1817 LogDebug (
"Pixel Digitizer") <<
" The drift direction in local coordinate is " 1818 << theDriftDirection ;
1821 return theDriftDirection;
1836 int col = ip.second;
1853 Parameters::const_iterator itDeadModules=
DeadModules.begin();
1856 for(; itDeadModules !=
DeadModules.end(); ++itDeadModules){
1857 int Dead_detID = itDeadModules->getParameter<
int>(
"Dead_detID");
1858 if(detid == Dead_detID){
1871 if(Module==
"whole"){
1880 if(Module==
"tbmA" && ip.first>=80 && ip.first<=159){
1884 if( Module==
"tbmB" && ip.first<=79){
1899 for (
size_t id=0;
id<disabledModules.size();
id++)
1901 if(detID==disabledModules[
id].DetID){
1903 badmodule = disabledModules[
id];
1923 std::vector<GlobalPixel> badrocpositions (0);
1924 for(
unsigned int j = 0; j < 16; j++){
1928 typedef std::vector<CablingPathToDetUnit>::const_iterator
IT;
1929 for (IT it = path.begin(); it != path.end(); ++it) {
1934 badrocpositions.push_back(global);
1945 for(std::vector<GlobalPixel>::const_iterator it = badrocpositions.begin(); it != badrocpositions.end(); ++it){
1946 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==120 && ip.second-it->col==26){
i->second.set(0.);}
1949 else if(it->row==119 && it->col-ip.second==26){
i->second.set(0.);}
1951 else if(it->row < 80 && ip.first < 80 ){
1952 if((
std::abs(ip.second - it->col) < 26) ){
i->second.set(0.);}
1953 else if(it->row==40 && ip.second-it->col==26){
i->second.set(0.);}
1954 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 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 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
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]
virtual 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
virtual 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
const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.