CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
SiStripGainFromCalibTree Class Reference
Inheritance diagram for SiStripGainFromCalibTree:
ConditionDBWriter< SiStripApvGain > edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 SiStripGainFromCalibTree (const edm::ParameterSet &)
 
 ~SiStripGainFromCalibTree () override
 
- Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
 ~ConditionDBWriter () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept 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 noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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)
 

Private Member Functions

void algoAnalyze (const edm::Event &, const edm::EventSetup &) override
 
void algoAnalyzeTheTree ()
 
void algoBeginJob (const edm::EventSetup &iSetup) override
 
void algoBeginRun (const edm::Run &run, const edm::EventSetup &iSetup) override
 
void algoComputeMPVandGain ()
 
void algoEndJob () override
 
void algoEndRun (const edm::Run &run, const edm::EventSetup &iSetup) override
 
void bookDQMHistos (const char *dqm_dir, const char *tag)
 
template<typename T >
edm::Handle< Tconnect (const T *&ptr, edm::EDGetTokenT< T > token, const edm::Event &evt)
 
std::unique_ptr< SiStripApvGaingetNewObject () override
 
void getPeakOfLandau (TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
 
bool isBFieldConsistentWithMode (const edm::EventSetup &iSetup) const
 
bool IsGoodLandauFit (double *FitResults)
 
void MakeCalibrationMap ()
 
void merge (TH2 *A, TH2 *B)
 
void processEvent ()
 
bool produceTagFilter ()
 
void qualityMonitor ()
 
int statCollectionFromMode (const char *tag) const
 
void storeOnTree (TFileService *tfs)
 
void swapBFieldMode (void)
 

Private Attributes

std::string AlgoMode
 
bool AllowSaturation
 
const std::vector< unsigned char > * amplitude = nullptr
 
edm::EDGetTokenT< std::vector< unsigned char > > amplitude_token_
 
std::unordered_map< unsigned int, stAPVGain * > APVsColl
 
std::vector< stAPVGain * > APVsCollOrdered
 
unsigned int BAD
 
std::string booked_dir_
 
string CalibPrefix_
 
int CalibrationLevel
 
string CalibSuffix_
 
const std::vector< unsigned int > * charge = nullptr
 
std::array< std::vector< APVGain::APVmon >, 7 > Charge_1
 
std::array< std::vector< APVGain::APVmon >, 7 > Charge_2
 
std::array< std::vector< APVGain::APVmon >, 7 > Charge_3
 
std::array< std::vector< APVGain::APVmon >, 7 > Charge_4
 
edm::EDGetTokenT< std::vector< unsigned int > > charge_token_
 
std::vector< MonitorElement * > Charge_Vs_Index
 
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
 
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
 
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
 
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
 
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
 
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
 
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
 
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
 
const std::vector< double > * chargeoverpath = nullptr
 
edm::EDGetTokenT< std::vector< double > > chargeoverpath_token_
 
DQMStoredbe
 
MonitorElementDiffWRTPrevGainTEC
 
MonitorElementDiffWRTPrevGainTIB
 
MonitorElementDiffWRTPrevGainTID
 
MonitorElementDiffWRTPrevGainTOB
 
bool doChargeMonitorPerPlane
 
std::vector< string > dqm_tag_
 
unsigned int ERun
 
unsigned int eventnumber = 0
 
string EventPrefix_
 
string EventSuffix_
 
const std::vector< bool > * farfromedge = nullptr
 
edm::EDGetTokenT< std::vector< bool > > farfromedge_token_
 
bool FirstSetOfConstants
 
const std::vector< unsigned short > * firststrip = nullptr
 
edm::EDGetTokenT< std::vector< unsigned short > > firststrip_token_
 
MonitorElementGains
 
edm::ESGetToken< SiStripGain, SiStripGainRcdgainToken_
 
const std::vector< double > * gainused = nullptr
 
edm::EDGetTokenT< std::vector< double > > gainused_token_
 
const std::vector< double > * gainusedTick = nullptr
 
edm::EDGetTokenT< std::vector< double > > gainusedTick_token_
 
MonitorElementGainVsPrevGainTEC
 
MonitorElementGainVsPrevGainTIB
 
MonitorElementGainVsPrevGainTID
 
MonitorElementGainVsPrevGainTOB
 
unsigned int GOOD
 
const std::vector< double > * localdirx = nullptr
 
edm::EDGetTokenT< std::vector< double > > localdirx_token_
 
const std::vector< double > * localdiry = nullptr
 
edm::EDGetTokenT< std::vector< double > > localdiry_token_
 
const std::vector< double > * localdirz = nullptr
 
edm::EDGetTokenT< std::vector< double > > localdirz_token_
 
std::string m_calibrationMode
 
std::string m_calibrationPath
 
std::string m_DQMdir
 
bool m_harvestingMode
 
bool m_splitDQMstat
 
double MagFieldCurrentTh
 
unsigned int MASKED
 
double MaxChi2OverNDF
 
double MaxMPVError
 
unsigned int MaxNrStrips
 
double MaxTrackChiOverNdf
 
double MaxTrackEta
 
int MaxTrackingIteration
 
double MaxTrackMomentum
 
double MinNrEntries
 
double MinTrackEta
 
unsigned int MinTrackHits
 
double MinTrackMomentum
 
MonitorElementMPV_Vs_EtaTEC
 
MonitorElementMPV_Vs_EtaTECthick
 
MonitorElementMPV_Vs_EtaTECthin
 
MonitorElementMPV_Vs_EtaTIB
 
MonitorElementMPV_Vs_EtaTID
 
MonitorElementMPV_Vs_EtaTOB
 
MonitorElementMPV_Vs_PhiTEC
 
MonitorElementMPV_Vs_PhiTECthick
 
MonitorElementMPV_Vs_PhiTECthin
 
MonitorElementMPV_Vs_PhiTIB
 
MonitorElementMPV_Vs_PhiTID
 
MonitorElementMPV_Vs_PhiTOB
 
MonitorElementMPVError
 
MonitorElementMPVErrorVsEta
 
MonitorElementMPVErrorVsMPV
 
MonitorElementMPVErrorVsN
 
MonitorElementMPVErrorVsPhi
 
MonitorElementMPVs
 
MonitorElementMPVs320
 
MonitorElementMPVs500
 
MonitorElementMPVsTEC
 
MonitorElementMPVsTECM
 
MonitorElementMPVsTECM1
 
MonitorElementMPVsTECM2
 
MonitorElementMPVsTECP
 
MonitorElementMPVsTECP1
 
MonitorElementMPVsTECP2
 
MonitorElementMPVsTECthick
 
MonitorElementMPVsTECthin
 
MonitorElementMPVsTIB
 
MonitorElementMPVsTID
 
MonitorElementMPVsTIDM
 
MonitorElementMPVsTIDP
 
MonitorElementMPVsTOB
 
unsigned int NClusterPixel
 
unsigned int NClusterStrip
 
unsigned int NEvent
 
std::vector< APVGain::APVmonnewCharge
 
MonitorElementNoMPVfit
 
MonitorElementNoMPVmasked
 
int NPixelDets
 
int NStripAPVs
 
const std::vector< unsigned short > * nstrips = nullptr
 
edm::EDGetTokenT< std::vector< unsigned short > > nstrips_token_
 
unsigned int NTrack
 
bool OldGainRemoving
 
std::string OutputGains
 
const std::vector< bool > * overlapping = nullptr
 
edm::EDGetTokenT< std::vector< bool > > overlapping_token_
 
const std::vector< double > * path = nullptr
 
edm::EDGetTokenT< std::vector< double > > path_token_
 
edm::ESGetToken< SiStripQuality, SiStripQualityRcdqualityToken_
 
const std::vector< unsigned int > * rawid = nullptr
 
edm::EDGetTokenT< std::vector< unsigned int > > rawid_token_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
unsigned int runnumber = 0
 
const std::vector< bool > * saturation = nullptr
 
edm::EDGetTokenT< std::vector< bool > > saturation_token_
 
bool saveSummary
 
unsigned int SRun
 
double tagCondition_GoodFrac
 
double tagCondition_NClusters
 
TFileServicetfs
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
const std::vector< int > * trackalgo = nullptr
 
edm::EDGetTokenT< std::vector< int > > trackalgo_token_
 
const std::vector< double > * trackchi2ndof = nullptr
 
edm::EDGetTokenT< std::vector< double > > trackchi2ndof_token_
 
const std::vector< double > * tracketa = nullptr
 
edm::EDGetTokenT< std::vector< double > > tracketa_token_
 
const std::vector< unsigned int > * trackhitsvalid = nullptr
 
edm::EDGetTokenT< std::vector< unsigned int > > trackhitsvalid_token_
 
const std::vector< int > * trackindex = nullptr
 
edm::EDGetTokenT< std::vector< int > > trackindex_token_
 
const std::vector< float > * trackp = nullptr
 
edm::EDGetTokenT< std::vector< float > > trackp_token_
 
const std::vector< double > * trackphi = nullptr
 
edm::EDGetTokenT< std::vector< double > > trackphi_token_
 
string TrackPrefix_
 
const std::vector< float > * trackpt = nullptr
 
edm::EDGetTokenT< std::vector< float > > trackpt_token_
 
string TrackSuffix_
 
const std::vector< bool > * TrigTech = nullptr
 
edm::EDGetTokenT< std::vector< bool > > TrigTech_token_
 
const TrackerTopologytTopo_ = nullptr
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
bool useCalibration
 
bool Validation
 
std::vector< std::string > VChargeHisto
 
vector< string > VInputFiles
 

Additional Inherited Members

- Static Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from ConditionDBWriter< SiStripApvGain >
void setDoStore (const bool doStore)
 When set to false the payload will not be written to the db. More...
 
void storeOnDbNow ()
 
cond::Time_t timeOfLastIOV ()
 
- 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 88 of file SiStripGainFromCalibTree.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 91 of file SiStripGainFromCalibTree.cc.

◆ MonitorElement

Definition at line 90 of file SiStripGainFromCalibTree.cc.

Constructor & Destructor Documentation

◆ SiStripGainFromCalibTree()

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

Definition at line 359 of file SiStripGainFromCalibTree.cc.

References AlgoMode, AllowSaturation, amplitude_token_, CalibPrefix_, CalibrationLevel, CalibSuffix_, charge_token_, Charge_Vs_Index, Charge_Vs_PathlengthTECM1, Charge_Vs_PathlengthTECM2, Charge_Vs_PathlengthTECP1, Charge_Vs_PathlengthTECP2, Charge_Vs_PathlengthTIB, Charge_Vs_PathlengthTIDM, Charge_Vs_PathlengthTIDP, Charge_Vs_PathlengthTOB, chargeoverpath_token_, dbe, doChargeMonitorPerPlane, dqm_tag_, EventPrefix_, EventSuffix_, farfromedge_token_, FirstSetOfConstants, firststrip_token_, gainToken_, gainused_token_, gainusedTick_token_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), ProducerED_cfi::InputTag, TFileService::kSharedResource, label, localdirx_token_, localdiry_token_, localdirz_token_, m_calibrationMode, m_calibrationPath, m_DQMdir, m_harvestingMode, m_splitDQMstat, MagFieldCurrentTh, MaxChi2OverNDF, MaxMPVError, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackingIteration, MaxTrackMomentum, MinNrEntries, MinTrackEta, MinTrackHits, MinTrackMomentum, nstrips_token_, OldGainRemoving, Utilities::operator, OutputGains, overlapping_token_, path_token_, qualityToken_, rawid_token_, runInfoToken_, saturation_token_, saveSummary, AlCaHLTBitMon_QueryRunRegistry::string, tagCondition_GoodFrac, tagCondition_NClusters, tkGeomToken_, trackalgo_token_, trackchi2ndof_token_, tracketa_token_, trackhitsvalid_token_, trackindex_token_, trackp_token_, trackphi_token_, TrackPrefix_, trackpt_token_, TrackSuffix_, TrigTech_token_, tTopoToken_, useCalibration, Validation, VChargeHisto, and VInputFiles.

361  usesResource(TFileService::kSharedResource);
362  OutputGains = iConfig.getParameter<std::string>("OutputGains");
363  AlgoMode = iConfig.getUntrackedParameter<std::string>("AlgoMode", "CalibTree");
364  MagFieldCurrentTh = iConfig.getUntrackedParameter<double>("MagFieldCurrentTh", 2000.);
365  MinNrEntries = iConfig.getUntrackedParameter<double>("minNrEntries", 20);
366  MaxMPVError = iConfig.getUntrackedParameter<double>("maxMPVError", 500.0);
367  MaxChi2OverNDF = iConfig.getUntrackedParameter<double>("maxChi2OverNDF", 5.0);
368  MinTrackMomentum = iConfig.getUntrackedParameter<double>("minTrackMomentum", 3.0);
369  MaxTrackMomentum = iConfig.getUntrackedParameter<double>("maxTrackMomentum", 99999.0);
370  MinTrackEta = iConfig.getUntrackedParameter<double>("minTrackEta", -5.0);
371  MaxTrackEta = iConfig.getUntrackedParameter<double>("maxTrackEta", 5.0);
372  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips", 2);
373  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits", 8);
374  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double>("MaxTrackChiOverNdf", 3);
375  MaxTrackingIteration = iConfig.getUntrackedParameter<int>("MaxTrackingIteration", 7);
376  AllowSaturation = iConfig.getUntrackedParameter<bool>("AllowSaturation", false);
377  FirstSetOfConstants = iConfig.getUntrackedParameter<bool>("FirstSetOfConstants", true);
378  Validation = iConfig.getUntrackedParameter<bool>("Validation", false);
379  OldGainRemoving = iConfig.getUntrackedParameter<bool>("OldGainRemoving", false);
380 
381  CalibrationLevel = iConfig.getUntrackedParameter<int>("CalibrationLevel", 0);
382  VInputFiles = iConfig.getUntrackedParameter<vector<string>>("InputFiles");
383  VChargeHisto = iConfig.getUntrackedParameter<vector<string>>("ChargeHisto");
384 
385  useCalibration = iConfig.getUntrackedParameter<bool>("UseCalibration", false);
386  m_harvestingMode = iConfig.getUntrackedParameter<bool>("harvestingMode", false);
387  m_splitDQMstat = iConfig.getUntrackedParameter<bool>("splitDQMstat", false);
388  m_calibrationMode = iConfig.getUntrackedParameter<string>("calibrationMode", "StdBunch");
389  m_calibrationPath = iConfig.getUntrackedParameter<string>("calibrationPath");
390  m_DQMdir = iConfig.getUntrackedParameter<string>("DQMdir", "AlCaReco/SiStripGains");
391 
392  tagCondition_NClusters = iConfig.getUntrackedParameter<double>("NClustersForTagProd", 2E8);
393  tagCondition_GoodFrac = iConfig.getUntrackedParameter<double>("GoodFracForTagProd", 0.95);
394 
395  saveSummary = iConfig.getUntrackedParameter<bool>("saveSummary", false);
396 
397  doChargeMonitorPerPlane = iConfig.getUntrackedParameter<bool>("doChargeMonitorPerPlane", false);
398 
399  // Gather DQM Service
401 
402  //Set the monitoring element tag and store
403  dqm_tag_.reserve(7);
404  dqm_tag_.clear();
405  dqm_tag_.push_back("StdBunch"); // statistic collection from Standard Collision Bunch @ 3.8 T
406  dqm_tag_.push_back("StdBunch0T"); // statistic collection from Standard Collision Bunch @ 0 T
407  dqm_tag_.push_back("AagBunch"); // statistic collection from First Collision After Abort Gap @ 3.8 T
408  dqm_tag_.push_back("AagBunch0T"); // statistic collection from First Collision After Abort Gap @ 0 T
409  dqm_tag_.push_back("IsoMuon"); // statistic collection from Isolated Muon @ 3.8 T
410  dqm_tag_.push_back("IsoMuon0T"); // statistic collection from Isolated Muon @ 0 T
411  dqm_tag_.push_back("Harvest"); // statistic collection: Harvest
412 
413  Charge_Vs_Index.insert(Charge_Vs_Index.begin(), dqm_tag_.size(), nullptr);
414  //Charge_Vs_Index_Absolute.insert( Charge_Vs_Index_Absolute.begin(), dqm_tag_.size(), 0);
415  Charge_Vs_PathlengthTIB.insert(Charge_Vs_PathlengthTIB.begin(), dqm_tag_.size(), nullptr);
416  Charge_Vs_PathlengthTOB.insert(Charge_Vs_PathlengthTOB.begin(), dqm_tag_.size(), nullptr);
417  Charge_Vs_PathlengthTIDP.insert(Charge_Vs_PathlengthTIDP.begin(), dqm_tag_.size(), nullptr);
418  Charge_Vs_PathlengthTIDM.insert(Charge_Vs_PathlengthTIDM.begin(), dqm_tag_.size(), nullptr);
419  Charge_Vs_PathlengthTECP1.insert(Charge_Vs_PathlengthTECP1.begin(), dqm_tag_.size(), nullptr);
420  Charge_Vs_PathlengthTECP2.insert(Charge_Vs_PathlengthTECP2.begin(), dqm_tag_.size(), nullptr);
421  Charge_Vs_PathlengthTECM1.insert(Charge_Vs_PathlengthTECM1.begin(), dqm_tag_.size(), nullptr);
422  Charge_Vs_PathlengthTECM2.insert(Charge_Vs_PathlengthTECM2.begin(), dqm_tag_.size(), nullptr);
423 
424  // configure token for gathering the ntuple variables
425  edm::ParameterSet swhallowgain_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("gain");
426 
427  string label = swhallowgain_pset.getUntrackedParameter<string>("label");
428  CalibPrefix_ = swhallowgain_pset.getUntrackedParameter<string>("prefix");
429  CalibSuffix_ = swhallowgain_pset.getUntrackedParameter<string>("suffix");
430 
431  trackindex_token_ = consumes<std::vector<int>>(edm::InputTag(label, CalibPrefix_ + "trackindex" + CalibSuffix_));
432  rawid_token_ = consumes<std::vector<unsigned int>>(edm::InputTag(label, CalibPrefix_ + "rawid" + CalibSuffix_));
433  localdirx_token_ = consumes<std::vector<double>>(edm::InputTag(label, CalibPrefix_ + "localdirx" + CalibSuffix_));
434  localdiry_token_ = consumes<std::vector<double>>(edm::InputTag(label, CalibPrefix_ + "localdiry" + CalibSuffix_));
435  localdirz_token_ = consumes<std::vector<double>>(edm::InputTag(label, CalibPrefix_ + "localdirz" + CalibSuffix_));
437  consumes<std::vector<unsigned short>>(edm::InputTag(label, CalibPrefix_ + "firststrip" + CalibSuffix_));
438  nstrips_token_ = consumes<std::vector<unsigned short>>(edm::InputTag(label, CalibPrefix_ + "nstrips" + CalibSuffix_));
439  saturation_token_ = consumes<std::vector<bool>>(edm::InputTag(label, CalibPrefix_ + "saturation" + CalibSuffix_));
440  overlapping_token_ = consumes<std::vector<bool>>(edm::InputTag(label, CalibPrefix_ + "overlapping" + CalibSuffix_));
441  farfromedge_token_ = consumes<std::vector<bool>>(edm::InputTag(label, CalibPrefix_ + "farfromedge" + CalibSuffix_));
442  charge_token_ = consumes<std::vector<unsigned int>>(edm::InputTag(label, CalibPrefix_ + "charge" + CalibSuffix_));
443  path_token_ = consumes<std::vector<double>>(edm::InputTag(label, CalibPrefix_ + "path" + CalibSuffix_));
445  consumes<std::vector<double>>(edm::InputTag(label, CalibPrefix_ + "chargeoverpath" + CalibSuffix_));
447  consumes<std::vector<unsigned char>>(edm::InputTag(label, CalibPrefix_ + "amplitude" + CalibSuffix_));
448  gainused_token_ = consumes<std::vector<double>>(edm::InputTag(label, CalibPrefix_ + "gainused" + CalibSuffix_));
450  consumes<std::vector<double>>(edm::InputTag(label, CalibPrefix_ + "gainusedTick" + CalibSuffix_));
451 
452  edm::ParameterSet evtinfo_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("evtinfo");
453  label = evtinfo_pset.getUntrackedParameter<string>("label");
454  EventPrefix_ = evtinfo_pset.getUntrackedParameter<string>("prefix");
455  EventSuffix_ = evtinfo_pset.getUntrackedParameter<string>("suffix");
456  TrigTech_token_ = consumes<std::vector<bool>>(edm::InputTag(label, EventPrefix_ + "TrigTech" + EventSuffix_));
457 
458  edm::ParameterSet track_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("tracks");
459  label = track_pset.getUntrackedParameter<string>("label");
460  TrackPrefix_ = track_pset.getUntrackedParameter<string>("prefix");
461  TrackSuffix_ = track_pset.getUntrackedParameter<string>("suffix");
462 
463  trackchi2ndof_token_ = consumes<std::vector<double>>(edm::InputTag(label, TrackPrefix_ + "chi2ndof" + TrackSuffix_));
464  trackp_token_ = consumes<std::vector<float>>(edm::InputTag(label, TrackPrefix_ + "momentum" + TrackSuffix_));
465  trackpt_token_ = consumes<std::vector<float>>(edm::InputTag(label, TrackPrefix_ + "pt" + TrackSuffix_));
466  tracketa_token_ = consumes<std::vector<double>>(edm::InputTag(label, TrackPrefix_ + "eta" + TrackSuffix_));
467  trackphi_token_ = consumes<std::vector<double>>(edm::InputTag(label, TrackPrefix_ + "phi" + TrackSuffix_));
469  consumes<std::vector<unsigned int>>(edm::InputTag(label, TrackPrefix_ + "hitsvalid" + TrackSuffix_));
470  trackalgo_token_ = consumes<std::vector<int>>(edm::InputTag(label, TrackPrefix_ + "algo" + TrackSuffix_));
471 
472  tTopoToken_ = esConsumes<edm::Transition::BeginRun>();
473  tkGeomToken_ = esConsumes<edm::Transition::BeginRun>();
474  runInfoToken_ = esConsumes<edm::Transition::BeginRun>();
475  gainToken_ = esConsumes<edm::Transition::BeginRun>();
476  qualityToken_ = esConsumes<edm::Transition::BeginRun>();
477 }
static const std::string kSharedResource
Definition: TFileService.h:76
edm::EDGetTokenT< std::vector< int > > trackindex_token_
std::vector< MonitorElement * > Charge_Vs_Index
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< std::vector< double > > tracketa_token_
edm::EDGetTokenT< std::vector< unsigned char > > amplitude_token_
edm::EDGetTokenT< std::vector< unsigned int > > rawid_token_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
edm::EDGetTokenT< std::vector< bool > > overlapping_token_
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
edm::EDGetTokenT< std::vector< bool > > farfromedge_token_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< std::vector< unsigned int > > trackhitsvalid_token_
char const * label
edm::EDGetTokenT< std::vector< double > > path_token_
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
edm::EDGetTokenT< std::vector< int > > trackalgo_token_
edm::EDGetTokenT< std::vector< float > > trackp_token_
edm::EDGetTokenT< std::vector< bool > > TrigTech_token_
edm::EDGetTokenT< std::vector< double > > chargeoverpath_token_
edm::EDGetTokenT< std::vector< double > > gainusedTick_token_
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
edm::EDGetTokenT< std::vector< double > > localdirz_token_
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
edm::EDGetTokenT< std::vector< unsigned int > > charge_token_
edm::EDGetTokenT< std::vector< unsigned short > > nstrips_token_
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
edm::EDGetTokenT< std::vector< unsigned short > > firststrip_token_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
edm::EDGetTokenT< std::vector< float > > trackpt_token_
std::vector< std::string > VChargeHisto
edm::EDGetTokenT< std::vector< double > > localdirx_token_
edm::EDGetTokenT< std::vector< bool > > saturation_token_
edm::EDGetTokenT< std::vector< double > > trackchi2ndof_token_
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
edm::EDGetTokenT< std::vector< double > > localdiry_token_
edm::EDGetTokenT< std::vector< double > > gainused_token_
edm::EDGetTokenT< std::vector< double > > trackphi_token_

