17 printProvenanceInfo(
false), nRawGenPart(0),
count(0)
27 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
29 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
42 edm::LogInfo (
"MuonSimHitsValidAnalyzer::MuonSimHitsValidAnalyzer")
43 <<
"\n===============================\n"
44 <<
"Initialized as EDAnalyzer with parameter values:\n"
45 <<
" Name = " <<
fName <<
"\n"
46 <<
" Verbosity = " << verbosity <<
"\n"
47 <<
" Label = " << label <<
"\n"
48 <<
" GetProv = " << getAllProvenances <<
"\n"
49 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
52 <<
" DTHitsSrc = " << l.
module
56 <<
"===============================\n";
117 sprintf (histo_n,
"Number_of_all_DT_hits" );
118 sprintf (histo_t,
"Number_of_all_DT_hits" );
121 sprintf (histo_n,
"Number_of_muon_DT_hits" );
122 sprintf (histo_t,
"Number_of_muon_DT_hits" );
125 sprintf (histo_n,
"Tof_of_hits " );
126 sprintf (histo_t,
"Tof_of_hits " );
127 meToF = iBooker.
book1D(histo_n, histo_t, 100, -0.5, 50.) ;
129 sprintf (histo_n,
"DT_energy_loss_keV" );
130 sprintf (histo_t,
"DT_energy_loss_keV" );
133 sprintf (histo_n,
"Momentum_at_MB1" );
134 sprintf (histo_t,
"Momentum_at_MB1" );
137 sprintf (histo_n,
"Momentum_at_MB4" );
138 sprintf (histo_t,
"Momentum_at_MB4" );
141 sprintf (histo_n,
"Loss_of_muon_Momentum_in_Iron" );
142 sprintf (histo_t,
"Loss_of_muon_Momentum_in_Iron" );
145 sprintf (histo_n,
"Local_x-coord_vs_local_z-coord_of_muon_hit" );
146 sprintf (histo_t,
"Local_x-coord_vs_local_z-coord_of_muon_hit" );
147 meLocalXvsZ = iBooker.
book2D(histo_n, histo_t,100, -150., 150., 100, -0.8, 0.8 ) ;
149 sprintf (histo_n,
"local_x-coord_vs_local_y-coord_of_muon_hit" );
150 sprintf (histo_t,
"local_x-coord_vs_local_y-coord_of_muon_hit" );
151 meLocalXvsY = iBooker.
book2D(histo_n, histo_t, 100, -150., 150., 100, -150., 150. );
153 sprintf (histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit" );
154 sprintf (histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit" );
155 meGlobalXvsZ = iBooker.
book2D(histo_n, histo_t, 100, -800., 800., 100, -800., 800. ) ;
157 sprintf (histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit" );
158 sprintf (histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit" );
159 meGlobalXvsY = iBooker.
book2D(histo_n, histo_t, 100, -800., 800., 100, -800., 800. ) ;
163 sprintf (histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-2" );
164 sprintf (histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-2" );
167 sprintf (histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-2" );
168 sprintf (histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-2" );
171 sprintf (histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-1" );
172 sprintf (histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-1" );
175 sprintf (histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-1" );
176 sprintf (histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-1" );
179 sprintf (histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w0" );
180 sprintf (histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w0" );
183 sprintf (histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w0" );
184 sprintf (histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w0" );
187 sprintf (histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w1" );
188 sprintf (histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w1" );
191 sprintf (histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w1" );
192 sprintf (histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w1" );
195 sprintf (histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w2" );
196 sprintf (histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w2" );
199 sprintf (histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w2" );
200 sprintf (histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w2" );
205 sprintf (histo_n,
"Wheel_occupancy" );
206 sprintf (histo_t,
"Wheel_occupancy" );
209 sprintf (histo_n,
"Station_occupancy" );
210 sprintf (histo_t,
"Station_occupancy" );
213 sprintf (histo_n,
"Sector_occupancy" );
214 sprintf (histo_t,
"Sector_occupancy" );
217 sprintf (histo_n,
"SuperLayer_occupancy" );
218 sprintf (histo_t,
"SuperLayer_occupancy" );
221 sprintf (histo_n,
"Layer_occupancy" );
222 sprintf (histo_t,
"Layer_occupancy" );
225 sprintf (histo_n,
"Wire_occupancy" );
226 sprintf (histo_t,
"Wire_occupancy" );
229 sprintf (histo_n,
"path_followed_by_muon" );
230 sprintf (histo_t,
"path_followed_by_muon" );
233 sprintf (histo_n,
"chamber_occupancy" );
234 sprintf (histo_t,
"chamber_occupancy" );
237 sprintf (histo_n,
"radius_of_hit");
238 sprintf (histo_t,
"radius_of_hit");
241 sprintf (histo_n,
"costheta_of_hit" );
242 sprintf (histo_t,
"costheta_of_hit" );
245 sprintf (histo_n,
"global_eta_of_hit" );
246 sprintf (histo_t,
"global_eta_of_hit" );
249 sprintf (histo_n,
"global_phi_of_hit" );
250 sprintf (histo_t,
"global_phi_of_hit" );
266 <<
"Processing run " << nrun <<
", event " <<
nevt;
272 std::vector<const edm::Provenance*> AllProv;
277 <<
"Number of Provenances = " << AllProv.size();
280 TString eventout(
"\nProvenance info:\n");
282 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
283 eventout +=
"\n ******************************";
284 eventout +=
"\n Module : ";
285 eventout += AllProv[
i]->moduleLabel();
286 eventout +=
"\n ProductID : ";
287 eventout += AllProv[
i]->productID().id();
288 eventout +=
"\n ClassName : ";
289 eventout += AllProv[
i]->className();
290 eventout +=
"\n InstanceName : ";
291 eventout += AllProv[
i]->productInstanceName();
292 eventout +=
"\n BranchName : ";
293 eventout += AllProv[
i]->branchName();
295 eventout +=
" ******************************\n";
296 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") << eventout <<
"\n";
304 <<
"Done gathering data from event.";
314 eventout =
"\nGathering DT info:";
317 edm::PSimHitContainer::const_iterator itHit;
323 if (!theDTGeometry.
isValid()) {
325 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
333 if (!MuonDTContainer.
isValid()) {
335 <<
"Unable to find MuonDTHits in event!";
347 for (itHit = MuonDTContainer->begin(); itHit != MuonDTContainer->end();
353 DetId theDetUnitId(itHit->detUnitId());
354 int detector = theDetUnitId.
det();
355 int subdetector = theDetUnitId.subdetId();
358 if ((detector ==
dMuon) &&
366 <<
"Unable to get GeomDetUnit from theDTMuon for hit " <<
i;
377 if (
abs(itHit->particleType()) == 13 ) {
383 iden = itHit->detUnitId();
400 path = (station-1) * 40 + superlayer * 10 + layer;
434 meLocalXvsZ->
Fill(itHit->localPosition().x(), itHit->localPosition().z() );
437 meLocalXvsY->
Fill(itHit->localPosition().x(), itHit->localPosition().y() );
441 globposz = bsurf.toGlobal(itHit->localPosition()).
z();
488 <<
"MuonDT PSimHit " << i
489 <<
" is expected to be (det,subdet) = ("
491 <<
"); value returned is: ("
492 << detector <<
"," << subdetector <<
")";
498 eventout +=
"\n Number of DT muon Hits collected:......... ";
504 edm::LogInfo(
"MuonSimHitsValidAnalyzer::fillDT") << eventout <<
"\n";
T getParameter(std::string const &) const
MonitorElement * meChamberOccup
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meLayerOccup
void getAllProvenance(std::vector< Provenance const * > &provenances) const
MonitorElement * meCosTheta
static const int sdMuonDT
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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
const Plane & surface() const
The nominal surface of the GeomDet.
MonitorElement * meGlobalXvsYWm2
MonitorElement * meGlobalXvsY
MonitorElement * meAllDTHits
MonitorElement * meGlobalXvsYWp2
MonitorElement * meGlobalXvsYWm1
int nRawGenPart
G4MC info.
Cos< T >::type cos(const T &t)
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
virtual ~MuonSimHitsValidAnalyzer()
MonitorElement * meEnergyLoss
MuonSimHitsValidAnalyzer(const edm::ParameterSet &)
void setCurrentFolder(const std::string &fullpath)
std::string fName
parameter information
MonitorElement * book2D(Args &&...args)
MonitorElement * meHitRadius
MonitorElement * meMuDTHits
MonitorElement * meSuperLOccup
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
char const * productInstance
MonitorElement * meStationOccup
MonitorElement * meGlobalPhi
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meMomentumMB1
MonitorElement * meLocalXvsZ
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * meGlobalXvsYWp1
volatile std::atomic< bool > shutdown_flag false
Detector det() const
get the detector field from this detid
MonitorElement * meMomentumMB4
MonitorElement * meLossMomIron
MonitorElement * mePathMuon
unsigned int count
private statistics information
MonitorElement * meGlobalXvsYW0
MonitorElement * meWheelOccup
void fillDT(const edm::Event &, const edm::EventSetup &)