CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
SiStripApvGainInspector Class Reference
Inheritance diagram for SiStripApvGainInspector:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SiStripApvGainInspector (const edm::ParameterSet &)
 
 ~SiStripApvGainInspector () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Types

enum  fitMode { landau = 1, landauAroundMax = 2, landauGauss = 3, fake = 4 }
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
std::map< std::string, TH1 * > bookQualityMonitor (const TFileDirectory &dir)
 
void checkAndRetrieveTopology (const edm::EventSetup &setup)
 
void checkBookAPVColls (const edm::EventSetup &es)
 
void doFakeFit (TH1 *InputHisto, double *FitResults)
 
void endJob () override
 
void fill1D (std::map< std::string, TH1 *> &h, const std::string &s, double x)
 
void fill2D (std::map< std::string, TH1 *> &h, const std::string &s, double x, double y)
 
void fillQualityMonitor ()
 
std::unique_ptr< SiStripApvGaingetNewObject ()
 
void getPeakOfLandau (TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
 
void getPeakOfLandauAroundMax (TH1 *InputHisto, double *FitResults, double LowRange=100, double HighRange=100)
 
void getPeakOfLanGau (TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
 
bool isGoodLandauFit (double *FitResults)
 
bool isValidMode (int mode) const
 
void makeNicePlotStyle (TH1F *plot)
 
void storeOnTree (TFileService *tfs)
 

Static Private Member Functions

static double langaufun (Double_t *x, Double_t *par)
 

Private Attributes

std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
 
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
 
unsigned int BAD
 
const TrackerGeometrybareTkGeomPtr_
 
const TH2F * Charge_Vs_Index
 
std::unique_ptr< TrackerMapentries_map
 
const std::string filename_
 
TFile * fin
 
std::unique_ptr< TrackerMapfitChi2_map
 
fitMode fitMode_
 
const std::vector< std::string > fitModeStrings
 
const edm::ESGetToken< SiStripGain, SiStripGainRcdgainToken_
 
unsigned int GOOD
 
std::map< std::string, TH1 * > hControl
 
std::map< std::pair< unsigned char, uint32_t >, TH1F * > histoMap_
 
unsigned int MASKED
 
double minNrEntries
 
std::unique_ptr< TrackerMapmpv_err_map
 
std::unique_ptr< TrackerMapmpv_map
 
std::unique_ptr< TrackerMapnew_payload_map
 
int NPixelDets
 
int NStripAPVs
 
std::unique_ptr< TrackerMapold_payload_map
 
const edm::ESGetToken< SiStripQuality, SiStripQualityRcdqualityToken_
 
std::unique_ptr< TrackerMapratio_map
 
TFileServicetfs
 
edm::ESHandle< TrackerGeometrytkGeom_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
const TrackerTopologytTopo_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
std::vector< unsigned int > wantedmods
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 69 of file SiStripApvGainInspector.cc.

Member Enumeration Documentation

◆ fitMode

Constructor & Destructor Documentation

◆ SiStripApvGainInspector()

SiStripApvGainInspector::SiStripApvGainInspector ( const edm::ParameterSet iConfig)
explicit

Definition at line 169 of file SiStripApvGainInspector.cc.

References Charge_Vs_Index, entries_map, filename_, fin, fitChi2_map, fitMode_, fitModeStrings, edm::ParameterSet::getParameter(), isValidMode(), cond::service::PoolDBOutputService::kSharedResource, TFileService::kSharedResource, mod(), mpv_err_map, mpv_map, new_payload_map, old_payload_map, ratio_map, jetUpdater_cfi::sort, and wantedmods.

170  : gainToken_(esConsumes()),
174  bareTkGeomPtr_(nullptr),
175  tTopo_(nullptr),
176  GOOD(0),
177  BAD(0),
178  filename_(iConfig.getUntrackedParameter<std::string>("inputFile")),
179  minNrEntries(iConfig.getUntrackedParameter<double>("minNrEntries", 20)),
180  wantedmods(iConfig.getUntrackedParameter<std::vector<unsigned int>>("selectedModules")) {
181  usesResource(TFileService::kSharedResource);
183 
184  sort(wantedmods.begin(), wantedmods.end());
185 
186  edm::LogInfo("SelectedModules") << "Selected module list";
187  for (std::vector<unsigned int>::const_iterator mod = wantedmods.begin(); mod != wantedmods.end(); mod++) {
188  edm::LogVerbatim("SelectedModules") << *mod;
189  }
190 
191  int modeValue = iConfig.getParameter<int>("fitMode");
192  if (!isValidMode(modeValue)) {
193  throw std::invalid_argument("Invalid value provided for 'fitMode'");
194  } else {
195  edm::LogPrint("SiStripApvGainInspector") << "Chosen fitting mode: " << fitModeStrings[modeValue];
196  }
197 
198  fitMode_ = static_cast<fitMode>(modeValue);
199 
200  //now do what ever initialization is needed
201  fin = TFile::Open(filename_.c_str(), "READ");
202  Charge_Vs_Index = (TH2F*)fin->Get("DQMData/Run 999999/AlCaReco/Run summary/SiStripGainsAAG/Charge_Vs_Index_AagBunch");
203 
204  ratio_map = std::make_unique<TrackerMap>("ratio");
205  ratio_map->setTitle("Average by module of the G2 Gain payload ratio (new/old)");
206  ratio_map->setPalette(1);
207 
208  new_payload_map = std::make_unique<TrackerMap>("new_payload");
209  new_payload_map->setTitle("Tracker Map of Updated G2 Gain payload averaged by module");
210  new_payload_map->setPalette(1);
211 
212  old_payload_map = std::make_unique<TrackerMap>("old_payload");
213  old_payload_map->setTitle("Tracker Map of Starting G2 Gain Payload averaged by module");
214  old_payload_map->setPalette(1);
215 
216  // fit quality maps
217 
218  mpv_map = std::make_unique<TrackerMap>("MPV");
219  mpv_map->setTitle("Landau Fit MPV average value per module [ADC counts/mm]");
220  mpv_map->setPalette(1);
221 
222  mpv_err_map = std::make_unique<TrackerMap>("MPVerr");
223  mpv_err_map->setTitle("Landau Fit MPV average error per module [ADC counts/mm]");
224  mpv_err_map->setPalette(1);
225 
226  entries_map = std::make_unique<TrackerMap>("Entries");
227  entries_map->setTitle("log_{10}(entries) average per module");
228  entries_map->setPalette(1);
229 
230  fitChi2_map = std::make_unique<TrackerMap>("FitChi2");
231  fitChi2_map->setTitle("log_{10}(Fit #chi^{2}/ndf) average per module");
232  fitChi2_map->setPalette(1);
233 }
static const std::string kSharedResource
Definition: TFileService.h:76
Log< level::Info, true > LogVerbatim
std::unique_ptr< TrackerMap > mpv_err_map
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
bool isValidMode(int mode) const
std::unique_ptr< TrackerMap > entries_map
std::unique_ptr< TrackerMap > new_payload_map
std::unique_ptr< TrackerMap > mpv_map
std::vector< unsigned int > wantedmods
std::unique_ptr< TrackerMap > fitChi2_map
T getUntrackedParameter(std::string const &, T const &) const
const std::vector< std::string > fitModeStrings
const TrackerTopology * tTopo_
std::unique_ptr< TrackerMap > old_payload_map
std::unique_ptr< TrackerMap > ratio_map
Log< level::Warning, true > LogPrint
const edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
Log< level::Info, false > LogInfo
const TrackerGeometry * bareTkGeomPtr_
static const std::string kSharedResource
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_

◆ ~SiStripApvGainInspector()

SiStripApvGainInspector::~SiStripApvGainInspector ( )
override

Definition at line 237 of file SiStripApvGainInspector.cc.

References fin.

237  {
238  fin->Close();
239  delete fin;
240 }

Member Function Documentation

◆ analyze()

void SiStripApvGainInspector::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 247 of file SiStripApvGainInspector.cc.

References a, sistrip::APV, APVsColl, APVsCollOrdered, BAD, Charge_Vs_Index, checkAndRetrieveTopology(), checkBookAPVColls(), doFakeFit(), beamvalidation::exit(), fake, fitMode_, gainToken_, SiStripGain::getApvGain(), edm::EventSetup::getHandle(), SiStripGain::getNumberOfTags(), getPeakOfLandau(), getPeakOfLandauAroundMax(), getPeakOfLanGau(), SiStripGain::getRange(), GOOD, histoMap_, Exhume::I, SiStripQuality::IsApvBad(), isGoodLandauFit(), edm::ESHandleBase::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, landau, landauAroundMax, landauGauss, mod(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, qualityToken_, mps_setup::stdout, and wantedmods.

247  {
248  using namespace edm;
249  this->checkBookAPVColls(iSetup); // check whether APV colls are booked and do so if not yet done
250  this->checkAndRetrieveTopology(iSetup);
251 
252  edm::ESHandle<SiStripGain> gainHandle = iSetup.getHandle(gainToken_);
253  if (!gainHandle.isValid()) {
254  edm::LogError("SiStripApvGainInspector") << "gainHandle is not valid\n";
255  exit(0);
256  }
257 
258  edm::ESHandle<SiStripQuality> SiStripQuality_ = iSetup.getHandle(qualityToken_);
259 
260  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
261  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
262 
264  continue;
265 
266  APV->isMasked = SiStripQuality_->IsApvBad(APV->DetId, APV->APVId);
267 
268  if (gainHandle->getNumberOfTags() != 2) {
269  edm::LogError("SiStripApvGainInspector") << "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";
270  fflush(stdout);
271  exit(0);
272  };
273  float newPreviousGain = gainHandle->getApvGain(APV->APVId, gainHandle->getRange(APV->DetId, 1), 1);
274  if (APV->PreviousGain != 1 and newPreviousGain != APV->PreviousGain)
275  edm::LogWarning("SiStripApvGainInspector") << "WARNING: ParticleGain in the global tag changed\n";
276  APV->PreviousGain = newPreviousGain;
277 
278  float newPreviousGainTick = gainHandle->getApvGain(APV->APVId, gainHandle->getRange(APV->DetId, 0), 0);
279  if (APV->PreviousGainTick != 1 and newPreviousGainTick != APV->PreviousGainTick) {
280  edm::LogWarning("SiStripApvGainInspector")
281  << "WARNING: TickMarkGain in the global tag changed\n"
282  << std::endl
283  << " APV->SubDet: " << APV->SubDet << " APV->APVId:" << APV->APVId << std::endl
284  << " APV->PreviousGainTick: " << APV->PreviousGainTick << " newPreviousGainTick: " << newPreviousGainTick
285  << std::endl;
286  }
287  APV->PreviousGainTick = newPreviousGainTick;
288  }
289 
290  unsigned int I = 0;
291  TH1F* Proj = nullptr;
292  double FitResults[6];
293  double MPVmean = 300;
294 
295  if (Charge_Vs_Index == nullptr) {
296  edm::LogError("SiStripGainsPCLHarvester") << "Harvesting: could not find input histogram " << std::endl;
297  return;
298  }
299 
300  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
301  printf("Fitting Charge Distribution :");
302  int TreeStep = APVsColl.size() / 50;
303 
304  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++, I++) {
305  if (I % TreeStep == 0) {
306  printf(".");
307  fflush(stdout);
308  }
309  std::shared_ptr<stAPVGain> APV = it->second;
310  if (APV->Bin < 0)
311  APV->Bin = Charge_Vs_Index->GetXaxis()->FindBin(APV->Index);
312 
313  Proj = (TH1F*)(Charge_Vs_Index->ProjectionY(
314  "", Charge_Vs_Index->GetXaxis()->FindBin(APV->Index), Charge_Vs_Index->GetXaxis()->FindBin(APV->Index), "e"));
315  if (!Proj)
316  continue;
317 
318  switch (fitMode_) {
319  case landau:
320  getPeakOfLandau(Proj, FitResults);
321  break;
322  case landauAroundMax:
323  getPeakOfLandauAroundMax(Proj, FitResults);
324  break;
325  case landauGauss:
326  getPeakOfLanGau(Proj, FitResults);
327  break;
328  case fake:
329  doFakeFit(Proj, FitResults);
330  break;
331  default:
332  throw std::invalid_argument("Invalid value provided for 'fitMode'");
333  }
334 
335  APV->FitMPV = FitResults[0];
336  APV->FitMPVErr = FitResults[1];
337  APV->FitWidth = FitResults[2];
338  APV->FitWidthErr = FitResults[3];
339  APV->FitChi2 = FitResults[4];
340  APV->FitNorm = FitResults[5];
341  APV->NEntries = Proj->GetEntries();
342 
343  for (const auto& mod : wantedmods) {
344  if (mod == APV->DetId) {
345  edm::LogInfo("ModuleFound") << " module " << mod << " found! Storing... " << std::endl;
346  histoMap_[std::make_pair(APV->APVId, APV->DetId)] = (TH1F*)Proj->Clone(Form("hClone_%s", Proj->GetName()));
347  }
348  }
349 
350  if (isGoodLandauFit(FitResults)) {
351  APV->Gain = APV->FitMPV / MPVmean;
352  if (APV->SubDet > 2)
353  GOOD++;
354  } else {
355  APV->Gain = APV->PreviousGain;
356  if (APV->SubDet > 2)
357  BAD++;
358  }
359  if (APV->Gain <= 0)
360  APV->Gain = 1;
361 
362  delete Proj;
363  }
364  printf("\n");
365 }
void getPeakOfLanGau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
bool IsApvBad(uint32_t detid, short apvNb) const
const SiStripApvGain::Range getRange(uint32_t detID) const
Definition: SiStripGain.h:75
void doFakeFit(TH1 *InputHisto, double *FitResults)
std::vector< unsigned int > wantedmods
Log< level::Error, false > LogError
static float getApvGain(const uint16_t &apv, const SiStripApvGain::Range &range)
Definition: SiStripGain.h:80
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
void getPeakOfLandauAroundMax(TH1 *InputHisto, double *FitResults, double LowRange=100, double HighRange=100)
size_t getNumberOfTags() const
Definition: SiStripGain.h:99
const std::complex< double > I
Definition: I.h:8
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
const edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
bool isValid() const
Definition: ESHandle.h:44
std::map< std::pair< unsigned char, uint32_t >, TH1F * > histoMap_
Log< level::Info, false > LogInfo
bool isGoodLandauFit(double *FitResults)
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
void checkBookAPVColls(const edm::EventSetup &es)
HLT enums.
double a
Definition: hdecay.h:121
Log< level::Warning, false > LogWarning
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
void checkAndRetrieveTopology(const edm::EventSetup &setup)
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
def exit(msg="")

◆ beginJob()

void SiStripApvGainInspector::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 875 of file SiStripApvGainInspector.cc.

References bookQualityMonitor(), hControl, TFileService::mkdir(), and tfs.

875  {
876  TFileDirectory control_dir = tfs->mkdir("Control");
877  //DA.cd();
878  hControl = this->bookQualityMonitor(control_dir);
879 }
std::map< std::string, TH1 * > hControl
std::map< std::string, TH1 * > bookQualityMonitor(const TFileDirectory &dir)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69

◆ bookQualityMonitor()

std::map< std::string, TH1 * > SiStripApvGainInspector::bookQualityMonitor ( const TFileDirectory dir)
private

Definition at line 954 of file SiStripApvGainInspector.cc.

References DeadROC_duringRun::dir, and h.

Referenced by beginJob().

954  {
955  int MPVbin = 300;
956  float MPVmin = 0.;
957  float MPVmax = 600.;
958 
959  TH1F::SetDefaultSumw2(kTRUE);
960  std::map<std::string, TH1*> h;
961 
962  h["MPV_Vs_EtaTIB"] = dir.make<TH2F>("MPVvsEtaTIB", "MPV vs Eta TIB", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
963  h["MPV_Vs_EtaTID"] = dir.make<TH2F>("MPVvsEtaTID", "MPV vs Eta TID", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
964  h["MPV_Vs_EtaTOB"] = dir.make<TH2F>("MPVvsEtaTOB", "MPV vs Eta TOB", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
965  h["MPV_Vs_EtaTEC"] = dir.make<TH2F>("MPVvsEtaTEC", "MPV vs Eta TEC", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
966  h["MPV_Vs_EtaTECthin"] = dir.make<TH2F>("MPVvsEtaTEC1", "MPV vs Eta TEC-thin", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
967  h["MPV_Vs_EtaTECthick"] =
968  dir.make<TH2F>("MPVvsEtaTEC2", "MPV vs Eta TEC-thick", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
969 
970  h["MPV_Vs_PhiTIB"] = dir.make<TH2F>("MPVvsPhiTIB", "MPV vs Phi TIB", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
971  h["MPV_Vs_PhiTID"] = dir.make<TH2F>("MPVvsPhiTID", "MPV vs Phi TID", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
972  h["MPV_Vs_PhiTOB"] = dir.make<TH2F>("MPVvsPhiTOB", "MPV vs Phi TOB", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
973  h["MPV_Vs_PhiTEC"] = dir.make<TH2F>("MPVvsPhiTEC", "MPV vs Phi TEC", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
974  h["MPV_Vs_PhiTECthin"] =
975  dir.make<TH2F>("MPVvsPhiTEC1", "MPV vs Phi TEC-thin ", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
976  h["MPV_Vs_PhiTECthick"] =
977  dir.make<TH2F>("MPVvsPhiTEC2", "MPV vs Phi TEC-thick", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
978 
979  h["NoMPVfit"] = dir.make<TH2F>("NoMPVfit", "Modules with bad Landau Fit", 350, -350, 350, 240, 0, 120);
980  h["NoMPVmasked"] = dir.make<TH2F>("NoMPVmasked", "Masked Modules", 350, -350, 350, 240, 0, 120);
981 
982  h["Gains"] = dir.make<TH1F>("Gains", "Gains", 300, 0, 2);
983  h["MPVs"] = dir.make<TH1F>("MPVs", "MPVs", MPVbin, MPVmin, MPVmax);
984  h["MPVs320"] = dir.make<TH1F>("MPV_320", "MPV 320 thickness", MPVbin, MPVmin, MPVmax);
985  h["MPVs500"] = dir.make<TH1F>("MPV_500", "MPV 500 thickness", MPVbin, MPVmin, MPVmax);
986  h["MPVsTIB"] = dir.make<TH1F>("MPV_TIB", "MPV TIB", MPVbin, MPVmin, MPVmax);
987  h["MPVsTID"] = dir.make<TH1F>("MPV_TID", "MPV TID", MPVbin, MPVmin, MPVmax);
988  h["MPVsTIDP"] = dir.make<TH1F>("MPV_TIDP", "MPV TIDP", MPVbin, MPVmin, MPVmax);
989  h["MPVsTIDM"] = dir.make<TH1F>("MPV_TIDM", "MPV TIDM", MPVbin, MPVmin, MPVmax);
990  h["MPVsTOB"] = dir.make<TH1F>("MPV_TOB", "MPV TOB", MPVbin, MPVmin, MPVmax);
991  h["MPVsTEC"] = dir.make<TH1F>("MPV_TEC", "MPV TEC", MPVbin, MPVmin, MPVmax);
992  h["MPVsTECP"] = dir.make<TH1F>("MPV_TECP", "MPV TECP", MPVbin, MPVmin, MPVmax);
993  h["MPVsTECM"] = dir.make<TH1F>("MPV_TECM", "MPV TECM", MPVbin, MPVmin, MPVmax);
994  h["MPVsTECthin"] = dir.make<TH1F>("MPV_TEC1", "MPV TEC thin", MPVbin, MPVmin, MPVmax);
995  h["MPVsTECthick"] = dir.make<TH1F>("MPV_TEC2", "MPV TEC thick", MPVbin, MPVmin, MPVmax);
996  h["MPVsTECP1"] = dir.make<TH1F>("MPV_TECP1", "MPV TECP thin ", MPVbin, MPVmin, MPVmax);
997  h["MPVsTECP2"] = dir.make<TH1F>("MPV_TECP2", "MPV TECP thick", MPVbin, MPVmin, MPVmax);
998  h["MPVsTECM1"] = dir.make<TH1F>("MPV_TECM1", "MPV TECM thin", MPVbin, MPVmin, MPVmax);
999  h["MPVsTECM2"] = dir.make<TH1F>("MPV_TECM2", "MPV TECM thick", MPVbin, MPVmin, MPVmax);
1000 
1001  h["MPVError"] = dir.make<TH1F>("MPVError", "MPV Error", 150, 0, 150);
1002  h["MPVErrorVsMPV"] = dir.make<TH2F>("MPVErrorVsMPV", "MPV Error vs MPV", 300, 0, 600, 150, 0, 150);
1003  h["MPVErrorVsEta"] = dir.make<TH2F>("MPVErrorVsEta", "MPV Error vs Eta", 50, -3.0, 3.0, 150, 0, 150);
1004  h["MPVErrorVsPhi"] = dir.make<TH2F>("MPVErrorVsPhi", "MPV Error vs Phi", 50, -3.4, 3.4, 150, 0, 150);
1005  h["MPVErrorVsN"] = dir.make<TH2F>("MPVErrorVsN", "MPV Error vs N", 500, 0, 1000, 150, 0, 150);
1006 
1007  h["DiffWRTPrevGainTIB"] = dir.make<TH1F>("DiffWRTPrevGainTIB", "Diff w.r.t. PrevGain TIB", 250, 0.5, 1.5);
1008  h["DiffWRTPrevGainTID"] = dir.make<TH1F>("DiffWRTPrevGainTID", "Diff w.r.t. PrevGain TID", 250, 0.5, 1.5);
1009  h["DiffWRTPrevGainTOB"] = dir.make<TH1F>("DiffWRTPrevGainTOB", "Diff w.r.t. PrevGain TOB", 250, 0.5, 1.5);
1010  h["DiffWRTPrevGainTEC"] = dir.make<TH1F>("DiffWRTPrevGainTEC", "Diff w.r.t. PrevGain TEC", 250, 0.5, 1.5);
1011 
1012  h["GainVsPrevGainTIB"] = dir.make<TH2F>("GainVsPrevGainTIB", "Gain vs PrevGain TIB", 100, 0, 2, 100, 0, 2);
1013  h["GainVsPrevGainTID"] = dir.make<TH2F>("GainVsPrevGainTID", "Gain vs PrevGain TID", 100, 0, 2, 100, 0, 2);
1014  h["GainVsPrevGainTOB"] = dir.make<TH2F>("GainVsPrevGainTOB", "Gain vs PrevGain TOB", 100, 0, 2, 100, 0, 2);
1015  h["GainVsPrevGainTEC"] = dir.make<TH2F>("GainVsPrevGainTEC", "Gain vs PrevGain TEC", 100, 0, 2, 100, 0, 2);
1016 
1017  return h;
1018 }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ checkAndRetrieveTopology()

void SiStripApvGainInspector::checkAndRetrieveTopology ( const edm::EventSetup setup)
private

Definition at line 620 of file SiStripApvGainInspector.cc.

References edm::ESHandle< T >::product(), singleTopDQM_cfi::setup, tTopo_, and tTopoToken_.

Referenced by analyze().

620  {
621  if (!tTopo_) {
622  edm::ESHandle<TrackerTopology> TopoHandle = setup.getHandle(tTopoToken_);
623  tTopo_ = TopoHandle.product();
624  }
625 }
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
T const * product() const
Definition: ESHandle.h:86
const TrackerTopology * tTopo_

◆ checkBookAPVColls()

void SiStripApvGainInspector::checkBookAPVColls ( const edm::EventSetup es)
private

Definition at line 369 of file SiStripApvGainInspector.cc.

References sistrip::APV, APVsColl, APVsCollOrdered, bareTkGeomPtr_, TrackerGeometry::dets(), edm::EventSetup::getHandle(), mps_fire::i, dqmiolumiharvest::j, PixelTopology::ncolumns(), NPixelDets, PixelTopology::nrows(), NStripAPVs, StripTopology::nstrips(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), ntupleEnum::SubDet, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, tkGeom_, tkGeomToken_, and StripSubdetector::TOB.

Referenced by analyze().

369  {
371  const TrackerGeometry* newBareTkGeomPtr = &(*tkGeom_);
372  if (newBareTkGeomPtr == bareTkGeomPtr_)
373  return; // already filled APVColls, nothing changed
374 
375  if (!bareTkGeomPtr_) { // pointer not yet set: called the first time => fill the APVColls
376  auto const& Det = newBareTkGeomPtr->dets();
377 
378  unsigned int Index = 0;
379 
380  for (unsigned int i = 0; i < Det.size(); i++) {
381  DetId Detid = Det[i]->geographicalId();
382  int SubDet = Detid.subdetId();
383 
386  auto DetUnit = dynamic_cast<const StripGeomDetUnit*>(Det[i]);
387  if (!DetUnit)
388  continue;
389 
390  const StripTopology& Topo = DetUnit->specificTopology();
391  unsigned int NAPV = Topo.nstrips() / 128;
392 
393  for (unsigned int j = 0; j < NAPV; j++) {
394  auto APV = std::make_shared<stAPVGain>();
395  APV->Index = Index;
396  APV->Bin = -1;
397  APV->DetId = Detid.rawId();
398  APV->APVId = j;
399  APV->SubDet = SubDet;
400  APV->FitMPV = -1;
401  APV->FitMPVErr = -1;
402  APV->FitWidth = -1;
403  APV->FitWidthErr = -1;
404  APV->FitChi2 = -1;
405  APV->FitNorm = -1;
406  APV->Gain = -1;
407  APV->PreviousGain = 1;
408  APV->PreviousGainTick = 1;
409  APV->x = DetUnit->position().basicVector().x();
410  APV->y = DetUnit->position().basicVector().y();
411  APV->z = DetUnit->position().basicVector().z();
412  APV->Eta = DetUnit->position().basicVector().eta();
413  APV->Phi = DetUnit->position().basicVector().phi();
414  APV->R = DetUnit->position().basicVector().transverse();
415  APV->Thickness = DetUnit->surface().bounds().thickness();
416  APV->NEntries = 0;
417  APV->isMasked = false;
418 
419  APVsCollOrdered.push_back(APV);
420  APVsColl[(APV->DetId << 4) | APV->APVId] = APV;
421  Index++;
422  NStripAPVs++;
423  } // loop on APVs
424  } // if is Strips
425  } // loop on dets
426 
427  for (unsigned int i = 0; i < Det.size();
428  i++) { //Make two loop such that the Pixel information is added at the end --> make transition simpler
429  DetId Detid = Det[i]->geographicalId();
430  int SubDet = Detid.subdetId();
432  auto DetUnit = dynamic_cast<const PixelGeomDetUnit*>(Det[i]);
433  if (!DetUnit)
434  continue;
435 
436  const PixelTopology& Topo = DetUnit->specificTopology();
437  unsigned int NROCRow = Topo.nrows() / (80.);
438  unsigned int NROCCol = Topo.ncolumns() / (52.);
439 
440  for (unsigned int j = 0; j < NROCRow; j++) {
441  for (unsigned int i = 0; i < NROCCol; i++) {
442  auto APV = std::make_shared<stAPVGain>();
443  APV->Index = Index;
444  APV->Bin = -1;
445  APV->DetId = Detid.rawId();
446  APV->APVId = (j << 3 | i);
447  APV->SubDet = SubDet;
448  APV->FitMPV = -1;
449  APV->FitMPVErr = -1;
450  APV->FitWidth = -1;
451  APV->FitWidthErr = -1;
452  APV->FitChi2 = -1;
453  APV->Gain = -1;
454  APV->PreviousGain = 1;
455  APV->PreviousGainTick = 1;
456  APV->x = DetUnit->position().basicVector().x();
457  APV->y = DetUnit->position().basicVector().y();
458  APV->z = DetUnit->position().basicVector().z();
459  APV->Eta = DetUnit->position().basicVector().eta();
460  APV->Phi = DetUnit->position().basicVector().phi();
461  APV->R = DetUnit->position().basicVector().transverse();
462  APV->Thickness = DetUnit->surface().bounds().thickness();
463  APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId());
464  APV->NEntries = 0;
465 
466  APVsCollOrdered.push_back(APV);
467  APVsColl[(APV->DetId << 4) | APV->APVId] = APV;
468  Index++;
469  NPixelDets++;
470 
471  } // loop on ROC cols
472  } // loop on ROC rows
473  } // if Pixel
474  } // loop on Dets
475  } //if (!bareTkGeomPtr_) ...
476  bareTkGeomPtr_ = newBareTkGeomPtr;
477 }
static constexpr auto TEC
virtual int nstrips() const =0
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
virtual int ncolumns() const =0
virtual int nrows() const =0
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
Definition: DetId.h:17
static constexpr auto TIB
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const TrackerGeometry * bareTkGeomPtr_
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
edm::ESHandle< TrackerGeometry > tkGeom_
static constexpr auto TID

◆ doFakeFit()

void SiStripApvGainInspector::doFakeFit ( TH1 *  InputHisto,
double *  FitResults 
)
private

Definition at line 653 of file SiStripApvGainInspector.cc.

Referenced by analyze().

653  {
654  FitResults[0] = -0.5; //MPV
655  FitResults[1] = 0; //MPV error
656  FitResults[2] = -0.5; //Width
657  FitResults[3] = 0; //Width error
658  FitResults[4] = -0.5; //Fit Chi2/NDF
659  FitResults[5] = 0; //Normalization
660 }

◆ endJob()

void SiStripApvGainInspector::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 882 of file SiStripApvGainInspector.cc.

References alignmentValidation::c1, cond::service::PoolDBOutputService::currentTime(), entries_map, fillQualityMonitor(), fitChi2_map, getNewObject(), SiStripMiscalibrate::getTruncatedRange(), histoMap_, edm::Service< T >::isAvailable(), makeNicePlotStyle(), mpv_err_map, mpv_map, new_payload_map, old_payload_map, Utilities::operator, plotFactory::plot, FastTimerService_cff::range, ratio_map, storeOnTree(), tfs, and cond::service::PoolDBOutputService::writeOneIOV().

882  {
883  edm::LogVerbatim("SelectedModules") << "Selected APVs:" << histoMap_.size() << std::endl;
884  for (const auto& plot : histoMap_) {
885  TCanvas* c1 = new TCanvas(Form("c1_%i_%i", plot.first.second, plot.first.first),
886  Form("c1_%i_%i", plot.first.second, plot.first.first),
887  800,
888  600);
889  // Define common things for the different fits
890 
891  gStyle->SetOptFit(1011);
892  c1->Clear();
893 
894  c1->SetLeftMargin(0.15);
895  c1->SetRightMargin(0.10);
896  plot.second->SetTitle(Form("Cluster Charge (%i,%i)", plot.first.second, plot.first.first));
897  plot.second->GetXaxis()->SetTitle("Normalized Cluster Charge [ADC counts/mm]");
898  plot.second->GetYaxis()->SetTitle("On-track clusters");
899  plot.second->GetXaxis()->SetRangeUser(0., 1000.);
900 
901  this->makeNicePlotStyle(plot.second);
902  plot.second->Draw();
903  edm::LogVerbatim("SelectedModules") << " DetId: " << plot.first.second << " (" << plot.first.first << ")"
904  << std::endl;
905  ;
906 
907  c1->Print(Form("c1_%i_%i.png", plot.first.second, plot.first.first));
908  c1->Print(Form("c1_%i_%i.pdf", plot.first.second, plot.first.first));
909  }
910 
912  storeOnTree(tfs);
913 
915 
916  ratio_map->save(true, range.first, range.second, "G2_gain_ratio_map.pdf");
917  ratio_map->save(true, range.first, range.second, "G2_gain_ratio_map.png");
918 
920 
921  old_payload_map->save(true, range.first, range.second, "starting_G2_gain_payload_map.pdf");
922  old_payload_map->save(true, range.first, range.second, "starting_G2_gain_payload_map.png");
923 
925 
926  new_payload_map->save(true, range.first, range.second, "new_G2_gain_payload_map.pdf");
927  new_payload_map->save(true, range.first, range.second, "new_G2_gain_payload_map.png");
928 
929  mpv_map->save(true, 250, 350., "mpv_map.pdf");
930  mpv_map->save(true, 250, 350., "mpv_map.png");
931 
932  mpv_err_map->save(true, 0., 3., "mpv_err_map.pdf");
933  mpv_err_map->save(true, 0., 3., "mpv_err_map.png");
934 
935  entries_map->save(true, 0, 0, "entries_map.pdf");
936  entries_map->save(true, 0, 0, "entries_map.png");
937 
938  fitChi2_map->save(true, 0., 0., "fitChi2_map.pdf");
939  fitChi2_map->save(true, 0., 0., "fitChi2_map.png");
940 
942 
943  std::unique_ptr<SiStripApvGain> theAPVGains = this->getNewObject();
944 
945  // write out the APVGains record
947 
948  if (poolDbService.isAvailable())
949  poolDbService->writeOneIOV(theAPVGains.get(), poolDbService->currentTime(), "SiStripApvGainRcd");
950  else
951  throw std::runtime_error("PoolDBService required.");
952 }
Log< level::Info, true > LogVerbatim
std::unique_ptr< TrackerMap > mpv_err_map
std::unique_ptr< TrackerMap > entries_map
std::unique_ptr< TrackerMap > new_payload_map
std::unique_ptr< TrackerMap > mpv_map
void storeOnTree(TFileService *tfs)
std::unique_ptr< TrackerMap > fitChi2_map
std::unique_ptr< TrackerMap > old_payload_map
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
std::unique_ptr< TrackerMap > ratio_map
std::unique_ptr< SiStripApvGain > getNewObject()
std::map< std::pair< unsigned char, uint32_t >, TH1F * > histoMap_
std::pair< float, float > getTruncatedRange(const TrackerMap *theMap)
bool isAvailable() const
Definition: Service.h:40

◆ fill1D()

void SiStripApvGainInspector::fill1D ( std::map< std::string, TH1 *> &  h,
const std::string &  s,
double  x 
)
inlineprivate

Definition at line 94 of file SiStripApvGainInspector.cc.

References h, alignCSCRings::s, and x.

Referenced by fillQualityMonitor().

94  {
95  if (h.count(s) == 0) {
96  edm::LogWarning("SiStripApvGainInspector") << "Trying to fill non-existing Histogram named " << s << std::endl;
97  return;
98  }
99  h[s]->Fill(x);
100  }
Log< level::Warning, false > LogWarning
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ fill2D()

void SiStripApvGainInspector::fill2D ( std::map< std::string, TH1 *> &  h,
const std::string &  s,
double  x,
double  y 
)
inlineprivate

Definition at line 102 of file SiStripApvGainInspector.cc.

References h, alignCSCRings::s, x, and y.

Referenced by fillQualityMonitor().

102  {
103  if (h.count(s) == 0) {
104  edm::LogWarning("SiStripApvGainInspector") << "Trying to fill non-existing Histogram named " << s << std::endl;
105  return;
106  }
107  h[s]->Fill(x, y);
108  }
Log< level::Warning, false > LogWarning
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ fillDescriptions()

void SiStripApvGainInspector::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1134 of file SiStripApvGainInspector.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

1134  {
1136  desc.addUntracked<std::string>("inputFile", {});
1137  desc.addUntracked<double>("minNrEntries", 20);
1138  desc.add<int>("fitMode", 2)
1139  ->setComment("fit mode. Available options: 1: landau\n 2: landau around max\n 3:landau&gaus convo\n 4: fake");
1140  desc.addUntracked<std::vector<unsigned int>>("selectedModules", {});
1141  descriptions.addWithDefaultLabel(desc);
1142 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ fillQualityMonitor()

void SiStripApvGainInspector::fillQualityMonitor ( )
private

Definition at line 1020 of file SiStripApvGainInspector.cc.

References a, sistrip::APV, APVsCollOrdered, fill1D(), fill2D(), IntegrityClient_cfi::Gain, hControl, VtxSmearedParameters_cfi::Phi, dttmaxenums::R, ntupleEnum::SubDet, and z.

Referenced by endJob().

1020  {
1021  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
1022  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
1023  if (APV == nullptr)
1024  continue;
1025 
1026  //unsigned int Index = APV->Index;
1027  //unsigned int DetId = APV->DetId;
1028  unsigned int SubDet = APV->SubDet;
1029  float z = APV->z;
1030  float Eta = APV->Eta;
1031  float R = APV->R;
1032  float Phi = APV->Phi;
1033  float Thickness = APV->Thickness;
1034  double FitMPV = APV->FitMPV;
1035  double FitMPVErr = APV->FitMPVErr;
1036  double Gain = APV->Gain;
1037  double NEntries = APV->NEntries;
1038  double PreviousGain = APV->PreviousGain;
1039 
1040  if (SubDet < 3)
1041  continue; // avoid to loop over Pixel det id
1042 
1043  if (FitMPV <= 0.) { // No fit of MPV
1044  if (APV->isMasked)
1045  fill2D(hControl, "NoMPVmasked", z, R);
1046  else
1047  fill2D(hControl, "NoMPVfit", z, R);
1048  } else { // Fit of MPV
1049  if (FitMPV > 0.)
1050  fill1D(hControl, "Gains", Gain);
1051 
1052  fill1D(hControl, "MPVs", FitMPV);
1053  if (Thickness < 0.04)
1054  fill1D(hControl, "MPVs320", FitMPV);
1055  if (Thickness > 0.04)
1056  fill1D(hControl, "MPVs500", FitMPV);
1057 
1058  fill1D(hControl, "MPVError", FitMPVErr);
1059  fill2D(hControl, "MPVErrorVsMPV", FitMPV, FitMPVErr);
1060  fill2D(hControl, "MPVErrorVsEta", Eta, FitMPVErr);
1061  fill2D(hControl, "MPVErrorVsPhi", Phi, FitMPVErr);
1062  fill2D(hControl, "MPVErrorVsN", NEntries, FitMPVErr);
1063 
1064  if (SubDet == 3) {
1065  fill2D(hControl, "MPV_Vs_EtaTIB", Eta, FitMPV);
1066  fill2D(hControl, "MPV_Vs_PhiTIB", Phi, FitMPV);
1067  fill1D(hControl, "MPVsTIB", FitMPV);
1068 
1069  } else if (SubDet == 4) {
1070  fill2D(hControl, "MPV_Vs_EtaTID", Eta, FitMPV);
1071  fill2D(hControl, "MPV_Vs_PhiTID", Phi, FitMPV);
1072  fill1D(hControl, "MPVsTID", FitMPV);
1073  if (Eta < 0.)
1074  fill1D(hControl, "MPVsTIDM", FitMPV);
1075  if (Eta > 0.)
1076  fill1D(hControl, "MPVsTIDP", FitMPV);
1077 
1078  } else if (SubDet == 5) {
1079  fill2D(hControl, "MPV_Vs_EtaTOB", Eta, FitMPV);
1080  fill2D(hControl, "MPV_Vs_PhiTOB", Phi, FitMPV);
1081  fill1D(hControl, "MPVsTOB", FitMPV);
1082 
1083  } else if (SubDet == 6) {
1084  fill2D(hControl, "MPV_Vs_EtaTEC", Eta, FitMPV);
1085  fill2D(hControl, "MPV_Vs_PhiTEC", Phi, FitMPV);
1086  fill1D(hControl, "MPVsTEC", FitMPV);
1087  if (Eta < 0.)
1088  fill1D(hControl, "MPVsTECM", FitMPV);
1089  if (Eta > 0.)
1090  fill1D(hControl, "MPVsTECP", FitMPV);
1091  if (Thickness < 0.04) {
1092  fill2D(hControl, "MPV_Vs_EtaTECthin", Eta, FitMPV);
1093  fill2D(hControl, "MPV_Vs_PhiTECthin", Phi, FitMPV);
1094  fill1D(hControl, "MPVsTECthin", FitMPV);
1095  if (Eta > 0.)
1096  fill1D(hControl, "MPVsTECP1", FitMPV);
1097  if (Eta < 0.)
1098  fill1D(hControl, "MPVsTECM1", FitMPV);
1099  }
1100  if (Thickness > 0.04) {
1101  fill2D(hControl, "MPV_Vs_EtaTECthick", Eta, FitMPV);
1102  fill2D(hControl, "MPV_Vs_PhiTECthick", Phi, FitMPV);
1103  fill1D(hControl, "MPVsTECthick", FitMPV);
1104  if (Eta > 0.)
1105  fill1D(hControl, "MPVsTECP2", FitMPV);
1106  if (Eta < 0.)
1107  fill1D(hControl, "MPVsTECM2", FitMPV);
1108  }
1109  }
1110  }
1111 
1112  if (SubDet == 3 && PreviousGain != 0.)
1113  fill1D(hControl, "DiffWRTPrevGainTIB", Gain / PreviousGain);
1114  else if (SubDet == 4 && PreviousGain != 0.)
1115  fill1D(hControl, "DiffWRTPrevGainTID", Gain / PreviousGain);
1116  else if (SubDet == 5 && PreviousGain != 0.)
1117  fill1D(hControl, "DiffWRTPrevGainTOB", Gain / PreviousGain);
1118  else if (SubDet == 6 && PreviousGain != 0.)
1119  fill1D(hControl, "DiffWRTPrevGainTEC", Gain / PreviousGain);
1120 
1121  if (SubDet == 3)
1122  fill2D(hControl, "GainVsPrevGainTIB", PreviousGain, Gain);
1123  else if (SubDet == 4)
1124  fill2D(hControl, "GainVsPrevGainTID", PreviousGain, Gain);
1125  else if (SubDet == 5)
1126  fill2D(hControl, "GainVsPrevGainTOB", PreviousGain, Gain);
1127  else if (SubDet == 6)
1128  fill2D(hControl, "GainVsPrevGainTEC", PreviousGain, Gain);
1129 
1130  } // loop on the APV collections
1131 }
std::map< std::string, TH1 * > hControl
void fill1D(std::map< std::string, TH1 *> &h, const std::string &s, double x)
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
double a
Definition: hdecay.h:121
void fill2D(std::map< std::string, TH1 *> &h, const std::string &s, double x, double y)

◆ getNewObject()

std::unique_ptr< SiStripApvGain > SiStripApvGainInspector::getNewObject ( )
private

Definition at line 838 of file SiStripApvGainInspector.cc.

References a, sistrip::APV, APVsCollOrdered, LogDebug, getGTfromDQMFile::obj, and FastTimerService_cff::range.

Referenced by endJob().

838  {
839  std::unique_ptr<SiStripApvGain> obj = std::make_unique<SiStripApvGain>();
840 
841  std::vector<float> theSiStripVector;
842  unsigned int PreviousDetId = 0;
843  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
844  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
845  if (APV == nullptr) {
846  printf("Bug\n");
847  continue;
848  }
849  if (APV->SubDet <= 2)
850  continue;
851  if (APV->DetId != PreviousDetId) {
852  if (!theSiStripVector.empty()) {
853  SiStripApvGain::Range range(theSiStripVector.begin(), theSiStripVector.end());
854  if (!obj->put(PreviousDetId, range))
855  printf("Bug to put detId = %i\n", PreviousDetId);
856  }
857  theSiStripVector.clear();
858  PreviousDetId = APV->DetId;
859  }
860  theSiStripVector.push_back(APV->Gain);
861 
862  LogDebug("SiStripGainsPCLHarvester") << " DetId: " << APV->DetId << " APV: " << APV->APVId
863  << " Gain: " << APV->Gain << std::endl;
864  }
865  if (!theSiStripVector.empty()) {
866  SiStripApvGain::Range range(theSiStripVector.begin(), theSiStripVector.end());
867  if (!obj->put(PreviousDetId, range))
868  printf("Bug to put detId = %i\n", PreviousDetId);
869  }
870 
871  return obj;
872 }
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
double a
Definition: hdecay.h:121
#define LogDebug(id)

◆ getPeakOfLandau()

void SiStripApvGainInspector::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 50,
double  HighRange = 5400 
)
private

Definition at line 628 of file SiStripApvGainInspector.cc.

References minNrEntries.

Referenced by analyze().

628  {
629  FitResults[0] = -0.5; //MPV
630  FitResults[1] = 0; //MPV error
631  FitResults[2] = -0.5; //Width
632  FitResults[3] = 0; //Width error
633  FitResults[4] = -0.5; //Fit Chi2/NDF
634  FitResults[5] = 0; //Normalization
635 
636  if (InputHisto->GetEntries() < minNrEntries)
637  return;
638 
639  // perform fit with standard landau
640  TF1 MyLandau("MyLandau", "landau", LowRange, HighRange);
641  MyLandau.SetParameter(1, 300);
642  InputHisto->Fit(&MyLandau, "QR WW");
643 
644  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
645  FitResults[0] = MyLandau.GetParameter(1); //MPV
646  FitResults[1] = MyLandau.GetParError(1); //MPV error
647  FitResults[2] = MyLandau.GetParameter(2); //Width
648  FitResults[3] = MyLandau.GetParError(2); //Width error
649  FitResults[4] = MyLandau.GetChisquare() / MyLandau.GetNDF(); //Fit Chi2/NDF
650  FitResults[5] = MyLandau.GetParameter(0);
651 }

◆ getPeakOfLandauAroundMax()

void SiStripApvGainInspector::getPeakOfLandauAroundMax ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 100,
double  HighRange = 100 
)
private

Definition at line 759 of file SiStripApvGainInspector.cc.

References minNrEntries.

Referenced by analyze().

762  {
763  FitResults[0] = -0.5; //MPV
764  FitResults[1] = 0; //MPV error
765  FitResults[2] = -0.5; //Width
766  FitResults[3] = 0; //Width error
767  FitResults[4] = -0.5; //Fit Chi2/NDF
768  FitResults[5] = 0; //Normalization
769 
770  if (InputHisto->GetEntries() < minNrEntries)
771  return;
772 
773  int maxbin = InputHisto->GetMaximumBin();
774  int maxbin2 = -9999.;
775 
776  if (InputHisto->GetBinContent(maxbin - 1) > InputHisto->GetBinContent(maxbin + 1)) {
777  maxbin2 = maxbin - 1;
778  } else {
779  maxbin2 = maxbin + 1;
780  }
781 
782  float maxbincenter = (InputHisto->GetBinCenter(maxbin) + InputHisto->GetBinCenter(maxbin2)) / 2;
783 
784  TF1 MyLandau("MyLandau", "[2]*TMath::Landau(x,[0],[1],0)", maxbincenter - LowRange, maxbincenter + HighRange);
785  // TF1 MyLandau("MyLandau", "landau", LowRange, HighRange);
786  // MyLandau.SetParameter(1, 300);
787  InputHisto->Fit(&MyLandau, "QR WW");
788 
789  MyLandau.SetParameter(0, maxbincenter);
790  MyLandau.SetParameter(1, maxbincenter / 10.);
791  MyLandau.SetParameter(2, InputHisto->GetMaximum());
792 
793  float mpv = MyLandau.GetParameter(1);
794  MyLandau.SetParameter(1, mpv);
795  //InputHisto->Rebin(3);
796  InputHisto->Fit(&MyLandau, "QOR", "", mpv - 50, mpv + 100);
797 
798  InputHisto->Fit(&MyLandau, "QOR", "", maxbincenter - LowRange, maxbincenter + HighRange);
799  InputHisto->Fit(&MyLandau, "QOR", "", maxbincenter - LowRange, maxbincenter + HighRange);
800 
801  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
802  FitResults[0] = MyLandau.GetParameter(1); //MPV
803  FitResults[1] = MyLandau.GetParError(1); //MPV error
804  FitResults[2] = MyLandau.GetParameter(2); //Width
805  FitResults[3] = MyLandau.GetParError(2); //Width error
806  FitResults[4] = MyLandau.GetChisquare() / MyLandau.GetNDF(); //Fit Chi2/NDF
807  FitResults[5] = MyLandau.GetParameter(0);
808 }

◆ getPeakOfLanGau()

void SiStripApvGainInspector::getPeakOfLanGau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 50,
double  HighRange = 5400 
)
private

Definition at line 718 of file SiStripApvGainInspector.cc.

References mps_fire::i, langaufun(), and minNrEntries.

Referenced by analyze().

718  {
719  FitResults[0] = -0.5; //MPV
720  FitResults[1] = 0; //MPV error
721  FitResults[2] = -0.5; //Width
722  FitResults[3] = 0; //Width error
723  FitResults[4] = -0.5; //Fit Chi2/NDF
724  FitResults[5] = 0; //Normalization
725 
726  if (InputHisto->GetEntries() < minNrEntries)
727  return;
728 
729  // perform fit with standard landau
730  TF1 MyLandau("MyLandau", "landau", LowRange, HighRange);
731  MyLandau.SetParameter(1, 300);
732  InputHisto->Fit(&MyLandau, "QR WW");
733 
734  double startvalues[4] = {100, 300, 10000, 100};
735  double parlimitslo[4] = {0, 250, 10, 0};
736  double parlimitshi[4] = {200, 350, 1000000, 200};
737 
738  TF1 MyLangau("MyLanGau", langaufun, LowRange, HighRange, 4);
739 
740  MyLangau.SetParameters(startvalues);
741  MyLangau.SetParNames("Width", "MP", "Area", "GSigma");
742 
743  for (unsigned int i = 0; i < 4; i++) {
744  MyLangau.SetParLimits(i, parlimitslo[i], parlimitshi[i]);
745  }
746 
747  InputHisto->Fit("MyLanGau", "QRB0"); // fit within specified range, use ParLimits, do not plot
748 
749  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
750  FitResults[0] = MyLangau.GetParameter(1); //MPV
751  FitResults[1] = MyLangau.GetParError(1); //MPV error
752  FitResults[2] = MyLangau.GetParameter(0); //Width
753  FitResults[3] = MyLangau.GetParError(0); //Width error
754  FitResults[4] = MyLangau.GetChisquare() / MyLangau.GetNDF(); //Fit Chi2/NDF
755  FitResults[5] = MyLangau.GetParameter(3);
756 }
static double langaufun(Double_t *x, Double_t *par)

◆ isGoodLandauFit()

bool SiStripApvGainInspector::isGoodLandauFit ( double *  FitResults)
private

Definition at line 811 of file SiStripApvGainInspector.cc.

Referenced by analyze().

811  {
812  if (FitResults[0] <= 0)
813  return false;
814  // if(FitResults[1] > MaxMPVError )return false;
815  // if(FitResults[4] > MaxChi2OverNDF)return false;
816  return true;
817 }

◆ isValidMode()

bool SiStripApvGainInspector::isValidMode ( int  mode) const
inlineprivate

◆ langaufun()

double SiStripApvGainInspector::langaufun ( Double_t *  x,
Double_t *  par 
)
staticprivate

Definition at line 663 of file SiStripApvGainInspector.cc.

References mps_fire::i, np, x, and geometryCSVtoXML::xx.

Referenced by getPeakOfLanGau().

665 {
666  //Fit parameters:
667  //par[0]=Width (scale) parameter of Landau density
668  //par[1]=Most Probable (MP, location) parameter of Landau density
669  //par[2]=Total area (integral -inf to inf, normalization constant)
670  //par[3]=Width (sigma) of convoluted Gaussian function
671  //
672  //In the Landau distribution (represented by the CERNLIB approximation),
673  //the maximum is located at x=-0.22278298 with the location parameter=0.
674  //This shift is corrected within this function, so that the actual
675  //maximum is identical to the MP parameter.
676 
677  // Numeric constants
678  Double_t invsq2pi = 0.3989422804014; // (2 pi)^(-1/2)
679  Double_t mpshift = -0.22278298; // Landau maximum location
680 
681  // Control constants
682  Double_t np = 100.0; // number of convolution steps
683  Double_t sc = 5.0; // convolution extends to +-sc Gaussian sigmas
684 
685  // Variables
686  Double_t xx;
687  Double_t mpc;
688  Double_t fland;
689  Double_t sum = 0.0;
690  Double_t xlow, xupp;
691  Double_t step;
692  Double_t i;
693 
694  // MP shift correction
695  mpc = par[1] - mpshift * par[0];
696 
697  // Range of convolution integral
698  xlow = x[0] - sc * par[3];
699  xupp = x[0] + sc * par[3];
700 
701  step = (xupp - xlow) / np;
702 
703  // Convolution integral of Landau and Gaussian by sum
704  for (i = 1.0; i <= np / 2; i++) {
705  xx = xlow + (i - .5) * step;
706  fland = TMath::Landau(xx, mpc, par[0]) / par[0];
707  sum += fland * TMath::Gaus(x[0], xx, par[3]);
708 
709  xx = xupp - (i - .5) * step;
710  fland = TMath::Landau(xx, mpc, par[0]) / par[0];
711  sum += fland * TMath::Gaus(x[0], xx, par[3]);
712  }
713 
714  return (par[2] * step * sum * invsq2pi / par[3]);
715 }
int np
Definition: AMPTWrapper.h:43
step
Definition: StallMonitor.cc:83

◆ makeNicePlotStyle()

void SiStripApvGainInspector::makeNicePlotStyle ( TH1F *  plot)
private

Definition at line 820 of file SiStripApvGainInspector.cc.

References plotFactory::plot.

Referenced by endJob().

822 {
823  plot->GetXaxis()->CenterTitle(true);
824  plot->GetYaxis()->CenterTitle(true);
825  plot->GetXaxis()->SetTitleFont(42);
826  plot->GetYaxis()->SetTitleFont(42);
827  plot->GetXaxis()->SetTitleSize(0.05);
828  plot->GetYaxis()->SetTitleSize(0.05);
829  plot->GetXaxis()->SetTitleOffset(0.9);
830  plot->GetYaxis()->SetTitleOffset(1.3);
831  plot->GetXaxis()->SetLabelFont(42);
832  plot->GetYaxis()->SetLabelFont(42);
833  plot->GetYaxis()->SetLabelSize(.05);
834  plot->GetXaxis()->SetLabelSize(.05);
835 }

◆ storeOnTree()

void SiStripApvGainInspector::storeOnTree ( TFileService tfs)
private

Definition at line 479 of file SiStripApvGainInspector.cc.

References a, SiStripMiscalibrate::Entry::add(), sistrip::APV, APVsCollOrdered, Charge_Vs_Index, entries_map, fitChi2(), fitChi2_map, TFileService::make(), SiStripMiscalibrate::Entry::mean(), mpv_err_map, mpv_map, new_payload_map, old_payload_map, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, ratio_map, SiStripMiscalibrate::Entry::reset(), and tfs.

Referenced by endJob().

479  {
480  unsigned int tree_Index;
481  unsigned int tree_Bin;
482  unsigned int tree_DetId;
483  unsigned char tree_APVId;
484  unsigned char tree_SubDet;
485  float tree_x;
486  float tree_y;
487  float tree_z;
488  float tree_Eta;
489  float tree_R;
490  float tree_Phi;
491  float tree_Thickness;
492  float tree_FitMPV;
493  float tree_FitMPVErr;
494  float tree_FitWidth;
495  float tree_FitWidthErr;
496  float tree_FitChi2NDF;
497  float tree_FitNorm;
498  double tree_Gain;
499  double tree_PrevGain;
500  double tree_PrevGainTick;
501  double tree_NEntries;
502  bool tree_isMasked;
503 
504  TTree* MyTree;
505  MyTree = tfs->make<TTree>("APVGain", "APVGain");
506  MyTree->Branch("Index", &tree_Index, "Index/i");
507  MyTree->Branch("Bin", &tree_Bin, "Bin/i");
508  MyTree->Branch("DetId", &tree_DetId, "DetId/i");
509  MyTree->Branch("APVId", &tree_APVId, "APVId/b");
510  MyTree->Branch("SubDet", &tree_SubDet, "SubDet/b");
511  MyTree->Branch("x", &tree_x, "x/F");
512  MyTree->Branch("y", &tree_y, "y/F");
513  MyTree->Branch("z", &tree_z, "z/F");
514  MyTree->Branch("Eta", &tree_Eta, "Eta/F");
515  MyTree->Branch("R", &tree_R, "R/F");
516  MyTree->Branch("Phi", &tree_Phi, "Phi/F");
517  MyTree->Branch("Thickness", &tree_Thickness, "Thickness/F");
518  MyTree->Branch("FitMPV", &tree_FitMPV, "FitMPV/F");
519  MyTree->Branch("FitMPVErr", &tree_FitMPVErr, "FitMPVErr/F");
520  MyTree->Branch("FitWidth", &tree_FitWidth, "FitWidth/F");
521  MyTree->Branch("FitWidthErr", &tree_FitWidthErr, "FitWidthErr/F");
522  MyTree->Branch("FitChi2NDF", &tree_FitChi2NDF, "FitChi2NDF/F");
523  MyTree->Branch("FitNorm", &tree_FitNorm, "FitNorm/F");
524  MyTree->Branch("Gain", &tree_Gain, "Gain/D");
525  MyTree->Branch("PrevGain", &tree_PrevGain, "PrevGain/D");
526  MyTree->Branch("PrevGainTick", &tree_PrevGainTick, "PrevGainTick/D");
527  MyTree->Branch("NEntries", &tree_NEntries, "NEntries/D");
528  MyTree->Branch("isMasked", &tree_isMasked, "isMasked/O");
529 
530  uint32_t cachedId(0);
531  SiStripMiscalibrate::Entry gain_ratio;
538 
539  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
540  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
541  if (APV == nullptr)
542  continue;
543  // printf( "%i | %i | PreviousGain = %7.5f NewGain = %7.5f (#clusters=%8.0f)\n", APV->DetId,APV->APVId,APV->PreviousGain,APV->Gain, APV->NEntries);
544  //fprintf(Gains,"%i | %i | PreviousGain = %7.5f(tick) x %7.5f(particle) NewGain (particle) = %7.5f (#clusters=%8.0f)\n", APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain,APV->Gain, APV->NEntries);
545 
546  // do not fill the Pixel
548  continue;
549 
550  tree_Index = APV->Index;
551  tree_Bin = Charge_Vs_Index->GetXaxis()->FindBin(APV->Index);
552  tree_DetId = APV->DetId;
553  tree_APVId = APV->APVId;
554  tree_SubDet = APV->SubDet;
555  tree_x = APV->x;
556  tree_y = APV->y;
557  tree_z = APV->z;
558  tree_Eta = APV->Eta;
559  tree_R = APV->R;
560  tree_Phi = APV->Phi;
561  tree_Thickness = APV->Thickness;
562  tree_FitMPV = APV->FitMPV;
563  tree_FitMPVErr = APV->FitMPVErr;
564  tree_FitWidth = APV->FitWidth;
565  tree_FitWidthErr = APV->FitWidthErr;
566  tree_FitChi2NDF = APV->FitChi2;
567  tree_FitNorm = APV->FitNorm;
568  tree_Gain = APV->Gain;
569  tree_PrevGain = APV->PreviousGain;
570  tree_PrevGainTick = APV->PreviousGainTick;
571  tree_NEntries = APV->NEntries;
572  tree_isMasked = APV->isMasked;
573 
574  // flush the counters
575  if (cachedId != 0 && tree_DetId != cachedId) {
576  //ratio_map->fill(cachedId,gain_ratio.mean());
577  ratio_map->fill(cachedId, o_gain.mean() / n_gain.mean());
578  old_payload_map->fill(cachedId, o_gain.mean());
579  new_payload_map->fill(cachedId, n_gain.mean());
580 
581  if (entries.mean() > 0) {
582  mpv_map->fill(cachedId, mpv.mean());
583  mpv_err_map->fill(cachedId, mpv_err.mean());
584  entries_map->fill(cachedId, log10(entries.mean()));
585  if (fitChi2.mean() > 0) {
586  fitChi2_map->fill(cachedId, log10(fitChi2.mean()));
587  } else {
588  fitChi2_map->fill(cachedId, -1);
589  }
590  }
591 
592  gain_ratio.reset();
593  o_gain.reset();
594  n_gain.reset();
595 
596  mpv.reset();
597  mpv_err.reset();
598  entries.reset();
599  fitChi2.reset();
600  }
601 
602  cachedId = tree_DetId;
603  gain_ratio.add(tree_PrevGain / tree_Gain);
604  o_gain.add(tree_PrevGain);
605  n_gain.add(tree_Gain);
606  mpv.add(tree_FitMPV);
607  mpv_err.add(tree_FitMPVErr);
608  entries.add(tree_NEntries);
609  fitChi2.add(tree_FitChi2NDF);
610 
611  if (tree_DetId == 402673324) {
612  printf("%i | %i : %f --> %f (%f)\n", tree_DetId, tree_APVId, tree_PrevGain, tree_Gain, tree_NEntries);
613  }
614 
615  MyTree->Fill();
616  }
617 }
std::unique_ptr< TrackerMap > mpv_err_map
std::unique_ptr< TrackerMap > entries_map
std::unique_ptr< TrackerMap > new_payload_map
std::unique_ptr< TrackerMap > mpv_map
std::unique_ptr< TrackerMap > fitChi2_map
static double fitChi2(const CachingVertex< 5 > &vtx)
std::unique_ptr< TrackerMap > old_payload_map
std::unique_ptr< TrackerMap > ratio_map
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
double a
Definition: hdecay.h:121
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64

Member Data Documentation

◆ APVsColl

std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > SiStripApvGainInspector::APVsColl
private

Definition at line 146 of file SiStripApvGainInspector.cc.

Referenced by analyze(), and checkBookAPVColls().

◆ APVsCollOrdered

std::vector<std::shared_ptr<stAPVGain> > SiStripApvGainInspector::APVsCollOrdered
private

◆ BAD

unsigned int SiStripApvGainInspector::BAD
private

Definition at line 142 of file SiStripApvGainInspector.cc.

Referenced by analyze().

◆ bareTkGeomPtr_

const TrackerGeometry* SiStripApvGainInspector::bareTkGeomPtr_
private

Definition at line 135 of file SiStripApvGainInspector.cc.

Referenced by checkBookAPVColls().

◆ Charge_Vs_Index

const TH2F* SiStripApvGainInspector::Charge_Vs_Index
private

Definition at line 148 of file SiStripApvGainInspector.cc.

Referenced by analyze(), SiStripApvGainInspector(), and storeOnTree().

◆ entries_map

std::unique_ptr<TrackerMap> SiStripApvGainInspector::entries_map
private

Definition at line 160 of file SiStripApvGainInspector.cc.

Referenced by endJob(), SiStripApvGainInspector(), and storeOnTree().

◆ filename_

const std::string SiStripApvGainInspector::filename_
private

Definition at line 151 of file SiStripApvGainInspector.cc.

Referenced by SiStripApvGainInspector().

◆ fin

TFile* SiStripApvGainInspector::fin
private

◆ fitChi2_map

std::unique_ptr<TrackerMap> SiStripApvGainInspector::fitChi2_map
private

Definition at line 161 of file SiStripApvGainInspector.cc.

Referenced by endJob(), SiStripApvGainInspector(), and storeOnTree().

◆ fitMode_

fitMode SiStripApvGainInspector::fitMode_
private

Definition at line 150 of file SiStripApvGainInspector.cc.

Referenced by analyze(), and SiStripApvGainInspector().

◆ fitModeStrings

const std::vector<std::string> SiStripApvGainInspector::fitModeStrings
private
Initial value:
= {
"",
"landau",
"landauAroundMax",
"landauGauss",
"fake"}

Definition at line 113 of file SiStripApvGainInspector.cc.

Referenced by SiStripApvGainInspector().

◆ gainToken_

const edm::ESGetToken<SiStripGain, SiStripGainRcd> SiStripApvGainInspector::gainToken_
private

Definition at line 124 of file SiStripApvGainInspector.cc.

Referenced by analyze().

◆ GOOD

unsigned int SiStripApvGainInspector::GOOD
private

Definition at line 141 of file SiStripApvGainInspector.cc.

Referenced by analyze().

◆ hControl

std::map<std::string, TH1*> SiStripApvGainInspector::hControl
private

Definition at line 163 of file SiStripApvGainInspector.cc.

Referenced by beginJob(), and fillQualityMonitor().

◆ histoMap_

std::map<std::pair<unsigned char, uint32_t>, TH1F*> SiStripApvGainInspector::histoMap_
private

Definition at line 132 of file SiStripApvGainInspector.cc.

Referenced by analyze(), and endJob().

◆ MASKED

unsigned int SiStripApvGainInspector::MASKED
private

Definition at line 143 of file SiStripApvGainInspector.cc.

◆ minNrEntries

double SiStripApvGainInspector::minNrEntries
private

◆ mpv_err_map

std::unique_ptr<TrackerMap> SiStripApvGainInspector::mpv_err_map
private

Definition at line 159 of file SiStripApvGainInspector.cc.

Referenced by endJob(), SiStripApvGainInspector(), and storeOnTree().

◆ mpv_map

std::unique_ptr<TrackerMap> SiStripApvGainInspector::mpv_map
private

Definition at line 158 of file SiStripApvGainInspector.cc.

Referenced by endJob(), SiStripApvGainInspector(), and storeOnTree().

◆ new_payload_map

std::unique_ptr<TrackerMap> SiStripApvGainInspector::new_payload_map
private

Definition at line 157 of file SiStripApvGainInspector.cc.

Referenced by endJob(), SiStripApvGainInspector(), and storeOnTree().

◆ NPixelDets

int SiStripApvGainInspector::NPixelDets
private

Definition at line 139 of file SiStripApvGainInspector.cc.

Referenced by checkBookAPVColls().

◆ NStripAPVs

int SiStripApvGainInspector::NStripAPVs
private

Definition at line 138 of file SiStripApvGainInspector.cc.

Referenced by checkBookAPVColls().

◆ old_payload_map

std::unique_ptr<TrackerMap> SiStripApvGainInspector::old_payload_map
private

Definition at line 156 of file SiStripApvGainInspector.cc.

Referenced by endJob(), SiStripApvGainInspector(), and storeOnTree().

◆ qualityToken_

const edm::ESGetToken<SiStripQuality, SiStripQualityRcd> SiStripApvGainInspector::qualityToken_
private

Definition at line 125 of file SiStripApvGainInspector.cc.

Referenced by analyze().

◆ ratio_map

std::unique_ptr<TrackerMap> SiStripApvGainInspector::ratio_map
private

Definition at line 155 of file SiStripApvGainInspector.cc.

Referenced by endJob(), SiStripApvGainInspector(), and storeOnTree().

◆ tfs

TFileService* SiStripApvGainInspector::tfs
private

Definition at line 129 of file SiStripApvGainInspector.cc.

Referenced by beginJob(), endJob(), and storeOnTree().

◆ tkGeom_

edm::ESHandle<TrackerGeometry> SiStripApvGainInspector::tkGeom_
private

Definition at line 134 of file SiStripApvGainInspector.cc.

Referenced by checkBookAPVColls().

◆ tkGeomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripApvGainInspector::tkGeomToken_
private

Definition at line 126 of file SiStripApvGainInspector.cc.

Referenced by checkBookAPVColls().

◆ tTopo_

const TrackerTopology* SiStripApvGainInspector::tTopo_
private

Definition at line 136 of file SiStripApvGainInspector.cc.

Referenced by checkAndRetrieveTopology().

◆ tTopoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripApvGainInspector::tTopoToken_
private

Definition at line 127 of file SiStripApvGainInspector.cc.

Referenced by checkAndRetrieveTopology().

◆ wantedmods

std::vector<unsigned int> SiStripApvGainInspector::wantedmods
private

Definition at line 153 of file SiStripApvGainInspector.cc.

Referenced by analyze(), and SiStripApvGainInspector().