CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripGainFromCalibTree Class Reference
Inheritance diagram for SiStripGainFromCalibTree:
ConditionDBWriter< SiStripApvGain > edm::EDAnalyzer edm::EDConsumerBase

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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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
 
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::vector< ModuleDescription const * > &modules, 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
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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)
 
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 = 0
 
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 = 0
 
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 = 0
 
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 = 0
 
edm::EDGetTokenT< std::vector< bool > > farfromedge_token_
 
bool FirstSetOfConstants
 
const std::vector< unsigned short > * firststrip = 0
 
edm::EDGetTokenT< std::vector< unsigned short > > firststrip_token_
 
MonitorElementGains
 
const std::vector< double > * gainused = 0
 
edm::EDGetTokenT< std::vector< double > > gainused_token_
 
const std::vector< double > * gainusedTick = 0
 
edm::EDGetTokenT< std::vector< double > > gainusedTick_token_
 
MonitorElementGainVsPrevGainTEC
 
MonitorElementGainVsPrevGainTIB
 
MonitorElementGainVsPrevGainTID
 
MonitorElementGainVsPrevGainTOB
 
unsigned int GOOD
 
const std::vector< double > * localdirx = 0
 
edm::EDGetTokenT< std::vector< double > > localdirx_token_
 
const std::vector< double > * localdiry = 0
 
edm::EDGetTokenT< std::vector< double > > localdiry_token_
 
const std::vector< double > * localdirz = 0
 
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 = 0
 
edm::EDGetTokenT< std::vector< unsigned short > > nstrips_token_
 
unsigned int NTrack
 
bool OldGainRemoving
 
std::string OutputGains
 
const std::vector< bool > * overlapping = 0
 
edm::EDGetTokenT< std::vector< bool > > overlapping_token_
 
const std::vector< double > * path = 0
 
edm::EDGetTokenT< std::vector< double > > path_token_
 
const std::vector< unsigned int > * rawid = 0
 
edm::EDGetTokenT< std::vector< unsigned int > > rawid_token_
 
unsigned int runnumber =0
 
const std::vector< bool > * saturation = 0
 
edm::EDGetTokenT< std::vector< bool > > saturation_token_
 
bool saveSummary
 
unsigned int SRun
 
double tagCondition_GoodFrac
 
double tagCondition_NClusters
 
TFileServicetfs
 
const std::vector< int > * trackalgo = 0
 
edm::EDGetTokenT< std::vector< int > > trackalgo_token_
 
const std::vector< double > * trackchi2ndof = 0
 
edm::EDGetTokenT< std::vector< double > > trackchi2ndof_token_
 
const std::vector< double > * tracketa = 0
 
edm::EDGetTokenT< std::vector< double > > tracketa_token_
 
const std::vector< unsigned int > * trackhitsvalid = 0
 
edm::EDGetTokenT< std::vector< unsigned int > > trackhitsvalid_token_
 
const std::vector< int > * trackindex = 0
 
edm::EDGetTokenT< std::vector< int > > trackindex_token_
 
const std::vector< float > * trackp = 0
 
edm::EDGetTokenT< std::vector< float > > trackp_token_
 
const std::vector< double > * trackphi = 0
 
edm::EDGetTokenT< std::vector< double > > trackphi_token_
 
string TrackPrefix_
 
const std::vector< float > * trackpt = 0
 
edm::EDGetTokenT< std::vector< float > > trackpt_token_
 
string TrackSuffix_
 
const std::vector< bool > * TrigTech = 0
 
edm::EDGetTokenT< std::vector< bool > > TrigTech_token_
 
const TrackerTopologytTopo_
 
bool useCalibration
 
bool Validation
 
std::vector< std::string > VChargeHisto
 
vector< string > VInputFiles
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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)
 
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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)
 

Detailed Description

Definition at line 93 of file SiStripGainFromCalibTree.cc.

Constructor & Destructor Documentation

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

Definition at line 340 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_, gainused_token_, gainusedTick_token_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), diffTwoXMLs::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_, rawid_token_, saturation_token_, saveSummary, AlCaHLTBitMon_QueryRunRegistry::string, tagCondition_GoodFrac, tagCondition_NClusters, trackalgo_token_, trackchi2ndof_token_, tracketa_token_, trackhitsvalid_token_, trackindex_token_, trackp_token_, trackphi_token_, TrackPrefix_, trackpt_token_, TrackSuffix_, TrigTech_token_, tTopo_, useCalibration, Validation, VChargeHisto, and VInputFiles.

341 {
342  OutputGains = iConfig.getParameter<std::string>("OutputGains");
343 
344  AlgoMode = iConfig.getUntrackedParameter<std::string>("AlgoMode", "CalibTree");
345  MagFieldCurrentTh = iConfig.getUntrackedParameter<double> ("MagFieldCurrentTh" , 2000.);
346  MinNrEntries = iConfig.getUntrackedParameter<double> ("minNrEntries" , 20);
347  MaxMPVError = iConfig.getUntrackedParameter<double> ("maxMPVError" , 500.0);
348  MaxChi2OverNDF = iConfig.getUntrackedParameter<double> ("maxChi2OverNDF" , 5.0);
349  MinTrackMomentum = iConfig.getUntrackedParameter<double> ("minTrackMomentum" , 3.0);
350  MaxTrackMomentum = iConfig.getUntrackedParameter<double> ("maxTrackMomentum" , 99999.0);
351  MinTrackEta = iConfig.getUntrackedParameter<double> ("minTrackEta" , -5.0);
352  MaxTrackEta = iConfig.getUntrackedParameter<double> ("maxTrackEta" , 5.0);
353  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips" , 2);
354  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits" , 8);
355  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double> ("MaxTrackChiOverNdf" , 3);
356  MaxTrackingIteration = iConfig.getUntrackedParameter<int> ("MaxTrackingIteration" , 7);
357  AllowSaturation = iConfig.getUntrackedParameter<bool> ("AllowSaturation" , false);
358  FirstSetOfConstants = iConfig.getUntrackedParameter<bool> ("FirstSetOfConstants" , true);
359  Validation = iConfig.getUntrackedParameter<bool> ("Validation" , false);
360  OldGainRemoving = iConfig.getUntrackedParameter<bool> ("OldGainRemoving" , false);
361 
362  CalibrationLevel = iConfig.getUntrackedParameter<int> ("CalibrationLevel" , 0);
363  VInputFiles = iConfig.getUntrackedParameter<vector<string> > ("InputFiles");
364  VChargeHisto = iConfig.getUntrackedParameter<vector<string> > ("ChargeHisto");
365 
366 
367  useCalibration = iConfig.getUntrackedParameter<bool> ("UseCalibration" , false);
368  m_harvestingMode = iConfig.getUntrackedParameter<bool> ("harvestingMode" , false);
369  m_splitDQMstat = iConfig.getUntrackedParameter<bool> ("splitDQMstat" , false);
370  m_calibrationMode = iConfig.getUntrackedParameter<string> ("calibrationMode" , "StdBunch");
371  m_calibrationPath = iConfig.getUntrackedParameter<string> ("calibrationPath");
372  m_DQMdir = iConfig.getUntrackedParameter<string> ("DQMdir" , "AlCaReco/SiStripGains");
373 
374  tagCondition_NClusters = iConfig.getUntrackedParameter<double> ("NClustersForTagProd" , 2E8);
375  tagCondition_GoodFrac = iConfig.getUntrackedParameter<double> ("GoodFracForTagProd" , 0.95);
376 
377  saveSummary = iConfig.getUntrackedParameter<bool> ("saveSummary" , false);
378 
379  doChargeMonitorPerPlane = iConfig.getUntrackedParameter<bool> ("doChargeMonitorPerPlane", false);
380 
381 
382  // Gather DQM Service
384  dbe->setVerbose(10);
385 
386  //Set the monitoring element tag and store
387  dqm_tag_.reserve(7);
388  dqm_tag_.clear();
389  dqm_tag_.push_back( "StdBunch" ); // statistic collection from Standard Collision Bunch @ 3.8 T
390  dqm_tag_.push_back( "StdBunch0T" ); // statistic collection from Standard Collision Bunch @ 0 T
391  dqm_tag_.push_back( "AagBunch" ); // statistic collection from First Collision After Abort Gap @ 3.8 T
392  dqm_tag_.push_back( "AagBunch0T" ); // statistic collection from First Collision After Abort Gap @ 0 T
393  dqm_tag_.push_back( "IsoMuon" ); // statistic collection from Isolated Muon @ 3.8 T
394  dqm_tag_.push_back( "IsoMuon0T" ); // statistic collection from Isolated Muon @ 0 T
395  dqm_tag_.push_back( "Harvest" ); // statistic collection: Harvest
396 
397  Charge_Vs_Index.insert( Charge_Vs_Index.begin(), dqm_tag_.size(), nullptr);
398  //Charge_Vs_Index_Absolute.insert( Charge_Vs_Index_Absolute.begin(), dqm_tag_.size(), 0);
399  Charge_Vs_PathlengthTIB.insert( Charge_Vs_PathlengthTIB.begin(), dqm_tag_.size(), nullptr);
400  Charge_Vs_PathlengthTOB.insert( Charge_Vs_PathlengthTOB.begin(), dqm_tag_.size(), nullptr);
401  Charge_Vs_PathlengthTIDP.insert( Charge_Vs_PathlengthTIDP.begin(), dqm_tag_.size(), nullptr);
402  Charge_Vs_PathlengthTIDM.insert( Charge_Vs_PathlengthTIDM.begin(), dqm_tag_.size(), nullptr);
403  Charge_Vs_PathlengthTECP1.insert( Charge_Vs_PathlengthTECP1.begin(), dqm_tag_.size(), nullptr);
404  Charge_Vs_PathlengthTECP2.insert( Charge_Vs_PathlengthTECP2.begin(), dqm_tag_.size(), nullptr);
405  Charge_Vs_PathlengthTECM1.insert( Charge_Vs_PathlengthTECM1.begin(), dqm_tag_.size(), nullptr);
406  Charge_Vs_PathlengthTECM2.insert( Charge_Vs_PathlengthTECM2.begin(), dqm_tag_.size(), nullptr);
407 
408 
409 
410 
411  // configure token for gathering the ntuple variables
412  edm::ParameterSet swhallowgain_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("gain");
413 
414  string label = swhallowgain_pset.getUntrackedParameter<string>("label");
415  CalibPrefix_ = swhallowgain_pset.getUntrackedParameter<string>("prefix");
416  CalibSuffix_ = swhallowgain_pset.getUntrackedParameter<string>("suffix");
417 
418  trackindex_token_ = consumes<std::vector<int> >(edm::InputTag(label, CalibPrefix_ + "trackindex" + CalibSuffix_));
419  rawid_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, CalibPrefix_ + "rawid" + CalibSuffix_));
420  localdirx_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdirx" + CalibSuffix_));
421  localdiry_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdiry" + CalibSuffix_));
422  localdirz_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdirz" + CalibSuffix_));
423  firststrip_token_ = consumes<std::vector<unsigned short> >(edm::InputTag(label, CalibPrefix_ + "firststrip" + CalibSuffix_));
424  nstrips_token_ = consumes<std::vector<unsigned short> >(edm::InputTag(label, CalibPrefix_ + "nstrips" + CalibSuffix_));
425  saturation_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "saturation" + CalibSuffix_));
426  overlapping_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "overlapping" + CalibSuffix_));
427  farfromedge_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "farfromedge" + CalibSuffix_));
428  charge_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, CalibPrefix_ + "charge" + CalibSuffix_));
429  path_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "path" + CalibSuffix_));
430  chargeoverpath_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "chargeoverpath"+ CalibSuffix_));
431  amplitude_token_ = consumes<std::vector<unsigned char> >(edm::InputTag(label, CalibPrefix_ + "amplitude" + CalibSuffix_));
432  gainused_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "gainused" + CalibSuffix_));
433  gainusedTick_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "gainusedTick" + CalibSuffix_));
434 
435  edm::ParameterSet evtinfo_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("evtinfo");
436  label = evtinfo_pset.getUntrackedParameter<string>("label");
437  EventPrefix_ = evtinfo_pset.getUntrackedParameter<string>("prefix");
438  EventSuffix_ = evtinfo_pset.getUntrackedParameter<string>("suffix");
439  TrigTech_token_ = consumes<std::vector<bool> >(edm::InputTag(label, EventPrefix_ + "TrigTech" + EventSuffix_));
440 
441  edm::ParameterSet track_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("tracks");
442  label = track_pset.getUntrackedParameter<string>("label");
443  TrackPrefix_ = track_pset.getUntrackedParameter<string>("prefix");
444  TrackSuffix_ = track_pset.getUntrackedParameter<string>("suffix");
445 
446  trackchi2ndof_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "chi2ndof" + TrackSuffix_));
447  trackp_token_ = consumes<std::vector<float> >(edm::InputTag(label, TrackPrefix_ + "momentum" + TrackSuffix_));
448  trackpt_token_ = consumes<std::vector<float> >(edm::InputTag(label, TrackPrefix_ + "pt" + TrackSuffix_));
449  tracketa_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "eta" + TrackSuffix_));
450  trackphi_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "phi" + TrackSuffix_));
451  trackhitsvalid_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, TrackPrefix_ + "hitsvalid" + TrackSuffix_));
452  trackalgo_token_ = consumes<std::vector<int> >(edm::InputTag(label, TrackPrefix_ + "algo" + TrackSuffix_));
453 
454  tTopo_ = nullptr;
455 }
edm::EDGetTokenT< std::vector< int > > trackindex_token_
std::vector< MonitorElement * > Charge_Vs_Index
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< std::vector< double > > tracketa_token_
edm::EDGetTokenT< std::vector< unsigned char > > amplitude_token_
edm::EDGetTokenT< std::vector< unsigned int > > rawid_token_
edm::EDGetTokenT< std::vector< bool > > overlapping_token_
const TrackerTopology * tTopo_
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
edm::EDGetTokenT< std::vector< bool > > farfromedge_token_
edm::EDGetTokenT< std::vector< unsigned int > > trackhitsvalid_token_
edm::EDGetTokenT< std::vector< double > > path_token_
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::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 ( )
override

