7 trackerTopology_(nullptr),
8 trackerGeometry_(nullptr),
16 fractionOfStubsToKillInLayers_(0),
17 fractionOfStubsToKillEverywhere_(0),
18 fractionOfModulesToKillEverywhere_(0) {}
145 TRandom3* randomGenerator =
new TRandom3();
146 randomGenerator->SetSeed(0);
159 float moduleR = gd->position().perp();
160 float moduleZ = gd->position().z();
161 float modulePhi = gd->position().phi();
162 DetId geoDetId = gd->geographicalId();
192 bool killStubRandomly =
killStub(stub,
203 return killStubRandomly || killStubInDeadModules;
213 const vector<int> layersToKill,
214 const double minPhiToKill,
215 const double maxPhiToKill,
216 const double minZToKill,
217 const double maxZToKill,
218 const double minRToKill,
219 const double maxRToKill,
220 const double fractionOfStubsToKillInLayers,
221 const double fractionOfStubsToKillEverywhere) {
223 if (!layersToKill.empty()) {
237 if (
find(layersToKill.begin(), layersToKill.end(), layerID) != layersToKill.end()) {
247 double stubPhi =
pos.phi();
253 if (stubPhi > minPhiToKill && stubPhi < maxPhiToKill &&
pos.z() > minZToKill &&
pos.z() < maxZToKill &&
254 pos.perp() > minRToKill &&
pos.perp() < maxRToKill) {
256 if (fractionOfStubsToKillInLayers == 1) {
259 static TRandom randomGenerator;
260 if (randomGenerator.Rndm() < fractionOfStubsToKillInLayers) {
269 if (fractionOfStubsToKillEverywhere > 0) {
270 static TRandom randomGenerator;
271 if (randomGenerator.Rndm() < fractionOfStubsToKillEverywhere) {
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...
std::vector< int > layersToKill_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
bool killStubInDeadModule(const TTStub< Ref_Phase2TrackerDigi_ > *stub)
std::map< DetId, float > deadModules_
unsigned int tidWheel(const DetId &id) const
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
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.
double fractionOfStubsToKillInLayers_
unsigned int layer(const DetId &id) const
void initialise(unsigned int killScenario, const TrackerTopology *trackerTopology, const TrackerGeometry *trackerGeometry)
bool killStub(const TTStub< Ref_Phase2TrackerDigi_ > *stub, const std::vector< int > layersToKill, const double minPhiToKill, const double maxPhiToKill, const double minZToKill, const double maxZToKill, const double minRToKill, const double maxRToKill, const double fractionOfStubsToKillInLayers, const double fractionOfStubsToKillEverywhere)
const TrackerGeometry * trackerGeometry_
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
static constexpr auto TIB
const Plane & surface() const
The nominal surface of the GeomDet.
constexpr uint32_t rawId() const
get the raw id
unsigned int killScenario_
void chooseModulesToKill()
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
double fractionOfStubsToKillEverywhere_
void addDeadLayerModulesToDeadModuleList()
double fractionOfModulesToKillEverywhere_
const TrackerTopology * trackerTopology_