@@ -537,15 +537,21 @@ void SiPixelLorentzAnglePCLWorker::analyze(edm::Event const& iEvent, edm::EventS
537537 iHists.h_drift_depth_noadc_ .at (i_index)->Fill (drift, depth, 1 .);
538538 iHists.h_bySectOccupancy_ ->Fill (i_index - 1 ); // histogram starts at 0
539539
540- if (module_ >= 3 && module_ <= 6 && (layer_ == 3 || layer_ == 4 )) {
541- int i_index_merge = (module_ - 1 ) / 2 + (layer_ - 3 ) * 2 +
542- iHists.nlay * iHists.nModules_ [iHists.nlay - 1 ] +
543- (int )iHists.BPixnewDetIds_ .size ();
544-
545- iHists.h_drift_depth_adc_ .at (i_index_merge)->Fill (drift, depth, pixinfo_.adc [j]);
546- iHists.h_drift_depth_adc2_ .at (i_index_merge)->Fill (drift, depth, pixinfo_.adc [j] * pixinfo_.adc [j]);
547- iHists.h_drift_depth_noadc_ .at (i_index_merge)->Fill (drift, depth, 1 .);
548- iHists.h_bySectOccupancy_ ->Fill (i_index_merge - 1 );
540+ if (tracker->getDetectorType (subDetID) == TrackerGeometry::ModuleType::Ph1PXB) {
541+ if ((module_ == 3 || module_ == 5 ) && (layer_ == 3 || layer_ == 4 )) {
542+ int i_index_merge = i_index + 1 ;
543+ iHists.h_drift_depth_adc_ .at (i_index_merge)->Fill (drift, depth, pixinfo_.adc [j]);
544+ iHists.h_drift_depth_adc2_ .at (i_index_merge)->Fill (drift, depth, pixinfo_.adc [j] * pixinfo_.adc [j]);
545+ iHists.h_drift_depth_noadc_ .at (i_index_merge)->Fill (drift, depth, 1 .);
546+ iHists.h_bySectOccupancy_ ->Fill (i_index_merge - 1 );
547+ }
548+ if ((module_ == 4 || module_ == 6 ) && (layer_ == 3 || layer_ == 4 )) {
549+ int i_index_merge = i_index - 1 ;
550+ iHists.h_drift_depth_adc_ .at (i_index_merge)->Fill (drift, depth, pixinfo_.adc [j]);
551+ iHists.h_drift_depth_adc2_ .at (i_index_merge)->Fill (drift, depth, pixinfo_.adc [j] * pixinfo_.adc [j]);
552+ iHists.h_drift_depth_noadc_ .at (i_index_merge)->Fill (drift, depth, 1 .);
553+ iHists.h_bySectOccupancy_ ->Fill (i_index_merge - 1 );
554+ }
549555 }
550556
551557 } else {
@@ -705,12 +711,11 @@ void SiPixelLorentzAnglePCLWorker::bookHistograms(DQMStore::IBooker& iBooker,
705711 edm::Run const & run,
706712 edm::EventSetup const & iSetup) {
707713 // book the by partition monitoring
708- const auto maxSect = iHists.nlay * iHists.nModules_ [iHists.nlay - 1 ] + (int )iHists.BPixnewDetIds_ .size () +
709- 4 ; // add 4 more for combined modules
714+ const auto maxSect = iHists.nlay * iHists.nModules_ [iHists.nlay - 1 ] + (int )iHists.BPixnewDetIds_ .size ();
710715
711716 iBooker.setCurrentFolder (fmt::sprintf (" %s/SectorMonitoring" , folder_.data ()));
712717 iHists.h_bySectOccupancy_ = iBooker.book1D (
713- " h_bySectorOccupancy" , " hit occupancy by sector;pixel sector;hits on track" , maxSect, -0.5 , maxSect + 0.5 );
718+ " h_bySectorOccupancy" , " hit occupancy by sector;pixel sector;hits on track" , maxSect, -0.5 , maxSect - 0.5 );
714719
715720 iBooker.setCurrentFolder (folder_);
716721 static constexpr double min_depth_ = -100 .;
@@ -736,26 +741,6 @@ void SiPixelLorentzAnglePCLWorker::bookHistograms(DQMStore::IBooker& iBooker,
736741 i_layer,
737742 i_module);
738743 iHists.h_mean_ [i_index] = iBooker.book1D (name, title, hist_depth_, min_depth_, max_depth_);
739-
740- if ((i_module == 3 || i_module == 5 ) && (i_layer == 3 || i_layer == 4 )) {
741- int i_index_merge = (i_module - 1 ) / 2 + (i_layer - 3 ) * 2 + iHists.nlay * iHists.nModules_ [iHists.nlay - 1 ] +
742- (int )iHists.BPixnewDetIds_ .size ();
743-
744- std::string binName = fmt::sprintf (" BPix Layer%i Module %i and Module %i" , i_layer, i_module, i_module + 1 );
745- LogDebug (" SiPixelLorentzAnglePCLWorker" ) << " i_index_merge: " << i_index_merge << " bin name: " << binName
746- << " (i_layer: " << i_layer << " i_module:" << i_module << " and "
747- << " i_module:" << i_module + 1 << " )" ;
748-
749- iHists.h_bySectOccupancy_ ->setBinLabel (i_index_merge, binName);
750-
751- sprintf (name, " h_mean_layer%i_module%i_and_module%i" , i_layer, i_module, i_module + 1 );
752- sprintf (title,
753- " average drift vs depth layer%i module%i_and_module%i; production depth [#mum]; #LTdrift#GT [#mum]" ,
754- i_layer,
755- i_module,
756- i_module + 1 );
757- iHists.h_mean_ [i_index_merge] = iBooker.book1D (name, title, hist_depth_, min_depth_, max_depth_);
758- }
759744 }
760745 }
761746 for (int i = 0 ; i < (int )iHists.BPixnewDetIds_ .size (); i++) {
@@ -798,50 +783,6 @@ void SiPixelLorentzAnglePCLWorker::bookHistograms(DQMStore::IBooker& iBooker,
798783 sprintf (title, " depth vs drift layer%i module%i; drift [#mum]; production depth [#mum]" , i_layer, i_module);
799784 iHists.h_drift_depth_ [i_index] =
800785 iBooker.book2D (name, title, hist_drift_, min_drift_, max_drift_, hist_depth_, min_depth_, max_depth_);
801-
802- // merge modules 3 and 4 at L3 & L4, merge modules 5 and 6 at L3 & L4
803- if ((i_module == 3 || i_module == 5 ) && (i_layer == 3 || i_layer == 4 )) {
804- unsigned int i_index_merge = (i_module - 1 ) / 2 + (i_layer - 3 ) * 2 +
805- iHists.nlay * iHists.nModules_ [iHists.nlay - 1 ] +
806- (int )iHists.BPixnewDetIds_ .size ();
807-
808- sprintf (name, " h_drift_depth_adc_layer%i_module%i_and_module%i" , i_layer, i_module, i_module + 1 );
809- sprintf (title,
810- " depth vs drift (ADC) layer%i module%i_and_module%i; drift [#mum]; production depth [#mum]" ,
811- i_layer,
812- i_module,
813- i_module + 1 );
814- iHists.h_drift_depth_adc_ [i_index_merge] =
815- iBooker.book2D (name, title, hist_drift_, min_drift_, max_drift_, hist_depth_, min_depth_, max_depth_);
816-
817- sprintf (name, " h_drift_depth_adc2_layer%i_module%i_and_module%i" , i_layer, i_module, i_module + 1 );
818- sprintf (title,
819- " depth vs drift (ADC^{2}) layer%i module%i_and_module%i; drift [#mum]; production depth [#mum]" ,
820- i_layer,
821- i_module,
822- i_module + 1 );
823- iHists.h_drift_depth_adc2_ [i_index_merge] =
824- iBooker.book2D (name, title, hist_drift_, min_drift_, max_drift_, hist_depth_, min_depth_, max_depth_);
825-
826- sprintf (name, " h_drift_depth_noadc_layer%i_module%i_and_module%i" , i_layer, i_module, i_module + 1 );
827- sprintf (title,
828- " depth vs drift (no ADC) layer%i module%i_and_module%i; drift [#mum]; production depth [#mum]" ,
829- i_layer,
830- i_module,
831- i_module + 1 );
832- iHists.h_drift_depth_noadc_ [i_index_merge] =
833- iBooker.book2D (name, title, hist_drift_, min_drift_, max_drift_, hist_depth_, min_depth_, max_depth_);
834-
835- sprintf (name, " h_drift_depth_layer%i_module%i_and_module%i" , i_layer, i_module, i_module + 1 );
836- sprintf (title,
837- " depth vs drift layer%i module%i_and_module%i; drift [#mum]; production depth [#mum]" ,
838- i_layer,
839- i_module,
840- i_module + 1 );
841-
842- iHists.h_drift_depth_ [i_index_merge] =
843- iBooker.book2D (name, title, hist_drift_, min_drift_, max_drift_, hist_depth_, min_depth_, max_depth_);
844- }
845786 }
846787 }
847788
0 commit comments