Definition at line 1647 of file SiStripGainFromCalibTree.cc.

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

1648 {
1649  APVsColl.clear();
1650  for(unsigned int a=0;a<APVsCollOrdered.size();a++) {
1652  if(APV!=nullptr) delete APV;
1653  }
1654  APVsCollOrdered.clear();
1655 }
std::vector< stAPVGain * > APVsCollOrdered
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double a
Definition: hdecay.h:121

Member Function Documentation

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

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1682 of file SiStripGainFromCalibTree.cc.

References AlgoMode, amplitude, amplitude_token_, charge, charge_token_, chargeoverpath, chargeoverpath_token_, connect(), DEFINE_FWK_MODULE, edm::EventID::event(), eventnumber, farfromedge, farfromedge_token_, firststrip, firststrip_token_, gainused, gainused_token_, gainusedTick, gainusedTick_token_, edm::EventBase::id(), localdirx, localdirx_token_, localdiry, localdiry_token_, localdirz, localdirz_token_, m_harvestingMode, nstrips, nstrips_token_, overlapping, overlapping_token_, path, path_token_, processEvent(), rawid, rawid_token_, edm::EventID::run(), 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_.

1683 {
1684  // in AlCaHarvesting mode we just need to run the logic in the endJob step
1685  if(m_harvestingMode) return;
1686 
1687  if(AlgoMode=="CalibTree")return;
1688 
1689  eventnumber = iEvent.id().event();
1690  runnumber = iEvent.id().run();
1691  auto handle01 = connect(TrigTech , TrigTech_token_ , iEvent);
1692  auto handle02 = connect(trackchi2ndof , trackchi2ndof_token_ , iEvent);
1693  auto handle03 = connect(trackp , trackp_token_ , iEvent);
1694  auto handle04 = connect(trackpt , trackpt_token_ , iEvent);
1695  auto handle05 = connect(tracketa , tracketa_token_ , iEvent);
1696  auto handle06 = connect(trackphi , trackphi_token_ , iEvent);
1697  auto handle07 = connect(trackhitsvalid, trackhitsvalid_token_, iEvent);
1698  auto handle08 = connect(trackindex , trackindex_token_ , iEvent);
1699  auto handle09 = connect(rawid , rawid_token_ , iEvent);
1700  auto handle11 = connect(localdirx , localdirx_token_ , iEvent);
1701  auto handle12 = connect(localdiry , localdiry_token_ , iEvent);
1702  auto handle13 = connect(localdirz , localdirz_token_ , iEvent);
1703  auto handle14 = connect(firststrip , firststrip_token_ , iEvent);
1704  auto handle15 = connect(nstrips , nstrips_token_ , iEvent);
1705  auto handle16 = connect(saturation , saturation_token_ , iEvent);
1706  auto handle17 = connect(overlapping , overlapping_token_ , iEvent);
1707  auto handle18 = connect(farfromedge , farfromedge_token_ , iEvent);
1708  auto handle19 = connect(charge , charge_token_ , iEvent);
1709  auto handle21 = connect(path , path_token_ , iEvent);
1710  auto handle22 = connect(chargeoverpath, chargeoverpath_token_, iEvent);
1711  auto handle23 = connect(amplitude , amplitude_token_ , iEvent);
1712  auto handle24 = connect(gainused , gainused_token_ , iEvent);
1713  auto handle25 = connect(gainusedTick , gainusedTick_token_ , iEvent);
1714  auto handle26 = connect(trackalgo , trackalgo_token_ , iEvent);
1715 
1716  processEvent();
1717 }
RunNumber_t run() const
Definition: EventID.h:39
edm::EDGetTokenT< std::vector< int > > trackindex_token_
EventNumber_t event() const
Definition: EventID.h:41
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_
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::EventID id() const
Definition: EventBase.h:60
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
void SiStripGainFromCalibTree::algoAnalyzeTheTree ( )
private

Definition at line 1221 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().

1222 {
1223  for(unsigned int i=0;i<VInputFiles.size();i++){
1224  printf("Openning file %3i/%3i --> %s\n",i+1, (int)VInputFiles.size(), (char*)(VInputFiles[i].c_str())); fflush(stdout);
1225  TFile *tfile = TFile::Open(VInputFiles[i].c_str());
1226  TString tree_path = TString::Format("gainCalibrationTree%s/tree",m_calibrationMode.c_str());
1227  TTree* tree = dynamic_cast<TTree*> (tfile->Get(tree_path.Data()));
1228 
1229  tree->SetBranchAddress((EventPrefix_ + "event" + EventSuffix_).c_str(), &eventnumber , nullptr);
1230  tree->SetBranchAddress((EventPrefix_ + "run" + EventSuffix_).c_str(), &runnumber , nullptr);
1231  tree->SetBranchAddress((EventPrefix_ + "TrigTech" + EventSuffix_).c_str(), &TrigTech , nullptr);
1232 
1233  tree->SetBranchAddress((TrackPrefix_ + "chi2ndof" + TrackSuffix_).c_str(), &trackchi2ndof , nullptr);
1234  tree->SetBranchAddress((TrackPrefix_ + "momentum" + TrackSuffix_).c_str(), &trackp , nullptr);
1235  tree->SetBranchAddress((TrackPrefix_ + "pt" + TrackSuffix_).c_str(), &trackpt , nullptr);
1236  tree->SetBranchAddress((TrackPrefix_ + "eta" + TrackSuffix_).c_str(), &tracketa , nullptr);
1237  tree->SetBranchAddress((TrackPrefix_ + "phi" + TrackSuffix_).c_str(), &trackphi , nullptr);
1238  tree->SetBranchAddress((TrackPrefix_ + "hitsvalid" + TrackSuffix_).c_str(), &trackhitsvalid, nullptr);
1239  tree->SetBranchAddress((TrackPrefix_ + "algo" + TrackSuffix_).c_str(), &trackalgo , nullptr);
1240 
1241  tree->SetBranchAddress((CalibPrefix_ + "trackindex" + CalibSuffix_).c_str(), &trackindex , nullptr);
1242  tree->SetBranchAddress((CalibPrefix_ + "rawid" + CalibSuffix_).c_str(), &rawid , nullptr);
1243  tree->SetBranchAddress((CalibPrefix_ + "localdirx" + CalibSuffix_).c_str(), &localdirx , nullptr);
1244  tree->SetBranchAddress((CalibPrefix_ + "localdiry" + CalibSuffix_).c_str(), &localdiry , nullptr);
1245  tree->SetBranchAddress((CalibPrefix_ + "localdirz" + CalibSuffix_).c_str(), &localdirz , nullptr);
1246  tree->SetBranchAddress((CalibPrefix_ + "firststrip" + CalibSuffix_).c_str(), &firststrip , nullptr);
1247  tree->SetBranchAddress((CalibPrefix_ + "nstrips" + CalibSuffix_).c_str(), &nstrips , nullptr);
1248  tree->SetBranchAddress((CalibPrefix_ + "saturation" + CalibSuffix_).c_str(), &saturation , nullptr);
1249  tree->SetBranchAddress((CalibPrefix_ + "overlapping" + CalibSuffix_).c_str(), &overlapping , nullptr);
1250  tree->SetBranchAddress((CalibPrefix_ + "farfromedge" + CalibSuffix_).c_str(), &farfromedge , nullptr);
1251  tree->SetBranchAddress((CalibPrefix_ + "charge" + CalibSuffix_).c_str(), &charge , nullptr);
1252  tree->SetBranchAddress((CalibPrefix_ + "path" + CalibSuffix_).c_str(), &path , nullptr);
1253  tree->SetBranchAddress((CalibPrefix_ + "chargeoverpath" + CalibSuffix_).c_str(), &chargeoverpath, nullptr);
1254  tree->SetBranchAddress((CalibPrefix_ + "amplitude" + CalibSuffix_).c_str(), &amplitude , nullptr);
1255  tree->SetBranchAddress((CalibPrefix_ + "gainused" + CalibSuffix_).c_str(), &gainused , nullptr);
1256  tree->SetBranchAddress((CalibPrefix_ + "gainusedTick" + CalibSuffix_).c_str(), &gainusedTick , nullptr);
1257 
1258 
1259  unsigned int nentries = tree->GetEntries();
1260  printf("Number of Events = %i + %i = %i\n",NEvent,nentries,(NEvent+nentries));
1261  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
1262  printf("Looping on the Tree :");
1263  int TreeStep = nentries/50;if(TreeStep<=1)TreeStep=1;
1264  for (unsigned int ientry = 0; ientry < tree->GetEntries(); ientry++) {
1265  if(ientry%TreeStep==0){printf(".");fflush(stdout);}
1266  tree->GetEntry(ientry);
1267  processEvent();
1268  }printf("\n");// END OF EVENT LOOP
1269  }
1270 }
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
void SiStripGainFromCalibTree::algoBeginJob ( const edm::EventSetup iSetup)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 631 of file SiStripGainFromCalibTree.cc.

References AlgoMode, sistrip::APV, stAPVGain::APVId, APVsColl, APVsCollOrdered, BAD, stAPVGain::Bin, bookDQMHistos(), stAPVGain::DetId, TrackerGeometry::dets(), dqm_tag_, HTMLExport::elem(), ERun, stAPVGain::Eta, stAPVGain::FitChi2, stAPVGain::FitMPV, stAPVGain::FitMPVErr, stAPVGain::FitNorm, stAPVGain::FitWidth, stAPVGain::FitWidthErr, stAPVGain::Gain, edm::EventSetup::get(), GOOD, mps_fire::i, stAPVGain::Index, isBFieldConsistentWithMode(), stAPVGain::isMasked, m_calibrationMode, m_DQMdir, m_harvestingMode, m_splitDQMstat, MakeCalibrationMap(), MASKED, NClusterPixel, NClusterStrip, PixelTopology::ncolumns(), stAPVGain::NEntries, NEvent, NPixelDets, PixelTopology::nrows(), NStripAPVs, StripTopology::nstrips(), NTrack, or, stAPVGain::Phi, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, stAPVGain::PreviousGain, stAPVGain::PreviousGainTick, stAPVGain::R, DetId::rawId(), SRun, statCollectionFromMode(), AlCaHLTBitMon_QueryRunRegistry::string, stAPVGain::SubDet, ntupleEnum::SubDet, DetId::subdetId(), swapBFieldMode(), StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, tTopo_, stAPVGain::x, stAPVGain::y, and stAPVGain::z.