◆ ~SiStripGainFromCalibTree()

SiStripGainFromCalibTree::~SiStripGainFromCalibTree ( )
override

Definition at line 1807 of file SiStripGainFromCalibTree.cc.

References a, sistrip::APV, APVsColl, and APVsCollOrdered.

1807  {
1808  APVsColl.clear();
1809  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
1811  if (APV != nullptr)
1812  delete APV;
1813  }
1814  APVsCollOrdered.clear();
1815 }
std::vector< stAPVGain * > APVsCollOrdered
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double a
Definition: hdecay.h:121

Member Function Documentation

◆ algoAnalyze()

void SiStripGainFromCalibTree::algoAnalyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1841 of file SiStripGainFromCalibTree.cc.

References AlgoMode, amplitude, amplitude_token_, charge, charge_token_, chargeoverpath, chargeoverpath_token_, connect(), eventnumber, farfromedge, farfromedge_token_, firststrip, firststrip_token_, gainused, gainused_token_, gainusedTick, gainusedTick_token_, iEvent, localdirx, localdirx_token_, localdiry, localdiry_token_, localdirz, localdirz_token_, m_harvestingMode, nstrips, nstrips_token_, overlapping, overlapping_token_, path, path_token_, processEvent(), rawid, rawid_token_, runnumber, saturation, saturation_token_, trackalgo, trackalgo_token_, trackchi2ndof, trackchi2ndof_token_, tracketa, tracketa_token_, trackhitsvalid, trackhitsvalid_token_, trackindex, trackindex_token_, trackp, trackp_token_, trackphi, trackphi_token_, trackpt, trackpt_token_, TrigTech, and TrigTech_token_.

1841  {
1842  // in AlCaHarvesting mode we just need to run the logic in the endJob step
1843  if (m_harvestingMode)
1844  return;
1845 
1846  if (AlgoMode == "CalibTree")
1847  return;
1848 
1849  eventnumber = iEvent.id().event();
1850  runnumber = iEvent.id().run();
1851  auto handle01 = connect(TrigTech, TrigTech_token_, iEvent);
1852  auto handle02 = connect(trackchi2ndof, trackchi2ndof_token_, iEvent);
1853  auto handle03 = connect(trackp, trackp_token_, iEvent);
1854  auto handle04 = connect(trackpt, trackpt_token_, iEvent);
1855  auto handle05 = connect(tracketa, tracketa_token_, iEvent);
1856  auto handle06 = connect(trackphi, trackphi_token_, iEvent);
1858  auto handle08 = connect(trackindex, trackindex_token_, iEvent);
1859  auto handle09 = connect(rawid, rawid_token_, iEvent);
1860  auto handle11 = connect(localdirx, localdirx_token_, iEvent);
1861  auto handle12 = connect(localdiry, localdiry_token_, iEvent);
1862  auto handle13 = connect(localdirz, localdirz_token_, iEvent);
1863  auto handle14 = connect(firststrip, firststrip_token_, iEvent);
1864  auto handle15 = connect(nstrips, nstrips_token_, iEvent);
1865  auto handle16 = connect(saturation, saturation_token_, iEvent);
1866  auto handle17 = connect(overlapping, overlapping_token_, iEvent);
1867  auto handle18 = connect(farfromedge, farfromedge_token_, iEvent);
1868  auto handle19 = connect(charge, charge_token_, iEvent);
1869  auto handle21 = connect(path, path_token_, iEvent);
1871  auto handle23 = connect(amplitude, amplitude_token_, iEvent);
1872  auto handle24 = connect(gainused, gainused_token_, iEvent);
1873  auto handle25 = connect(gainusedTick, gainusedTick_token_, iEvent);
1874  auto handle26 = connect(trackalgo, trackalgo_token_, iEvent);
1875 
1876  processEvent();
1877 }
edm::EDGetTokenT< std::vector< int > > trackindex_token_
const std::vector< float > * trackp
edm::EDGetTokenT< std::vector< double > > tracketa_token_
edm::EDGetTokenT< std::vector< unsigned char > > amplitude_token_
const std::vector< double > * chargeoverpath
edm::EDGetTokenT< std::vector< unsigned int > > rawid_token_
const std::vector< unsigned char > * amplitude
const std::vector< double > * localdirz
const std::vector< double > * trackchi2ndof
const std::vector< double > * localdirx
const std::vector< double > * gainusedTick
const std::vector< unsigned int > * rawid
edm::EDGetTokenT< std::vector< bool > > overlapping_token_
edm::Handle< T > connect(const T *&ptr, edm::EDGetTokenT< T > token, const edm::Event &evt)
const std::vector< int > * trackalgo
const std::vector< float > * trackpt
const std::vector< unsigned int > * trackhitsvalid
edm::EDGetTokenT< std::vector< bool > > farfromedge_token_
edm::EDGetTokenT< std::vector< unsigned int > > trackhitsvalid_token_
edm::EDGetTokenT< std::vector< double > > path_token_
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< std::vector< int > > trackalgo_token_
edm::EDGetTokenT< std::vector< float > > trackp_token_
edm::EDGetTokenT< std::vector< bool > > TrigTech_token_
edm::EDGetTokenT< std::vector< double > > chargeoverpath_token_
edm::EDGetTokenT< std::vector< double > > gainusedTick_token_
const std::vector< double > * gainused
edm::EDGetTokenT< std::vector< double > > localdirz_token_
const std::vector< unsigned short > * firststrip
const std::vector< double > * localdiry
edm::EDGetTokenT< std::vector< unsigned int > > charge_token_
edm::EDGetTokenT< std::vector< unsigned short > > nstrips_token_
const std::vector< int > * trackindex
edm::EDGetTokenT< std::vector< unsigned short > > firststrip_token_
edm::EDGetTokenT< std::vector< float > > trackpt_token_
const std::vector< bool > * overlapping
const std::vector< bool > * saturation
const std::vector< bool > * farfromedge
const std::vector< bool > * TrigTech
edm::EDGetTokenT< std::vector< double > > localdirx_token_
edm::EDGetTokenT< std::vector< bool > > saturation_token_
edm::EDGetTokenT< std::vector< double > > trackchi2ndof_token_
edm::EDGetTokenT< std::vector< double > > localdiry_token_
const std::vector< unsigned int > * charge
const std::vector< double > * path
const std::vector< double > * trackphi
const std::vector< unsigned short > * nstrips
edm::EDGetTokenT< std::vector< double > > gainused_token_
edm::EDGetTokenT< std::vector< double > > trackphi_token_
const std::vector< double > * tracketa

◆ algoAnalyzeTheTree()

void SiStripGainFromCalibTree::algoAnalyzeTheTree ( )
private

Definition at line 1311 of file SiStripGainFromCalibTree.cc.

References amplitude, CalibPrefix_, CalibSuffix_, charge, chargeoverpath, eventnumber, EventPrefix_, EventSuffix_, farfromedge, firststrip, gainused, gainusedTick, mps_fire::i, localdirx, localdiry, localdirz, m_calibrationMode, NEvent, nstrips, overlapping, path, processEvent(), rawid, runnumber, saturation, mps_setup::stdout, trackalgo, trackchi2ndof, tracketa, trackhitsvalid, trackindex, trackp, trackphi, TrackPrefix_, trackpt, TrackSuffix_, TrigTech, and VInputFiles.

Referenced by algoEndJob().

1311  {
1312  for (unsigned int i = 0; i < VInputFiles.size(); i++) {
1313  printf("Openning file %3i/%3i --> %s\n", i + 1, (int)VInputFiles.size(), (char*)(VInputFiles[i].c_str()));
1314  fflush(stdout);
1315  TFile* tfile = TFile::Open(VInputFiles[i].c_str());
1316  TString tree_path = TString::Format("gainCalibrationTree%s/tree", m_calibrationMode.c_str());
1317  TTree* tree = dynamic_cast<TTree*>(tfile->Get(tree_path.Data()));
1318 
1319  tree->SetBranchAddress((EventPrefix_ + "event" + EventSuffix_).c_str(), &eventnumber, nullptr);
1320  tree->SetBranchAddress((EventPrefix_ + "run" + EventSuffix_).c_str(), &runnumber, nullptr);
1321  tree->SetBranchAddress((EventPrefix_ + "TrigTech" + EventSuffix_).c_str(), &TrigTech, nullptr);
1322 
1323  tree->SetBranchAddress((TrackPrefix_ + "chi2ndof" + TrackSuffix_).c_str(), &trackchi2ndof, nullptr);
1324  tree->SetBranchAddress((TrackPrefix_ + "momentum" + TrackSuffix_).c_str(), &trackp, nullptr);
1325  tree->SetBranchAddress((TrackPrefix_ + "pt" + TrackSuffix_).c_str(), &trackpt, nullptr);
1326  tree->SetBranchAddress((TrackPrefix_ + "eta" + TrackSuffix_).c_str(), &tracketa, nullptr);
1327  tree->SetBranchAddress((TrackPrefix_ + "phi" + TrackSuffix_).c_str(), &trackphi, nullptr);
1328  tree->SetBranchAddress((TrackPrefix_ + "hitsvalid" + TrackSuffix_).c_str(), &trackhitsvalid, nullptr);
1329  tree->SetBranchAddress((TrackPrefix_ + "algo" + TrackSuffix_).c_str(), &trackalgo, nullptr);
1330 
1331  tree->SetBranchAddress((CalibPrefix_ + "trackindex" + CalibSuffix_).c_str(), &trackindex, nullptr);
1332  tree->SetBranchAddress((CalibPrefix_ + "rawid" + CalibSuffix_).c_str(), &rawid, nullptr);
1333  tree->SetBranchAddress((CalibPrefix_ + "localdirx" + CalibSuffix_).c_str(), &localdirx, nullptr);
1334  tree->SetBranchAddress((CalibPrefix_ + "localdiry" + CalibSuffix_).c_str(), &localdiry, nullptr);
1335  tree->SetBranchAddress((CalibPrefix_ + "localdirz" + CalibSuffix_).c_str(), &localdirz, nullptr);
1336  tree->SetBranchAddress((CalibPrefix_ + "firststrip" + CalibSuffix_).c_str(), &firststrip, nullptr);
1337  tree->SetBranchAddress((CalibPrefix_ + "nstrips" + CalibSuffix_).c_str(), &nstrips, nullptr);
1338  tree->SetBranchAddress((CalibPrefix_ + "saturation" + CalibSuffix_).c_str(), &saturation, nullptr);
1339  tree->SetBranchAddress((CalibPrefix_ + "overlapping" + CalibSuffix_).c_str(), &overlapping, nullptr);
1340  tree->SetBranchAddress((CalibPrefix_ + "farfromedge" + CalibSuffix_).c_str(), &farfromedge, nullptr);
1341  tree->SetBranchAddress((CalibPrefix_ + "charge" + CalibSuffix_).c_str(), &charge, nullptr);
1342  tree->SetBranchAddress((CalibPrefix_ + "path" + CalibSuffix_).c_str(), &path, nullptr);
1343  tree->SetBranchAddress((CalibPrefix_ + "chargeoverpath" + CalibSuffix_).c_str(), &chargeoverpath, nullptr);
1344  tree->SetBranchAddress((CalibPrefix_ + "amplitude" + CalibSuffix_).c_str(), &amplitude, nullptr);
1345  tree->SetBranchAddress((CalibPrefix_ + "gainused" + CalibSuffix_).c_str(), &gainused, nullptr);
1346  tree->SetBranchAddress((CalibPrefix_ + "gainusedTick" + CalibSuffix_).c_str(), &gainusedTick, nullptr);
1347 
1348  unsigned int nentries = tree->GetEntries();
1349  printf("Number of Events = %i + %i = %i\n", NEvent, nentries, (NEvent + nentries));
1350  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
1351  printf("Looping on the Tree :");
1352  int TreeStep = nentries / 50;
1353  if (TreeStep <= 1)
1354  TreeStep = 1;
1355  for (unsigned int ientry = 0; ientry < tree->GetEntries(); ientry++) {
1356  if (ientry % TreeStep == 0) {
1357  printf(".");
1358  fflush(stdout);
1359  }
1360  tree->GetEntry(ientry);
1361  processEvent();
1362  }
1363  printf("\n"); // END OF EVENT LOOP
1364  }
1365 }
const std::vector< float > * trackp
const std::vector< double > * chargeoverpath
const std::vector< unsigned char > * amplitude
const std::vector< double > * localdirz
const std::vector< double > * trackchi2ndof
const std::vector< double > * localdirx
const std::vector< double > * gainusedTick
const std::vector< unsigned int > * rawid
const std::vector< int > * trackalgo
const std::vector< float > * trackpt
const std::vector< unsigned int > * trackhitsvalid
Definition: tfile.py:1
const std::vector< double > * gainused
const std::vector< unsigned short > * firststrip
const std::vector< double > * localdiry
const std::vector< int > * trackindex
const std::vector< bool > * overlapping
const std::vector< bool > * saturation
const std::vector< bool > * farfromedge
const std::vector< bool > * TrigTech
Definition: tree.py:1
const std::vector< unsigned int > * charge
const std::vector< double > * path
const std::vector< double > * trackphi
const std::vector< unsigned short > * nstrips
const std::vector< double > * tracketa

◆ algoBeginJob()

void SiStripGainFromCalibTree::algoBeginJob ( const edm::EventSetup iSetup)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 661 of file SiStripGainFromCalibTree.cc.

