13 : killScenario_(killScenario),
14 trackerTopology_(trackerTopology),
15 trackerGeometry_(trackerGeometry),
22 fractionOfStubsToKillInLayers_(0),
23 fractionOfStubsToKillEverywhere_(0),
24 fractionOfModulesToKillEverywhere_(0) {
29 <<
"StubKiller: requires RandomNumberGeneratorService, not present in cfg file, namely:" << endl
30 <<
"process.RandomNumberGeneratorService=cms.Service('RandomNumberGeneratorService',TMTrackProducer=cms.PSet(" 31 "initialSeed=cms.untracked.uint32(12345)))";
116 bool killStubRandomly =
killStub(stub,
129 return killStubRandomly || killStubInDeadModules;
142 const vector<int>& layersToKill,
143 const double minPhiToKill,
144 const double maxPhiToKill,
145 const double minZToKill,
146 const double maxZToKill,
147 const double minRToKill,
148 const double maxRToKill,
149 const double fractionOfStubsToKillInLayers,
150 const double fractionOfStubsToKillEverywhere)
const {
152 if (not layersToKill.empty()) {
168 if (
find(layersToKill.begin(), layersToKill.end(), layerID) != layersToKill.end()) {
179 if (stubPhi > minPhiToKill && stubPhi < maxPhiToKill &&
pos.z() > minZToKill &&
pos.z() < maxZToKill &&
180 pos.perp() > minRToKill &&
pos.perp() < maxRToKill) {
182 if (fractionOfStubsToKillInLayers == 1) {
185 if (
rndmEngine_->flat() < fractionOfStubsToKillInLayers) {
195 if (fractionOfStubsToKillEverywhere > 0) {
196 if (
rndmEngine_->flat() < fractionOfStubsToKillEverywhere) {
212 if (deadModule->second == 1) {
241 float moduleR = gd->position().perp();
242 float moduleZ = gd->position().z();
244 DetId geoDetId = gd->geographicalId();
const edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > & clusterRef(unsigned int hitStackMember) const
Clusters composing the Stub – see https://twiki.cern.ch/twiki/bin/viewauth/CMS/SLHCTrackerTriggerSWT...
constexpr double deltaPhi(double phi1, double phi2)
const TrackerGeometry * trackerGeometry_
double fractionOfModulesToKillEverywhere_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
KillOptions killScenario_
CLHEP::HepRandomEngine * rndmEngine_
unsigned int tidWheel(const DetId &id) const
bool killStubInDeadModule(const TTStub< Ref_Phase2TrackerDigi_ > *stub) const
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
double fractionOfStubsToKillInLayers_
unsigned int side(const DetId &id) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
DetId getDetId() const
Detector element.
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
unsigned int layer(const DetId &id) const
std::map< DetId, float > deadModules_
void addDeadLayerModulesToDeadModuleList()
std::vector< int > layersToKill_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
Class to store the L1 Track Trigger stubs.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
bool isLower(const DetId &id) const
const TrackerTopology * trackerTopology_
static constexpr auto TIB
const Plane & surface() const
The nominal surface of the GeomDet.
double fractionOfStubsToKillEverywhere_
=== This is the base class for the linearised chi-squared track fit algorithms.
void chooseModulesToKill()
constexpr uint32_t rawId() const
get the raw id
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
edm::Service< edm::RandomNumberGenerator > rndmService_
bool killStub(const TTStub< Ref_Phase2TrackerDigi_ > *stub) const