632 {
633  edm::LogInfo("SiStripGainFromCalibTree") << "AlgoMode : " << AlgoMode << "\n"
634  << "CalibrationMode : " << m_calibrationMode << "\n"
635  << "HarvestingMode : " << m_harvestingMode << std::endl;
636  //Setup DQM histograms
637  if(AlgoMode != "PCL" or m_harvestingMode) {
638  const char * dqm_dir = "AlCaReco/SiStripGainsHarvesting/";
639  this->bookDQMHistos( dqm_dir, dqm_tag_[statCollectionFromMode(m_calibrationMode.c_str())].c_str() );
640  } else {
641  //Check consistency of calibration Mode and BField only for the ALCAPROMPT in the PCL workflow
642  if (!isBFieldConsistentWithMode(iSetup)) {
643  string prevMode = m_calibrationMode;
644  swapBFieldMode();
645  edm::LogInfo("SiStripGainFromCalibTree") << "Switching calibration mode for endorsing BField status: "
646  << prevMode << " ==> " << m_calibrationMode << std::endl;
647  }
648  std::string dqm_dir = m_DQMdir + ((m_splitDQMstat)? m_calibrationMode:"") + "/";
650  this->bookDQMHistos( dqm_dir.c_str(), dqm_tag_[elem].c_str() );
651  }
652 
654  iSetup.get<TrackerTopologyRcd>().get( TopoHandle );
655  tTopo_ = TopoHandle.product();
656 
658  iSetup.get<TrackerDigiGeometryRecord>().get( tkGeom );
659  auto const & Det = tkGeom->dets();
660 
661 
662  NPixelDets = 0;
663  NStripAPVs = 0;
664  unsigned int Index=0;
665  for(unsigned int i=0;i<Det.size();i++){
666  DetId Detid = Det[i]->geographicalId();
667  int SubDet = Detid.subdetId();
668 
669  if( SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID ||
670  SubDet == StripSubdetector::TOB || SubDet == StripSubdetector::TEC ){
671 
672  auto DetUnit = dynamic_cast<const StripGeomDetUnit*> (Det[i]);
673  if(!DetUnit)continue;
674 
675  const StripTopology& Topo = DetUnit->specificTopology();
676  unsigned int NAPV = Topo.nstrips()/128;
677 
678  for(unsigned int j=0;j<NAPV;j++){
679  stAPVGain* APV = new stAPVGain;
680  APV->Index = Index;
681  APV->Bin = -1;
682  APV->DetId = Detid.rawId();
683  APV->APVId = j;
684  APV->SubDet = SubDet;
685  APV->FitMPV = -1;
686  APV->FitMPVErr = -1;
687  APV->FitWidth = -1;
688  APV->FitWidthErr = -1;
689  APV->FitChi2 = -1;
690  APV->FitNorm = -1;
691  APV->Gain = -1;
692  APV->PreviousGain = 1;
693  APV->PreviousGainTick = 1;
694  APV->x = DetUnit->position().basicVector().x();
695  APV->y = DetUnit->position().basicVector().y();
696  APV->z = DetUnit->position().basicVector().z();
697  APV->Eta = DetUnit->position().basicVector().eta();
698  APV->Phi = DetUnit->position().basicVector().phi();
699  APV->R = DetUnit->position().basicVector().transverse();
700  APV->Thickness = DetUnit->surface().bounds().thickness();
701  APV->NEntries = 0;
702  APV->isMasked = false;
703 
704  APVsCollOrdered.push_back(APV);
705  APVsColl[(APV->DetId<<4) | APV->APVId] = APV;
706  Index++;
707  NStripAPVs++;
708  }
709  }
710  }
711 
712  for(unsigned int i=0;i<Det.size();i++){ //Make two loop such that the Pixel information is added at the end --> make transition simpler
713  DetId Detid = Det[i]->geographicalId();
714  int SubDet = Detid.subdetId();
716  auto DetUnit = dynamic_cast<const PixelGeomDetUnit*> (Det[i]);
717  if(!DetUnit) continue;
718 
719  const PixelTopology& Topo = DetUnit->specificTopology();
720  unsigned int NROCRow = Topo.nrows()/(80.);
721  unsigned int NROCCol = Topo.ncolumns()/(52.);
722 
723  for(unsigned int j=0;j<NROCRow;j++){
724  for(unsigned int i=0;i<NROCCol;i++){
725 
726  stAPVGain* APV = new stAPVGain;
727  APV->Index = Index;
728  APV->Bin = -1;
729  APV->DetId = Detid.rawId();
730  APV->APVId = (j<<3 | i);
731  APV->SubDet = SubDet;
732  APV->FitMPV = -1;
733  APV->FitMPVErr = -1;
734  APV->FitWidth = -1;
735  APV->FitWidthErr = -1;
736  APV->FitChi2 = -1;
737  APV->Gain = -1;
738  APV->PreviousGain = 1;
739  APV->PreviousGainTick = 1;
740  APV->x = DetUnit->position().basicVector().x();
741  APV->y = DetUnit->position().basicVector().y();
742  APV->z = DetUnit->position().basicVector().z();
743  APV->Eta = DetUnit->position().basicVector().eta();
744  APV->Phi = DetUnit->position().basicVector().phi();
745  APV->R = DetUnit->position().basicVector().transverse();
746  APV->Thickness = DetUnit->surface().bounds().thickness();
747  APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId());
748  APV->NEntries = 0;
749 
750  APVsCollOrdered.push_back(APV);
751  APVsColl[(APV->DetId<<4) | APV->APVId] = APV;
752  Index++;
753  NPixelDets++;
754  }}
755  }
756  }
757 
758 
760 
761  NEvent = 0;
762  NTrack = 0;
763  NClusterStrip = 0;
764  NClusterPixel = 0;
765  SRun = 1<<31;
766  ERun = 0;
767  GOOD = 0;
768  BAD = 0;
769  MASKED = 0;
770 }
virtual int nrows() const =0
double FitMPV
Definition: APVGainStruct.h:20
bool isBFieldConsistentWithMode(const edm::EventSetup &iSetup) const
double PreviousGainTick
Definition: APVGainStruct.h:29
unsigned int APVId
Definition: APVGainStruct.h:11
float Thickness
Definition: APVGainStruct.h:19
const TrackerTopology * tTopo_
unsigned int DetId
Definition: APVGainStruct.h:10
bool isMasked
Definition: APVGainStruct.h:33
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
std::vector< stAPVGain * > APVsCollOrdered
double FitWidth
Definition: APVGainStruct.h:22
double Gain
Definition: APVGainStruct.h:26
double PreviousGain
Definition: APVGainStruct.h:28
std::unordered_map< unsigned int, stAPVGain * > APVsColl
unsigned int Index
Definition: APVGainStruct.h:8
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
double FitNorm
Definition: APVGainStruct.h:25
double FitMPVErr
Definition: APVGainStruct.h:21
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:18
double FitChi2
Definition: APVGainStruct.h:24
Definition: DetId.h:18
int statCollectionFromMode(const char *tag) const
virtual int nstrips() const =0
const T & get() const
Definition: EventSetup.h:59
double NEntries
Definition: APVGainStruct.h:30
virtual int ncolumns() const =0
unsigned int SubDet
Definition: APVGainStruct.h:12
void bookDQMHistos(const char *dqm_dir, const char *tag)
double FitWidthErr
Definition: APVGainStruct.h:23
void SiStripGainFromCalibTree::algoBeginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 791 of file SiStripGainFromCalibTree.cc.

References a, AlgoMode, sistrip::APV, stAPVGain::APVId, APVsCollOrdered, stAPVGain::DetId, cmsRelvalreport::exit, edm::EventSetup::get(), SiStripGain::getApvGain(), SiStripGain::getNumberOfTags(), SiStripGain::getRange(), SiStripQuality::IsApvBad(), isBFieldConsistentWithMode(), stAPVGain::isMasked, edm::ESHandleBase::isValid(), m_calibrationMode, m_harvestingMode, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, stAPVGain::PreviousGain, stAPVGain::PreviousGainTick, mps_setup::stdout, stAPVGain::SubDet, and swapBFieldMode().

792 {
793  if( !m_harvestingMode && AlgoMode=="PCL") {
794  //Check consistency of calibration Mode and BField only for the ALCAPROMPT in the PCL workflow
795  if (!isBFieldConsistentWithMode(iSetup)) {
796  string prevMode = m_calibrationMode;
797  swapBFieldMode();
798  edm::LogInfo("SiStripGainFromCalibTree") << "Switching calibration mode for endorsing BField status: "
799  << prevMode << " ==> " << m_calibrationMode << std::endl;
800  }
801  }
802 
803  edm::ESHandle<SiStripGain> gainHandle;
804  iSetup.get<SiStripGainRcd>().get(gainHandle);
805  if(!gainHandle.isValid()){edm::LogError("SiStripGainFromCalibTree")<< "gainHandle is not valid\n"; exit(0);}
806 
807  edm::ESHandle<SiStripQuality> SiStripQuality_;
808  iSetup.get<SiStripQualityRcd>().get(SiStripQuality_);
809 
810  for(unsigned int a=0;a<APVsCollOrdered.size();a++){
811 
813 
814  // 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)
816 
817  APV->isMasked = SiStripQuality_->IsApvBad(APV->DetId,APV->APVId);
818  // if(!FirstSetOfConstants){
819 
820  if(gainHandle->getNumberOfTags()!=2){edm::LogError("SiStripGainFromCalibTree")<< "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";fflush(stdout);exit(0);};
821  float newPreviousGain = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 1),1);
822  if(APV->PreviousGain!=1 and newPreviousGain!=APV->PreviousGain)edm::LogWarning("SiStripGainFromCalibTree")<< "WARNING: ParticleGain in the global tag changed\n";
823  APV->PreviousGain = newPreviousGain;
824 
825  float newPreviousGainTick = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 0),0);
826  if(APV->PreviousGainTick!=1 and newPreviousGainTick!=APV->PreviousGainTick){
827  edm::LogWarning("SiStripGainFromCalibTree")<< "WARNING: TickMarkGain in the global tag changed\n"<< std::endl
828  <<" APV->SubDet: "<< APV->SubDet << " APV->APVId:" << APV->APVId << std::endl
829  <<" APV->PreviousGainTick: "<<APV->PreviousGainTick<<" newPreviousGainTick: "<<newPreviousGainTick<<std::endl;
830  }
831  APV->PreviousGainTick = newPreviousGainTick;
832 
833  //printf("DETID = %7i APVID=%1i Previous Gain=%8.4f (G1) x %8.4f (G2)\n",APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain);
834  // }
835 
836  }
837 }
bool IsApvBad(const uint32_t &detid, const short &apvNb) const
bool isBFieldConsistentWithMode(const edm::EventSetup &iSetup) const
double PreviousGainTick
Definition: APVGainStruct.h:29
size_t getNumberOfTags() const
Definition: SiStripGain.h:91
unsigned int APVId
Definition: APVGainStruct.h:11
unsigned int DetId
Definition: APVGainStruct.h:10
bool isMasked
Definition: APVGainStruct.h:33
static float getApvGain(const uint16_t &apv, const SiStripApvGain::Range &range)
Definition: SiStripGain.h:73
std::vector< stAPVGain * > APVsCollOrdered
double PreviousGain
Definition: APVGainStruct.h:28
const T & get() const
Definition: EventSetup.h:59
double a
Definition: hdecay.h:121
bool isValid() const
Definition: ESHandle.h:47
unsigned int SubDet
Definition: APVGainStruct.h:12
const SiStripApvGain::Range getRange(uint32_t detID) const
Definition: SiStripGain.h:70
void SiStripGainFromCalibTree::algoComputeMPVandGain ( )
private

Definition at line 1274 of file SiStripGainFromCalibTree.cc.

References AlgoMode, sistrip::APV, stAPVGain::APVId, APVsColl, BAD, stAPVGain::Bin, CalibrationLevel, Charge_Vs_Index, stAPVGain::DetId, stAPVGain::FitChi2, stAPVGain::FitMPV, stAPVGain::FitMPVErr, stAPVGain::FitNorm, stAPVGain::FitWidth, stAPVGain::FitWidthErr, stAPVGain::Gain, getPeakOfLandau(), GOOD, Harvest, Exhume::I, mps_fire::i, stAPVGain::Index, IsGoodLandauFit(), stAPVGain::isMasked, m_calibrationMode, MASKED, stAPVGain::NEntries, stAPVGain::PreviousGain, statCollectionFromMode(), mps_setup::stdout, and stAPVGain::SubDet.

Referenced by algoEndJob().