References AlgoMode, sistrip::APV, APVsColl, APVsCollOrdered, BAD, bookDQMHistos(), dqm_tag_, ERun, edm::EventSetup::getData(), GOOD, mps_fire::i, isBFieldConsistentWithMode(), dqmiolumiharvest::j, m_calibrationMode, m_DQMdir, m_harvestingMode, m_splitDQMstat, MakeCalibrationMap(), MASKED, NClusterPixel, NClusterStrip, PixelTopology::ncolumns(), NEvent, NPixelDets, PixelTopology::nrows(), NStripAPVs, StripTopology::nstrips(), NTrack, or, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), SRun, statCollectionFromMode(), AlCaHLTBitMon_QueryRunRegistry::string, ntupleEnum::SubDet, DetId::subdetId(), swapBFieldMode(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, tkGeomToken_, StripSubdetector::TOB, tTopo_, and tTopoToken_.

661  {
662  edm::LogInfo("SiStripGainFromCalibTree") << "AlgoMode : " << AlgoMode << "\n"
663  << "CalibrationMode : " << m_calibrationMode << "\n"
664  << "HarvestingMode : " << m_harvestingMode << std::endl;
665  //Setup DQM histograms
666  if (AlgoMode != "PCL" or m_harvestingMode) {
667  const char* dqm_dir = "AlCaReco/SiStripGainsHarvesting/";
668  this->bookDQMHistos(dqm_dir, dqm_tag_[statCollectionFromMode(m_calibrationMode.c_str())].c_str());
669  } else {
670  //Check consistency of calibration Mode and BField only for the ALCAPROMPT in the PCL workflow
671  if (!isBFieldConsistentWithMode(iSetup)) {
672  string prevMode = m_calibrationMode;
673  swapBFieldMode();
674  edm::LogInfo("SiStripGainFromCalibTree") << "Switching calibration mode for endorsing BField status: " << prevMode
675  << " ==> " << m_calibrationMode << std::endl;
676  }
677  std::string dqm_dir = m_DQMdir + ((m_splitDQMstat) ? m_calibrationMode : "") + "/";
678  int elem = statCollectionFromMode(m_calibrationMode.c_str());
679  this->bookDQMHistos(dqm_dir.c_str(), dqm_tag_[elem].c_str());
680  }
681 
682  tTopo_ = &iSetup.getData(tTopoToken_);
683 
684  auto const& Det = iSetup.getData(tkGeomToken_).dets();
685 
686  NPixelDets = 0;
687  NStripAPVs = 0;
688  unsigned int Index = 0;
689  for (unsigned int i = 0; i < Det.size(); i++) {
690  DetId Detid = Det[i]->geographicalId();
691  int SubDet = Detid.subdetId();
692 
695  auto DetUnit = dynamic_cast<const StripGeomDetUnit*>(Det[i]);
696  if (!DetUnit)
697  continue;
698 
699  const StripTopology& Topo = DetUnit->specificTopology();
700  unsigned int NAPV = Topo.nstrips() / 128;
701 
702  for (unsigned int j = 0; j < NAPV; j++) {
703  stAPVGain* APV = new stAPVGain;
704  APV->Index = Index;
705  APV->Bin = -1;
706  APV->DetId = Detid.rawId();
707  APV->APVId = j;
708  APV->SubDet = SubDet;
709  APV->FitMPV = -1;
710  APV->FitMPVErr = -1;
711  APV->FitWidth = -1;
712  APV->FitWidthErr = -1;
713  APV->FitChi2 = -1;
714  APV->FitNorm = -1;
715  APV->Gain = -1;
716  APV->PreviousGain = 1;
717  APV->PreviousGainTick = 1;
718  APV->x = DetUnit->position().basicVector().x();
719  APV->y = DetUnit->position().basicVector().y();
720  APV->z = DetUnit->position().basicVector().z();
721  APV->Eta = DetUnit->position().basicVector().eta();
722  APV->Phi = DetUnit->position().basicVector().phi();
723  APV->R = DetUnit->position().basicVector().transverse();
724  APV->Thickness = DetUnit->surface().bounds().thickness();
725  APV->NEntries = 0;
726  APV->isMasked = false;
727 
728  APVsCollOrdered.push_back(APV);
729  APVsColl[(APV->DetId << 4) | APV->APVId] = APV;
730  Index++;
731  NStripAPVs++;
732  }
733  }
734  }
735 
736  for (unsigned int i = 0; i < Det.size();
737  i++) { //Make two loop such that the Pixel information is added at the end --> make transition simpler
738  DetId Detid = Det[i]->geographicalId();
739  int SubDet = Detid.subdetId();
741  auto DetUnit = dynamic_cast<const PixelGeomDetUnit*>(Det[i]);
742  if (!DetUnit)
743  continue;
744 
745  const PixelTopology& Topo = DetUnit->specificTopology();
746  unsigned int NROCRow = Topo.nrows() / (80.);
747  unsigned int NROCCol = Topo.ncolumns() / (52.);
748 
749  for (unsigned int j = 0; j < NROCRow; j++) {
750  for (unsigned int i = 0; i < NROCCol; i++) {
751  stAPVGain* APV = new stAPVGain;
752  APV->Index = Index;
753  APV->Bin = -1;
754  APV->DetId = Detid.rawId();
755  APV->APVId = (j << 3 | i);
756  APV->SubDet = SubDet;
757  APV->FitMPV = -1;
758  APV->FitMPVErr = -1;
759  APV->FitWidth = -1;
760  APV->FitWidthErr = -1;
761  APV->FitChi2 = -1;
762  APV->Gain = -1;
763  APV->PreviousGain = 1;
764  APV->PreviousGainTick = 1;
765  APV->x = DetUnit->position().basicVector().x();
766  APV->y = DetUnit->position().basicVector().y();
767  APV->z = DetUnit->position().basicVector().z();
768  APV->Eta = DetUnit->position().basicVector().eta();
769  APV->Phi = DetUnit->position().basicVector().phi();
770  APV->R = DetUnit->position().basicVector().transverse();
771  APV->Thickness = DetUnit->surface().bounds().thickness();
772  APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId());
773  APV->NEntries = 0;
774 
775  APVsCollOrdered.push_back(APV);
776  APVsColl[(APV->DetId << 4) | APV->APVId] = APV;
777  Index++;
778  NPixelDets++;
779  }
780  }
781  }
782  }
783 
785 
786  NEvent = 0;
787  NTrack = 0;
788  NClusterStrip = 0;
789  NClusterPixel = 0;
790  SRun = 1 << 31;
791  ERun = 0;
792  GOOD = 0;
793  BAD = 0;
794  MASKED = 0;
795 }
static constexpr auto TEC
virtual int nstrips() const =0
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
virtual int ncolumns() const =0
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
const TrackerTopology * tTopo_
virtual int nrows() const =0
int statCollectionFromMode(const char *tag) const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
std::vector< stAPVGain * > APVsCollOrdered
std::unordered_map< unsigned int, stAPVGain * > APVsColl
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool isBFieldConsistentWithMode(const edm::EventSetup &iSetup) const
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
Log< level::Info, false > LogInfo
Definition: DetId.h:17
static constexpr auto TIB
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
static constexpr auto TID
void bookDQMHistos(const char *dqm_dir, const char *tag)

◆ algoBeginRun()

void SiStripGainFromCalibTree::algoBeginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 815 of file SiStripGainFromCalibTree.cc.

References a, AlgoMode, sistrip::APV, APVsCollOrdered, beamvalidation::exit(), gainToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), isBFieldConsistentWithMode(), m_calibrationMode, m_harvestingMode, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, qualityToken_, mps_setup::stdout, and swapBFieldMode().

815  {
816  if (!m_harvestingMode && AlgoMode == "PCL") {
817  //Check consistency of calibration Mode and BField only for the ALCAPROMPT in the PCL workflow
818  if (!isBFieldConsistentWithMode(iSetup)) {
819  string prevMode = m_calibrationMode;
820  swapBFieldMode();
821  edm::LogInfo("SiStripGainFromCalibTree") << "Switching calibration mode for endorsing BField status: " << prevMode
822  << " ==> " << m_calibrationMode << std::endl;
823  }
824  }
825 
826  const auto gainHandle = iSetup.getHandle(gainToken_);
827  if (!gainHandle.isValid()) {
828  edm::LogError("SiStripGainFromCalibTree") << "gainHandle is not valid\n";
829  exit(0);
830  }
831 
832  const auto& siStripQuality = iSetup.getData(qualityToken_);
833  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
835 
836  // MM. 03/03/2017 all of this makes sense only for SiStrip (i.e. get me out of here if I am on a pixel ROC)
838  continue;
839 
840  APV->isMasked = siStripQuality.IsApvBad(APV->DetId, APV->APVId);
841  // if(!FirstSetOfConstants){
842 
843  if (gainHandle->getNumberOfTags() != 2) {
844  edm::LogError("SiStripGainFromCalibTree") << "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";
845  fflush(stdout);
846  exit(0);
847  };
848  float newPreviousGain = gainHandle->getApvGain(APV->APVId, gainHandle->getRange(APV->DetId, 1), 1);
849  if (APV->PreviousGain != 1 and newPreviousGain != APV->PreviousGain)
850  edm::LogWarning("SiStripGainFromCalibTree") << "WARNING: ParticleGain in the global tag changed\n";
851  APV->PreviousGain = newPreviousGain;
852 
853  float newPreviousGainTick = gainHandle->getApvGain(APV->APVId, gainHandle->getRange(APV->DetId, 0), 0);
854  if (APV->PreviousGainTick != 1 and newPreviousGainTick != APV->PreviousGainTick) {
855  edm::LogWarning("SiStripGainFromCalibTree")
856  << "WARNING: TickMarkGain in the global tag changed\n"
857  << std::endl
858  << " APV->SubDet: " << APV->SubDet << " APV->APVId:" << APV->APVId << std::endl
859  << " APV->PreviousGainTick: " << APV->PreviousGainTick << " newPreviousGainTick: " << newPreviousGainTick
860  << std::endl;
861  }
862  APV->PreviousGainTick = newPreviousGainTick;
863 
864  //printf("DETID = %7i APVID=%1i Previous Gain=%8.4f (G1) x %8.4f (G2)\n",APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain);
865  // }
866  }
867 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
Log< level::Error, false > LogError
std::vector< stAPVGain * > APVsCollOrdered
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
bool isBFieldConsistentWithMode(const edm::EventSetup &iSetup) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
Log< level::Info, false > LogInfo
double a
Definition: hdecay.h:121
Log< level::Warning, false > LogWarning
def exit(msg="")

◆ algoComputeMPVandGain()

void SiStripGainFromCalibTree::algoComputeMPVandGain ( )
private

Definition at line 1367 of file SiStripGainFromCalibTree.cc.

References AlgoMode, sistrip::APV, stAPVGain::APVId, APVsColl, BAD, stAPVGain::Bin, CalibrationLevel, Charge_Vs_Index, stAPVGain::DetId, getPeakOfLandau(), GOOD, Harvest, Exhume::I, mps_fire::i, stAPVGain::Index, IsGoodLandauFit(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, m_calibrationMode, MASKED, statCollectionFromMode(), and mps_setup::stdout.

Referenced by algoEndJob().

1367  {
1368  unsigned int I = 0;
1369  TH1F* Proj = nullptr;
1370  double FitResults[6];
1371  double MPVmean = 300;
1372 
1373  int elepos = (AlgoMode == "PCL") ? Harvest : statCollectionFromMode(m_calibrationMode.c_str());
1374 
1375  if (Charge_Vs_Index[elepos] == nullptr) {
1376  edm::LogError("SiStripGainFromCalibTree")
1377  << "Harvesting: could not execute algoComputeMPVandGain method because " << m_calibrationMode.c_str()
1378  << " statistics cannot be retrieved.\n"
1379  << "Please check if input contains " << m_calibrationMode.c_str() << " data." << std::endl;
1380  return;
1381  }
1382 
1383  TH2S* chvsidx = (Charge_Vs_Index[elepos])->getTH2S();
1384 
1385  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
1386  printf("Fitting Charge Distribution :");
1387  int TreeStep = APVsColl.size() / 50;
1388  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++, I++) {
1389  if (I % TreeStep == 0) {
1390  printf(".");
1391  fflush(stdout);
1392  }
1393  stAPVGain* APV = it->second;
1394  if (APV->Bin < 0)
1395  APV->Bin = chvsidx->GetXaxis()->FindBin(APV->Index);
1396 
1397  if (APV->isMasked) {
1398  APV->Gain = APV->PreviousGain;
1399  MASKED++;
1400  continue;
1401  }
1402 
1403  Proj = (TH1F*)(chvsidx->ProjectionY(
1404  "", chvsidx->GetXaxis()->FindBin(APV->Index), chvsidx->GetXaxis()->FindBin(APV->Index), "e"));
1405  if (!Proj)
1406  continue;
1407 
1408  if (CalibrationLevel == 0) {
1409  } else if (CalibrationLevel == 1) {
1410  int SecondAPVId = APV->APVId;
1411  if (SecondAPVId % 2 == 0) {
1412  SecondAPVId = SecondAPVId + 1;
1413  } else {
1414  SecondAPVId = SecondAPVId - 1;
1415  }
1416  stAPVGain* APV2 = APVsColl[(APV->DetId << 4) | SecondAPVId];
1417  if (APV2->Bin < 0)
1418  APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index);
1419  TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("", APV2->Bin, APV2->Bin, "e"));
1420  if (Proj2) {
1421  Proj->Add(Proj2, 1);
1422  delete Proj2;
1423  }
1424  } else if (CalibrationLevel == 2) {
1425  for (unsigned int i = 0; i < 16; i++) { //loop up to 6APV for Strip and up to 16 for Pixels
1426  auto tmpit = APVsColl.find((APV->DetId << 4) | i);
1427  if (tmpit == APVsColl.end())
1428  continue;
1429  stAPVGain* APV2 = tmpit->second;
1430  if (APV2->DetId != APV->DetId || APV2->APVId == APV->APVId)
1431  continue;
1432  if (APV2->Bin < 0)
1433  APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index);
1434  TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("", APV2->Bin, APV2->Bin, "e"));
1435  if (Proj2) {
1436  Proj->Add(Proj2, 1);
1437  delete Proj2;
1438  }
1439  }
1440  } else {
1441  CalibrationLevel = 0;
1442  printf("Unknown Calibration Level, will assume %i\n", CalibrationLevel);
1443  }
1444 
1445  getPeakOfLandau(Proj, FitResults);
1446  APV->FitMPV = FitResults[0];
1447  APV->FitMPVErr = FitResults[1];
1448  APV->FitWidth = FitResults[2];
1449  APV->FitWidthErr = FitResults[3];
1450  APV->FitChi2 = FitResults[4];
1451  APV->FitNorm = FitResults[5];
1452  APV->NEntries = Proj->GetEntries();
1453 
1454  if (IsGoodLandauFit(FitResults)) {
1455  APV->Gain = APV->FitMPV / MPVmean;
1456  if (APV->SubDet > 2)
1457  GOOD++;
1458  } else {
1459  APV->Gain = APV->PreviousGain;
1460  if (APV->SubDet > 2)
1461  BAD++;
1462  }
1463  if (APV->Gain <= 0)
1464  APV->Gain = 1;
1465 
1466  //printf("%5i/%5i: %6i - %1i %5E Entries --> MPV = %f +- %f\n",I,APVsColl.size(),APV->DetId, APV->APVId, Proj->GetEntries(), FitResults[0], FitResults[1]);fflush(stdout);
1467  delete Proj;
1468  }
1469  printf("\n");
1470 }
std::vector< MonitorElement * > Charge_Vs_Index
unsigned int APVId
Definition: APVGainStruct.h:13
int statCollectionFromMode(const char *tag) const
unsigned int DetId
Definition: APVGainStruct.h:12
Log< level::Error, false > LogError
bool IsGoodLandauFit(double *FitResults)
std::unordered_map< unsigned int, stAPVGain * > APVsColl
unsigned int Index
Definition: APVGainStruct.h:10
const std::complex< double > I
Definition: I.h:8
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)

◆ algoEndJob()

void SiStripGainFromCalibTree::algoEndJob ( )
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1029 of file SiStripGainFromCalibTree.cc.

References algoAnalyzeTheTree(), algoComputeMPVandGain(), AlgoMode, Charge_Vs_Index, Charge_Vs_PathlengthTECM1, Charge_Vs_PathlengthTECM2, Charge_Vs_PathlengthTECP1, Charge_Vs_PathlengthTECP2, Charge_Vs_PathlengthTIB, Charge_Vs_PathlengthTIDM, Charge_Vs_PathlengthTIDP, Charge_Vs_PathlengthTOB, Harvest, m_calibrationMode, m_harvestingMode, TFileService::make(), NClusterStrip, NStripAPVs, Utilities::operator, or, qualityMonitor(), saveSummary, statCollectionFromMode(), ConditionDBWriter< SiStripApvGain >::storeOnDbNow(), storeOnTree(), and tfs.

1029  {
1030  if (AlgoMode == "PCL" && !m_harvestingMode)
1031  return; //nothing to do in that case
1032 
1033  if (AlgoMode == "CalibTree") {
1034  edm::LogInfo("SiStripGainFromCalibTree") << "Analyzing calibration tree" << std::endl;
1035  // Loop on calibTrees to fill the 2D histograms
1037  } else if (m_harvestingMode) {
1038  NClusterStrip = (Charge_Vs_Index[Harvest])->getTH2S()->Integral(0, NStripAPVs + 1, 0, 99999);
1039  //NClusterPixel = (Charge_Vs_Index[Harvest])->getTH2S()->Integral(NStripAPVs+2, NStripAPVs+NPixelDets+2, 0, 99999 );
1040  }
1041 
1042  // Now that we have the full statistics we can extract the information of the 2D histograms
1044 
1045  // Result monitoring
1046  qualityMonitor();
1047 
1048  // Force the DB object writing,
1049  // thus setting the IOV as the first processed run (if timeFromEndRun is set to false)
1050  storeOnDbNow();
1051 
1052  if (AlgoMode != "PCL" or saveSummary) {
1053  edm::LogInfo("SiStripGainFromCalibTree") << "Saving summary into root file" << std::endl;
1054 
1055  //also save the 2D monitor elements to this file as TH2D tfs
1057 
1058  //save only the statistics for the calibrationTag
1059  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
1060 
1061  if (Charge_Vs_Index[elepos] != nullptr)
1062  tfs->make<TH2S>(*(Charge_Vs_Index[elepos])->getTH2S());
1063  //if( Charge_Vs_Index_Absolute[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_Index_Absolute[elepos])->getTH2S() );
1064  if (Charge_Vs_PathlengthTIB[elepos] != nullptr)
1065  tfs->make<TH2S>(*(Charge_Vs_PathlengthTIB[elepos])->getTH2S());
1066  if (Charge_Vs_PathlengthTOB[elepos] != nullptr)
1067  tfs->make<TH2S>(*(Charge_Vs_PathlengthTOB[elepos])->getTH2S());
1068  if (Charge_Vs_PathlengthTIDP[elepos] != nullptr)
1069  tfs->make<TH2S>(*(Charge_Vs_PathlengthTIDP[elepos])->getTH2S());
1070  if (Charge_Vs_PathlengthTIDM[elepos] != nullptr)
1071  tfs->make<TH2S>(*(Charge_Vs_PathlengthTIDM[elepos])->getTH2S());
1072  if (Charge_Vs_PathlengthTECP1[elepos] != nullptr)
1073  tfs->make<TH2S>(*(Charge_Vs_PathlengthTECP1[elepos])->getTH2S());
1074  if (Charge_Vs_PathlengthTECP2[elepos] != nullptr)
1075  tfs->make<TH2S>(*(Charge_Vs_PathlengthTECP2[elepos])->getTH2S());
1076  if (Charge_Vs_PathlengthTECM1[elepos] != nullptr)
1077  tfs->make<TH2S>(*(Charge_Vs_PathlengthTECM1[elepos])->getTH2S());
1078  if (Charge_Vs_PathlengthTECM2[elepos] != nullptr)
1079  tfs->make<TH2S>(*(Charge_Vs_PathlengthTECM2[elepos])->getTH2S());
1080 
1081  storeOnTree(tfs);
1082  }
1083 }
std::vector< MonitorElement * > Charge_Vs_Index
int statCollectionFromMode(const char *tag) const
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
void storeOnTree(TFileService *tfs)
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
Log< level::Info, false > LogInfo
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP

