18 getAllProvenances(
false),
19 printProvenanceInfo(
false),
42 edm::LogInfo(
"MuonSimHitsValidAnalyzer::MuonSimHitsValidAnalyzer")
43 <<
"\n===============================\n" 44 <<
"Initialized as EDAnalyzer with parameter values:\n" 45 <<
" Name = " <<
fName <<
"\n" 47 <<
" Label = " <<
label <<
"\n" 53 <<
" DTHitsSrc = " <<
l.module <<
":" <<
l.productInstance
57 <<
"===============================\n";
71 geomToken_ = esConsumes<DTGeometry, MuonGeometryRecord>();
118 sprintf(histo_n,
"Number_of_all_DT_hits");
119 sprintf(histo_t,
"Number_of_all_DT_hits");
122 sprintf(histo_n,
"Number_of_muon_DT_hits");
123 sprintf(histo_t,
"Number_of_muon_DT_hits");
126 sprintf(histo_n,
"Tof_of_hits ");
127 sprintf(histo_t,
"Tof_of_hits ");
128 meToF = iBooker.
book1D(histo_n, histo_t, 100, -0.5, 50.);
130 sprintf(histo_n,
"DT_energy_loss_keV");
131 sprintf(histo_t,
"DT_energy_loss_keV");
134 sprintf(histo_n,
"Momentum_at_MB1");
135 sprintf(histo_t,
"Momentum_at_MB1");
138 sprintf(histo_n,
"Momentum_at_MB4");
139 sprintf(histo_t,
"Momentum_at_MB4");
142 sprintf(histo_n,
"Loss_of_muon_Momentum_in_Iron");
143 sprintf(histo_t,
"Loss_of_muon_Momentum_in_Iron");
146 sprintf(histo_n,
"Local_x-coord_vs_local_z-coord_of_muon_hit");
147 sprintf(histo_t,
"Local_x-coord_vs_local_z-coord_of_muon_hit");
148 meLocalXvsZ = iBooker.
book2D(histo_n, histo_t, 100, -150., 150., 100, -0.8, 0.8);
150 sprintf(histo_n,
"local_x-coord_vs_local_y-coord_of_muon_hit");
151 sprintf(histo_t,
"local_x-coord_vs_local_y-coord_of_muon_hit");
152 meLocalXvsY = iBooker.
book2D(histo_n, histo_t, 100, -150., 150., 100, -150., 150.);
154 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit");
155 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit");
158 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit");
159 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit");
164 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-2");
165 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-2");
168 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-2");
169 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-2");
172 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-1");
173 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-1");
176 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-1");
177 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-1");
180 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w0");
181 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w0");
184 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w0");
185 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w0");
188 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w1");
189 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w1");
192 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w1");
193 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w1");
196 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w2");
197 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w2");
200 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w2");
201 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w2");
206 sprintf(histo_n,
"Wheel_occupancy");
207 sprintf(histo_t,
"Wheel_occupancy");
210 sprintf(histo_n,
"Station_occupancy");
211 sprintf(histo_t,
"Station_occupancy");
214 sprintf(histo_n,
"Sector_occupancy");
215 sprintf(histo_t,
"Sector_occupancy");
218 sprintf(histo_n,
"SuperLayer_occupancy");
219 sprintf(histo_t,
"SuperLayer_occupancy");
222 sprintf(histo_n,
"Layer_occupancy");
223 sprintf(histo_t,
"Layer_occupancy");
226 sprintf(histo_n,
"Wire_occupancy");
227 sprintf(histo_t,
"Wire_occupancy");
230 sprintf(histo_n,
"path_followed_by_muon");
231 sprintf(histo_t,
"path_followed_by_muon");
234 sprintf(histo_n,
"chamber_occupancy");
235 sprintf(histo_t,
"chamber_occupancy");
238 sprintf(histo_n,
"radius_of_hit");
239 sprintf(histo_t,
"radius_of_hit");
242 sprintf(histo_n,
"costheta_of_hit");
243 sprintf(histo_t,
"costheta_of_hit");
246 sprintf(histo_n,
"global_eta_of_hit");
247 sprintf(histo_t,
"global_eta_of_hit");
250 sprintf(histo_n,
"global_phi_of_hit");
251 sprintf(histo_t,
"global_phi_of_hit");
264 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Processing run " << nrun <<
", event " <<
nevt;
269 std::vector<const edm::StableProvenance*> AllProv;
270 iEvent.getAllStableProvenance(AllProv);
273 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Number of Provenances = " << AllProv.size();
276 TString eventout(
"\nProvenance info:\n");
278 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
279 eventout +=
"\n ******************************";
280 eventout +=
"\n Module : ";
281 eventout += AllProv[
i]->moduleLabel();
282 eventout +=
"\n ProductID : ";
283 eventout += AllProv[
i]->productID().id();
284 eventout +=
"\n ClassName : ";
285 eventout += AllProv[
i]->className();
286 eventout +=
"\n InstanceName : ";
287 eventout += AllProv[
i]->productInstanceName();
288 eventout +=
"\n BranchName : ";
289 eventout += AllProv[
i]->branchName();
291 eventout +=
" ******************************\n";
292 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") << eventout <<
"\n";
299 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Done gathering data from event.";
307 eventout =
"\nGathering DT info:";
310 edm::PSimHitContainer::const_iterator itHit;
316 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
324 if (!MuonDTContainer.
isValid()) {
325 edm::LogWarning(
"MuonSimHitsValidAnalyzer::fillDT") <<
"Unable to find MuonDTHits in event!";
337 for (itHit = MuonDTContainer->begin(); itHit != MuonDTContainer->end(); ++itHit) {
341 DetId theDetUnitId(itHit->detUnitId());
351 edm::LogWarning(
"MuonSimHitsValidAnalyzer::fillDT") <<
"Unable to get GeomDetUnit from theDTMuon for hit " <<
i;
362 if (
abs(itHit->particleType()) == 13) {
367 iden = itHit->detUnitId();
394 mom1 = itHit->pabs();
403 mom4 = itHit->pabs();
413 meLocalXvsZ->
Fill(itHit->localPosition().x(), itHit->localPosition().z());
416 meLocalXvsY->
Fill(itHit->localPosition().x(), itHit->localPosition().y());
420 globposz = bsurf.toGlobal(itHit->localPosition()).
z();
466 <<
"MuonDT PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dMuon <<
"," <<
sdMuonDT 473 eventout +=
"\n Number of DT muon Hits collected:......... ";
479 edm::LogInfo(
"MuonSimHitsValidAnalyzer::fillDT") << eventout <<
"\n";
MonitorElement * meChamberOccup
MonitorElement * meLayerOccup
T getParameter(std::string const &) const
MonitorElement * meCosTheta
virtual void setCurrentFolder(std::string const &fullpath)
static const int sdMuonDT
MonitorElement * meGlobalXvsZW0
MonitorElement * meGlobalXvsZWm1
MonitorElement * meLocalXvsY
MonitorElement * meGlobalXvsZWp2
MonitorElement * meGlobalXvsZWm2
Sin< T >::type sin(const T &t)
MonitorElement * meGlobalEta
MonitorElement * meGlobalXvsZWp1
unsigned long long EventNumber_t
edm::EDGetTokenT< edm::PSimHitContainer > DTHitsToken_
Input tags.
MonitorElement * meSectorOccup
MonitorElement * meGlobalXvsZ
MonitorElement * meWireOccup
MonitorElement * meGlobalXvsYWm2
MonitorElement * meGlobalXvsY
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meAllDTHits
MonitorElement * meGlobalXvsYWp2
MonitorElement * meGlobalXvsYWm1
int nRawGenPart
G4MC info.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > geomToken_
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
~MuonSimHitsValidAnalyzer() override
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
MonitorElement * meEnergyLoss
Log< level::Info, false > LogInfo
MuonSimHitsValidAnalyzer(const edm::ParameterSet &)
const Plane & surface() const
The nominal surface of the GeomDet.
std::string fName
parameter information
MonitorElement * meHitRadius
MonitorElement * meMuDTHits
MonitorElement * meSuperLOccup
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * meStationOccup
MonitorElement * meGlobalPhi
void analyze(const edm::Event &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meMomentumMB1
MonitorElement * meLocalXvsZ
MonitorElement * meGlobalXvsYWp1
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * meMomentumMB4
MonitorElement * meLossMomIron
MonitorElement * mePathMuon
unsigned int count
private statistics information
MonitorElement * meGlobalXvsYW0
MonitorElement * meWheelOccup
void fillDT(const edm::Event &, const edm::EventSetup &)