1274  {
1275  unsigned int I=0;
1276  TH1F* Proj = nullptr;
1277  double FitResults[6];
1278  double MPVmean = 300;
1279 
1280  int elepos = (AlgoMode == "PCL")? Harvest : statCollectionFromMode(m_calibrationMode.c_str());
1281 
1282  if ( Charge_Vs_Index[elepos]==nullptr ) {
1283  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not execute algoComputeMPVandGain method because "
1284  << m_calibrationMode.c_str() << " statistics cannot be retrieved.\n"
1285  << "Please check if input contains "
1286  << m_calibrationMode.c_str() << " data." << std::endl;
1287  return;
1288  }
1289 
1290  TH2S *chvsidx = (Charge_Vs_Index[elepos])->getTH2S();
1291 
1292 
1293  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
1294  printf("Fitting Charge Distribution :");
1295  int TreeStep = APVsColl.size()/50;
1296  for(auto it = APVsColl.begin();it!=APVsColl.end();it++,I++){
1297  if(I%TreeStep==0){printf(".");fflush(stdout);}
1298  stAPVGain* APV = it->second;
1299  if(APV->Bin<0) APV->Bin = chvsidx->GetXaxis()->FindBin(APV->Index);
1300 
1301  if(APV->isMasked){APV->Gain=APV->PreviousGain; MASKED++; continue;}
1302 
1303  Proj = (TH1F*)(chvsidx->ProjectionY("",chvsidx->GetXaxis()->FindBin(APV->Index),chvsidx->GetXaxis()->FindBin(APV->Index),"e"));
1304  if(!Proj)continue;
1305 
1306  if(CalibrationLevel==0){
1307  }else if(CalibrationLevel==1){
1308  int SecondAPVId = APV->APVId;
1309  if(SecondAPVId%2==0){ SecondAPVId = SecondAPVId+1; }else{ SecondAPVId = SecondAPVId-1; }
1310  stAPVGain* APV2 = APVsColl[(APV->DetId<<4) | SecondAPVId];
1311  if(APV2->Bin<0) APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index);
1312  TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("",APV2->Bin,APV2->Bin,"e"));
1313  if(Proj2){Proj->Add(Proj2,1);delete Proj2;}
1314  }else if(CalibrationLevel==2){
1315  for(unsigned int i=0;i<16;i++){ //loop up to 6APV for Strip and up to 16 for Pixels
1316  auto tmpit = APVsColl.find((APV->DetId<<4) | i);
1317  if(tmpit==APVsColl.end())continue;
1318  stAPVGain* APV2 = tmpit->second;
1319  if(APV2->DetId != APV->DetId || APV2->APVId == APV->APVId)continue;
1320  if(APV2->Bin<0) APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index);
1321  TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("",APV2->Bin,APV2->Bin,"e"));
1322  if(Proj2){Proj->Add(Proj2,1);delete Proj2;}
1323  }
1324  }else{
1325  CalibrationLevel = 0;
1326  printf("Unknown Calibration Level, will assume %i\n",CalibrationLevel);
1327  }
1328 
1329  getPeakOfLandau(Proj,FitResults);
1330  APV->FitMPV = FitResults[0];
1331  APV->FitMPVErr = FitResults[1];
1332  APV->FitWidth = FitResults[2];
1333  APV->FitWidthErr = FitResults[3];
1334  APV->FitChi2 = FitResults[4];
1335  APV->FitNorm = FitResults[5];
1336  APV->NEntries = Proj->GetEntries();
1337 
1338  if(IsGoodLandauFit(FitResults)){
1339  APV->Gain = APV->FitMPV / MPVmean;
1340  if(APV->SubDet>2)GOOD++;
1341  }else{
1342  APV->Gain = APV->PreviousGain;
1343  if(APV->SubDet>2)BAD++;
1344  }
1345  if(APV->Gain<=0) APV->Gain = 1;
1346 
1347  //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);
1348  delete Proj;
1349  }printf("\n");
1350 }
std::vector< MonitorElement * > Charge_Vs_Index
double FitMPV
Definition: APVGainStruct.h:20
unsigned int APVId
Definition: APVGainStruct.h:11
unsigned int DetId
Definition: APVGainStruct.h:10
bool isMasked
Definition: APVGainStruct.h:33
double FitWidth
Definition: APVGainStruct.h:22
double Gain
Definition: APVGainStruct.h:26
double PreviousGain
Definition: APVGainStruct.h:28
bool IsGoodLandauFit(double *FitResults)
std::unordered_map< unsigned int, stAPVGain * > APVsColl
unsigned int Index
Definition: APVGainStruct.h:8
double FitNorm
Definition: APVGainStruct.h:25
const std::complex< double > I
Definition: I.h:8
double FitMPVErr
Definition: APVGainStruct.h:21
double FitChi2
Definition: APVGainStruct.h:24
int statCollectionFromMode(const char *tag) const
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
double NEntries
Definition: APVGainStruct.h:30
unsigned int SubDet
Definition: APVGainStruct.h:12
double FitWidthErr
Definition: APVGainStruct.h:23
void SiStripGainFromCalibTree::algoEndJob ( )
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 991 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.

991  {
992  if(AlgoMode == "PCL" && !m_harvestingMode) return;//nothing to do in that case
993 
994  if(AlgoMode == "CalibTree"){
995  edm::LogInfo("SiStripGainFromCalibTree") << "Analyzing calibration tree" << std::endl;
996  // Loop on calibTrees to fill the 2D histograms
998  }else if(m_harvestingMode){
999  NClusterStrip = (Charge_Vs_Index[Harvest])->getTH2S()->Integral(0,NStripAPVs+1, 0, 99999 );
1000  //NClusterPixel = (Charge_Vs_Index[Harvest])->getTH2S()->Integral(NStripAPVs+2, NStripAPVs+NPixelDets+2, 0, 99999 );
1001  }
1002 
1003  // Now that we have the full statistics we can extract the information of the 2D histograms
1005 
1006  // Result monitoring
1007  qualityMonitor();
1008 
1009  // Force the DB object writing,
1010  // thus setting the IOV as the first processed run (if timeFromEndRun is set to false)
1011  storeOnDbNow();
1012 
1013  if(AlgoMode != "PCL" or saveSummary){
1014  edm::LogInfo("SiStripGainFromCalibTree") << "Saving summary into root file" << std::endl;
1015 
1016  //also save the 2D monitor elements to this file as TH2D tfs
1018 
1019  //save only the statistics for the calibrationTag
1020  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
1021 
1022  if( Charge_Vs_Index[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_Index[elepos])->getTH2S() );
1023  //if( Charge_Vs_Index_Absolute[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_Index_Absolute[elepos])->getTH2S() );
1024  if( Charge_Vs_PathlengthTIB[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTIB[elepos])->getTH2S() );
1025  if( Charge_Vs_PathlengthTOB[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTOB[elepos])->getTH2S() );
1026  if( Charge_Vs_PathlengthTIDP[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTIDP[elepos])->getTH2S() );
1027  if( Charge_Vs_PathlengthTIDM[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTIDM[elepos])->getTH2S() );
1028  if( Charge_Vs_PathlengthTECP1[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTECP1[elepos])->getTH2S() );
1029  if( Charge_Vs_PathlengthTECP2[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTECP2[elepos])->getTH2S() );
1030  if( Charge_Vs_PathlengthTECM1[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTECM1[elepos])->getTH2S() );
1031  if( Charge_Vs_PathlengthTECM2[elepos]!=nullptr ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTECM2[elepos])->getTH2S() );
1032 
1033  storeOnTree(tfs);
1034  }
1035 }
std::vector< MonitorElement * > Charge_Vs_Index
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
void storeOnTree(TFileService *tfs)
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
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
int statCollectionFromMode(const char *tag) const
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
void SiStripGainFromCalibTree::algoEndRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 839 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, plotBeamSpotDB::first, Harvest, mps_fire::i, m_calibrationMode, m_DQMdir, m_harvestingMode, m_splitDQMstat, merge(), APVGain::monHnames(), nullptr, statCollectionFromMode(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, and VChargeHisto.

839  {
840  if(AlgoMode == "PCL" && !m_harvestingMode) return;//nothing to do in that case
841 
842  if(AlgoMode == "PCL" and m_harvestingMode){
843  // Load the 2D histograms from the DQM objects
844  // When running in AlCaHarvesting mode the histos are already booked and should be just retrieved from
845  // DQMStore so that they can be used in the fit
846 
847  edm::LogInfo("SiStripGainFromCalibTree") << "Starting harvesting statistics" << std::endl;
848 
849  // check the required tag before adding histograms
850  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
851  if (elepos!=Harvest) {
852 
853  //collect statistics from DQM into the related monitored elements
855  if(!stag.empty() && stag[0]!='_') stag.insert(0,1,'_');
856 
857 
858  if (elepos==-1) {
859  //implememt backward compatibility
860  elepos=0;
861  stag="";
862  }
863 
865 
866  std::string cvi = DQM_dir + std::string("/Charge_Vs_Index") + stag;
867  //std::string cviA = DQM_dir + std::string("/Charge_Vs_Index_Absolute") + stag;
868  std::string cvpTIB = DQM_dir + std::string("/Charge_Vs_PathlengthTIB") + stag;
869  std::string cvpTOB = DQM_dir + std::string("/Charge_Vs_PathlengthTOB") + stag;
870  std::string cvpTIDP = DQM_dir + std::string("/Charge_Vs_PathlengthTIDP") + stag;
871  std::string cvpTIDM = DQM_dir + std::string("/Charge_Vs_PathlengthTIDM") + stag;
872  std::string cvpTECP1 = DQM_dir + std::string("/Charge_Vs_PathlengthTECP1") + stag;
873  std::string cvpTECP2 = DQM_dir + std::string("/Charge_Vs_PathlengthTECP2") + stag;
874  std::string cvpTECM1 = DQM_dir + std::string("/Charge_Vs_PathlengthTECM1") + stag;
875  std::string cvpTECM2 = DQM_dir + std::string("/Charge_Vs_PathlengthTECM2") + stag;
876 
877  Charge_Vs_Index[elepos] = dbe->get(cvi);
878  //Charge_Vs_Index_Absolute[elepos] = dbe->get(cviA.c_str());
879  Charge_Vs_PathlengthTIB[elepos] = dbe->get(cvpTIB);
880  Charge_Vs_PathlengthTOB[elepos] = dbe->get(cvpTOB);
881  Charge_Vs_PathlengthTIDP[elepos] = dbe->get(cvpTIDP);
882  Charge_Vs_PathlengthTIDM[elepos] = dbe->get(cvpTIDM);
883  Charge_Vs_PathlengthTECP1[elepos] = dbe->get(cvpTECP1);
884  Charge_Vs_PathlengthTECP2[elepos] = dbe->get(cvpTECP2);
885  Charge_Vs_PathlengthTECM1[elepos] = dbe->get(cvpTECM1);
886  Charge_Vs_PathlengthTECM2[elepos] = dbe->get(cvpTECM2);
887 
888  if (Charge_Vs_Index[elepos]==nullptr) {
889  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvi.c_str()
890  << ", statistics will not be summed!" << std::endl;
891  } else {
892  merge( (Charge_Vs_Index[Harvest])->getTH2S(), (Charge_Vs_Index[elepos])->getTH2S() );
893  edm::LogInfo("SiStripGainFromCalibTree") << "Harvesting "
894  << (Charge_Vs_Index[elepos])->getTH2S()->GetEntries() << " more clusters" << std::endl;
895  }
896 
897  //if (Charge_Vs_Index_Absolute[elepos]==0) {
898  // edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cviA.c_str()
899  // << ", statistics will not be summed!" << std::endl;
900  //} else merge( (Charge_Vs_Index_Absolute[Harvest])->getTH2S(), (Charge_Vs_Index_Absolute[elepos])->getTH2S() );
901 
902  if (Charge_Vs_PathlengthTIB[elepos]==nullptr) {
903  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTIB.c_str()
904  << ", statistics will not be summed!" << std::endl;
905  } else (Charge_Vs_PathlengthTIB[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIB[elepos])->getTH2S());
906 
907  if (Charge_Vs_PathlengthTOB[elepos]==nullptr) {
908  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTOB.c_str()
909  << ", statistics will not be summed!" << std::endl;
910  } else (Charge_Vs_PathlengthTOB[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTOB[elepos])->getTH2S());
911 
912  if (Charge_Vs_PathlengthTIDP[elepos]==nullptr) {
913  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTIDP.c_str()
914  << ", statistics will not be summed!" << std::endl;
915  } else (Charge_Vs_PathlengthTIDP[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIDP[elepos])->getTH2S());
916 
917  if (Charge_Vs_PathlengthTIDM[elepos]==nullptr) {
918  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTIDM.c_str()
919  << ", statistics will not be summed!" << std::endl;
920  } else (Charge_Vs_PathlengthTIDM[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIDM[elepos])->getTH2S());
921 
922  if (Charge_Vs_PathlengthTECP1[elepos]==nullptr) {
923  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTECP1.c_str()
924  << ", statistics will not be summed!" << std::endl;
925  } else (Charge_Vs_PathlengthTECP1[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECP1[elepos])->getTH2S());
926 
927  if (Charge_Vs_PathlengthTECP2[elepos]==nullptr) {
928  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTECP2.c_str()
929  << ", statistics will not be summed!" << std::endl;
930  } else (Charge_Vs_PathlengthTECP2[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECP2[elepos])->getTH2S());
931 
932  if (Charge_Vs_PathlengthTECM1[elepos]==nullptr) {
933  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTECM1.c_str()
934  << ", statistics will not be summed!" << std::endl;
935  } else (Charge_Vs_PathlengthTECM1[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECM1[elepos])->getTH2S());
936 
937  if (Charge_Vs_PathlengthTECM2[elepos]==nullptr) {
938  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTECM2.c_str()
939  << ", statistics will not be summed!" << std::endl;
940  } else (Charge_Vs_PathlengthTECM2[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECM2[elepos])->getTH2S());
941 
942 
943  // Gather Charge monitoring histograms
944  std::vector<std::pair<std::string,std::string>> tags = APVGain::monHnames(VChargeHisto,doChargeMonitorPerPlane,"");
945  for (unsigned int i=0;i<tags.size();i++){
946  std::string tag = DQM_dir + "/" + (tags[i]).first + stag;
947  Charge_1[elepos].push_back( APVGain::APVmon(0,0,0,dbe->get( tag) ) );
948  if ( (Charge_1[elepos][i]).getMonitor()==nullptr ) {
949  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << tag.c_str()
950  << ", statistics will not be summed!" << std::endl;
951  } else (Charge_1[Harvest][i]).getMonitor()->getTH1D()->Add((Charge_1[elepos][i]).getMonitor()->getTH1D());
952  }
953 
955  for (unsigned int i=0;i<tags.size();i++){
956  std::string tag = DQM_dir + "/" + (tags[i]).first + stag;
957  Charge_2[elepos].push_back( APVGain::APVmon(0,0,0,dbe->get( tag) ) );
958  if ( (Charge_2[elepos][i]).getMonitor()==nullptr ) {
959  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << tag.c_str()
960  << ", statistics will not be summed!" << std::endl;
961  } else (Charge_2[Harvest][i]).getMonitor()->getTH1D()->Add((Charge_2[elepos][i]).getMonitor()->getTH1D());
962 
963  }
964 
966  for (unsigned int i=0;i<tags.size();i++){
967  std::string tag = DQM_dir + "/" + (tags[i]).first + stag;
968  Charge_3[elepos].push_back( APVGain::APVmon(0,0,0,dbe->get( tag) ) );
969  if ( (Charge_3[elepos][i]).getMonitor()==nullptr ) {
970  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << tag.c_str()
971  << ", statistics will not be summed!" << std::endl;
972  } else (Charge_3[Harvest][i]).getMonitor()->getTH1D()->Add((Charge_3[elepos][i]).getMonitor()->getTH1D());
973 
974  }
975 
977  for (unsigned int i=0;i<tags.size();i++){
978  std::string tag = DQM_dir + "/" + (tags[i]).first + stag;
979  Charge_4[elepos].push_back( APVGain::APVmon(0,0,0,dbe->get( tag) ) );
980  if ( (Charge_4[elepos][i]).getMonitor()==nullptr ) {
981  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << tag.c_str()
982  << ", statistics will not be summed!" << std::endl;
983  } else (Charge_4[Harvest][i]).getMonitor()->getTH1D()->Add((Charge_4[elepos][i]).getMonitor()->getTH1D());
984  }
985 
986  }
987  }
988 }
std::vector< MonitorElement * > Charge_Vs_Index
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
#define nullptr
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
std::array< std::vector< APVGain::APVmon >, 7 > Charge_3
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
std::array< std::vector< APVGain::APVmon >, 7 > Charge_2
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
int statCollectionFromMode(const char *tag) const
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
std::vector< std::string > VChargeHisto
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
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_4
std::array< std::vector< APVGain::APVmon >, 7 > Charge_1
void SiStripGainFromCalibTree::bookDQMHistos ( const char *  dqm_dir,
const char *  tag 
)
private

Definition at line 457 of file SiStripGainFromCalibTree.cc.

References a, AlgoMode, b, 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, plotBeamSpotDB::first, Gains, GainVsPrevGainTEC, GainVsPrevGainTIB, GainVsPrevGainTID, GainVsPrevGainTOB, Harvest, mps_fire::i, cmsBatch::log, m_harvestingMode, APVGain::monHnames(), 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, p1, p2, edm::second(), statCollectionFromMode(), AlCaHLTBitMon_QueryRunRegistry::string, APVGain::subdetectorId(), APVGain::subdetectorPlane(), APVGain::subdetectorSide(), VChargeHisto, and y.

Referenced by algoBeginJob().

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

Definition at line 127 of file SiStripGainFromCalibTree.cc.

References edm::Event::getByToken(), cmsBatch::handle, and edm::Handle< T >::product().

Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), Vispa.Views.PropertyView.BooleanProperty::__init__(), Vispa.Gui.FindDialog.FindDialog::_addScript(), Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), Vispa.Main.Application.Application::_connectSignals(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), algoAnalyze(), Vispa.Views.PropertyView.PropertyView::append(), Vispa.Views.PropertyView.PropertyView::appendAddRow(), Vispa.Main.Application.Application::createAction(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), Vispa.Views.PropertyView.BooleanProperty::setChecked(), Vispa.Main.SplitterTab.SplitterTab::setController(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), Vispa.Views.PropertyView.IntegerProperty::setValue(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), o2o_db_cfgmap.DbManagerDAQ::update_hashmap(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().

127  {
129  evt.getByToken(token, handle);
130  ptr = handle.product();
131  return handle; //return handle to keep alive pointer (safety first)
132  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
T const * product() const
Definition: Handle.h:81
SiStripApvGain * SiStripGainFromCalibTree::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripApvGain >.

Definition at line 1608 of file SiStripGainFromCalibTree.cc.

References a, sistrip::APV, APVsCollOrdered, stAPVGain::DetId, stAPVGain::Gain, m_harvestingMode, GetRecoTauVFromDQM_MC_cff::obj, produceTagFilter(), SiStripApvGain::put(), ConditionDBWriter< SiStripApvGain >::setDoStore(), and stAPVGain::SubDet.

1609 {
1611  if(!m_harvestingMode) return obj;
1612 
1613  if(!produceTagFilter()){
1614  edm::LogWarning("SiStripGainFromCalibTree")<< "getNewObject -> will not produce a paylaod because produceTagFilter returned false " << endl;
1615  setDoStore(false);
1616  return obj;
1617  }
1618 
1619 
1620  std::vector<float>* theSiStripVector = nullptr;
1621  unsigned int PreviousDetId = 0;
1622  for(unsigned int a=0;a<APVsCollOrdered.size();a++){
1624  if(APV==nullptr){ printf("Bug\n"); continue; }
1625  if(APV->SubDet<=2)continue;
1626  if(APV->DetId != PreviousDetId){
1627  if(theSiStripVector!=nullptr){
1628  SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end());
1629  if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId);
1630  }
1631  theSiStripVector = new std::vector<float>;
1632  PreviousDetId = APV->DetId;
1633  }
1634  theSiStripVector->push_back(APV->Gain);
1635  }
1636  if(theSiStripVector!=nullptr){
1637  SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end());
1638  if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId);
1639  }
1640 
1641  if (theSiStripVector!=nullptr) delete theSiStripVector;
1642 
1643  return obj;
1644 }
unsigned int DetId
Definition: APVGainStruct.h:10
bool put(const uint32_t &detID, Range input)
std::vector< stAPVGain * > APVsCollOrdered
double Gain
Definition: APVGainStruct.h:26
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
unsigned int SubDet
Definition: APVGainStruct.h:12
void SiStripGainFromCalibTree::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 50,
double  HighRange = 5400 
)
private