◆ algoEndRun()

void SiStripGainFromCalibTree::algoEndRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 869 of file SiStripGainFromCalibTree.cc.

References AlgoMode, Charge_1, Charge_2, Charge_3, Charge_4, Charge_Vs_Index, Charge_Vs_PathlengthTECM1, Charge_Vs_PathlengthTECM2, Charge_Vs_PathlengthTECP1, Charge_Vs_PathlengthTECP2, Charge_Vs_PathlengthTIB, Charge_Vs_PathlengthTIDM, Charge_Vs_PathlengthTIDP, Charge_Vs_PathlengthTOB, dbe, doChargeMonitorPerPlane, dqmdumpme::first, dqm::implementation::IGetter::get(), Harvest, mps_fire::i, m_calibrationMode, m_DQMdir, m_harvestingMode, m_splitDQMstat, merge(), APVGain::monHnames(), statCollectionFromMode(), AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, triggerMatcherToHLTDebug_cfi::tags, and VChargeHisto.

869  {
870  if (AlgoMode == "PCL" && !m_harvestingMode)
871  return; //nothing to do in that case
872 
873  if (AlgoMode == "PCL" and m_harvestingMode) {
874  // Load the 2D histograms from the DQM objects
875  // When running in AlCaHarvesting mode the histos are already booked and should be just retrieved from
876  // DQMStore so that they can be used in the fit
877 
878  edm::LogInfo("SiStripGainFromCalibTree") << "Starting harvesting statistics" << std::endl;
879 
880  // check the required tag before adding histograms
881  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
882  if (elepos != Harvest) {
883  //collect statistics from DQM into the related monitored elements
885  if (!stag.empty() && stag[0] != '_')
886  stag.insert(0, 1, '_');
887 
888  if (elepos == -1) {
889  //implememt backward compatibility
890  elepos = 0;
891  stag = "";
892  }
893 
894  std::string DQM_dir = m_DQMdir + ((m_splitDQMstat) ? m_calibrationMode : "");
895 
896  std::string cvi = DQM_dir + std::string("/Charge_Vs_Index") + stag;
897  //std::string cviA = DQM_dir + std::string("/Charge_Vs_Index_Absolute") + stag;
898  std::string cvpTIB = DQM_dir + std::string("/Charge_Vs_PathlengthTIB") + stag;
899  std::string cvpTOB = DQM_dir + std::string("/Charge_Vs_PathlengthTOB") + stag;
900  std::string cvpTIDP = DQM_dir + std::string("/Charge_Vs_PathlengthTIDP") + stag;
901  std::string cvpTIDM = DQM_dir + std::string("/Charge_Vs_PathlengthTIDM") + stag;
902  std::string cvpTECP1 = DQM_dir + std::string("/Charge_Vs_PathlengthTECP1") + stag;
903  std::string cvpTECP2 = DQM_dir + std::string("/Charge_Vs_PathlengthTECP2") + stag;
904  std::string cvpTECM1 = DQM_dir + std::string("/Charge_Vs_PathlengthTECM1") + stag;
905  std::string cvpTECM2 = DQM_dir + std::string("/Charge_Vs_PathlengthTECM2") + stag;
906 
907  Charge_Vs_Index[elepos] = dbe->get(cvi);
908  //Charge_Vs_Index_Absolute[elepos] = dbe->get(cviA.c_str());
909  Charge_Vs_PathlengthTIB[elepos] = dbe->get(cvpTIB);
910  Charge_Vs_PathlengthTOB[elepos] = dbe->get(cvpTOB);
911  Charge_Vs_PathlengthTIDP[elepos] = dbe->get(cvpTIDP);
912  Charge_Vs_PathlengthTIDM[elepos] = dbe->get(cvpTIDM);
913  Charge_Vs_PathlengthTECP1[elepos] = dbe->get(cvpTECP1);
914  Charge_Vs_PathlengthTECP2[elepos] = dbe->get(cvpTECP2);
915  Charge_Vs_PathlengthTECM1[elepos] = dbe->get(cvpTECM1);
916  Charge_Vs_PathlengthTECM2[elepos] = dbe->get(cvpTECM2);
917 
918  if (Charge_Vs_Index[elepos] == nullptr) {
919  edm::LogError("SiStripGainFromCalibTree")
920  << "Harvesting: could not retrieve " << cvi.c_str() << ", statistics will not be summed!" << std::endl;
921  } else {
922  merge((Charge_Vs_Index[Harvest])->getTH2S(), (Charge_Vs_Index[elepos])->getTH2S());
923  edm::LogInfo("SiStripGainFromCalibTree")
924  << "Harvesting " << (Charge_Vs_Index[elepos])->getTH2S()->GetEntries() << " more clusters" << std::endl;
925  }
926 
927  //if (Charge_Vs_Index_Absolute[elepos]==0) {
928  // edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cviA.c_str()
929  // << ", statistics will not be summed!" << std::endl;
930  //} else merge( (Charge_Vs_Index_Absolute[Harvest])->getTH2S(), (Charge_Vs_Index_Absolute[elepos])->getTH2S() );
931 
932  if (Charge_Vs_PathlengthTIB[elepos] == nullptr) {
933  edm::LogError("SiStripGainFromCalibTree")
934  << "Harvesting: could not retrieve " << cvpTIB.c_str() << ", statistics will not be summed!" << std::endl;
935  } else
936  (Charge_Vs_PathlengthTIB[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIB[elepos])->getTH2S());
937 
938  if (Charge_Vs_PathlengthTOB[elepos] == nullptr) {
939  edm::LogError("SiStripGainFromCalibTree")
940  << "Harvesting: could not retrieve " << cvpTOB.c_str() << ", statistics will not be summed!" << std::endl;
941  } else
942  (Charge_Vs_PathlengthTOB[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTOB[elepos])->getTH2S());
943 
944  if (Charge_Vs_PathlengthTIDP[elepos] == nullptr) {
945  edm::LogError("SiStripGainFromCalibTree")
946  << "Harvesting: could not retrieve " << cvpTIDP.c_str() << ", statistics will not be summed!" << std::endl;
947  } else
948  (Charge_Vs_PathlengthTIDP[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIDP[elepos])->getTH2S());
949 
950  if (Charge_Vs_PathlengthTIDM[elepos] == nullptr) {
951  edm::LogError("SiStripGainFromCalibTree")
952  << "Harvesting: could not retrieve " << cvpTIDM.c_str() << ", statistics will not be summed!" << std::endl;
953  } else
954  (Charge_Vs_PathlengthTIDM[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIDM[elepos])->getTH2S());
955 
956  if (Charge_Vs_PathlengthTECP1[elepos] == nullptr) {
957  edm::LogError("SiStripGainFromCalibTree")
958  << "Harvesting: could not retrieve " << cvpTECP1.c_str() << ", statistics will not be summed!" << std::endl;
959  } else
960  (Charge_Vs_PathlengthTECP1[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECP1[elepos])->getTH2S());
961 
962  if (Charge_Vs_PathlengthTECP2[elepos] == nullptr) {
963  edm::LogError("SiStripGainFromCalibTree")
964  << "Harvesting: could not retrieve " << cvpTECP2.c_str() << ", statistics will not be summed!" << std::endl;
965  } else
966  (Charge_Vs_PathlengthTECP2[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECP2[elepos])->getTH2S());
967 
968  if (Charge_Vs_PathlengthTECM1[elepos] == nullptr) {
969  edm::LogError("SiStripGainFromCalibTree")
970  << "Harvesting: could not retrieve " << cvpTECM1.c_str() << ", statistics will not be summed!" << std::endl;
971  } else
972  (Charge_Vs_PathlengthTECM1[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECM1[elepos])->getTH2S());
973 
974  if (Charge_Vs_PathlengthTECM2[elepos] == nullptr) {
975  edm::LogError("SiStripGainFromCalibTree")
976  << "Harvesting: could not retrieve " << cvpTECM2.c_str() << ", statistics will not be summed!" << std::endl;
977  } else
978  (Charge_Vs_PathlengthTECM2[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECM2[elepos])->getTH2S());
979 
980  // Gather Charge monitoring histograms
981  std::vector<std::pair<std::string, std::string>> tags =
983  for (unsigned int i = 0; i < tags.size(); i++) {
984  std::string tag = DQM_dir + "/" + (tags[i]).first + stag;
985  Charge_1[elepos].push_back(APVGain::APVmon(0, 0, 0, 0, dbe->get(tag)));
986  if ((Charge_1[elepos][i]).getMonitor() == nullptr) {
987  edm::LogError("SiStripGainFromCalibTree")
988  << "Harvesting: could not retrieve " << tag.c_str() << ", statistics will not be summed!" << std::endl;
989  } else
990  (Charge_1[Harvest][i]).getMonitor()->getTH1D()->Add((Charge_1[elepos][i]).getMonitor()->getTH1D());
991  }
992 
994  for (unsigned int i = 0; i < tags.size(); i++) {
995  std::string tag = DQM_dir + "/" + (tags[i]).first + stag;
996  Charge_2[elepos].push_back(APVGain::APVmon(0, 0, 0, 0, dbe->get(tag)));
997  if ((Charge_2[elepos][i]).getMonitor() == nullptr) {
998  edm::LogError("SiStripGainFromCalibTree")
999  << "Harvesting: could not retrieve " << tag.c_str() << ", statistics will not be summed!" << std::endl;
1000  } else
1001  (Charge_2[Harvest][i]).getMonitor()->getTH1D()->Add((Charge_2[elepos][i]).getMonitor()->getTH1D());
1002  }
1003 
1005  for (unsigned int i = 0; i < tags.size(); i++) {
1006  std::string tag = DQM_dir + "/" + (tags[i]).first + stag;
1007  Charge_3[elepos].push_back(APVGain::APVmon(0, 0, 0, 0, dbe->get(tag)));
1008  if ((Charge_3[elepos][i]).getMonitor() == nullptr) {
1009  edm::LogError("SiStripGainFromCalibTree")
1010  << "Harvesting: could not retrieve " << tag.c_str() << ", statistics will not be summed!" << std::endl;
1011  } else
1012  (Charge_3[Harvest][i]).getMonitor()->getTH1D()->Add((Charge_3[elepos][i]).getMonitor()->getTH1D());
1013  }
1014 
1016  for (unsigned int i = 0; i < tags.size(); i++) {
1017  std::string tag = DQM_dir + "/" + (tags[i]).first + stag;
1018  Charge_4[elepos].push_back(APVGain::APVmon(0, 0, 0, 0, dbe->get(tag)));
1019  if ((Charge_4[elepos][i]).getMonitor() == nullptr) {
1020  edm::LogError("SiStripGainFromCalibTree")
1021  << "Harvesting: could not retrieve " << tag.c_str() << ", statistics will not be summed!" << std::endl;
1022  } else
1023  (Charge_4[Harvest][i]).getMonitor()->getTH1D()->Add((Charge_4[elepos][i]).getMonitor()->getTH1D());
1024  }
1025  }
1026  }
1027 }
std::vector< MonitorElement * > Charge_Vs_Index
int statCollectionFromMode(const char *tag) const
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
Log< level::Error, false > LogError
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
Log< level::Info, false > LogInfo
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
std::array< std::vector< APVGain::APVmon >, 7 > Charge_4
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
std::vector< std::string > VChargeHisto
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
std::array< std::vector< APVGain::APVmon >, 7 > Charge_3
std::vector< std::pair< std::string, std::string > > monHnames(std::vector< std::string >, bool, const char *tag)
std::array< std::vector< APVGain::APVmon >, 7 > Charge_1
std::array< std::vector< APVGain::APVmon >, 7 > Charge_2

◆ bookDQMHistos()

void SiStripGainFromCalibTree::bookDQMHistos ( const char *  dqm_dir,
const char *  tag 
)
private

Definition at line 479 of file SiStripGainFromCalibTree.cc.

