22 verbose_ =
pset.getUntrackedParameter<
bool>(
"verbose",
false);
31 hDigis_W0 = std::make_unique<hDigis>(
"Wheel0");
32 hDigis_W1 = std::make_unique<hDigis>(
"Wheel1");
33 hDigis_W2 = std::make_unique<hDigis>(
"Wheel2");
34 hAllHits = std::make_unique<hHits>(
"AllHits");
39 cout <<
"[MuonDTDigis] Destructor called" << endl;
77 sprintf(histo_n,
"DigiTimeBox");
78 sprintf(histo_t,
"Digi Time Box");
81 sprintf(histo_n,
"DigiTimeBox_wheel2m");
82 sprintf(histo_t,
"Digi Time Box wheel -2");
85 sprintf(histo_n,
"DigiTimeBox_wheel1m");
86 sprintf(histo_t,
"Digi Time Box wheel -1");
89 sprintf(histo_n,
"DigiTimeBox_wheel0");
90 sprintf(histo_t,
"Digi Time Box wheel 0");
93 sprintf(histo_n,
"DigiTimeBox_wheel1p");
94 sprintf(histo_t,
"Digi Time Box wheel 1");
97 sprintf(histo_n,
"DigiTimeBox_wheel2p");
98 sprintf(histo_t,
"Digi Time Box wheel 2");
101 sprintf(histo_n,
"DigiEfficiencyMu");
102 sprintf(histo_t,
"Ratio (#Digis Mu)/(#SimHits Mu)");
105 sprintf(histo_n,
"DigiEfficiency");
106 sprintf(histo_t,
"Ratio (#Digis)/(#SimHits)");
109 sprintf(histo_n,
"Number_Digi_per_layer");
110 sprintf(histo_t,
"Number_Digi_per_layer");
113 sprintf(histo_n,
"Number_simhit_vs_digi");
114 sprintf(histo_t,
"Number_simhit_vs_digi");
117 sprintf(histo_n,
"Wire_Number_with_double_Digi");
118 sprintf(histo_t,
"Wire_Number_with_double_Digi");
121 sprintf(histo_n,
"Simhit_occupancy_MB1");
122 sprintf(histo_t,
"Simhit_occupancy_MB1");
125 sprintf(histo_n,
"Digi_occupancy_MB1");
126 sprintf(histo_t,
"Digi_occupancy_MB1");
129 sprintf(histo_n,
"Simhit_occupancy_MB2");
130 sprintf(histo_t,
"Simhit_occupancy_MB2");
133 sprintf(histo_n,
"Digi_occupancy_MB2");
134 sprintf(histo_t,
"Digi_occupancy_MB2");
137 sprintf(histo_n,
"Simhit_occupancy_MB3");
138 sprintf(histo_t,
"Simhit_occupancy_MB3");
141 sprintf(histo_n,
"Digi_occupancy_MB3");
142 sprintf(histo_t,
"Digi_occupancy_MB3");
145 sprintf(histo_n,
"Simhit_occupancy_MB4");
146 sprintf(histo_t,
"Simhit_occupancy_MB4");
149 sprintf(histo_n,
"Digi_occupancy_MB4");
150 sprintf(histo_t,
"Digi_occupancy_MB4");
155 for (
int slnum = 1; slnum < 62; ++slnum) {
156 sprintf(stringcham,
"DigiTimeBox_slid_%d", slnum);
164 cout <<
"--- [MuonDTDigis] Analysing Event: #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event()
196 wireMap[wireId].push_back(&(*
hit));
200 int partType =
hit->particleType();
201 if (
abs(partType) == 13)
204 if (wireId.station() == 1 &&
abs(partType) == 13)
206 if (wireId.station() == 2 &&
abs(partType) == 13)
208 if (wireId.station() == 3 &&
abs(partType) == 13)
210 if (wireId.station() == 4 &&
abs(partType) == 13)
213 float path = (exitP - entryP).
mag();
214 float path_x = fabs((exitP - entryP).
x());
232 for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end(); ++detUnitIt) {
233 const DTLayerId &
id = (*detUnitIt).first;
247 if (num_digis_layer > 1) {
248 if ((*digiIt).wire() == wire_touched) {
254 wire_touched = (*digiIt).wire();
257 if (
id.
wheel() == -2)
259 if (
id.
wheel() == -1)
270 cham_num = (
id.wheel() + 2) * 12 + (
id.
station() - 1) * 3 +
id.superlayer();
277 DTWireId wireId(
id, (*digiIt).wire());
278 if (wireId.station() == 1)
280 if (wireId.station() == 2)
282 if (wireId.station() == 3)
284 if (wireId.station() == 4)
290 for (vector<const PSimHit *>::iterator
hit = wireMap[wireId].begin();
hit != wireMap[wireId].end();
hit++)
291 if (
abs((*hit)->particleType()) == 13) {
292 theta = atan((*hit)->momentumAtEntry().x() / (-(*hit)->momentumAtEntry().z())) * 180 /
M_PI;
316 if (num_musimhits != 0) {
MonitorElement * meDoubleDigi_
MonitorElement * meWire_DoubleDigi_
std::vector< MonitorElement * > meDigiTimeBox_SL_
MonitorElement * meDigiHisto_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * meMB2_digi_occup_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< DTDigiCollection > DigiToken_
MonitorElement * meMB3_sim_occup_
std::map< DTWireId, std::vector< const PSimHit * > > DTWireIdMap
MonitorElement * meDigiEfficiencyMu_
const DTGeometry * muonGeom
std::unique_ptr< hDigis > hDigis_global
MonitorElement * meDigiTimeBox_wheel2m_
MonitorElement * meDigiTimeBox_wheel1m_
MonitorElement * meDigiTimeBox_wheel0_
edm::EDGetTokenT< edm::PSimHitContainer > SimHitToken_
MonitorElement * meMB4_sim_occup_
MonitorElement * meMB1_sim_occup_
MonitorElement * meMB2_sim_occup_
std::unique_ptr< hDigis > hDigis_W1
MonitorElement * meMB3_digi_occup_
std::unique_ptr< hDigis > hDigis_W0
MonitorElement * meDigiTimeBox_
Abs< T >::type abs(const T &t)
MonitorElement * meDigiTimeBox_wheel1p_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
MonitorElement * meMB4_digi_occup_
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< hHits > hAllHits
hDigis * WheelHistos(int wheel)
std::unique_ptr< hDigis > hDigis_W2
MonitorElement * meSimvsDigi_
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
std::pair< const_iterator, const_iterator > Range
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::vector< DigiType >::const_iterator const_iterator
MonitorElement * meDigiEfficiency_
void Fill(double time, double theta, int sltype)
MonitorElement * meDigiTimeBox_wheel2p_
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Geom::Theta< T > theta() const
MonitorElement * meMB1_digi_occup_
MuonDTDigis(const edm::ParameterSet &pset)