Definition at line 1038 of file SiStripGainFromCalibTree.cc.

References MinNrEntries.

Referenced by algoComputeMPVandGain().

1039 {
1040  FitResults[0] = -0.5; //MPV
1041  FitResults[1] = 0; //MPV error
1042  FitResults[2] = -0.5; //Width
1043  FitResults[3] = 0; //Width error
1044  FitResults[4] = -0.5; //Fit Chi2/NDF
1045  FitResults[5] = 0; //Normalization
1046 
1047  if( InputHisto->GetEntries() < MinNrEntries)return;
1048 
1049  // perform fit with standard landau
1050  TF1* MyLandau = new TF1("MyLandau","landau",LowRange, HighRange);
1051  MyLandau->SetParameter(1,300);
1052  InputHisto->Fit(MyLandau,"0QR WW");
1053 
1054  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
1055  FitResults[0] = MyLandau->GetParameter(1); //MPV
1056  FitResults[1] = MyLandau->GetParError(1); //MPV error
1057  FitResults[2] = MyLandau->GetParameter(2); //Width
1058  FitResults[3] = MyLandau->GetParError(2); //Width error
1059  FitResults[4] = MyLandau->GetChisquare() / MyLandau->GetNDF(); //Fit Chi2/NDF
1060  FitResults[5] = MyLandau->GetParameter(0);
1061 
1062  delete MyLandau;
1063 }
bool SiStripGainFromCalibTree::isBFieldConsistentWithMode ( const edm::EventSetup iSetup) const
private

Definition at line 772 of file SiStripGainFromCalibTree.cc.

References edm::EventSetup::get(), RunInfo::m_avg_current, m_calibrationMode, MagFieldCurrentTh, and edm::ESHandle< T >::product().

Referenced by algoBeginJob(), and algoBeginRun().

772  {
773  edm::ESHandle<RunInfo> runInfo;
774  iSetup.get<RunInfoRcd>().get(runInfo);
775 
776  double average_current = runInfo.product()->m_avg_current;
777  bool isOn = (average_current > MagFieldCurrentTh);
778  bool is0T = (m_calibrationMode.substr( m_calibrationMode.length()-2 )=="0T");
779 
780  return ( (isOn && !is0T) || (!isOn && is0T) );
781 }
const T & get() const
Definition: EventSetup.h:59
float m_avg_current
Definition: RunInfo.h:29
T const * product() const
Definition: ESHandle.h:86
bool SiStripGainFromCalibTree::IsGoodLandauFit ( double *  FitResults)
private

Definition at line 1065 of file SiStripGainFromCalibTree.cc.

Referenced by algoComputeMPVandGain().

1065  {
1066  if(FitResults[0] <= 0 )return false;
1067 // if(FitResults[1] > MaxMPVError )return false;
1068 // if(FitResults[4] > MaxChi2OverNDF)return false;
1069  return true;
1070 }
void SiStripGainFromCalibTree::MakeCalibrationMap ( )
private

Definition at line 1658 of file SiStripGainFromCalibTree.cc.

References sistrip::APV, APVsColl, stAPVGain::CalibGain, m_calibrationPath, and useCalibration.

Referenced by algoBeginJob().

1658  {
1659  if(!useCalibration)return;
1660 
1661  TChain* t1 = new TChain("SiStripCalib/APVGain");
1662  t1->Add(m_calibrationPath.c_str());
1663 
1664  unsigned int tree_DetId;
1665  unsigned char tree_APVId;
1666  double tree_Gain;
1667 
1668  t1->SetBranchAddress("DetId" ,&tree_DetId );
1669  t1->SetBranchAddress("APVId" ,&tree_APVId );
1670  t1->SetBranchAddress("Gain" ,&tree_Gain );
1671 
1672  for (unsigned int ientry = 0; ientry < t1->GetEntries(); ientry++) {
1673  t1->GetEntry(ientry);
1674  stAPVGain* APV = APVsColl[(tree_DetId<<4) | (unsigned int)tree_APVId];
1675  APV->CalibGain = tree_Gain;
1676  }
1677 
1678  delete t1;
1679 }
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double CalibGain
Definition: APVGainStruct.h:27
void SiStripGainFromCalibTree::merge ( TH2 *  A,
TH2 *  B 
)
private

Definition at line 327 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndRun().

327  {
328  if(A->GetNbinsX() == B->GetNbinsX()){
329  A->Add(B);
330  }else{
331  for(int x=0;x<=B->GetNbinsX()+1; x++){
332  for(int y=0;y<=B->GetNbinsY()+1; y++){
333  A->SetBinContent(x,y,A->GetBinContent(x,y)+B->GetBinContent(x,y));
334  }}
335  }
336 }
static const std::string B
void SiStripGainFromCalibTree::processEvent ( )
private

Definition at line 1072 of file SiStripGainFromCalibTree.cc.

References AllowSaturation, sistrip::APV, APVsColl, stAPVGain::CalibGain, 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, stAPVGain::Eta, eventnumber, funct::false, farfromedge, APVGain::FetchMonitor(), HcalObjRepresent::Fill(), FirstSetOfConstants, firststrip, mps_fire::i, stAPVGain::Index, createfilelist::int, funct::m, m_calibrationMode, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackingIteration, MaxTrackMomentum, MinTrackEta, MinTrackHits, MinTrackMomentum, NClusterPixel, NClusterStrip, NEvent, nstrips, NTrack, OldGainRemoving, overlapping, path, stAPVGain::PreviousGain, rawid, runnumber, alignCSCRings::s, saturation, SRun, statCollectionFromMode(), stAPVGain::SubDet, StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, trackalgo, trackchi2ndof, tracketa, trackhitsvalid, trackp, funct::true, tTopo_, useCalibration, and Validation.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