References a, AlgoMode, b, dqm::implementation::IBooker::book1DD(), dqm::implementation::IBooker::book2DD(), dqm::implementation::IBooker::book2S(), booked_dir_, Charge_1, Charge_2, Charge_3, Charge_4, Charge_Vs_Index, Charge_Vs_PathlengthTECM1, Charge_Vs_PathlengthTECM2, Charge_Vs_PathlengthTECP1, Charge_Vs_PathlengthTECP2, Charge_Vs_PathlengthTIB, Charge_Vs_PathlengthTIDM, Charge_Vs_PathlengthTIDP, Charge_Vs_PathlengthTOB, dbe, DiffWRTPrevGainTEC, DiffWRTPrevGainTIB, DiffWRTPrevGainTID, DiffWRTPrevGainTOB, doChargeMonitorPerPlane, JetChargeProducer_cfi::exp, dqmdumpme::first, Gains, GainVsPrevGainTEC, GainVsPrevGainTIB, GainVsPrevGainTID, GainVsPrevGainTOB, Harvest, mps_fire::i, dqm-mbProfile::log, m_harvestingMode, APVGain::monHnames(), beam_dqm_sourceclient-live_cfg::monitor, MPV_Vs_EtaTEC, MPV_Vs_EtaTECthick, MPV_Vs_EtaTECthin, MPV_Vs_EtaTIB, MPV_Vs_EtaTID, MPV_Vs_EtaTOB, MPV_Vs_PhiTEC, MPV_Vs_PhiTECthick, MPV_Vs_PhiTECthin, MPV_Vs_PhiTIB, MPV_Vs_PhiTID, MPV_Vs_PhiTOB, MPVError, MPVErrorVsEta, MPVErrorVsMPV, MPVErrorVsN, MPVErrorVsPhi, MPVs, MPVs320, MPVs500, MPVsTEC, MPVsTECM, MPVsTECM1, MPVsTECM2, MPVsTECP, MPVsTECP1, MPVsTECP2, MPVsTECthick, MPVsTECthin, MPVsTIB, MPVsTID, MPVsTIDM, MPVsTIDP, MPVsTOB, newCharge, NoMPVfit, NoMPVmasked, NStripAPVs, LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, edm::second(), dqm::implementation::DQMStore::setCurrentFolder(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::side(), statCollectionFromMode(), AlCaHLTBitMon_QueryRunRegistry::string, APVGain::subdetectorId(), APVGain::subdetectorPlane(), APVGain::subdetectorSide(), makeGlobalPositionRcd_cfg::tag, APVGain::thickness(), VChargeHisto, and y.

Referenced by algoBeginJob().

479  {
480  edm::LogInfo("SiStripGainFromCalibTree")
481  << "Setting " << dqm_dir << "in DQM and booking histograms for tag " << tag << std::endl;
482 
483  if (strcmp(booked_dir_.c_str(), dqm_dir) != 0) {
484  booked_dir_ = dqm_dir;
485  dbe->setCurrentFolder(dqm_dir);
486  }
487 
488  std::string stag(tag);
489  if (!stag.empty() && stag[0] != '_')
490  stag.insert(0, 1, '_');
491 
492  std::string cvi = std::string("Charge_Vs_Index") + stag;
493  //std::string cviA = std::string("Charge_Vs_Index_Absolute") + stag;
494  std::string cvpTIB = std::string("Charge_Vs_PathlengthTIB") + stag;
495  std::string cvpTOB = std::string("Charge_Vs_PathlengthTOB") + stag;
496  std::string cvpTIDP = std::string("Charge_Vs_PathlengthTIDP") + stag;
497  std::string cvpTIDM = std::string("Charge_Vs_PathlengthTIDM") + stag;
498  std::string cvpTECP1 = std::string("Charge_Vs_PathlengthTECP1") + stag;
499  std::string cvpTECP2 = std::string("Charge_Vs_PathlengthTECP2") + stag;
500  std::string cvpTECM1 = std::string("Charge_Vs_PathlengthTECM1") + stag;
501  std::string cvpTECM2 = std::string("Charge_Vs_PathlengthTECM2") + stag;
502 
503  int elepos = (m_harvestingMode && AlgoMode == "PCL") ? Harvest : statCollectionFromMode(tag);
504 
505  // The cluster charge is stored by exploiting a non uniform binning in order
506  // reduce the histogram memory size. The bin width is relaxed with a falling
507  // exponential function and the bin boundaries are stored in the binYarray.
508  // The binXarray is used to provide as many bins as the APVs.
509  //
510  // More details about this implementations are here:
511  // https://indico.cern.ch/event/649344/contributions/2672267/attachments/1498323/2332518/OptimizeChHisto.pdf
512 
513  std::vector<float> binXarray;
514  binXarray.reserve(NStripAPVs + 1);
515  for (int a = 0; a <= NStripAPVs; a++) {
516  binXarray.push_back((float)a);
517  }
518 
519  std::array<float, 688> binYarray;
520  double p0 = 5.445;
521  double p1 = 0.002113;
522  double p2 = 69.01576;
523  double y = 0.;
524  for (int b = 0; b < 687; b++) {
525  binYarray[b] = y;
526  if (y <= 902.)
527  y = y + 2.;
528  else
529  y = (p0 - log(exp(p0 - p1 * y) - p2 * p1)) / p1;
530  }
531  binYarray[687] = 4000.;
532 
533  Charge_Vs_Index[elepos] = dbe->book2S(cvi.c_str(), cvi.c_str(), NStripAPVs, &binXarray[0], 687, binYarray.data());
534  //Charge_Vs_Index_Absolute[elepos] = dbe->book2S(cviA.c_str() , cviA.c_str() , 88625, 0 , 88624,1000,0,4000);
535  Charge_Vs_PathlengthTIB[elepos] = dbe->book2S(cvpTIB.c_str(), cvpTIB.c_str(), 20, 0.3, 1.3, 250, 0, 2000);
536  Charge_Vs_PathlengthTOB[elepos] = dbe->book2S(cvpTOB.c_str(), cvpTOB.c_str(), 20, 0.3, 1.3, 250, 0, 2000);
537  Charge_Vs_PathlengthTIDP[elepos] = dbe->book2S(cvpTIDP.c_str(), cvpTIDP.c_str(), 20, 0.3, 1.3, 250, 0, 2000);
538  Charge_Vs_PathlengthTIDM[elepos] = dbe->book2S(cvpTIDM.c_str(), cvpTIDM.c_str(), 20, 0.3, 1.3, 250, 0, 2000);
539  Charge_Vs_PathlengthTECP1[elepos] = dbe->book2S(cvpTECP1.c_str(), cvpTECP1.c_str(), 20, 0.3, 1.3, 250, 0, 2000);
540  Charge_Vs_PathlengthTECP2[elepos] = dbe->book2S(cvpTECP2.c_str(), cvpTECP2.c_str(), 20, 0.3, 1.3, 250, 0, 2000);
541  Charge_Vs_PathlengthTECM1[elepos] = dbe->book2S(cvpTECM1.c_str(), cvpTECM1.c_str(), 20, 0.3, 1.3, 250, 0, 2000);
542  Charge_Vs_PathlengthTECM2[elepos] = dbe->book2S(cvpTECM2.c_str(), cvpTECM2.c_str(), 20, 0.3, 1.3, 250, 0, 2000);
543 
544  //Book Charge monitoring histograms
545  std::vector<std::pair<std::string, std::string>> hnames =
547  for (unsigned int i = 0; i < hnames.size(); i++) {
548  std::string htag = (hnames[i]).first + stag;
549  MonitorElement* monitor = dbe->book1DD(htag.c_str(), (hnames[i]).second.c_str(), 100, 0., 1000.);
550  int thick = APVGain::thickness((hnames[i]).first);
551  int id = APVGain::subdetectorId((hnames[i]).first);
552  int side = APVGain::subdetectorSide((hnames[i]).first);
553  int plane = APVGain::subdetectorPlane((hnames[i]).first);
554  Charge_1[elepos].push_back(APVGain::APVmon(thick, id, side, plane, monitor));
555  }
556 
558  for (unsigned int i = 0; i < hnames.size(); i++) {
559  std::string htag = (hnames[i]).first + stag;
560  MonitorElement* monitor = dbe->book1DD(htag.c_str(), (hnames[i]).second.c_str(), 100, 0., 1000.);
561  int thick = APVGain::thickness((hnames[i]).first);
562  int id = APVGain::subdetectorId((hnames[i]).first);
563  int side = APVGain::subdetectorSide((hnames[i]).first);
564  int plane = APVGain::subdetectorPlane((hnames[i]).first);
565  Charge_2[elepos].push_back(APVGain::APVmon(thick, id, side, plane, monitor));
566  }
567 
569  for (unsigned int i = 0; i < hnames.size(); i++) {
570  std::string htag = (hnames[i]).first + stag;
571  MonitorElement* monitor = dbe->book1DD(htag.c_str(), (hnames[i]).second.c_str(), 100, 0., 1000.);
572  int thick = APVGain::thickness((hnames[i]).first);
573  int id = APVGain::subdetectorId((hnames[i]).first);
574  int side = APVGain::subdetectorSide((hnames[i]).first);
575  int plane = APVGain::subdetectorPlane((hnames[i]).first);
576  Charge_3[elepos].push_back(APVGain::APVmon(thick, id, side, plane, monitor));
577  }
578 
580  for (unsigned int i = 0; i < hnames.size(); i++) {
581  std::string htag = (hnames[i]).first + stag;
582  MonitorElement* monitor = dbe->book1DD(htag.c_str(), (hnames[i]).second.c_str(), 100, 0., 1000.);
583  int thick = APVGain::thickness((hnames[i]).first);
584  int id = APVGain::subdetectorId((hnames[i]).first);
585  int side = APVGain::subdetectorSide((hnames[i]).first);
586  int plane = APVGain::subdetectorPlane((hnames[i]).first);
587  Charge_4[elepos].push_back(APVGain::APVmon(thick, id, side, plane, monitor));
588  }
589 
590  //Book validation histograms
591  if (m_harvestingMode) {
592  int MPVbin = 300;
593  float MPVmin = 0.;
594  float MPVmax = 600.;
595 
596  MPV_Vs_EtaTIB = dbe->book2DD("MPV_vs_EtaTIB", "MPV vs Eta TIB", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
597  MPV_Vs_EtaTID = dbe->book2DD("MPV_vs_EtaTID", "MPV vs Eta TID", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
598  MPV_Vs_EtaTOB = dbe->book2DD("MPV_vs_EtaTOB", "MPV vs Eta TOB", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
599  MPV_Vs_EtaTEC = dbe->book2DD("MPV_vs_EtaTEC", "MPV vs Eta TEC", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
600  MPV_Vs_EtaTECthin = dbe->book2DD("MPV_vs_EtaTEC1", "MPV vs Eta TEC-thin", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
601  MPV_Vs_EtaTECthick = dbe->book2DD("MPV_vs_EtaTEC2", "MPV vs Eta TEC-thick", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
602 
603  MPV_Vs_PhiTIB = dbe->book2DD("MPV_vs_PhiTIB", "MPV vs Phi TIB", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
604  MPV_Vs_PhiTID = dbe->book2DD("MPV_vs_PhiTID", "MPV vs Phi TID", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
605  MPV_Vs_PhiTOB = dbe->book2DD("MPV_vs_PhiTOB", "MPV vs Phi TOB", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
606  MPV_Vs_PhiTEC = dbe->book2DD("MPV_vs_PhiTEC", "MPV vs Phi TEC", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
607  MPV_Vs_PhiTECthin = dbe->book2DD("MPV_vs_PhiTEC1", "MPV vs Phi TEC-thin", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
608  MPV_Vs_PhiTECthick = dbe->book2DD("MPV_vs_PhiTEC2", "MPV vs Phi TEC-thick", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
609 
610  NoMPVfit = dbe->book2DD("NoMPVfit", "Modules with bad Landau Fit", 350, -350, 350, 240, 0, 120);
611  NoMPVmasked = dbe->book2DD("NoMPVmasked", "Masked Modules", 350, -350, 350, 240, 0, 120);
612 
613  Gains = dbe->book1DD("Gains", "Gains", 300, 0, 2);
614  MPVs = dbe->book1DD("MPVs", "MPVs", MPVbin, MPVmin, MPVmax);
615  MPVs320 = dbe->book1DD("MPV_320", "MPV 320 thickness", MPVbin, MPVmin, MPVmax);
616  MPVs500 = dbe->book1DD("MPV_500", "MPV 500 thickness", MPVbin, MPVmin, MPVmax);
617  MPVsTIB = dbe->book1DD("MPV_TIB", "MPV TIB", MPVbin, MPVmin, MPVmax);
618  MPVsTID = dbe->book1DD("MPV_TID", "MPV TID", MPVbin, MPVmin, MPVmax);
619  MPVsTIDP = dbe->book1DD("MPV_TIDP", "MPV TIDP", MPVbin, MPVmin, MPVmax);
620  MPVsTIDM = dbe->book1DD("MPV_TIDM", "MPV TIDM", MPVbin, MPVmin, MPVmax);
621  MPVsTOB = dbe->book1DD("MPV_TOB", "MPV TOB", MPVbin, MPVmin, MPVmax);
622  MPVsTEC = dbe->book1DD("MPV_TEC", "MPV TEC", MPVbin, MPVmin, MPVmax);
623  MPVsTECP = dbe->book1DD("MPV_TECP", "MPV TECP", MPVbin, MPVmin, MPVmax);
624  MPVsTECM = dbe->book1DD("MPV_TECM", "MPV TECM", MPVbin, MPVmin, MPVmax);
625  MPVsTECthin = dbe->book1DD("MPV_TEC1", "MPV TEC1", MPVbin, MPVmin, MPVmax);
626  MPVsTECthick = dbe->book1DD("MPV_TEC2", "MPV TEC2", MPVbin, MPVmin, MPVmax);
627  MPVsTECP1 = dbe->book1DD("MPV_TECP1", "MPV TECP1", MPVbin, MPVmin, MPVmax);
628  MPVsTECP2 = dbe->book1DD("MPV_TECP2", "MPV TECP2", MPVbin, MPVmin, MPVmax);
629  MPVsTECM1 = dbe->book1DD("MPV_TECM1", "MPV TECM1", MPVbin, MPVmin, MPVmax);
630  MPVsTECM2 = dbe->book1DD("MPV_TECM2", "MPV TECM2", MPVbin, MPVmin, MPVmax);
631 
632  MPVError = dbe->book1DD("MPVError", "MPV Error", 150, 0, 150);
633  MPVErrorVsMPV = dbe->book2DD("MPVErrorVsMPV", "MPV Error vs MPV", 300, 0, 600, 150, 0, 150);
634  MPVErrorVsEta = dbe->book2DD("MPVErrorVsEta", "MPV Error vs Eta", 50, -3.0, 3.0, 150, 0, 150);
635  MPVErrorVsPhi = dbe->book2DD("MPVErrorVsPhi", "MPV Error vs Phi", 50, -3.4, 3.4, 150, 0, 150);
636  MPVErrorVsN = dbe->book2DD("MPVErrorVsN", "MPV Error vs N", 500, 0, 1000, 150, 0, 150);
637 
638  DiffWRTPrevGainTIB = dbe->book1DD("DiffWRTPrevGainTIB", "Diff w.r.t. PrevGain TIB", 250, 0, 2);
639  DiffWRTPrevGainTID = dbe->book1DD("DiffWRTPrevGainTID", "Diff w.r.t. PrevGain TID", 250, 0, 2);
640  DiffWRTPrevGainTOB = dbe->book1DD("DiffWRTPrevGainTOB", "Diff w.r.t. PrevGain TOB", 250, 0, 2);
641  DiffWRTPrevGainTEC = dbe->book1DD("DiffWRTPrevGainTEC", "Diff w.r.t. PrevGain TEC", 250, 0, 2);
642 
643  GainVsPrevGainTIB = dbe->book2DD("GainVsPrevGainTIB", "Gain vs PrevGain TIB", 100, 0, 2, 100, 0, 2);
644  GainVsPrevGainTID = dbe->book2DD("GainVsPrevGainTID", "Gain vs PrevGain TID", 100, 0, 2, 100, 0, 2);
645  GainVsPrevGainTOB = dbe->book2DD("GainVsPrevGainTOB", "Gain vs PrevGain TOB", 100, 0, 2, 100, 0, 2);
646  GainVsPrevGainTEC = dbe->book2DD("GainVsPrevGainTEC", "Gain vs PrevGain TEC", 100, 0, 2, 100, 0, 2);
647 
648  std::vector<std::pair<std::string, std::string>> hnames =
650  for (unsigned int i = 0; i < hnames.size(); i++) {
651  MonitorElement* monitor = dbe->book1DD((hnames[i]).first.c_str(), (hnames[i]).second.c_str(), 100, 0., 1000.);
652  int thick = APVGain::thickness((hnames[i]).first);
653  int id = APVGain::subdetectorId((hnames[i]).first);
654  int side = APVGain::subdetectorSide((hnames[i]).first);
655  int plane = APVGain::subdetectorPlane((hnames[i]).first);
656  newCharge.push_back(APVGain::APVmon(thick, id, side, plane, monitor));
657  }
658  }
659 }
std::vector< MonitorElement * > Charge_Vs_Index
std::vector< APVGain::APVmon > newCharge
MonitorElement * book2S(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:263
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
int subdetectorPlane(uint32_t, const TrackerTopology *)
int statCollectionFromMode(const char *tag) const
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
U second(std::pair< T, U > const &p)
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:155
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
Log< level::Info, false > LogInfo
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
std::array< std::vector< APVGain::APVmon >, 7 > Charge_4
int subdetectorSide(uint32_t, const TrackerTopology *)
double b
Definition: hdecay.h:120
int thickness(uint32_t)
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:347
double a
Definition: hdecay.h:121
std::vector< std::string > VChargeHisto
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
std::array< std::vector< APVGain::APVmon >, 7 > Charge_3
std::vector< std::pair< std::string, std::string > > monHnames(std::vector< std::string >, bool, const char *tag)
std::array< std::vector< APVGain::APVmon >, 7 > Charge_1
std::array< std::vector< APVGain::APVmon >, 7 > Charge_2
int subdetectorId(uint32_t)

◆ connect()

template<typename T >
edm::Handle<T> SiStripGainFromCalibTree::connect ( const T *&  ptr,
edm::EDGetTokenT< T token,
const edm::Event evt 
)
inlineprivate

Definition at line 121 of file SiStripGainFromCalibTree.cc.

References edm::Event::getByToken(), patZpeak::handle, and unpackBuffers-CaloStage2::token.

Referenced by algoAnalyze(), and o2o_db_cfgmap.DbManagerDAQ::update_hashmap().

121  {
123  evt.getByToken(token, handle);
124  ptr = handle.product();
125  return handle; //return handle to keep alive pointer (safety first)
126  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:526

◆ getNewObject()

std::unique_ptr< SiStripApvGain > SiStripGainFromCalibTree::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripApvGain >.

Definition at line 1760 of file SiStripGainFromCalibTree.cc.

References a, sistrip::APV, APVsCollOrdered, m_harvestingMode, getGTfromDQMFile::obj, produceTagFilter(), FastTimerService_cff::range, and ConditionDBWriter< SiStripApvGain >::setDoStore().

1760  {
1761  auto obj = std::make_unique<SiStripApvGain>();
1762  if (!m_harvestingMode)
1763  return obj;
1764 
1765  if (!produceTagFilter()) {
1766  edm::LogWarning("SiStripGainFromCalibTree")
1767  << "getNewObject -> will not produce a paylaod because produceTagFilter returned false " << endl;
1768  setDoStore(false);
1769  return obj;
1770  }
1771 
1772  std::vector<float>* theSiStripVector = nullptr;
1773  unsigned int PreviousDetId = 0;
1774  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
1776  if (APV == nullptr) {
1777  printf("Bug\n");
1778  continue;
1779  }
1780  if (APV->SubDet <= 2)
1781  continue;
1782  if (APV->DetId != PreviousDetId) {
1783  if (theSiStripVector != nullptr) {
1784  SiStripApvGain::Range range(theSiStripVector->begin(), theSiStripVector->end());
1785  if (!obj->put(PreviousDetId, range))
1786  printf("Bug to put detId = %i\n", PreviousDetId);
1787  }
1788  theSiStripVector = new std::vector<float>;
1789  PreviousDetId = APV->DetId;
1790  }
1791  if (theSiStripVector != nullptr) {
1792  theSiStripVector->push_back(APV->Gain);
1793  }
1794  }
1795  if (theSiStripVector != nullptr) {
1796  SiStripApvGain::Range range(theSiStripVector->begin(), theSiStripVector->end());
1797  if (!obj->put(PreviousDetId, range))
1798  printf("Bug to put detId = %i\n", PreviousDetId);
1799  }
1800 
1801  if (theSiStripVector != nullptr)
1802  delete theSiStripVector;
1803 
1804  return obj;
1805 }
std::vector< stAPVGain * > APVsCollOrdered
std::pair< ContainerIterator, ContainerIterator > Range
void setDoStore(const bool doStore)
When set to false the payload will not be written to the db.
double a
Definition: hdecay.h:121
Log< level::Warning, false > LogWarning

◆ getPeakOfLandau()

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

Definition at line 1085 of file SiStripGainFromCalibTree.cc.

References MinNrEntries.

Referenced by algoComputeMPVandGain().

1085  {
1086  FitResults[0] = -0.5; //MPV
1087  FitResults[1] = 0; //MPV error
1088  FitResults[2] = -0.5; //Width
1089  FitResults[3] = 0; //Width error
1090  FitResults[4] = -0.5; //Fit Chi2/NDF
1091  FitResults[5] = 0; //Normalization
1092 
1093  if (InputHisto->GetEntries() < MinNrEntries)
1094  return;
1095 
1096  // perform fit with standard landau
1097  TF1* MyLandau = new TF1("MyLandau", "landau", LowRange, HighRange);
1098  MyLandau->SetParameter(1, 300);
1099  InputHisto->Fit(MyLandau, "0QR WW");
1100 
1101  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
1102  FitResults[0] = MyLandau->GetParameter(1); //MPV
1103  FitResults[1] = MyLandau->GetParError(1); //MPV error
1104  FitResults[2] = MyLandau->GetParameter(2); //Width
1105  FitResults[3] = MyLandau->GetParError(2); //Width error
1106  FitResults[4] = MyLandau->GetChisquare() / MyLandau->GetNDF(); //Fit Chi2/NDF
1107  FitResults[5] = MyLandau->GetParameter(0);
1108 
1109  delete MyLandau;
1110 }

◆ isBFieldConsistentWithMode()

bool SiStripGainFromCalibTree::isBFieldConsistentWithMode ( const edm::EventSetup iSetup) const
private

Definition at line 797 of file SiStripGainFromCalibTree.cc.

References edm::EventSetup::getData(), m_calibrationMode, MagFieldCurrentTh, submitPVValidationJobs::runInfo, and runInfoToken_.

Referenced by algoBeginJob(), and algoBeginRun().

797  {
798  const auto& runInfo = iSetup.getData(runInfoToken_);
799 
800  double average_current = runInfo.m_avg_current;
801  bool isOn = (average_current > MagFieldCurrentTh);
802  bool is0T = (m_calibrationMode.substr(m_calibrationMode.length() - 2) == "0T");
803 
804  return ((isOn && !is0T) || (!isOn && is0T));
805 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_

◆ IsGoodLandauFit()

bool SiStripGainFromCalibTree::IsGoodLandauFit ( double *  FitResults)
private

Definition at line 1112 of file SiStripGainFromCalibTree.cc.

Referenced by algoComputeMPVandGain().

1112  {
1113  if (FitResults[0] <= 0)
1114  return false;
1115  // if(FitResults[1] > MaxMPVError )return false;
1116  // if(FitResults[4] > MaxChi2OverNDF)return false;
1117  return true;
1118 }

◆ MakeCalibrationMap()

void SiStripGainFromCalibTree::MakeCalibrationMap ( )
private

Definition at line 1817 of file SiStripGainFromCalibTree.cc.

References sistrip::APV, APVsColl, m_calibrationPath, RandomServiceHelper::t1, and useCalibration.

Referenced by algoBeginJob().

1817  {
1818  if (!useCalibration)
1819  return;
1820 
1821  TChain* t1 = new TChain("SiStripCalib/APVGain");
1822  t1->Add(m_calibrationPath.c_str());
1823 
1824  unsigned int tree_DetId;
1825  unsigned char tree_APVId;
1826  double tree_Gain;
1827 
1828  t1->SetBranchAddress("DetId", &tree_DetId);
1829  t1->SetBranchAddress("APVId", &tree_APVId);
1830  t1->SetBranchAddress("Gain", &tree_Gain);
1831 
1832  for (unsigned int ientry = 0; ientry < t1->GetEntries(); ientry++) {
1833  t1->GetEntry(ientry);
1834  stAPVGain* APV = APVsColl[(tree_DetId << 4) | (unsigned int)tree_APVId];
1835  APV->CalibGain = tree_Gain;
1836  }
1837 
1838  delete t1;
1839 }
std::unordered_map< unsigned int, stAPVGain * > APVsColl

◆ merge()

void SiStripGainFromCalibTree::merge ( TH2 *  A,
TH2 *  B 
)
private

Definition at line 347 of file SiStripGainFromCalibTree.cc.

References A, B, and x.

Referenced by algoEndRun().

347  {
348  if (A->GetNbinsX() == B->GetNbinsX()) {
349  A->Add(B);
350  } else {
351  for (int x = 0; x <= B->GetNbinsX() + 1; x++) {
352  for (int y = 0; y <= B->GetNbinsY() + 1; y++) {
353  A->SetBinContent(x, y, A->GetBinContent(x, y) + B->GetBinContent(x, y));
354  }
355  }
356  }
357 }
Definition: APVGainStruct.h:7
Definition: APVGainStruct.h:7

◆ processEvent()

void SiStripGainFromCalibTree::processEvent ( )
private

Definition at line 1120 of file SiStripGainFromCalibTree.cc.

References AllowSaturation, sistrip::APV, APVsColl, PixelTestBeamValidation_cfi::Charge, Charge_1, Charge_2, Charge_3, Charge_4, Charge_Vs_Index, Charge_Vs_PathlengthTECM1, Charge_Vs_PathlengthTECM2, Charge_Vs_PathlengthTECP1, Charge_Vs_PathlengthTECP2, Charge_Vs_PathlengthTIB, Charge_Vs_PathlengthTIDM, Charge_Vs_PathlengthTIDP, Charge_Vs_PathlengthTOB, ERun, eventnumber, farfromedge, APVGain::FetchMonitor(), HcalObjRepresent::Fill(), FirstSetOfConstants, firststrip, mps_fire::i, createfilelist::int, visualization-live-secondInstance_cfg::m, m_calibrationMode, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackingIteration, MaxTrackMomentum, MinTrackEta, MinTrackHits, MinTrackMomentum, NClusterPixel, NClusterStrip, NEvent, nstrips, NTrack, OldGainRemoving, overlapping, path, rawid, runnumber, alignCSCRings::s, saturation, SRun, statCollectionFromMode(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, trackalgo, trackchi2ndof, tracketa, trackhitsvalid, trackp, tTopo_, useCalibration, and Validation.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

1120  {
1121  edm::LogInfo("SiStripGainFromCalibTree") << "Processing run " << runnumber << " and event " << eventnumber << " for "
1122  << m_calibrationMode << " calibration." << std::endl;
1123 
1124  if (runnumber < SRun)
1125  SRun = runnumber;
1126  if (runnumber > ERun)
1127  ERun = runnumber;
1128 
1129  NEvent++;
1130  NTrack += (*trackp).size();
1131 
1132  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
1133 
1134  unsigned int FirstAmplitude = 0;
1135  for (unsigned int i = 0; i < (*chargeoverpath).size(); i++) {
1136  FirstAmplitude += (*nstrips)[i];
1137  int TI = (*trackindex)[i];
1138 
1139  //printf("%i - %i - %i %i %i\n", (int)(*rawid)[i], (int)(*firststrip)[i]/128, (int)(*farfromedge)[i], (int)(*overlapping)[i], (int)(*saturation )[i] );
1140  if ((*tracketa)[TI] < MinTrackEta)
1141  continue;
1142  if ((*tracketa)[TI] > MaxTrackEta)
1143  continue;
1144  if ((*trackp)[TI] < MinTrackMomentum)
1145  continue;
1146  if ((*trackp)[TI] > MaxTrackMomentum)
1147  continue;
1148  if ((*trackhitsvalid)[TI] < MinTrackHits)
1149  continue;
1150  if ((*trackchi2ndof)[TI] > MaxTrackChiOverNdf)
1151  continue;
1152  if ((*trackalgo)[TI] > MaxTrackingIteration)
1153  continue;
1154 
1155  stAPVGain* APV =
1156  APVsColl[((*rawid)[i] << 4) |
1157  ((*firststrip)[i] /
1158  128)]; //works for both strip and pixel thanks to firstStrip encoding for pixel in the calibTree
1159 
1160  if (APV->SubDet > 2 && (*farfromedge)[i] == false)
1161  continue;
1162  if (APV->SubDet > 2 && (*overlapping)[i] == true)
1163  continue;
1164  if (APV->SubDet > 2 && (*saturation)[i] && !AllowSaturation)
1165  continue;
1166  if (APV->SubDet > 2 && (*nstrips)[i] > MaxNrStrips)
1167  continue;
1168 
1169  //printf("detId=%7i run=%7i event=%9i charge=%5i cs=%3i\n",(*rawid)[i],runnumber,eventnumber,(*charge)[i],(*nstrips)[i]);
1170 
1171  //double trans = atan2((*localdiry)[i],(*localdirx)[i])*(180/3.14159265);
1172  //double alpha = acos ((*localdirx)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265);
1173  //double beta = acos ((*localdiry)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265);
1174 
1175  //printf("NStrip = %i : Charge = %i --> Path = %f --> ChargeOverPath=%f\n",(*nstrips)[i],(*charge)[i],(*path)[i],(*chargeoverpath)[i]);
1176  //printf("Amplitudes: ");
1177  //for(unsigned int a=0;a<(*nstrips)[i];a++){printf("%i ",(*amplitude)[FirstAmplitude+a]);}
1178  //printf("\n");
1179 
1180  if (APV->SubDet > 2) {
1181  NClusterStrip++;
1182  } else {
1183  NClusterPixel++;
1184  }
1185 
1186  int Charge = 0;
1187  if (APV->SubDet > 2 && (useCalibration || !FirstSetOfConstants)) {
1188  bool Saturation = false;
1189  for (unsigned int s = 0; s < (*nstrips)[i]; s++) {
1190  int StripCharge = (*amplitude)[FirstAmplitude - (*nstrips)[i] + s];
1192  StripCharge = (int)(StripCharge * (APV->PreviousGain / APV->CalibGain));
1193  } else if (useCalibration) {
1194  StripCharge = (int)(StripCharge / APV->CalibGain);
1195  } else if (!FirstSetOfConstants) {
1196  StripCharge = (int)(StripCharge * APV->PreviousGain);
1197  }
1198  if (StripCharge > 1024) {
1199  StripCharge = 255;
1200  Saturation = true;
1201  } else if (StripCharge > 254) {
1202  StripCharge = 254;
1203  Saturation = true;
1204  }
1205  Charge += StripCharge;
1206  }
1207  if (Saturation && !AllowSaturation)
1208  continue;
1209  } else if (APV->SubDet > 2) {
1210  Charge = (*charge)[i];
1211  } else {
1212  Charge = (*charge)[i] / 265.0; //expected scale factor between pixel and strip charge
1213  }
1214 
1215  //printf("ChargeDifference = %i Vs %i with Gain = %f\n",(*charge)[i],Charge,APV->CalibGain);
1216 
1217  double ClusterChargeOverPath = ((double)Charge) / (*path)[i];
1218  if (APV->SubDet > 2) {
1219  if (Validation) {
1220  ClusterChargeOverPath /= (*gainused)[i];
1221  }
1222  if (OldGainRemoving) {
1223  ClusterChargeOverPath *= (*gainused)[i];
1224  }
1225  }
1226 
1227  // keep pixel cluster charge processing until here
1228  if (APV->SubDet <= 2)
1229  continue;
1230 
1231  (Charge_Vs_Index[elepos])->Fill(APV->Index, ClusterChargeOverPath);
1232 
1233  // Compute the charge for monitoring and fill the relative histograms
1234  int mCharge1 = 0;
1235  int mCharge2 = 0;
1236  int mCharge3 = 0;
1237  int mCharge4 = 0;
1238  if (APV->SubDet > 2) {
1239  for (unsigned int s = 0; s < (*nstrips)[i]; s++) {
1240  int StripCharge = (*amplitude)[FirstAmplitude - (*nstrips)[i] + s];
1241  if (StripCharge > 1024)
1242  StripCharge = 255;
1243  else if (StripCharge > 254)
1244  StripCharge = 254;
1245  mCharge1 += StripCharge;
1246  mCharge2 += StripCharge;
1247  mCharge3 += StripCharge;
1248  mCharge4 += StripCharge;
1249  }
1250  // Revome gains for monitoring
1251  mCharge2 *= (*gainused)[i]; // remove G2
1252  mCharge3 *= (*gainusedTick)[i]; // remove G1
1253  mCharge4 *= ((*gainused)[i] * (*gainusedTick)[i]); // remove G1 and G2
1254  }
1255  std::vector<APVGain::APVmon>& v1 = Charge_1[elepos];
1256  std::vector<MonitorElement*> cmon1 = APVGain::FetchMonitor(v1, (*rawid)[i], tTopo_);
1257  for (unsigned int m = 0; m < cmon1.size(); m++)
1258  cmon1[m]->Fill(((double)mCharge1) / (*path)[i]);
1259 
1260  std::vector<APVGain::APVmon>& v2 = Charge_2[elepos];
1261  std::vector<MonitorElement*> cmon2 = APVGain::FetchMonitor(v2, (*rawid)[i], tTopo_);
1262  for (unsigned int m = 0; m < cmon2.size(); m++)
1263  cmon2[m]->Fill(((double)mCharge2) / (*path)[i]);
1264 
1265  std::vector<APVGain::APVmon>& v3 = Charge_3[elepos];
1266  std::vector<MonitorElement*> cmon3 = APVGain::FetchMonitor(v3, (*rawid)[i], tTopo_);
1267  for (unsigned int m = 0; m < cmon3.size(); m++)
1268  cmon3[m]->Fill(((double)mCharge3) / (*path)[i]);
1269 
1270  std::vector<APVGain::APVmon>& v4 = Charge_4[elepos];
1271  std::vector<MonitorElement*> cmon4 = APVGain::FetchMonitor(v4, (*rawid)[i], tTopo_);
1272  for (unsigned int m = 0; m < cmon4.size(); m++)
1273  cmon4[m]->Fill(((double)mCharge4) / (*path)[i]);
1274 
1275  // Fill Charge Vs pathLenght histograms
1276  if (APV->SubDet == StripSubdetector::TIB) {
1277  (Charge_Vs_PathlengthTIB[elepos])->Fill((*path)[i], Charge); // TIB
1278 
1279  } else if (APV->SubDet == StripSubdetector::TOB) {
1280  (Charge_Vs_PathlengthTOB[elepos])->Fill((*path)[i], Charge); // TOB
1281 
1282  } else if (APV->SubDet == StripSubdetector::TID) {
1283  if (APV->Eta < 0) {
1284  (Charge_Vs_PathlengthTIDM[elepos])->Fill((*path)[i], Charge);
1285  } // TID minus
1286  else if (APV->Eta > 0) {
1287  (Charge_Vs_PathlengthTIDP[elepos])->Fill((*path)[i], Charge);
1288  } // TID plus
1289 
1290  } else if (APV->SubDet == StripSubdetector::TEC) {
1291  if (APV->Eta < 0) {
1292  if (APV->Thickness < 0.04) {
1293  (Charge_Vs_PathlengthTECM1[elepos])->Fill((*path)[i], Charge);
1294  } // TEC minus, type 1
1295  else if (APV->Thickness > 0.04) {
1296  (Charge_Vs_PathlengthTECM2[elepos])->Fill((*path)[i], Charge);
1297  } // TEC minus, type 2
1298  } else if (APV->Eta > 0) {
1299  if (APV->Thickness < 0.04) {
1300  (Charge_Vs_PathlengthTECP1[elepos])->Fill((*path)[i], Charge);
1301  } // TEC plus, type 1
1302  else if (APV->Thickness > 0.04) {
1303  (Charge_Vs_PathlengthTECP2[elepos])->Fill((*path)[i], Charge);
1304  } // TEC plus, type 2
1305  }
1306  }
1307 
1308  } // END OF ON-CLUSTER LOOP
1309 } //END OF processEvent()
std::vector< MonitorElement * > Charge_Vs_Index
static constexpr auto TEC
const std::vector< float > * trackp
const std::vector< double > * trackchi2ndof
const std::vector< unsigned int > * rawid
const TrackerTopology * tTopo_
const std::vector< int > * trackalgo
int statCollectionFromMode(const char *tag) const
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
const std::vector< unsigned int > * trackhitsvalid
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::unordered_map< unsigned int, stAPVGain * > APVsColl
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
static constexpr auto TOB
const std::vector< unsigned short > * firststrip
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
Log< level::Info, false > LogInfo
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
static constexpr auto TIB
const std::vector< bool > * overlapping
const std::vector< bool > * saturation
std::array< std::vector< APVGain::APVmon >, 7 > Charge_4
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=nullptr)
const std::vector< bool > * farfromedge
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
std::array< std::vector< APVGain::APVmon >, 7 > Charge_3
std::array< std::vector< APVGain::APVmon >, 7 > Charge_1
const std::vector< double > * path
static constexpr auto TID
const std::vector< unsigned short > * nstrips
std::array< std::vector< APVGain::APVmon >, 7 > Charge_2
const std::vector< double > * tracketa

◆ produceTagFilter()

bool SiStripGainFromCalibTree::produceTagFilter ( )
private

Definition at line 1733 of file SiStripGainFromCalibTree.cc.

References AlgoMode, BAD, Charge_Vs_Index, GOOD, Harvest, funct::integral(), m_calibrationMode, NStripAPVs, statCollectionFromMode(), tagCondition_GoodFrac, and tagCondition_NClusters.

Referenced by getNewObject().

1733  {
1734  // The goal of this function is to check wether or not there is enough statistics
1735  // to produce a meaningful tag for the DB
1736  int elepos = (AlgoMode == "PCL") ? Harvest : statCollectionFromMode(m_calibrationMode.c_str());
1737  if (Charge_Vs_Index[elepos] == nullptr) {
1738  edm::LogError("SiStripGainFromCalibTree")
1739  << "produceTagFilter -> Return false: could not retrieve the " << m_calibrationMode.c_str() << " statistics.\n"
1740  << "Please check if input contains " << m_calibrationMode.c_str() << " data." << std::endl;
1741  return false;
1742  }
1743 
1744  float integral = (Charge_Vs_Index[elepos])->getTH2S()->Integral();
1745  if ((Charge_Vs_Index[elepos])->getTH2S()->Integral(0, NStripAPVs + 1, 0, 99999) < tagCondition_NClusters) {
1746  edm::LogWarning("SiStripGainFromCalibTree")
1747  << "calibrationMode -> " << m_calibrationMode << "\n"
1748  << "produceTagFilter -> Return false: Statistics is too low : " << integral << endl;
1749  return false;
1750  }
1751  if ((1.0 * GOOD) / (GOOD + BAD) < tagCondition_GoodFrac) {
1752  edm::LogWarning("SiStripGainFromCalibTree")
1753  << "calibrationMode -> " << m_calibrationMode << "\n"
1754  << "produceTagFilter -> Return false: ratio of GOOD/TOTAL is too low: " << (1.0 * GOOD) / (GOOD + BAD) << endl;
1755  return false;
1756  }
1757  return true;
1758 }
std::vector< MonitorElement * > Charge_Vs_Index
int statCollectionFromMode(const char *tag) const
Log< level::Error, false > LogError
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:70
Log< level::Warning, false > LogWarning

◆ qualityMonitor()

void SiStripGainFromCalibTree::qualityMonitor ( )
private

Definition at line 1472 of file SiStripGainFromCalibTree.cc.

References a, AlgoMode, sistrip::APV, APVsCollOrdered, newFWLiteAna::bin, Charge_Vs_Index, DiffWRTPrevGainTEC, DiffWRTPrevGainTIB, DiffWRTPrevGainTID, DiffWRTPrevGainTOB, MillePedeFileConverter_cfg::e, APVGain::FetchMonitor(), dqm::impl::MonitorElement::Fill(), IntegrityClient_cfi::Gain, Gains, GainVsPrevGainTEC, GainVsPrevGainTIB, GainVsPrevGainTID, GainVsPrevGainTOB, h, Harvest, m_calibrationMode, MPV_Vs_EtaTEC, MPV_Vs_EtaTECthick, MPV_Vs_EtaTECthin, MPV_Vs_EtaTIB, MPV_Vs_EtaTID, MPV_Vs_EtaTOB, MPV_Vs_PhiTEC, MPV_Vs_PhiTECthick, MPV_Vs_PhiTECthin, MPV_Vs_PhiTIB, MPV_Vs_PhiTID, MPV_Vs_PhiTOB, MPVError, MPVErrorVsEta, MPVErrorVsMPV, MPVErrorVsN, MPVErrorVsPhi, MPVs, MPVs320, MPVs500, MPVsTEC, MPVsTECM, MPVsTECM1, MPVsTECM2, MPVsTECP, MPVsTECP1, MPVsTECP2, MPVsTECthick, MPVsTECthin, MPVsTIB, MPVsTID, MPVsTIDM, MPVsTIDP, MPVsTOB, newCharge, NoMPVfit, NoMPVmasked, VtxSmearedParameters_cfi::Phi, dttmaxenums::R, statCollectionFromMode(), ntupleEnum::SubDet, tTopo_, and z.

Referenced by algoEndJob().

1472  {
1473  int elepos = (AlgoMode == "PCL") ? Harvest : statCollectionFromMode(m_calibrationMode.c_str());
1474 
1475  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
1477  if (APV == nullptr)
1478  continue;
1479 
1480  unsigned int Index = APV->Index;
1481  unsigned int SubDet = APV->SubDet;
1482  unsigned int DetId = APV->DetId;
1483  float z = APV->z;
1484  float Eta = APV->Eta;
1485  float R = APV->R;
1486  float Phi = APV->Phi;
1487  float Thickness = APV->Thickness;
1488  double FitMPV = APV->FitMPV;
1489  double FitMPVErr = APV->FitMPVErr;
1490  double Gain = APV->Gain;
1491  double NEntries = APV->NEntries;
1492  double PreviousGain = APV->PreviousGain;
1493 
1494  if (SubDet < 3)
1495  continue; // avoid to loop over Pixel det id
1496 
1497  if (Gain != 1.) {
1498  std::vector<MonitorElement*> charge_histos = APVGain::FetchMonitor(newCharge, DetId, tTopo_);
1499  TH2S* chvsidx = (Charge_Vs_Index[elepos])->getTH2S();
1500  int bin = chvsidx->GetXaxis()->FindBin(Index);
1501  TH1D* Proj = chvsidx->ProjectionY("proj", bin, bin);
1502  for (int binId = 0; binId < Proj->GetXaxis()->GetNbins(); binId++) {
1503  double new_charge = Proj->GetXaxis()->GetBinCenter(binId) / Gain;
1504  if (Proj->GetBinContent(binId) != 0.) {
1505  for (unsigned int h = 0; h < charge_histos.size(); h++) {
1506  TH1D* chisto = (charge_histos[h])->getTH1D();
1507  for (int e = 0; e < Proj->GetBinContent(binId); e++)
1508  chisto->Fill(new_charge);
1509  }
1510  }
1511  }
1512  }
1513 
1514  if (FitMPV <= 0.) { // No fit of MPV
1515  if (APV->isMasked)
1516  NoMPVmasked->Fill(z, R);
1517  else
1518  NoMPVfit->Fill(z, R);
1519 
1520  } else { // Fit of MPV
1521  if (FitMPV > 0.)
1522  Gains->Fill(Gain);
1523 
1524  MPVs->Fill(FitMPV);
1525  if (Thickness < 0.04)
1526  MPVs320->Fill(FitMPV);
1527  if (Thickness > 0.04)
1528  MPVs500->Fill(FitMPV);
1529 
1530  MPVError->Fill(FitMPVErr);
1531  MPVErrorVsMPV->Fill(FitMPV, FitMPVErr);
1532  MPVErrorVsEta->Fill(Eta, FitMPVErr);
1533  MPVErrorVsPhi->Fill(Phi, FitMPVErr);
1534  MPVErrorVsN->Fill(NEntries, FitMPVErr);
1535 
1536  if (SubDet == 3) {
1537  MPV_Vs_EtaTIB->Fill(Eta, FitMPV);
1538  MPV_Vs_PhiTIB->Fill(Phi, FitMPV);
1539  MPVsTIB->Fill(FitMPV);
1540 
1541  } else if (SubDet == 4) {
1542  MPV_Vs_EtaTID->Fill(Eta, FitMPV);
1543  MPV_Vs_PhiTID->Fill(Phi, FitMPV);
1544  MPVsTID->Fill(FitMPV);
1545  if (Eta < 0.)
1546  MPVsTIDM->Fill(FitMPV);
1547  if (Eta > 0.)
1548  MPVsTIDP->Fill(FitMPV);
1549 
1550  } else if (SubDet == 5) {
1551  MPV_Vs_EtaTOB->Fill(Eta, FitMPV);
1552  MPV_Vs_PhiTOB->Fill(Phi, FitMPV);
1553  MPVsTOB->Fill(FitMPV);
1554 
1555  } else if (SubDet == 6) {
1556  MPV_Vs_EtaTEC->Fill(Eta, FitMPV);
1557  MPV_Vs_PhiTEC->Fill(Phi, FitMPV);
1558  MPVsTEC->Fill(FitMPV);
1559  if (Eta < 0.)
1560  MPVsTECM->Fill(FitMPV);
1561  if (Eta > 0.)
1562  MPVsTECP->Fill(FitMPV);
1563  if (Thickness < 0.04) {
1564  MPV_Vs_EtaTECthin->Fill(Eta, FitMPV);
1565  MPV_Vs_PhiTECthin->Fill(Phi, FitMPV);
1566  MPVsTECthin->Fill(FitMPV);
1567  if (Eta > 0.)
1568  MPVsTECP1->Fill(FitMPV);
1569  if (Eta < 0.)
1570  MPVsTECM1->Fill(FitMPV);
1571  }
1572  if (Thickness > 0.04) {
1573  MPV_Vs_EtaTECthick->Fill(Eta, FitMPV);
1574  MPV_Vs_PhiTECthick->Fill(Phi, FitMPV);
1575  MPVsTECthick->Fill(FitMPV);
1576  if (Eta > 0.)
1577  MPVsTECP2->Fill(FitMPV);
1578  if (Eta < 0.)
1579  MPVsTECM2->Fill(FitMPV);
1580  }
1581  }
1582  }
1583 
1584  if (SubDet == 3 && PreviousGain != 0.)
1585  DiffWRTPrevGainTIB->Fill(Gain / PreviousGain);
1586  else if (SubDet == 4 && PreviousGain != 0.)
1587  DiffWRTPrevGainTID->Fill(Gain / PreviousGain);
1588  else if (SubDet == 5 && PreviousGain != 0.)
1589  DiffWRTPrevGainTOB->Fill(Gain / PreviousGain);
1590  else if (SubDet == 6 && PreviousGain != 0.)
1591  DiffWRTPrevGainTEC->Fill(Gain / PreviousGain);
1592 
1593  if (SubDet == 3)
1594  GainVsPrevGainTIB->Fill(PreviousGain, Gain);
1595  else if (SubDet == 4)
1596  GainVsPrevGainTID->Fill(PreviousGain, Gain);
1597  else if (SubDet == 5)
1598  GainVsPrevGainTOB->Fill(PreviousGain, Gain);
1599  else if (SubDet == 6)
1600  GainVsPrevGainTEC->Fill(PreviousGain, Gain);
1601  }
1602 }
std::vector< MonitorElement * > Charge_Vs_Index
std::vector< APVGain::APVmon > newCharge
const TrackerTopology * tTopo_
int statCollectionFromMode(const char *tag) const
void Fill(long long x)
std::vector< stAPVGain * > APVsCollOrdered
Definition: DetId.h:17
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=nullptr)
double a
Definition: hdecay.h:121
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ statCollectionFromMode()

int SiStripGainFromCalibTree::statCollectionFromMode ( const char *  tag) const
inlineprivate

Definition at line 333 of file SiStripGainFromCalibTree.cc.

References relativeConstraints::empty, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, None, AlCaHLTBitMon_QueryRunRegistry::string, and makeGlobalPositionRcd_cfg::tag.

Referenced by algoBeginJob(), algoComputeMPVandGain(), algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), produceTagFilter(), qualityMonitor(), and storeOnTree().

333  {
334  std::vector<string>::const_iterator it = dqm_tag_.begin();
335  while (it != dqm_tag_.end()) {
336  if (*it == std::string(tag))
337  return it - dqm_tag_.begin();
338  it++;
339  }
340 
341  if (std::string(tag).empty())
342  return 0; // return StdBunch calibration mode for backward compatibility
343 
344  return None;
345 }

◆ storeOnTree()

void SiStripGainFromCalibTree::storeOnTree ( TFileService tfs)
private

Definition at line 1604 of file SiStripGainFromCalibTree.cc.

References a, sistrip::APV, APVsCollOrdered, BAD, Charge_Vs_Index, Gains, GOOD, m_calibrationMode, TFileService::make(), MASKED, NClusterStrip, NEvent, NStripAPVs, NTrack, OutputGains, statCollectionFromMode(), mps_setup::stdout, and tfs.

Referenced by algoEndJob().

1604  {
1605  unsigned int tree_Index;
1606  unsigned int tree_Bin;
1607  unsigned int tree_DetId;
1608  unsigned char tree_APVId;
1609  unsigned char tree_SubDet;
1610  float tree_x;
1611  float tree_y;
1612  float tree_z;
1613  float tree_Eta;
1614  float tree_R;
1615  float tree_Phi;
1616  float tree_Thickness;
1617  float tree_FitMPV;
1618  float tree_FitMPVErr;
1619  float tree_FitWidth;
1620  float tree_FitWidthErr;
1621  float tree_FitChi2NDF;
1622  float tree_FitNorm;
1623  double tree_Gain;
1624  double tree_PrevGain;
1625  double tree_PrevGainTick;
1626  double tree_NEntries;
1627  bool tree_isMasked;
1628 
1629  TTree* MyTree;
1630  MyTree = tfs->make<TTree>("APVGain", "APVGain");
1631  MyTree->Branch("Index", &tree_Index, "Index/i");
1632  MyTree->Branch("Bin", &tree_Bin, "Bin/i");
1633  MyTree->Branch("DetId", &tree_DetId, "DetId/i");
1634  MyTree->Branch("APVId", &tree_APVId, "APVId/b");
1635  MyTree->Branch("SubDet", &tree_SubDet, "SubDet/b");
1636  MyTree->Branch("x", &tree_x, "x/F");
1637  MyTree->Branch("y", &tree_y, "y/F");
1638  MyTree->Branch("z", &tree_z, "z/F");
1639  MyTree->Branch("Eta", &tree_Eta, "Eta/F");
1640  MyTree->Branch("R", &tree_R, "R/F");
1641  MyTree->Branch("Phi", &tree_Phi, "Phi/F");
1642  MyTree->Branch("Thickness", &tree_Thickness, "Thickness/F");
1643  MyTree->Branch("FitMPV", &tree_FitMPV, "FitMPV/F");
1644  MyTree->Branch("FitMPVErr", &tree_FitMPVErr, "FitMPVErr/F");
1645  MyTree->Branch("FitWidth", &tree_FitWidth, "FitWidth/F");
1646  MyTree->Branch("FitWidthErr", &tree_FitWidthErr, "FitWidthErr/F");
1647  MyTree->Branch("FitChi2NDF", &tree_FitChi2NDF, "FitChi2NDF/F");
1648  MyTree->Branch("FitNorm", &tree_FitNorm, "FitNorm/F");
1649  MyTree->Branch("Gain", &tree_Gain, "Gain/D");
1650  MyTree->Branch("PrevGain", &tree_PrevGain, "PrevGain/D");
1651  MyTree->Branch("PrevGainTick", &tree_PrevGainTick, "PrevGainTick/D");
1652  MyTree->Branch("NEntries", &tree_NEntries, "NEntries/D");
1653  MyTree->Branch("isMasked", &tree_isMasked, "isMasked/O");
1654 
1655  FILE* Gains = stdout;
1656  fprintf(Gains, "NEvents = %i\n", NEvent);
1657  fprintf(Gains, "NTracks = %i\n", NTrack);
1658  //fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel);
1659  fprintf(Gains, "NClustersStrip = %i\n", NClusterStrip);
1660  //fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast<unsigned long>(NPixelDets));
1661  fprintf(Gains, "Number of Strip APVs = %lu\n", static_cast<unsigned long>(NStripAPVs));
1662  fprintf(Gains,
1663  "GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",
1664  GOOD,
1665  BAD,
1666  (100.0 * GOOD) / (GOOD + BAD),
1667  MASKED);
1668 
1669  Gains = fopen(OutputGains.c_str(), "w");
1670  fprintf(Gains, "NEvents = %i\n", NEvent);
1671  fprintf(Gains, "NTracks = %i\n", NTrack);
1672  //fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel);
1673  fprintf(Gains, "NClustersStrip = %i\n", NClusterStrip);
1674  fprintf(Gains, "Number of Strip APVs = %lu\n", static_cast<unsigned long>(NStripAPVs));
1675  //fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast<unsigned long>(NPixelDets));
1676  fprintf(Gains,
1677  "GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",
1678  GOOD,
1679  BAD,
1680  (100.0 * GOOD) / (GOOD + BAD),
1681  MASKED);
1682 
1683  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
1684 
1685  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
1687  if (APV == nullptr)
1688  continue;
1689  // printf( "%i | %i | PreviousGain = %7.5f NewGain = %7.5f (#clusters=%8.0f)\n", APV->DetId,APV->APVId,APV->PreviousGain,APV->Gain, APV->NEntries);
1690  fprintf(Gains,
1691  "%i | %i | PreviousGain = %7.5f(tick) x %7.5f(particle) NewGain (particle) = %7.5f (#clusters=%8.0f)\n",
1692  APV->DetId,
1693  APV->APVId,
1694  APV->PreviousGainTick,
1695  APV->PreviousGain,
1696  APV->Gain,
1697  APV->NEntries);
1698 
1699  tree_Index = APV->Index;
1700  tree_Bin = (Charge_Vs_Index[elepos])->getTH2S()->GetXaxis()->FindBin(APV->Index);
1701  tree_DetId = APV->DetId;
1702  tree_APVId = APV->APVId;
1703  tree_SubDet = APV->SubDet;
1704  tree_x = APV->x;
1705  tree_y = APV->y;
1706  tree_z = APV->z;
1707  tree_Eta = APV->Eta;
1708  tree_R = APV->R;
1709  tree_Phi = APV->Phi;
1710  tree_Thickness = APV->Thickness;
1711  tree_FitMPV = APV->FitMPV;
1712  tree_FitMPVErr = APV->FitMPVErr;
1713  tree_FitWidth = APV->FitWidth;
1714  tree_FitWidthErr = APV->FitWidthErr;
1715  tree_FitChi2NDF = APV->FitChi2;
1716  tree_FitNorm = APV->FitNorm;
1717  tree_Gain = APV->Gain;
1718  tree_PrevGain = APV->PreviousGain;
1719  tree_PrevGainTick = APV->PreviousGainTick;
1720  tree_NEntries = APV->NEntries;
1721  tree_isMasked = APV->isMasked;
1722 
1723  if (tree_DetId == 402673324) {
1724  printf("%i | %i : %f --> %f (%f)\n", tree_DetId, tree_APVId, tree_PrevGain, tree_Gain, tree_NEntries);
1725  }
1726 
1727  MyTree->Fill();
1728  }
1729  if (Gains)
1730  fclose(Gains);
1731 }
std::vector< MonitorElement * > Charge_Vs_Index
int statCollectionFromMode(const char *tag) const
std::vector< stAPVGain * > APVsCollOrdered
double a
Definition: hdecay.h:121
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64

◆ swapBFieldMode()

void SiStripGainFromCalibTree::swapBFieldMode ( void  )
private

Definition at line 807 of file SiStripGainFromCalibTree.cc.

References m_calibrationMode.

Referenced by algoBeginJob(), and algoBeginRun().

807  {
808  if (m_calibrationMode.substr(m_calibrationMode.length() - 2) == "0T") {
809  m_calibrationMode.erase(m_calibrationMode.length() - 2, 2);
810  } else {
811  m_calibrationMode.append("0T");
812  }
813 }

Member Data Documentation

◆ AlgoMode

std::string SiStripGainFromCalibTree::AlgoMode
private

◆ AllowSaturation

bool SiStripGainFromCalibTree::AllowSaturation
private

Definition at line 144 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ amplitude

const std::vector<unsigned char>* SiStripGainFromCalibTree::amplitude = nullptr
private

Definition at line 307 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ amplitude_token_

edm::EDGetTokenT<std::vector<unsigned char> > SiStripGainFromCalibTree::amplitude_token_
private

Definition at line 308 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ APVsColl

std::unordered_map<unsigned int, stAPVGain*> SiStripGainFromCalibTree::APVsColl
private

◆ APVsCollOrdered

std::vector<stAPVGain*> SiStripGainFromCalibTree::APVsCollOrdered
private

◆ BAD

unsigned int SiStripGainFromCalibTree::BAD
private

◆ booked_dir_

std::string SiStripGainFromCalibTree::booked_dir_
private

Definition at line 170 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos().

◆ CalibPrefix_

string SiStripGainFromCalibTree::CalibPrefix_
private

Definition at line 318 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

◆ CalibrationLevel

int SiStripGainFromCalibTree::CalibrationLevel
private

Definition at line 148 of file SiStripGainFromCalibTree.cc.

Referenced by algoComputeMPVandGain(), and SiStripGainFromCalibTree().

◆ CalibSuffix_

string SiStripGainFromCalibTree::CalibSuffix_
private

Definition at line 319 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

◆ charge

const std::vector<unsigned int>* SiStripGainFromCalibTree::charge = nullptr
private

Definition at line 301 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ Charge_1

std::array<std::vector<APVGain::APVmon>, 7> SiStripGainFromCalibTree::Charge_1
private

Charge per cm per layer / wheel

Definition at line 173 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndRun(), bookDQMHistos(), and processEvent().

◆ Charge_2

std::array<std::vector<APVGain::APVmon>, 7> SiStripGainFromCalibTree::Charge_2
private

Charge per cm per layer / wheel without G2

Definition at line 174 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndRun(), bookDQMHistos(), and processEvent().

◆ Charge_3

std::array<std::vector<APVGain::APVmon>, 7> SiStripGainFromCalibTree::Charge_3
private

Charge per cm per layer / wheel without G1

Definition at line 175 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndRun(), bookDQMHistos(), and processEvent().

◆ Charge_4

std::array<std::vector<APVGain::APVmon>, 7> SiStripGainFromCalibTree::Charge_4
private

Charge per cm per layer / wheel without G1 and G1

Definition at line 176 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndRun(), bookDQMHistos(), and processEvent().

◆ charge_token_

edm::EDGetTokenT<std::vector<unsigned int> > SiStripGainFromCalibTree::charge_token_
private

Definition at line 302 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ Charge_Vs_Index

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_Index
private

◆ Charge_Vs_PathlengthTECM1

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTECM1
private

Charge vs pathlength in TECP thin

Definition at line 184 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), and SiStripGainFromCalibTree().

◆ Charge_Vs_PathlengthTECM2

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTECM2
private

Charge vs pathlength in TECP thick

Definition at line 185 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), and SiStripGainFromCalibTree().

◆ Charge_Vs_PathlengthTECP1

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTECP1
private

Charge vs pathlength in TECP thin

Definition at line 182 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), and SiStripGainFromCalibTree().

◆ Charge_Vs_PathlengthTECP2

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTECP2
private

Charge vs pathlength in TECP thick

Definition at line 183 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), and SiStripGainFromCalibTree().

◆ Charge_Vs_PathlengthTIB

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTIB
private

Charge vs pathlength in TIB

Definition at line 178 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), and SiStripGainFromCalibTree().

◆ Charge_Vs_PathlengthTIDM

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTIDM
private

Charge vs pathlength in TIDM

Definition at line 181 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), and SiStripGainFromCalibTree().

◆ Charge_Vs_PathlengthTIDP

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTIDP
private

Charge vs pathlength in TIDP

Definition at line 180 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), and SiStripGainFromCalibTree().

◆ Charge_Vs_PathlengthTOB

std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTOB
private

Charge vs pathlength in TOB

Definition at line 179 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), algoEndRun(), bookDQMHistos(), processEvent(), and SiStripGainFromCalibTree().

◆ chargeoverpath

const std::vector<double>* SiStripGainFromCalibTree::chargeoverpath = nullptr
private

Definition at line 305 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ chargeoverpath_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::chargeoverpath_token_
private

Definition at line 306 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ dbe

DQMStore* SiStripGainFromCalibTree::dbe
private

◆ DiffWRTPrevGainTEC

MonitorElement* SiStripGainFromCalibTree::DiffWRTPrevGainTEC
private

ratio gain / PreviousGain for TEC disks

Definition at line 235 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ DiffWRTPrevGainTIB

MonitorElement* SiStripGainFromCalibTree::DiffWRTPrevGainTIB
private

ratio Gain / PreviousGain for TIB layers

Definition at line 232 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ DiffWRTPrevGainTID

MonitorElement* SiStripGainFromCalibTree::DiffWRTPrevGainTID
private

ratio Gain / PreviousGain for TID disks

Definition at line 233 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ DiffWRTPrevGainTOB

MonitorElement* SiStripGainFromCalibTree::DiffWRTPrevGainTOB
private

ratio Gain / PreviousGain for TOB layers

Definition at line 234 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ doChargeMonitorPerPlane

bool SiStripGainFromCalibTree::doChargeMonitorPerPlane
private

Charge monitor per detector plane

Definition at line 154 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndRun(), bookDQMHistos(), and SiStripGainFromCalibTree().

◆ dqm_tag_

std::vector<string> SiStripGainFromCalibTree::dqm_tag_
private

Definition at line 169 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and SiStripGainFromCalibTree().

◆ ERun

unsigned int SiStripGainFromCalibTree::ERun
private

Definition at line 251 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and processEvent().

◆ eventnumber

unsigned int SiStripGainFromCalibTree::eventnumber = 0
private

Definition at line 259 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ EventPrefix_

string SiStripGainFromCalibTree::EventPrefix_
private

Definition at line 314 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

◆ EventSuffix_

string SiStripGainFromCalibTree::EventSuffix_
private

Definition at line 315 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

◆ farfromedge

const std::vector<bool>* SiStripGainFromCalibTree::farfromedge = nullptr
private

Definition at line 299 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ farfromedge_token_

edm::EDGetTokenT<std::vector<bool> > SiStripGainFromCalibTree::farfromedge_token_
private

Definition at line 300 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ FirstSetOfConstants

bool SiStripGainFromCalibTree::FirstSetOfConstants
private

Definition at line 145 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ firststrip

const std::vector<unsigned short>* SiStripGainFromCalibTree::firststrip = nullptr
private

Definition at line 291 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ firststrip_token_

edm::EDGetTokenT<std::vector<unsigned short> > SiStripGainFromCalibTree::firststrip_token_
private

Definition at line 292 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ Gains

MonitorElement* SiStripGainFromCalibTree::Gains
private

distribution of gain factors

Definition at line 207 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), qualityMonitor(), and storeOnTree().

◆ gainToken_

edm::ESGetToken<SiStripGain, SiStripGainRcd> SiStripGainFromCalibTree::gainToken_
private

Definition at line 328 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginRun(), and SiStripGainFromCalibTree().

◆ gainused

const std::vector<double>* SiStripGainFromCalibTree::gainused = nullptr
private

Definition at line 309 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ gainused_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::gainused_token_
private

Definition at line 310 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ gainusedTick

const std::vector<double>* SiStripGainFromCalibTree::gainusedTick = nullptr
private

Definition at line 311 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ gainusedTick_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::gainusedTick_token_
private

Definition at line 312 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ GainVsPrevGainTEC

MonitorElement* SiStripGainFromCalibTree::GainVsPrevGainTEC
private

Gain vs PreviousGain for TEC

Definition at line 240 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ GainVsPrevGainTIB

MonitorElement* SiStripGainFromCalibTree::GainVsPrevGainTIB
private

Gain vs PreviousGain for TIB

Definition at line 237 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ GainVsPrevGainTID

MonitorElement* SiStripGainFromCalibTree::GainVsPrevGainTID
private

Gain vs PreviousGain for TID

Definition at line 238 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ GainVsPrevGainTOB

MonitorElement* SiStripGainFromCalibTree::GainVsPrevGainTOB
private

Gain vs PreviousGain for TOB

Definition at line 239 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ GOOD

unsigned int SiStripGainFromCalibTree::GOOD
private

◆ localdirx

const std::vector<double>* SiStripGainFromCalibTree::localdirx = nullptr
private

Definition at line 285 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ localdirx_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::localdirx_token_
private

Definition at line 286 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ localdiry

const std::vector<double>* SiStripGainFromCalibTree::localdiry = nullptr
private

Definition at line 287 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ localdiry_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::localdiry_token_
private

Definition at line 288 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ localdirz

const std::vector<double>* SiStripGainFromCalibTree::localdirz = nullptr
private

Definition at line 289 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ localdirz_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::localdirz_token_
private

Definition at line 290 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ m_calibrationMode

std::string SiStripGainFromCalibTree::m_calibrationMode
private

◆ m_calibrationPath

std::string SiStripGainFromCalibTree::m_calibrationPath
private

Definition at line 156 of file SiStripGainFromCalibTree.cc.

Referenced by MakeCalibrationMap(), and SiStripGainFromCalibTree().

◆ m_DQMdir

std::string SiStripGainFromCalibTree::m_DQMdir
private

DQM folder hosting the charge statistics and the monitor plots

Definition at line 157 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), algoEndRun(), and SiStripGainFromCalibTree().

