CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
bool killStub(const TTStub< Ref_Phase2TrackerDigi_ > *stub) const
Definition: StubKiller.cc:110
const std::map< DetId, float > & listOfDeadModules() const
Definition: StubKiller.h:49
double minPhiToKill_
Definition: StubKiller.h:62
const TrackerGeometry * trackerGeometry_
Definition: StubKiller.h:59
double fractionOfModulesToKillEverywhere_
Definition: StubKiller.h:70
double maxPhiToKill_
Definition: StubKiller.h:63
KillOptions killScenario_
Definition: StubKiller.h:57
CLHEP::HepRandomEngine * rndmEngine_
Definition: StubKiller.h:75
bool killStubInDeadModule(const TTStub< Ref_Phase2TrackerDigi_ > *stub) const
Definition: StubKiller.cc:206
double fractionOfStubsToKillInLayers_
Definition: StubKiller.h:68
std::map< DetId, float > deadModules_
Definition: StubKiller.h:72
void addDeadLayerModulesToDeadModuleList()
Definition: StubKiller.cc:239
int iEvent
Definition: GenABIO.cc:224
std::vector< int > layersToKill_
Definition: StubKiller.h:61
StubKiller(KillOptions killScenario, const TrackerTopology *trackerTopology, const TrackerGeometry *trackerGeometry, const edm::Event &iEvent)
Definition: StubKiller.cc:9
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
double minRToKill_
Definition: StubKiller.h:66
const TrackerTopology * trackerTopology_
Definition: StubKiller.h:58
double fractionOfStubsToKillEverywhere_
Definition: StubKiller.h:69
void chooseModulesToKill()
Definition: StubKiller.cc:227
double minZToKill_
Definition: StubKiller.h:64
edm::Service< edm::RandomNumberGenerator > rndmService_
Definition: StubKiller.h:74
double maxZToKill_
Definition: StubKiller.h:65
double maxRToKill_
Definition: StubKiller.h:67