1072  {
1073 
1074  edm::LogInfo("SiStripGainFromCalibTree") << "Processing run " << runnumber
1075  << " and event " << eventnumber
1076  << " for " << m_calibrationMode << " calibration." << std::endl;
1077 
1080 
1081  NEvent++;
1082  NTrack+=(*trackp).size();
1083 
1084  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
1085 
1086  unsigned int FirstAmplitude=0;
1087  for(unsigned int i=0;i<(*chargeoverpath).size();i++){
1088  FirstAmplitude+=(*nstrips)[i];
1089  int TI = (*trackindex)[i];
1090 
1091  //printf("%i - %i - %i %i %i\n", (int)(*rawid)[i], (int)(*firststrip)[i]/128, (int)(*farfromedge)[i], (int)(*overlapping)[i], (int)(*saturation )[i] );
1092  if((*tracketa )[TI] < MinTrackEta )continue;
1093  if((*tracketa )[TI] > MaxTrackEta )continue;
1094  if((*trackp )[TI] < MinTrackMomentum )continue;
1095  if((*trackp )[TI] > MaxTrackMomentum )continue;
1096  if((*trackhitsvalid)[TI] < MinTrackHits )continue;
1097  if((*trackchi2ndof )[TI] > MaxTrackChiOverNdf )continue;
1098  if((*trackalgo )[TI] > MaxTrackingIteration )continue;
1099 
1100  stAPVGain* APV = APVsColl[((*rawid)[i]<<4) | ((*firststrip)[i]/128)]; //works for both strip and pixel thanks to firstStrip encoding for pixel in the calibTree
1101 
1102  if(APV->SubDet>2 && (*farfromedge)[i] == false )continue;
1103  if(APV->SubDet>2 && (*overlapping)[i] == true )continue;
1104  if(APV->SubDet>2 && (*saturation )[i] && !AllowSaturation)continue;
1105  if(APV->SubDet>2 && (*nstrips )[i] > MaxNrStrips )continue;
1106 
1107 
1108  //printf("detId=%7i run=%7i event=%9i charge=%5i cs=%3i\n",(*rawid)[i],runnumber,eventnumber,(*charge)[i],(*nstrips)[i]);
1109 
1110  //double trans = atan2((*localdiry)[i],(*localdirx)[i])*(180/3.14159265);
1111  //double alpha = acos ((*localdirx)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265);
1112  //double beta = acos ((*localdiry)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265);
1113 
1114  //printf("NStrip = %i : Charge = %i --> Path = %f --> ChargeOverPath=%f\n",(*nstrips)[i],(*charge)[i],(*path)[i],(*chargeoverpath)[i]);
1115  //printf("Amplitudes: ");
1116  //for(unsigned int a=0;a<(*nstrips)[i];a++){printf("%i ",(*amplitude)[FirstAmplitude+a]);}
1117  //printf("\n");
1118 
1119  if(APV->SubDet>2){NClusterStrip++;}else{NClusterPixel++;}
1120 
1121  int Charge = 0;
1122  if(APV->SubDet>2 && (useCalibration || !FirstSetOfConstants)){
1123  bool Saturation = false;
1124  for(unsigned int s=0;s<(*nstrips)[i];s++){
1125  int StripCharge = (*amplitude)[FirstAmplitude-(*nstrips)[i]+s];
1126  if(useCalibration && !FirstSetOfConstants){ StripCharge=(int)(StripCharge*(APV->PreviousGain/APV->CalibGain));
1127  }else if(useCalibration){ StripCharge=(int)(StripCharge/APV->CalibGain);
1128  }else if(!FirstSetOfConstants){ StripCharge=(int)(StripCharge*APV->PreviousGain);}
1129  if(StripCharge>1024){
1130  StripCharge = 255;
1131  Saturation = true;
1132  }else if(StripCharge>254){
1133  StripCharge = 254;
1134  Saturation = true;
1135  }
1136  Charge += StripCharge;
1137  }
1138  if(Saturation && !AllowSaturation)continue;
1139  }else if(APV->SubDet>2){
1140  Charge = (*charge)[i];
1141  }else{
1142  Charge = (*charge)[i]/265.0; //expected scale factor between pixel and strip charge
1143  }
1144 
1145  //printf("ChargeDifference = %i Vs %i with Gain = %f\n",(*charge)[i],Charge,APV->CalibGain);
1146 
1147  double ClusterChargeOverPath = ( (double) Charge )/(*path)[i] ;
1148  if(APV->SubDet>2){
1149  if(Validation) {ClusterChargeOverPath/=(*gainused)[i];}
1150  if(OldGainRemoving){ClusterChargeOverPath*=(*gainused)[i];}
1151  }
1152 
1153  // keep pixel cluster charge processing until here
1154  if(APV->SubDet<=2) continue;
1155 
1156  (Charge_Vs_Index[elepos]) ->Fill(APV->Index,ClusterChargeOverPath);
1157 
1158 
1159  // Compute the charge for monitoring and fill the relative histograms
1160  int mCharge1 = 0;
1161  int mCharge2 = 0;
1162  int mCharge3 = 0;
1163  int mCharge4 = 0;
1164  if(APV->SubDet>2) {
1165  for(unsigned int s=0;s<(*nstrips)[i];s++){
1166  int StripCharge = (*amplitude)[FirstAmplitude-(*nstrips)[i]+s];
1167  if(StripCharge>1024) StripCharge = 255;
1168  else if(StripCharge>254) StripCharge = 254;
1169  mCharge1 += StripCharge;
1170  mCharge2 += StripCharge;
1171  mCharge3 += StripCharge;
1172  mCharge4 += StripCharge;
1173  }
1174  // Revome gains for monitoring
1175  mCharge2 *= (*gainused)[i]; // remove G2
1176  mCharge3 *= (*gainusedTick)[i]; // remove G1
1177  mCharge4 *= ( (*gainused)[i] * (*gainusedTick)[i]); // remove G1 and G2
1178  }
1179  std::vector<APVGain::APVmon>& v1 = Charge_1[elepos];
1180  std::vector<MonitorElement*> cmon1 = APVGain::FetchMonitor(v1, (*rawid)[i], tTopo_);
1181  for(unsigned int m=0; m<cmon1.size(); m++) cmon1[m]->Fill(( (double) mCharge1 )/(*path)[i]);
1182 
1183  std::vector<APVGain::APVmon>& v2 = Charge_2[elepos];
1184  std::vector<MonitorElement*> cmon2 = APVGain::FetchMonitor(v2, (*rawid)[i], tTopo_);
1185  for(unsigned int m=0; m<cmon2.size(); m++) cmon2[m]->Fill(( (double) mCharge2 )/(*path)[i]);
1186 
1187  std::vector<APVGain::APVmon>& v3 = Charge_3[elepos];
1188  std::vector<MonitorElement*> cmon3 = APVGain::FetchMonitor(v3, (*rawid)[i], tTopo_);
1189  for(unsigned int m=0; m<cmon3.size(); m++) cmon3[m]->Fill(( (double) mCharge3 )/(*path)[i]);
1190 
1191  std::vector<APVGain::APVmon>& v4 = Charge_4[elepos];
1192  std::vector<MonitorElement*> cmon4 = APVGain::FetchMonitor(v4, (*rawid)[i], tTopo_);
1193  for(unsigned int m=0; m<cmon4.size(); m++) cmon4[m]->Fill(( (double) mCharge4 )/(*path)[i]);
1194 
1195 
1196 
1197  // Fill Charge Vs pathLenght histograms
1198  if(APV->SubDet==StripSubdetector::TIB){
1199  (Charge_Vs_PathlengthTIB[elepos])->Fill((*path)[i],Charge); // TIB
1200 
1201  }else if(APV->SubDet==StripSubdetector::TOB){
1202  (Charge_Vs_PathlengthTOB[elepos])->Fill((*path)[i],Charge); // TOB
1203 
1204  }else if(APV->SubDet==StripSubdetector::TID){
1205  if(APV->Eta<0) { (Charge_Vs_PathlengthTIDM[elepos])->Fill((*path)[i],Charge); } // TID minus
1206  else if(APV->Eta>0){ (Charge_Vs_PathlengthTIDP[elepos])->Fill((*path)[i],Charge); } // TID plus
1207 
1208  }else if(APV->SubDet==StripSubdetector::TEC){
1209  if(APV->Eta<0){
1210  if(APV->Thickness<0.04) { (Charge_Vs_PathlengthTECM1[elepos])->Fill((*path)[i],Charge); } // TEC minus, type 1
1211  else if(APV->Thickness>0.04){ (Charge_Vs_PathlengthTECM2[elepos])->Fill((*path)[i],Charge); } // TEC minus, type 2
1212  } else if(APV->Eta>0){
1213  if(APV->Thickness<0.04) { (Charge_Vs_PathlengthTECP1[elepos])->Fill((*path)[i],Charge); } // TEC plus, type 1
1214  else if(APV->Thickness>0.04){ (Charge_Vs_PathlengthTECP2[elepos])->Fill((*path)[i],Charge); } // TEC plus, type 2
1215  }
1216  }
1217 
1218  }// END OF ON-CLUSTER LOOP
1219 }//END OF processEvent()
std::vector< MonitorElement * > Charge_Vs_Index
const std::vector< float > * trackp
const std::vector< double > * trackchi2ndof
float Thickness
Definition: APVGainStruct.h:19
const std::vector< unsigned int > * rawid
const TrackerTopology * tTopo_
const std::vector< int > * trackalgo
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
const std::vector< unsigned int > * trackhitsvalid
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=0)
double PreviousGain
Definition: APVGainStruct.h:28
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::unordered_map< unsigned int, stAPVGain * > APVsColl
unsigned int Index
Definition: APVGainStruct.h:8
double CalibGain
Definition: APVGainStruct.h:27
std::array< std::vector< APVGain::APVmon >, 7 > Charge_3
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
const std::vector< unsigned short > * firststrip
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
std::array< std::vector< APVGain::APVmon >, 7 > Charge_2
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
int statCollectionFromMode(const char *tag) const
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
const std::vector< bool > * overlapping
const std::vector< bool > * saturation
const std::vector< bool > * farfromedge
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
const std::vector< double > * path
std::array< std::vector< APVGain::APVmon >, 7 > Charge_4
unsigned int SubDet
Definition: APVGainStruct.h:12
const std::vector< unsigned short > * nstrips
const std::vector< double > * tracketa
std::array< std::vector< APVGain::APVmon >, 7 > Charge_1
bool SiStripGainFromCalibTree::produceTagFilter ( )
private

Definition at line 1578 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().

1578  {
1579 
1580  // The goal of this function is to check wether or not there is enough statistics
1581  // to produce a meaningful tag for the DB
1582  int elepos = (AlgoMode == "PCL")? Harvest : statCollectionFromMode(m_calibrationMode.c_str());
1583  if( Charge_Vs_Index[elepos]==nullptr ) {
1584  edm::LogError("SiStripGainFromCalibTree") << "produceTagFilter -> Return false: could not retrieve the "
1585  << m_calibrationMode.c_str() << " statistics.\n"
1586  << "Please check if input contains "
1587  << m_calibrationMode.c_str() << " data." << std::endl;
1588  return false;
1589  }
1590 
1591 
1592  float integral = (Charge_Vs_Index[elepos])->getTH2S()->Integral();
1593  if( (Charge_Vs_Index[elepos])->getTH2S()->Integral(0,NStripAPVs+1, 0, 99999 ) < tagCondition_NClusters) {
1594  edm::LogWarning("SiStripGainFromCalibTree")
1595  << "calibrationMode -> " << m_calibrationMode << "\n"
1596  << "produceTagFilter -> Return false: Statistics is too low : " << integral << endl;
1597  return false;
1598  }
1599  if((1.0 * GOOD) / (GOOD+BAD) < tagCondition_GoodFrac) {
1600  edm::LogWarning("SiStripGainFromCalibTree")
1601  << "calibrationMode -> " << m_calibrationMode << "\n"
1602  << "produceTagFilter -> Return false: ratio of GOOD/TOTAL is too low: " << (1.0 * GOOD) / (GOOD+BAD) << endl;
1603  return false;
1604  }
1605  return true;
1606 }
std::vector< MonitorElement * > Charge_Vs_Index
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
int statCollectionFromMode(const char *tag) const
void SiStripGainFromCalibTree::qualityMonitor ( )
private

Definition at line 1352 of file SiStripGainFromCalibTree.cc.

References a, AlgoMode, sistrip::APV, APVsCollOrdered, stringResolutionProvider_cfi::bin, Charge_Vs_Index, stAPVGain::DetId, DiffWRTPrevGainTEC, DiffWRTPrevGainTIB, DiffWRTPrevGainTID, DiffWRTPrevGainTOB, MillePedeFileConverter_cfg::e, stAPVGain::Eta, reco::tau::disc::Eta(), APVGain::FetchMonitor(), MonitorElement::Fill(), stAPVGain::FitMPV, stAPVGain::FitMPVErr, stAPVGain::Gain, g4SimHits_cfi::Gain, Gains, GainVsPrevGainTEC, GainVsPrevGainTIB, GainVsPrevGainTID, GainVsPrevGainTOB, h, Harvest, stAPVGain::Index, stAPVGain::isMasked, 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, stAPVGain::NEntries, newCharge, NoMPVfit, NoMPVmasked, stAPVGain::Phi, colinearityKinematic::Phi, stAPVGain::PreviousGain, stAPVGain::R, dttmaxenums::R, statCollectionFromMode(), stAPVGain::SubDet, ntupleEnum::SubDet, stAPVGain::Thickness, tTopo_, z, and stAPVGain::z.

Referenced by algoEndJob().