◆ m_harvestingMode

bool SiStripGainFromCalibTree::m_harvestingMode
private

◆ m_splitDQMstat

bool SiStripGainFromCalibTree::m_splitDQMstat
private

Definition at line 153 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), algoEndRun(), and SiStripGainFromCalibTree().

◆ MagFieldCurrentTh

double SiStripGainFromCalibTree::MagFieldCurrentTh
private

◆ MASKED

unsigned int SiStripGainFromCalibTree::MASKED
private

Definition at line 254 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), algoComputeMPVandGain(), and storeOnTree().

◆ MaxChi2OverNDF

double SiStripGainFromCalibTree::MaxChi2OverNDF
private

Definition at line 135 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree().

◆ MaxMPVError

double SiStripGainFromCalibTree::MaxMPVError
private

Definition at line 134 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree().

◆ MaxNrStrips

unsigned int SiStripGainFromCalibTree::MaxNrStrips
private

Definition at line 140 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ MaxTrackChiOverNdf

double SiStripGainFromCalibTree::MaxTrackChiOverNdf
private

Definition at line 142 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ MaxTrackEta

double SiStripGainFromCalibTree::MaxTrackEta
private

Definition at line 139 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ MaxTrackingIteration

int SiStripGainFromCalibTree::MaxTrackingIteration
private

