CMS 3D CMS Logo

StubKiller.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTMTT_StubKiller_h
2 #define L1Trigger_TrackFindingTMTT_StubKiller_h
3 
4 // Kill some stubs to emulate dead tracker modules.
5 // Author: Emyr Clement (2018)
6 // Tidy up: Ian Tomalin (2020)
7 
16 #include "CLHEP/Random/RandomEngine.h"
17 
18 namespace tmtt {
19 
20  class StubKiller {
21  public:
22  enum class KillOptions { none = 0, layer5 = 1, layer1 = 2, layer1layer2 = 3, layer1disk1 = 4, random = 5 };
23 
24  StubKiller(KillOptions killScenario,
25  const TrackerTopology* trackerTopology,
26  const TrackerGeometry* trackerGeometry,
27  const edm::Event& iEvent);
28 
29  // Indicate if given stub was killed by dead tracker module, based on dead module scenario.
30  bool killStub(const TTStub<Ref_Phase2TrackerDigi_>* stub) const;
31 
32  // Indicate if given stub was killed by dead tracker module, based on dead regions specified here,
33  // and ignoring dead module scenario.
35  const std::vector<int>& layersToKill,
36  const double minPhiToKill,
37  const double maxPhiToKill,
38  const double minZToKill,
39  const double maxZToKill,
40  const double minRToKill,
41  const double maxRToKill,
42  const double fractionOfStubsToKillInLayers,
43  const double fractionOfStubsToKillEverywhere) const;
44 
45  // Indicate if given stub was in (partially) dead tracker module, based on dead module scenario.
47 
48  // List of all modules declared as (partially) dead, with fractional deadness of each.
49  const std::map<DetId, float>& listOfDeadModules() const { return deadModules_; }
50 
51  private:
52  // Identify modules to be killed, chosen randomly from those in the whole tracker.
53  void chooseModulesToKill();
54  // Identify modules to be killed, chosen based on location in tracker.
56 
60 
61  std::vector<int> layersToKill_;
62  double minPhiToKill_;
63  double maxPhiToKill_;
64  double minZToKill_;
65  double maxZToKill_;
66  double minRToKill_;
67  double maxRToKill_;
71 
72  std::map<DetId, float> deadModules_;
73 
75  CLHEP::HepRandomEngine* rndmEngine_;
76  };
77 
78 }; // namespace tmtt
79 
80 #endif
tmtt::StubKiller::minRToKill_
double minRToKill_
Definition: StubKiller.h:66
TrackerGeometry.h
PixelTopology.h
tmtt::StubKiller::chooseModulesToKill
void chooseModulesToKill()
Definition: StubKiller.cc:227
TTTypes.h
tmtt::StubKiller::fractionOfStubsToKillInLayers_
double fractionOfStubsToKillInLayers_
Definition: StubKiller.h:68
tmtt::StubKiller::KillOptions::layer1
tmtt::StubKiller::trackerTopology_
const TrackerTopology * trackerTopology_
Definition: StubKiller.h:58
RandomNumberGenerator.h
TrackerTopology
Definition: TrackerTopology.h:16
tmtt::StubKiller::rndmService_
edm::Service< edm::RandomNumberGenerator > rndmService_
Definition: StubKiller.h:74
tmtt::StubKiller::KillOptions::layer1layer2
tmtt::StubKiller::maxRToKill_
double maxRToKill_
Definition: StubKiller.h:67
tmtt::StubKiller::deadModules_
std::map< DetId, float > deadModules_
Definition: StubKiller.h:72
tmtt::StubKiller::fractionOfStubsToKillEverywhere_
double fractionOfStubsToKillEverywhere_
Definition: StubKiller.h:69
tmtt::StubKiller::killScenario_
KillOptions killScenario_
Definition: StubKiller.h:57
tmtt::StubKiller::rndmEngine_
CLHEP::HepRandomEngine * rndmEngine_
Definition: StubKiller.h:75
TrackerTopology.h
tmtt::StubKiller::StubKiller
StubKiller(KillOptions killScenario, const TrackerTopology *trackerTopology, const TrackerGeometry *trackerGeometry, const edm::Event &iEvent)
Definition: StubKiller.cc:9
Service.h
tmtt::StubKiller::maxZToKill_
double maxZToKill_
Definition: StubKiller.h:65
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
tmtt::StubKiller::killStubInDeadModule
bool killStubInDeadModule(const TTStub< Ref_Phase2TrackerDigi_ > *stub) const
Definition: StubKiller.cc:206
Event.h
tmtt::StubKiller::KillOptions
KillOptions
Definition: StubKiller.h:22
tmtt::StubKiller
Definition: StubKiller.h:20
tmtt::StubKiller::KillOptions::none
tmtt::StubKiller::minPhiToKill_
double minPhiToKill_
Definition: StubKiller.h:62
edm::Service< edm::RandomNumberGenerator >
iEvent
int iEvent
Definition: GenABIO.cc:224
tmtt::StubKiller::fractionOfModulesToKillEverywhere_
double fractionOfModulesToKillEverywhere_
Definition: StubKiller.h:70
PixelGeomDetUnit.h
tmtt::StubKiller::trackerGeometry_
const TrackerGeometry * trackerGeometry_
Definition: StubKiller.h:59
tmtt::StubKiller::minZToKill_
double minZToKill_
Definition: StubKiller.h:64
tmtt::StubKiller::listOfDeadModules
const std::map< DetId, float > & listOfDeadModules() const
Definition: StubKiller.h:49
tmtt::StubKiller::KillOptions::layer1disk1
tmtt::StubKiller::addDeadLayerModulesToDeadModuleList
void addDeadLayerModulesToDeadModuleList()
Definition: StubKiller.cc:239
tmtt::StubKiller::KillOptions::random
edm::Event
Definition: Event.h:73
tmtt::StubKiller::layersToKill_
std::vector< int > layersToKill_
Definition: StubKiller.h:61
tmtt::StubKiller::maxPhiToKill_
double maxPhiToKill_
Definition: StubKiller.h:63
tmtt
=== This is the base class for the linearised chi-squared track fit algorithms.
Definition: ChiSquaredFit4.h:6
tmtt::StubKiller::KillOptions::layer5
tmtt::StubKiller::killStub
bool killStub(const TTStub< Ref_Phase2TrackerDigi_ > *stub) const
Definition: StubKiller.cc:110
TrackerGeometry
Definition: TrackerGeometry.h:14