1352  {
1353 
1354  int elepos = (AlgoMode == "PCL")? Harvest : statCollectionFromMode(m_calibrationMode.c_str());
1355 
1356  for(unsigned int a=0;a<APVsCollOrdered.size();a++) {
1358  if(APV==nullptr)continue;
1359 
1360  unsigned int Index = APV->Index;
1361  unsigned int SubDet = APV->SubDet;
1362  unsigned int DetId = APV->DetId;
1363  float z = APV->z;
1364  float Eta = APV->Eta;
1365  float R = APV->R;
1366  float Phi = APV->Phi;
1367  float Thickness = APV->Thickness;
1368  double FitMPV = APV->FitMPV;
1369  double FitMPVErr = APV->FitMPVErr;
1370  double Gain = APV->Gain;
1371  double NEntries = APV->NEntries;
1372  double PreviousGain = APV->PreviousGain;
1373 
1374  if (SubDet<3) continue; // avoid to loop over Pixel det id
1375 
1376  if (Gain!=1.) {
1377  std::vector<MonitorElement*> charge_histos = APVGain::FetchMonitor(newCharge, DetId, tTopo_);
1378  TH2S *chvsidx = (Charge_Vs_Index[elepos])->getTH2S();
1379  int bin = chvsidx->GetXaxis()->FindBin(Index);
1380  TH1D* Proj = chvsidx->ProjectionY("proj",bin,bin);
1381  for (int binId=0; binId<Proj->GetXaxis()->GetNbins();binId++) {
1382  double new_charge = Proj->GetXaxis()->GetBinCenter(binId) / Gain;
1383  if (Proj->GetBinContent(binId)!=0.) {
1384  for (unsigned int h=0;h<charge_histos.size();h++) {
1385  TH1D* chisto = (charge_histos[h])->getTH1D();
1386  for (int e=0;e<Proj->GetBinContent(binId);e++) chisto->Fill(new_charge);
1387  }
1388  }
1389  }
1390  }
1391 
1392 
1393  if (FitMPV<=0.) { // No fit of MPV
1394  if (APV->isMasked) NoMPVmasked->Fill(z,R);
1395  else NoMPVfit->Fill(z,R);
1396 
1397  } else { // Fit of MPV
1398  if(FitMPV>0.) Gains->Fill(Gain);
1399 
1400  MPVs->Fill(FitMPV);
1401  if(Thickness<0.04) MPVs320->Fill(FitMPV);
1402  if(Thickness>0.04) MPVs500->Fill(FitMPV);
1403 
1404  MPVError->Fill(FitMPVErr);
1405  MPVErrorVsMPV->Fill(FitMPV,FitMPVErr);
1406  MPVErrorVsEta->Fill(Eta,FitMPVErr);
1407  MPVErrorVsPhi->Fill(Phi,FitMPVErr);
1408  MPVErrorVsN->Fill(NEntries,FitMPVErr);
1409 
1410  if(SubDet==3) {
1411  MPV_Vs_EtaTIB->Fill(Eta,FitMPV);
1412  MPV_Vs_PhiTIB->Fill(Phi,FitMPV);
1413  MPVsTIB->Fill(FitMPV);
1414 
1415  } else if(SubDet==4) {
1416  MPV_Vs_EtaTID->Fill(Eta,FitMPV);
1417  MPV_Vs_PhiTID->Fill(Phi,FitMPV);
1418  MPVsTID->Fill(FitMPV);
1419  if(Eta<0.) MPVsTIDM->Fill(FitMPV);
1420  if(Eta>0.) MPVsTIDP->Fill(FitMPV);
1421 
1422  } else if (SubDet==5) {
1423  MPV_Vs_EtaTOB->Fill(Eta,FitMPV);
1424  MPV_Vs_PhiTOB->Fill(Phi,FitMPV);
1425  MPVsTOB->Fill(FitMPV);
1426 
1427  } else if (SubDet==6) {
1428  MPV_Vs_EtaTEC->Fill(Eta,FitMPV);
1429  MPV_Vs_PhiTEC->Fill(Phi,FitMPV);
1430  MPVsTEC->Fill(FitMPV);
1431  if(Eta<0.) MPVsTECM->Fill(FitMPV);
1432  if(Eta>0.) MPVsTECP->Fill(FitMPV);
1433  if(Thickness<0.04) {
1434  MPV_Vs_EtaTECthin->Fill(Eta,FitMPV);
1435  MPV_Vs_PhiTECthin->Fill(Phi,FitMPV);
1436  MPVsTECthin->Fill(FitMPV);
1437  if(Eta>0.) MPVsTECP1->Fill(FitMPV);
1438  if(Eta<0.) MPVsTECM1->Fill(FitMPV);
1439  }
1440  if(Thickness>0.04) {
1441  MPV_Vs_EtaTECthick->Fill(Eta,FitMPV);
1442  MPV_Vs_PhiTECthick->Fill(Phi,FitMPV);
1443  MPVsTECthick->Fill(FitMPV);
1444  if(Eta>0.) MPVsTECP2->Fill(FitMPV);
1445  if(Eta<0.) MPVsTECM2->Fill(FitMPV);
1446  }
1447  }
1448  }
1449 
1450  if(SubDet==3 && PreviousGain!=0. ) DiffWRTPrevGainTIB->Fill(Gain/PreviousGain);
1451  else if(SubDet==4 && PreviousGain!=0. ) DiffWRTPrevGainTID->Fill(Gain/PreviousGain);
1452  else if(SubDet==5 && PreviousGain!=0. ) DiffWRTPrevGainTOB->Fill(Gain/PreviousGain);
1453  else if(SubDet==6 && PreviousGain!=0. ) DiffWRTPrevGainTEC->Fill(Gain/PreviousGain);
1454 
1455  if(SubDet==3 ) GainVsPrevGainTIB->Fill(PreviousGain,Gain);
1456  else if(SubDet==4 ) GainVsPrevGainTID->Fill(PreviousGain,Gain);
1457  else if(SubDet==5 ) GainVsPrevGainTOB->Fill(PreviousGain,Gain);
1458  else if(SubDet==6 ) GainVsPrevGainTEC->Fill(PreviousGain,Gain);
1459  }
1460 }
std::vector< MonitorElement * > Charge_Vs_Index
std::vector< APVGain::APVmon > newCharge
double FitMPV
Definition: APVGainStruct.h:20
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
float Thickness
Definition: APVGainStruct.h:19
const TrackerTopology * tTopo_
unsigned int DetId
Definition: APVGainStruct.h:10
bool isMasked
Definition: APVGainStruct.h:33
void Fill(long long x)
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=0)
std::vector< stAPVGain * > APVsCollOrdered
double Gain
Definition: APVGainStruct.h:26
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
double FitMPVErr
Definition: APVGainStruct.h:21
bin
set the eta bin as selection string.
Definition: DetId.h:18
int statCollectionFromMode(const char *tag) const
double NEntries
Definition: APVGainStruct.h:30
double a
Definition: hdecay.h:121
unsigned int SubDet
Definition: APVGainStruct.h:12
int SiStripGainFromCalibTree::statCollectionFromMode ( const char *  tag) const
inlineprivate

Definition at line 314 of file SiStripGainFromCalibTree.cc.

References relativeConstraints::empty, None, and AlCaHLTBitMon_QueryRunRegistry::string.

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

315 {
316  std::vector<string>::const_iterator it=dqm_tag_.begin();
317  while(it!=dqm_tag_.end()) {
318  if(*it==std::string(tag)) return it-dqm_tag_.begin();
319  it++;
320  }
321 
322  if (std::string(tag).empty()) return 0; // return StdBunch calibration mode for backward compatibility
323 
324  return None;
325 }
void SiStripGainFromCalibTree::storeOnTree ( TFileService tfs)
private

Definition at line 1462 of file SiStripGainFromCalibTree.cc.

References a, sistrip::APV, stAPVGain::APVId, APVsCollOrdered, BAD, Charge_Vs_Index, stAPVGain::DetId, stAPVGain::Eta, stAPVGain::FitChi2, stAPVGain::FitMPV, stAPVGain::FitMPVErr, stAPVGain::FitNorm, stAPVGain::FitWidth, stAPVGain::FitWidthErr, stAPVGain::Gain, Gains, GOOD, stAPVGain::Index, stAPVGain::isMasked, m_calibrationMode, TFileService::make(), MASKED, NClusterStrip, stAPVGain::NEntries, NEvent, NStripAPVs, NTrack, OutputGains, stAPVGain::Phi, stAPVGain::PreviousGain, stAPVGain::PreviousGainTick, stAPVGain::R, statCollectionFromMode(), mps_setup::stdout, stAPVGain::SubDet, stAPVGain::Thickness, stAPVGain::x, stAPVGain::y, and stAPVGain::z.

Referenced by algoEndJob().

1463 {
1464  unsigned int tree_Index;
1465  unsigned int tree_Bin;
1466  unsigned int tree_DetId;
1467  unsigned char tree_APVId;
1468  unsigned char tree_SubDet;
1469  float tree_x;
1470  float tree_y;
1471  float tree_z;
1472  float tree_Eta;
1473  float tree_R;
1474  float tree_Phi;
1475  float tree_Thickness;
1476  float tree_FitMPV;
1477  float tree_FitMPVErr;
1478  float tree_FitWidth;
1479  float tree_FitWidthErr;
1480  float tree_FitChi2NDF;
1481  float tree_FitNorm;
1482  double tree_Gain;
1483  double tree_PrevGain;
1484  double tree_PrevGainTick;
1485  double tree_NEntries;
1486  bool tree_isMasked;
1487 
1488  TTree* MyTree;
1489  MyTree = tfs->make<TTree> ("APVGain","APVGain");
1490  MyTree->Branch("Index" ,&tree_Index ,"Index/i");
1491  MyTree->Branch("Bin" ,&tree_Bin ,"Bin/i");
1492  MyTree->Branch("DetId" ,&tree_DetId ,"DetId/i");
1493  MyTree->Branch("APVId" ,&tree_APVId ,"APVId/b");
1494  MyTree->Branch("SubDet" ,&tree_SubDet ,"SubDet/b");
1495  MyTree->Branch("x" ,&tree_x ,"x/F");
1496  MyTree->Branch("y" ,&tree_y ,"y/F");
1497  MyTree->Branch("z" ,&tree_z ,"z/F");
1498  MyTree->Branch("Eta" ,&tree_Eta ,"Eta/F");
1499  MyTree->Branch("R" ,&tree_R ,"R/F");
1500  MyTree->Branch("Phi" ,&tree_Phi ,"Phi/F");
1501  MyTree->Branch("Thickness" ,&tree_Thickness ,"Thickness/F");
1502  MyTree->Branch("FitMPV" ,&tree_FitMPV ,"FitMPV/F");
1503  MyTree->Branch("FitMPVErr" ,&tree_FitMPVErr ,"FitMPVErr/F");
1504  MyTree->Branch("FitWidth" ,&tree_FitWidth ,"FitWidth/F");
1505  MyTree->Branch("FitWidthErr" ,&tree_FitWidthErr,"FitWidthErr/F");
1506  MyTree->Branch("FitChi2NDF" ,&tree_FitChi2NDF ,"FitChi2NDF/F");
1507  MyTree->Branch("FitNorm" ,&tree_FitNorm ,"FitNorm/F");
1508  MyTree->Branch("Gain" ,&tree_Gain ,"Gain/D");
1509  MyTree->Branch("PrevGain" ,&tree_PrevGain ,"PrevGain/D");
1510  MyTree->Branch("PrevGainTick" ,&tree_PrevGainTick,"PrevGainTick/D");
1511  MyTree->Branch("NEntries" ,&tree_NEntries ,"NEntries/D");
1512  MyTree->Branch("isMasked" ,&tree_isMasked ,"isMasked/O");
1513 
1514 
1515  FILE* Gains = stdout;
1516  fprintf(Gains,"NEvents = %i\n",NEvent);
1517  fprintf(Gains,"NTracks = %i\n",NTrack);
1518  //fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel);
1519  fprintf(Gains,"NClustersStrip = %i\n",NClusterStrip);
1520  //fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast<unsigned long>(NPixelDets));
1521  fprintf(Gains,"Number of Strip APVs = %lu\n",static_cast<unsigned long>(NStripAPVs));
1522  fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD), MASKED);
1523 
1524  Gains=fopen(OutputGains.c_str(),"w");
1525  fprintf(Gains,"NEvents = %i\n",NEvent);
1526  fprintf(Gains,"NTracks = %i\n",NTrack);
1527  //fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel);
1528  fprintf(Gains,"NClustersStrip = %i\n",NClusterStrip);
1529  fprintf(Gains,"Number of Strip APVs = %lu\n",static_cast<unsigned long>(NStripAPVs));
1530  //fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast<unsigned long>(NPixelDets));
1531  fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD), MASKED);
1532 
1533  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
1534 
1535  for(unsigned int a=0;a<APVsCollOrdered.size();a++){
1537  if(APV==nullptr)continue;
1538 // printf( "%i | %i | PreviousGain = %7.5f NewGain = %7.5f (#clusters=%8.0f)\n", APV->DetId,APV->APVId,APV->PreviousGain,APV->Gain, APV->NEntries);
1539  fprintf(Gains,"%i | %i | PreviousGain = %7.5f(tick) x %7.5f(particle) NewGain (particle) = %7.5f (#clusters=%8.0f)\n", APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain,APV->Gain, APV->NEntries);
1540 
1541  tree_Index = APV->Index;
1542  tree_Bin = (Charge_Vs_Index[elepos])->getTH2S()->GetXaxis()->FindBin(APV->Index);
1543  tree_DetId = APV->DetId;
1544  tree_APVId = APV->APVId;
1545  tree_SubDet = APV->SubDet;
1546  tree_x = APV->x;
1547  tree_y = APV->y;
1548  tree_z = APV->z;
1549  tree_Eta = APV->Eta;
1550  tree_R = APV->R;
1551  tree_Phi = APV->Phi;
1552  tree_Thickness = APV->Thickness;
1553  tree_FitMPV = APV->FitMPV;
1554  tree_FitMPVErr = APV->FitMPVErr;
1555  tree_FitWidth = APV->FitWidth;
1556  tree_FitWidthErr= APV->FitWidthErr;
1557  tree_FitChi2NDF = APV->FitChi2;
1558  tree_FitNorm = APV->FitNorm;
1559  tree_Gain = APV->Gain;
1560  tree_PrevGain = APV->PreviousGain;
1561  tree_PrevGainTick = APV->PreviousGainTick;
1562  tree_NEntries = APV->NEntries;
1563  tree_isMasked = APV->isMasked;
1564 
1565 
1566  if(tree_DetId==402673324){
1567  printf("%i | %i : %f --> %f (%f)\n", tree_DetId, tree_APVId, tree_PrevGain, tree_Gain, tree_NEntries);
1568  }
1569 
1570 
1571  MyTree->Fill();
1572  }
1573  if(Gains)fclose(Gains);
1574 
1575 
1576 }
std::vector< MonitorElement * > Charge_Vs_Index
double FitMPV
Definition: APVGainStruct.h:20
double PreviousGainTick
Definition: APVGainStruct.h:29
unsigned int APVId
Definition: APVGainStruct.h:11
float Thickness
Definition: APVGainStruct.h:19
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
unsigned int DetId
Definition: APVGainStruct.h:10
bool isMasked
Definition: APVGainStruct.h:33
std::vector< stAPVGain * > APVsCollOrdered
double FitWidth
Definition: APVGainStruct.h:22
double Gain
Definition: APVGainStruct.h:26
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
double FitNorm
Definition: APVGainStruct.h:25
double FitMPVErr
Definition: APVGainStruct.h:21
double FitChi2
Definition: APVGainStruct.h:24
int statCollectionFromMode(const char *tag) const
double NEntries
Definition: APVGainStruct.h:30
double a
Definition: hdecay.h:121
unsigned int SubDet
Definition: APVGainStruct.h:12
double FitWidthErr
Definition: APVGainStruct.h:23
void SiStripGainFromCalibTree::swapBFieldMode ( void  )
private