Definition at line 143 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ MaxTrackMomentum

double SiStripGainFromCalibTree::MaxTrackMomentum
private

Definition at line 137 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ MinNrEntries

double SiStripGainFromCalibTree::MinNrEntries
private

Definition at line 133 of file SiStripGainFromCalibTree.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromCalibTree().

◆ MinTrackEta

double SiStripGainFromCalibTree::MinTrackEta
private

Definition at line 138 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ MinTrackHits

unsigned int SiStripGainFromCalibTree::MinTrackHits
private

Definition at line 141 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ MinTrackMomentum

double SiStripGainFromCalibTree::MinTrackMomentum
private

Definition at line 136 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ MPV_Vs_EtaTEC

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTEC
private

MPV vs Eta for TEC planes

Definition at line 193 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_EtaTECthick

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTECthick
private

MPV vs Eta for TEC tick planes

Definition at line 195 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_EtaTECthin

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTECthin
private

MPV vs Eta for TEC thin planes

Definition at line 194 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_EtaTIB

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTIB
private

MPV vs Eta for TIB planes

Definition at line 190 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_EtaTID

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTID
private

MPV vs Eta for TID planes

Definition at line 191 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_EtaTOB

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTOB
private

MPV vs Eta for TOB planes

Definition at line 192 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_PhiTEC

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTEC
private

MPV vs Phi for TEC planes

Definition at line 200 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_PhiTECthick

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTECthick
private

MPV vs Phi for TID tick planes

Definition at line 202 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_PhiTECthin

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTECthin
private

MPV vs Phi for TEC thin planes

Definition at line 201 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_PhiTIB

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTIB
private

MPV vs Phi for TIB planes

Definition at line 197 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_PhiTID

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTID
private

MPV vs Phi for TID planes

Definition at line 198 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPV_Vs_PhiTOB

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTOB
private

MPV vs Phi for TOB planes

Definition at line 199 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVError

MonitorElement* SiStripGainFromCalibTree::MPVError
private

error of Landau fit

Definition at line 226 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVErrorVsEta

MonitorElement* SiStripGainFromCalibTree::MPVErrorVsEta
private

error of Landau fit vs Eta

Definition at line 228 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVErrorVsMPV

MonitorElement* SiStripGainFromCalibTree::MPVErrorVsMPV
private

error of Landau fit vs MPV

Definition at line 227 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVErrorVsN

MonitorElement* SiStripGainFromCalibTree::MPVErrorVsN
private

error of landau fit vs number of entries

Definition at line 230 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVErrorVsPhi

MonitorElement* SiStripGainFromCalibTree::MPVErrorVsPhi
private

error of Landau fit vs Phi

Definition at line 229 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVs

MonitorElement* SiStripGainFromCalibTree::MPVs
private

distribution of MPVs

Definition at line 208 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVs320

MonitorElement* SiStripGainFromCalibTree::MPVs320
private

distribution of MPVs for thin sensors

Definition at line 209 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVs500

MonitorElement* SiStripGainFromCalibTree::MPVs500
private

distribution of MPVs for tick sensors

Definition at line 210 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTEC

MonitorElement* SiStripGainFromCalibTree::MPVsTEC
private

distribution of MPVs for TEC disks

Definition at line 216 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTECM

MonitorElement* SiStripGainFromCalibTree::MPVsTECM
private

distribution of MPVs for TECM disks

Definition at line 218 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTECM1

MonitorElement* SiStripGainFromCalibTree::MPVsTECM1
private

distribution of MPVs for TECM thin sensors

Definition at line 223 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTECM2

MonitorElement* SiStripGainFromCalibTree::MPVsTECM2
private

distribution of MPVs for TECM tick sensors

Definition at line 224 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTECP

MonitorElement* SiStripGainFromCalibTree::MPVsTECP
private

distribution of MPVs for TECP disks

Definition at line 217 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTECP1

MonitorElement* SiStripGainFromCalibTree::MPVsTECP1
private

distribution of MPVs for TECP thin sensors

Definition at line 221 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTECP2

MonitorElement* SiStripGainFromCalibTree::MPVsTECP2
private

distribution of MPVs for TECP tick sensors

Definition at line 222 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTECthick

MonitorElement* SiStripGainFromCalibTree::MPVsTECthick
private

distribution of MPVs for TEC tick sensors

Definition at line 220 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTECthin

MonitorElement* SiStripGainFromCalibTree::MPVsTECthin
private

distribution of MPVs for TEC thin sensors

Definition at line 219 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTIB

MonitorElement* SiStripGainFromCalibTree::MPVsTIB
private

distribution of MPVs for TIB planes

Definition at line 211 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTID

MonitorElement* SiStripGainFromCalibTree::MPVsTID
private

distribution of MPVs for TID disks

Definition at line 212 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTIDM

MonitorElement* SiStripGainFromCalibTree::MPVsTIDM
private

distribution of MPVs for TIDM disks

Definition at line 214 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTIDP

MonitorElement* SiStripGainFromCalibTree::MPVsTIDP
private

distribution of MPVs for TIDP disks

Definition at line 213 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ MPVsTOB

MonitorElement* SiStripGainFromCalibTree::MPVsTOB
private

distribution of MPVs for TOB planes

Definition at line 215 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ NClusterPixel

unsigned int SiStripGainFromCalibTree::NClusterPixel
private

Definition at line 247 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and processEvent().

◆ NClusterStrip

unsigned int SiStripGainFromCalibTree::NClusterStrip
private

Definition at line 246 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), algoEndJob(), processEvent(), and storeOnTree().

◆ NEvent

unsigned int SiStripGainFromCalibTree::NEvent
private

◆ newCharge

std::vector<APVGain::APVmon> SiStripGainFromCalibTree::newCharge
private

Definition at line 242 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ NoMPVfit

MonitorElement* SiStripGainFromCalibTree::NoMPVfit
private

R,Z map of missing APV calibration (no fit)

Definition at line 205 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ NoMPVmasked

MonitorElement* SiStripGainFromCalibTree::NoMPVmasked
private

R,Z map of missing APV calibration (masked modules)

Definition at line 204 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

◆ NPixelDets

int SiStripGainFromCalibTree::NPixelDets
private

Definition at line 249 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob().

◆ NStripAPVs

int SiStripGainFromCalibTree::NStripAPVs
private

◆ nstrips

const std::vector<unsigned short>* SiStripGainFromCalibTree::nstrips = nullptr
private

Definition at line 293 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ nstrips_token_

edm::EDGetTokenT<std::vector<unsigned short> > SiStripGainFromCalibTree::nstrips_token_
private

Definition at line 294 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ NTrack

unsigned int SiStripGainFromCalibTree::NTrack
private

Definition at line 245 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), processEvent(), and storeOnTree().

◆ OldGainRemoving

bool SiStripGainFromCalibTree::OldGainRemoving
private

Definition at line 147 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ OutputGains

std::string SiStripGainFromCalibTree::OutputGains
private

Definition at line 164 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree(), and storeOnTree().

◆ overlapping

const std::vector<bool>* SiStripGainFromCalibTree::overlapping = nullptr
private

Definition at line 297 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ overlapping_token_

edm::EDGetTokenT<std::vector<bool> > SiStripGainFromCalibTree::overlapping_token_
private

Definition at line 298 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ path

const std::vector<double>* SiStripGainFromCalibTree::path = nullptr
private

◆ path_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::path_token_
private

Definition at line 304 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ qualityToken_

edm::ESGetToken<SiStripQuality, SiStripQualityRcd> SiStripGainFromCalibTree::qualityToken_
private

Definition at line 329 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginRun(), and SiStripGainFromCalibTree().

◆ rawid

const std::vector<unsigned int>* SiStripGainFromCalibTree::rawid = nullptr
private

Definition at line 283 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ rawid_token_

edm::EDGetTokenT<std::vector<unsigned int> > SiStripGainFromCalibTree::rawid_token_
private

Definition at line 284 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ runInfoToken_

edm::ESGetToken<RunInfo, RunInfoRcd> SiStripGainFromCalibTree::runInfoToken_
private

◆ runnumber

unsigned int SiStripGainFromCalibTree::runnumber = 0
private

Definition at line 260 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ saturation

const std::vector<bool>* SiStripGainFromCalibTree::saturation = nullptr
private

Definition at line 295 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ saturation_token_

edm::EDGetTokenT<std::vector<bool> > SiStripGainFromCalibTree::saturation_token_
private

Definition at line 296 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ saveSummary

bool SiStripGainFromCalibTree::saveSummary
private

Definition at line 150 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), and SiStripGainFromCalibTree().

◆ SRun

unsigned int SiStripGainFromCalibTree::SRun
private

Definition at line 250 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and processEvent().

◆ tagCondition_GoodFrac

double SiStripGainFromCalibTree::tagCondition_GoodFrac
private

Definition at line 161 of file SiStripGainFromCalibTree.cc.

Referenced by produceTagFilter(), and SiStripGainFromCalibTree().

◆ tagCondition_NClusters

double SiStripGainFromCalibTree::tagCondition_NClusters
private

Definition at line 160 of file SiStripGainFromCalibTree.cc.

Referenced by produceTagFilter(), and SiStripGainFromCalibTree().

◆ tfs

TFileService* SiStripGainFromCalibTree::tfs
private

Definition at line 130 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), and storeOnTree().

◆ tkGeomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripGainFromCalibTree::tkGeomToken_
private

Definition at line 326 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and SiStripGainFromCalibTree().

◆ trackalgo

const std::vector<int>* SiStripGainFromCalibTree::trackalgo = nullptr
private

Definition at line 277 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ trackalgo_token_

edm::EDGetTokenT<std::vector<int> > SiStripGainFromCalibTree::trackalgo_token_
private

Definition at line 278 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ trackchi2ndof

const std::vector<double>* SiStripGainFromCalibTree::trackchi2ndof = nullptr
private

Definition at line 265 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ trackchi2ndof_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::trackchi2ndof_token_
private

Definition at line 266 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ tracketa

const std::vector<double>* SiStripGainFromCalibTree::tracketa = nullptr
private

Definition at line 271 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ tracketa_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::tracketa_token_
private

Definition at line 272 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ trackhitsvalid

const std::vector<unsigned int>* SiStripGainFromCalibTree::trackhitsvalid = nullptr
private

Definition at line 275 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ trackhitsvalid_token_

edm::EDGetTokenT<std::vector<unsigned int> > SiStripGainFromCalibTree::trackhitsvalid_token_
private

Definition at line 276 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ trackindex

const std::vector<int>* SiStripGainFromCalibTree::trackindex = nullptr
private

Definition at line 281 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ trackindex_token_

edm::EDGetTokenT<std::vector<int> > SiStripGainFromCalibTree::trackindex_token_
private

Definition at line 282 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ trackp

const std::vector<float>* SiStripGainFromCalibTree::trackp = nullptr
private

Definition at line 267 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), algoAnalyzeTheTree(), and processEvent().

◆ trackp_token_

edm::EDGetTokenT<std::vector<float> > SiStripGainFromCalibTree::trackp_token_
private

Definition at line 268 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ trackphi

const std::vector<double>* SiStripGainFromCalibTree::trackphi = nullptr
private

Definition at line 273 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ trackphi_token_

edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::trackphi_token_
private

Definition at line 274 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ TrackPrefix_

string SiStripGainFromCalibTree::TrackPrefix_
private

Definition at line 316 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

◆ trackpt

const std::vector<float>* SiStripGainFromCalibTree::trackpt = nullptr
private

Definition at line 269 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ trackpt_token_

edm::EDGetTokenT<std::vector<float> > SiStripGainFromCalibTree::trackpt_token_
private

Definition at line 270 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ TrackSuffix_

string SiStripGainFromCalibTree::TrackSuffix_
private

Definition at line 317 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

◆ TrigTech

const std::vector<bool>* SiStripGainFromCalibTree::TrigTech = nullptr
private

Definition at line 261 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

◆ TrigTech_token_

edm::EDGetTokenT<std::vector<bool> > SiStripGainFromCalibTree::TrigTech_token_
private

Definition at line 262 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

◆ tTopo_

const TrackerTopology* SiStripGainFromCalibTree::tTopo_ = nullptr
private

Definition at line 330 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), processEvent(), and qualityMonitor().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripGainFromCalibTree::tTopoToken_
private

Definition at line 325 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and SiStripGainFromCalibTree().

◆ useCalibration

bool SiStripGainFromCalibTree::useCalibration
private

◆ Validation

bool SiStripGainFromCalibTree::Validation
private

Definition at line 146 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

◆ VChargeHisto

std::vector<std::string> SiStripGainFromCalibTree::VChargeHisto
private

Charge monitor plots to be output

Definition at line 158 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndRun(), bookDQMHistos(), and SiStripGainFromCalibTree().

◆ VInputFiles

vector<string> SiStripGainFromCalibTree::VInputFiles
private

Definition at line 165 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().