Definition at line 783 of file SiStripGainFromCalibTree.cc.

References m_calibrationMode.

Referenced by algoBeginJob(), and algoBeginRun().

783  {
784  if ( m_calibrationMode.substr( m_calibrationMode.length()-2 )=="0T" ) {
785  m_calibrationMode.erase( m_calibrationMode.length()-2,2);
786  } else {
787  m_calibrationMode.append( "0T" );
788  }
789 }

Member Data Documentation

std::string SiStripGainFromCalibTree::AlgoMode
private
bool SiStripGainFromCalibTree::AllowSaturation
private

Definition at line 150 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

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

Definition at line 294 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 294 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

std::unordered_map<unsigned int, stAPVGain*> SiStripGainFromCalibTree::APVsColl
private
std::vector<stAPVGain*> SiStripGainFromCalibTree::APVsCollOrdered
private
unsigned int SiStripGainFromCalibTree::BAD
private
std::string SiStripGainFromCalibTree::booked_dir_
private

Definition at line 176 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos().

string SiStripGainFromCalibTree::CalibPrefix_
private

Definition at line 303 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

int SiStripGainFromCalibTree::CalibrationLevel
private

Definition at line 154 of file SiStripGainFromCalibTree.cc.

Referenced by algoComputeMPVandGain(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::CalibSuffix_
private

Definition at line 304 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

const std::vector<unsigned int>* SiStripGainFromCalibTree::charge = 0
private
std::array< std::vector<APVGain::APVmon>,7 > SiStripGainFromCalibTree::Charge_1
private

Charge per cm per layer / wheel

Definition at line 179 of file SiStripGainFromCalibTree.cc.

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

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

Charge per cm per layer / wheel without G2

Definition at line 180 of file SiStripGainFromCalibTree.cc.

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

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

Charge per cm per layer / wheel without G1

Definition at line 181 of file SiStripGainFromCalibTree.cc.

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

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

Charge per cm per layer / wheel without G1 and G1

Definition at line 182 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 291 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Charge vs pathlength in TECP thin

Definition at line 190 of file SiStripGainFromCalibTree.cc.

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

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

Charge vs pathlength in TECP thick

Definition at line 191 of file SiStripGainFromCalibTree.cc.

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

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

Charge vs pathlength in TECP thin

Definition at line 188 of file SiStripGainFromCalibTree.cc.

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

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

Charge vs pathlength in TECP thick

Definition at line 189 of file SiStripGainFromCalibTree.cc.

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

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

Charge vs pathlength in TIB

Definition at line 184 of file SiStripGainFromCalibTree.cc.

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

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

Charge vs pathlength in TIDM

Definition at line 187 of file SiStripGainFromCalibTree.cc.

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

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

Charge vs pathlength in TIDP

Definition at line 186 of file SiStripGainFromCalibTree.cc.

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

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

Charge vs pathlength in TOB

Definition at line 185 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 293 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 293 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

DQMStore* SiStripGainFromCalibTree::dbe
private
MonitorElement* SiStripGainFromCalibTree::DiffWRTPrevGainTEC
private

ratio gain / PreviousGain for TEC disks

Definition at line 242 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::DiffWRTPrevGainTIB
private

ratio Gain / PreviousGain for TIB layers

Definition at line 239 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::DiffWRTPrevGainTID
private

ratio Gain / PreviousGain for TID disks

Definition at line 240 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::DiffWRTPrevGainTOB
private

ratio Gain / PreviousGain for TOB layers

Definition at line 241 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

bool SiStripGainFromCalibTree::doChargeMonitorPerPlane
private

Charge monitor per detector plane

Definition at line 160 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 175 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::ERun
private

Definition at line 259 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and processEvent().

unsigned int SiStripGainFromCalibTree::eventnumber =0
private

Definition at line 267 of file SiStripGainFromCalibTree.cc.

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

string SiStripGainFromCalibTree::EventPrefix_
private

Definition at line 299 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::EventSuffix_
private

Definition at line 300 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

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

Definition at line 290 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 290 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

bool SiStripGainFromCalibTree::FirstSetOfConstants
private

Definition at line 151 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

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

Definition at line 286 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 286 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

MonitorElement* SiStripGainFromCalibTree::Gains
private

distribution of gain factors

Definition at line 214 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 295 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 295 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 296 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 296 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

MonitorElement* SiStripGainFromCalibTree::GainVsPrevGainTEC
private

Gain vs PreviousGain for TEC

Definition at line 247 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::GainVsPrevGainTIB
private

Gain vs PreviousGain for TIB

Definition at line 244 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::GainVsPrevGainTID
private

Gain vs PreviousGain for TID

Definition at line 245 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::GainVsPrevGainTOB
private

Gain vs PreviousGain for TOB

Definition at line 246 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

unsigned int SiStripGainFromCalibTree::GOOD
private
const std::vector<double>* SiStripGainFromCalibTree::localdirx = 0
private

Definition at line 283 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 283 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 284 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 284 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 285 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 285 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

std::string SiStripGainFromCalibTree::m_calibrationMode
private
std::string SiStripGainFromCalibTree::m_calibrationPath
private

Definition at line 162 of file SiStripGainFromCalibTree.cc.

Referenced by MakeCalibrationMap(), and SiStripGainFromCalibTree().

std::string SiStripGainFromCalibTree::m_DQMdir
private

DQM folder hosting the charge statistics and the monitor plots

Definition at line 163 of file SiStripGainFromCalibTree.cc.

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

bool SiStripGainFromCalibTree::m_harvestingMode
private
bool SiStripGainFromCalibTree::m_splitDQMstat
private

Definition at line 159 of file SiStripGainFromCalibTree.cc.

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

double SiStripGainFromCalibTree::MagFieldCurrentTh
private
unsigned int SiStripGainFromCalibTree::MASKED
private

Definition at line 262 of file SiStripGainFromCalibTree.cc.

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

double SiStripGainFromCalibTree::MaxChi2OverNDF
private

Definition at line 141 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxMPVError
private

Definition at line 140 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::MaxNrStrips
private

Definition at line 146 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackChiOverNdf
private

Definition at line 148 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackEta
private

Definition at line 145 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

int SiStripGainFromCalibTree::MaxTrackingIteration
private

Definition at line 149 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackMomentum
private

Definition at line 143 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinNrEntries
private

Definition at line 139 of file SiStripGainFromCalibTree.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinTrackEta
private

Definition at line 144 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::MinTrackHits
private

Definition at line 147 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinTrackMomentum
private

Definition at line 142 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTEC
private

MPV vs Eta for TEC planes

Definition at line 200 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTECthick
private

MPV vs Eta for TEC tick planes

Definition at line 202 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTECthin
private

MPV vs Eta for TEC thin planes

Definition at line 201 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTIB
private

MPV vs Eta for TIB planes

Definition at line 197 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTID
private

MPV vs Eta for TID planes

Definition at line 198 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_EtaTOB
private

MPV vs Eta for TOB planes

Definition at line 199 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTEC
private

MPV vs Phi for TEC planes

Definition at line 207 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTECthick
private

MPV vs Phi for TID tick planes

Definition at line 209 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTECthin
private

MPV vs Phi for TEC thin planes

Definition at line 208 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTIB
private

MPV vs Phi for TIB planes

Definition at line 204 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTID
private

MPV vs Phi for TID planes

Definition at line 205 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPV_Vs_PhiTOB
private

MPV vs Phi for TOB planes

Definition at line 206 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVError
private

error of Landau fit

Definition at line 233 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVErrorVsEta
private

error of Landau fit vs Eta

Definition at line 235 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVErrorVsMPV
private

error of Landau fit vs MPV

Definition at line 234 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVErrorVsN
private

error of landau fit vs number of entries

Definition at line 237 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVErrorVsPhi
private

error of Landau fit vs Phi

Definition at line 236 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVs
private

distribution of MPVs

Definition at line 215 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVs320
private

distribution of MPVs for thin sensors

Definition at line 216 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVs500
private

distribution of MPVs for tick sensors

Definition at line 217 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTEC
private

distribution of MPVs for TEC disks

Definition at line 223 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTECM
private

distribution of MPVs for TECM disks

Definition at line 225 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTECM1
private

distribution of MPVs for TECM thin sensors

Definition at line 230 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTECM2
private

distribution of MPVs for TECM tick sensors

Definition at line 231 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTECP
private

distribution of MPVs for TECP disks

Definition at line 224 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTECP1
private

distribution of MPVs for TECP thin sensors

Definition at line 228 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTECP2
private

distribution of MPVs for TECP tick sensors

Definition at line 229 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTECthick
private

distribution of MPVs for TEC tick sensors

Definition at line 227 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTECthin
private

distribution of MPVs for TEC thin sensors

Definition at line 226 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTIB
private

distribution of MPVs for TIB planes

Definition at line 218 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTID
private

distribution of MPVs for TID disks

Definition at line 219 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTIDM
private

distribution of MPVs for TIDM disks

Definition at line 221 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTIDP
private

distribution of MPVs for TIDP disks

Definition at line 220 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::MPVsTOB
private

distribution of MPVs for TOB planes

Definition at line 222 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

unsigned int SiStripGainFromCalibTree::NClusterPixel
private

Definition at line 255 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and processEvent().

unsigned int SiStripGainFromCalibTree::NClusterStrip
private

Definition at line 254 of file SiStripGainFromCalibTree.cc.

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

unsigned int SiStripGainFromCalibTree::NEvent
private
std::vector<APVGain::APVmon> SiStripGainFromCalibTree::newCharge
private

Definition at line 249 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::NoMPVfit
private

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

Definition at line 212 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

MonitorElement* SiStripGainFromCalibTree::NoMPVmasked
private

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

Definition at line 211 of file SiStripGainFromCalibTree.cc.

Referenced by bookDQMHistos(), and qualityMonitor().

int SiStripGainFromCalibTree::NPixelDets
private

Definition at line 257 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob().

int SiStripGainFromCalibTree::NStripAPVs
private
const std::vector<unsigned short>* SiStripGainFromCalibTree::nstrips = 0
private

Definition at line 287 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 287 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::NTrack
private

Definition at line 253 of file SiStripGainFromCalibTree.cc.

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

bool SiStripGainFromCalibTree::OldGainRemoving
private

Definition at line 153 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

std::string SiStripGainFromCalibTree::OutputGains
private

Definition at line 170 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree(), and storeOnTree().

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

Definition at line 289 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 289 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

const std::vector<double>* SiStripGainFromCalibTree::path = 0
private
edm::EDGetTokenT<std::vector<double> > SiStripGainFromCalibTree::path_token_
private

Definition at line 292 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 282 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 282 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::runnumber =0
private

Definition at line 268 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 288 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 288 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

bool SiStripGainFromCalibTree::saveSummary
private

Definition at line 156 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::SRun
private

Definition at line 258 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and processEvent().

double SiStripGainFromCalibTree::tagCondition_GoodFrac
private

Definition at line 167 of file SiStripGainFromCalibTree.cc.

Referenced by produceTagFilter(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::tagCondition_NClusters
private

Definition at line 166 of file SiStripGainFromCalibTree.cc.

Referenced by produceTagFilter(), and SiStripGainFromCalibTree().

TFileService* SiStripGainFromCalibTree::tfs
private

Definition at line 136 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob().

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

Definition at line 278 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 278 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 272 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 272 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 275 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 275 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 277 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 277 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 281 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 281 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 273 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 273 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 276 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 276 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::TrackPrefix_
private

Definition at line 301 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

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

Definition at line 274 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 274 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::TrackSuffix_
private

Definition at line 302 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

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

Definition at line 269 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 269 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

const TrackerTopology* SiStripGainFromCalibTree::tTopo_
private
bool SiStripGainFromCalibTree::useCalibration
private
bool SiStripGainFromCalibTree::Validation
private

Definition at line 152 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

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

Charge monitor plots to be output

Definition at line 164 of file SiStripGainFromCalibTree.cc.

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

vector<string> SiStripGainFromCalibTree::VInputFiles
private

Definition at line 171 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().