test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
SiStripGainFromCalibTree Class Reference
Inheritance diagram for SiStripGainFromCalibTree:
ConditionDBWriter< SiStripApvGain > edm::EDAnalyzer edm::EDConsumerBase

Classes

class  isEqual
 

Public Member Functions

 SiStripGainFromCalibTree (const edm::ParameterSet &)
 
 ~SiStripGainFromCalibTree ()
 
- Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
virtual ~ConditionDBWriter ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

enum  statistic_type {
  None =-1, StdBunch, StdBunch0T, FaABunch,
  FaABunch0T, IsoBunch, IsoBunch0T, Harvest
}
 

Private Member Functions

virtual void algoAnalyze (const edm::Event &, const edm::EventSetup &) override
 
void algoAnalyzeTheTree ()
 
virtual void algoBeginJob (const edm::EventSetup &iSetup) override
 
virtual void algoBeginRun (const edm::Run &run, const edm::EventSetup &iSetup) override
 
void algoComputeMPVandGain ()
 
virtual void algoEndJob () override
 
virtual 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 ()
 
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_
 
__gnu_cxx::hash_map< unsigned
int, stAPVGain
*, __gnu_cxx::hash< unsigned
int >, isEqual
APVsColl
 
std::vector< stAPVGain * > APVsCollOrdered
 
unsigned int BAD
 
string CalibPrefix_
 
int CalibrationLevel
 
string CalibSuffix_
 
const std::vector< unsigned int > * charge =0
 
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
 
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_
 
const std::vector< double > * gainused =0
 
edm::EDGetTokenT< std::vector
< double > > 
gainused_token_
 
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_
 
string m_calibrationMode
 
string m_calibrationPath
 
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
 
unsigned int NClusterPixel
 
unsigned int NClusterStrip
 
unsigned int NEvent
 
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_
 
bool useCalibration
 
bool Validation
 
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 &)
 
- 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 119 of file SiStripGainFromCalibTree.cc.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 300 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, dqm_tag_, EventPrefix_, EventSuffix_, farfromedge_token_, FirstSetOfConstants, firststrip_token_, gainused_token_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_25ns10e33_v2_cff::InputTag, 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, cppFunctionSkipper::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_, useCalibration, Validation, and VInputFiles.

301 {
302  OutputGains = iConfig.getParameter<std::string>("OutputGains");
303 
304  AlgoMode = iConfig.getUntrackedParameter<std::string>("AlgoMode", "CalibTree");
305  MagFieldCurrentTh = iConfig.getUntrackedParameter<double> ("MagFieldCurrentTh" , 2000.);
306  MinNrEntries = iConfig.getUntrackedParameter<double> ("minNrEntries" , 20);
307  MaxMPVError = iConfig.getUntrackedParameter<double> ("maxMPVError" , 500.0);
308  MaxChi2OverNDF = iConfig.getUntrackedParameter<double> ("maxChi2OverNDF" , 5.0);
309  MinTrackMomentum = iConfig.getUntrackedParameter<double> ("minTrackMomentum" , 3.0);
310  MaxTrackMomentum = iConfig.getUntrackedParameter<double> ("maxTrackMomentum" , 99999.0);
311  MinTrackEta = iConfig.getUntrackedParameter<double> ("minTrackEta" , -5.0);
312  MaxTrackEta = iConfig.getUntrackedParameter<double> ("maxTrackEta" , 5.0);
313  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips" , 2);
314  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits" , 8);
315  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double> ("MaxTrackChiOverNdf" , 3);
316  MaxTrackingIteration = iConfig.getUntrackedParameter<int> ("MaxTrackingIteration" , 7);
317  AllowSaturation = iConfig.getUntrackedParameter<bool> ("AllowSaturation" , false);
318  FirstSetOfConstants = iConfig.getUntrackedParameter<bool> ("FirstSetOfConstants" , true);
319  Validation = iConfig.getUntrackedParameter<bool> ("Validation" , false);
320  OldGainRemoving = iConfig.getUntrackedParameter<bool> ("OldGainRemoving" , false);
321 
322  CalibrationLevel = iConfig.getUntrackedParameter<int> ("CalibrationLevel" , 0);
323  VInputFiles = iConfig.getUntrackedParameter<vector<string> > ("InputFiles");
324 
325 
326  useCalibration = iConfig.getUntrackedParameter<bool> ("UseCalibration" , false);
327  m_harvestingMode = iConfig.getUntrackedParameter<bool> ("harvestingMode" , false);
328  m_splitDQMstat = iConfig.getUntrackedParameter<bool> ("splitDQMstat" , false);
329  m_calibrationMode = iConfig.getUntrackedParameter<string> ("calibrationMode" , "StdBunch");
330  m_calibrationPath = iConfig.getUntrackedParameter<string> ("calibrationPath");
331  m_DQMdir = iConfig.getUntrackedParameter<string> ("DQMdir" , "AlCaReco/SiStripGains");
332 
333  tagCondition_NClusters = iConfig.getUntrackedParameter<double> ("NClustersForTagProd" , 2E8);
334  tagCondition_GoodFrac = iConfig.getUntrackedParameter<double> ("GoodFracForTagProd" , 0.95);
335 
336  saveSummary = iConfig.getUntrackedParameter<bool> ("saveSummary" , false);
337 
338 
339  // Gather DQM Service
341  dbe->setVerbose(10);
342 
343  //Set the monitoring element tag and store
344  dqm_tag_.reserve(7);
345  dqm_tag_.clear();
346  dqm_tag_.push_back( "StdBunch" ); // statistic collection from Standard Collision Bunch @ 3.8 T
347  dqm_tag_.push_back( "StdBunch0T" ); // statistic collection from Standard Collision Bunch @ 0 T
348  dqm_tag_.push_back( "AagBunch" ); // statistic collection from First Collision After Abort Gap @ 3.8 T
349  dqm_tag_.push_back( "AagBunch0T" ); // statistic collection from First Collision After Abort Gap @ 0 T
350  dqm_tag_.push_back( "IsoMuon" ); // statistic collection from Isolated Muon @ 3.8 T
351  dqm_tag_.push_back( "IsoMuon0T" ); // statistic collection from Isolated Muon @ 0 T
352  dqm_tag_.push_back( "Harvest" ); // statistic collection: Harvest
353 
354  Charge_Vs_Index.insert( Charge_Vs_Index.begin(), dqm_tag_.size(), 0);
355  //Charge_Vs_Index_Absolute.insert( Charge_Vs_Index_Absolute.begin(), dqm_tag_.size(), 0);
356  Charge_Vs_PathlengthTIB.insert( Charge_Vs_PathlengthTIB.begin(), dqm_tag_.size(), 0);
357  Charge_Vs_PathlengthTOB.insert( Charge_Vs_PathlengthTOB.begin(), dqm_tag_.size(), 0);
358  Charge_Vs_PathlengthTIDP.insert( Charge_Vs_PathlengthTIDP.begin(), dqm_tag_.size(), 0);
359  Charge_Vs_PathlengthTIDM.insert( Charge_Vs_PathlengthTIDM.begin(), dqm_tag_.size(), 0);
364 
365 
366 
367 
368  // configure token for gathering the ntuple variables
369  edm::ParameterSet swhallowgain_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("gain");
370 
371  string label = swhallowgain_pset.getUntrackedParameter<string>("label");
372  CalibPrefix_ = swhallowgain_pset.getUntrackedParameter<string>("prefix");
373  CalibSuffix_ = swhallowgain_pset.getUntrackedParameter<string>("suffix");
374 
375  trackindex_token_ = consumes<std::vector<int> >(edm::InputTag(label, CalibPrefix_ + "trackindex" + CalibSuffix_));
376  rawid_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, CalibPrefix_ + "rawid" + CalibSuffix_));
377  localdirx_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdirx" + CalibSuffix_));
378  localdiry_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdiry" + CalibSuffix_));
379  localdirz_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdirz" + CalibSuffix_));
380  firststrip_token_ = consumes<std::vector<unsigned short> >(edm::InputTag(label, CalibPrefix_ + "firststrip" + CalibSuffix_));
381  nstrips_token_ = consumes<std::vector<unsigned short> >(edm::InputTag(label, CalibPrefix_ + "nstrips" + CalibSuffix_));
382  saturation_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "saturation" + CalibSuffix_));
383  overlapping_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "overlapping" + CalibSuffix_));
384  farfromedge_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "farfromedge" + CalibSuffix_));
385  charge_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, CalibPrefix_ + "charge" + CalibSuffix_));
386  path_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "path" + CalibSuffix_));
387  chargeoverpath_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "chargeoverpath"+ CalibSuffix_));
388  amplitude_token_ = consumes<std::vector<unsigned char> >(edm::InputTag(label, CalibPrefix_ + "amplitude" + CalibSuffix_));
389  gainused_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "gainused" + CalibSuffix_));
390 
391  edm::ParameterSet evtinfo_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("evtinfo");
392  label = evtinfo_pset.getUntrackedParameter<string>("label");
393  EventPrefix_ = evtinfo_pset.getUntrackedParameter<string>("prefix");
394  EventSuffix_ = evtinfo_pset.getUntrackedParameter<string>("suffix");
395  TrigTech_token_ = consumes<std::vector<bool> >(edm::InputTag(label, EventPrefix_ + "TrigTech" + EventSuffix_));
396 
397  edm::ParameterSet track_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("tracks");
398  label = track_pset.getUntrackedParameter<string>("label");
399  TrackPrefix_ = track_pset.getUntrackedParameter<string>("prefix");
400  TrackSuffix_ = track_pset.getUntrackedParameter<string>("suffix");
401 
402  trackchi2ndof_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "chi2ndof" + TrackSuffix_));
403  trackp_token_ = consumes<std::vector<float> >(edm::InputTag(label, TrackPrefix_ + "momentum" + TrackSuffix_));
404  trackpt_token_ = consumes<std::vector<float> >(edm::InputTag(label, TrackPrefix_ + "pt" + TrackSuffix_));
405  tracketa_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "eta" + TrackSuffix_));
406  trackphi_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "phi" + TrackSuffix_));
407  trackhitsvalid_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, TrackPrefix_ + "hitsvalid" + TrackSuffix_));
408  trackalgo_token_ = consumes<std::vector<int> >(edm::InputTag(label, TrackPrefix_ + "algo" + TrackSuffix_));
409 }
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_
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_
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_
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 ( )

Definition at line 1252 of file SiStripGainFromCalibTree.cc.

1253 {
1254 }

Member Function Documentation

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

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1278 of file SiStripGainFromCalibTree.cc.

References AlgoMode, amplitude, amplitude_token_, charge, charge_token_, chargeoverpath, chargeoverpath_token_, connect(), edm::EventID::event(), eventnumber, farfromedge, farfromedge_token_, firststrip, firststrip_token_, gainused, gainused_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_.

1279 {
1280  // in AlCaHarvesting mode we just need to run the logic in the endJob step
1281  if(m_harvestingMode) return;
1282 
1283  if(AlgoMode=="CalibTree")return;
1284 
1285  eventnumber = iEvent.id().event();
1286  runnumber = iEvent.id().run();
1287  auto handle01 = connect(TrigTech , TrigTech_token_ , iEvent);
1288  auto handle02 = connect(trackchi2ndof , trackchi2ndof_token_ , iEvent);
1289  auto handle03 = connect(trackp , trackp_token_ , iEvent);
1290  auto handle04 = connect(trackpt , trackpt_token_ , iEvent);
1291  auto handle05 = connect(tracketa , tracketa_token_ , iEvent);
1292  auto handle06 = connect(trackphi , trackphi_token_ , iEvent);
1293  auto handle07 = connect(trackhitsvalid, trackhitsvalid_token_, iEvent);
1294  auto handle08 = connect(trackindex , trackindex_token_ , iEvent);
1295  auto handle09 = connect(rawid , rawid_token_ , iEvent);
1296  auto handle11 = connect(localdirx , localdirx_token_ , iEvent);
1297  auto handle12 = connect(localdiry , localdiry_token_ , iEvent);
1298  auto handle13 = connect(localdirz , localdirz_token_ , iEvent);
1299  auto handle14 = connect(firststrip , firststrip_token_ , iEvent);
1300  auto handle15 = connect(nstrips , nstrips_token_ , iEvent);
1301  auto handle16 = connect(saturation , saturation_token_ , iEvent);
1302  auto handle17 = connect(overlapping , overlapping_token_ , iEvent);
1303  auto handle18 = connect(farfromedge , farfromedge_token_ , iEvent);
1304  auto handle19 = connect(charge , charge_token_ , iEvent);
1305  auto handle21 = connect(path , path_token_ , iEvent);
1306  auto handle22 = connect(chargeoverpath, chargeoverpath_token_, iEvent);
1307  auto handle23 = connect(amplitude , amplitude_token_ , iEvent);
1308  auto handle24 = connect(gainused , gainused_token_ , iEvent);
1309 
1310  auto handle25 = connect(trackalgo , trackalgo_token_ , iEvent);
1311 
1312  processEvent();
1313 }
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< 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_
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:59
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 937 of file SiStripGainFromCalibTree.cc.

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

Referenced by algoEndJob().

938 {
939  for(unsigned int i=0;i<VInputFiles.size();i++){
940  printf("Openning file %3i/%3i --> %s\n",i+1, (int)VInputFiles.size(), (char*)(VInputFiles[i].c_str())); fflush(stdout);
941  TFile *tfile = TFile::Open(VInputFiles[i].c_str());
942  TString tree_path = TString::Format("gainCalibrationTree%s/tree",m_calibrationMode.c_str());
943  TTree* tree = dynamic_cast<TTree*> (tfile->Get(tree_path.Data()));
944 
945  tree->SetBranchAddress((EventPrefix_ + "event" + EventSuffix_).c_str(), &eventnumber , NULL);
946  tree->SetBranchAddress((EventPrefix_ + "run" + EventSuffix_).c_str(), &runnumber , NULL);
947  tree->SetBranchAddress((EventPrefix_ + "TrigTech" + EventSuffix_).c_str(), &TrigTech , NULL);
948 
949  tree->SetBranchAddress((TrackPrefix_ + "chi2ndof" + TrackSuffix_).c_str(), &trackchi2ndof , NULL);
950  tree->SetBranchAddress((TrackPrefix_ + "momentum" + TrackSuffix_).c_str(), &trackp , NULL);
951  tree->SetBranchAddress((TrackPrefix_ + "pt" + TrackSuffix_).c_str(), &trackpt , NULL);
952  tree->SetBranchAddress((TrackPrefix_ + "eta" + TrackSuffix_).c_str(), &tracketa , NULL);
953  tree->SetBranchAddress((TrackPrefix_ + "phi" + TrackSuffix_).c_str(), &trackphi , NULL);
954  tree->SetBranchAddress((TrackPrefix_ + "hitsvalid" + TrackSuffix_).c_str(), &trackhitsvalid, NULL);
955  tree->SetBranchAddress((TrackPrefix_ + "algo" + TrackSuffix_).c_str(), &trackalgo , NULL);
956 
957  tree->SetBranchAddress((CalibPrefix_ + "trackindex" + CalibSuffix_).c_str(), &trackindex , NULL);
958  tree->SetBranchAddress((CalibPrefix_ + "rawid" + CalibSuffix_).c_str(), &rawid , NULL);
959  tree->SetBranchAddress((CalibPrefix_ + "localdirx" + CalibSuffix_).c_str(), &localdirx , NULL);
960  tree->SetBranchAddress((CalibPrefix_ + "localdiry" + CalibSuffix_).c_str(), &localdiry , NULL);
961  tree->SetBranchAddress((CalibPrefix_ + "localdirz" + CalibSuffix_).c_str(), &localdirz , NULL);
962  tree->SetBranchAddress((CalibPrefix_ + "firststrip" + CalibSuffix_).c_str(), &firststrip , NULL);
963  tree->SetBranchAddress((CalibPrefix_ + "nstrips" + CalibSuffix_).c_str(), &nstrips , NULL);
964  tree->SetBranchAddress((CalibPrefix_ + "saturation" + CalibSuffix_).c_str(), &saturation , NULL);
965  tree->SetBranchAddress((CalibPrefix_ + "overlapping" + CalibSuffix_).c_str(), &overlapping , NULL);
966  tree->SetBranchAddress((CalibPrefix_ + "farfromedge" + CalibSuffix_).c_str(), &farfromedge , NULL);
967  tree->SetBranchAddress((CalibPrefix_ + "charge" + CalibSuffix_).c_str(), &charge , NULL);
968  tree->SetBranchAddress((CalibPrefix_ + "path" + CalibSuffix_).c_str(), &path , NULL);
969  tree->SetBranchAddress((CalibPrefix_ + "chargeoverpath" + CalibSuffix_).c_str(), &chargeoverpath, NULL);
970  tree->SetBranchAddress((CalibPrefix_ + "amplitude" + CalibSuffix_).c_str(), &amplitude , NULL);
971  tree->SetBranchAddress((CalibPrefix_ + "gainused" + CalibSuffix_).c_str(), &gainused , NULL);
972 
973 
974  unsigned int nentries = tree->GetEntries();
975  printf("Number of Events = %i + %i = %i\n",NEvent,nentries,(NEvent+nentries));
976  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
977  printf("Looping on the Tree :");
978  int TreeStep = nentries/50;if(TreeStep<=1)TreeStep=1;
979  for (unsigned int ientry = 0; ientry < tree->GetEntries(); ientry++) {
980  if(ientry%TreeStep==0){printf(".");fflush(stdout);}
981  tree->GetEntry(ientry);
982  processEvent();
983  }printf("\n");// END OF EVENT LOOP
984  }
985 }
int i
Definition: DBlmapReader.cc:9
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< unsigned int > * rawid
const std::vector< int > * trackalgo
#define NULL
Definition: scimark2.h:8
const std::vector< float > * trackpt
const std::vector< unsigned int > * trackhitsvalid
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
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 451 of file SiStripGainFromCalibTree.cc.

References AlgoMode, sistrip::APV, stAPVGain::APVId, APVsColl, APVsCollOrdered, BAD, stAPVGain::Bin, bookDQMHistos(), stAPVGain::DetId, 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, i, stAPVGain::Index, isBFieldConsistentWithMode(), stAPVGain::isMasked, j, 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, DetId::subdetId(), swapBFieldMode(), StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, stAPVGain::x, stAPVGain::y, and stAPVGain::z.

452 {
453  edm::LogInfo("SiStripGainFromCalibTree") << "AlgoMode : " << AlgoMode << "\n"
454  << "CalibrationMode : " << m_calibrationMode << "\n"
455  << "HarvestingMode : " << m_harvestingMode << std::endl;
456  //Setup DQM histograms
457  if(AlgoMode != "PCL" or m_harvestingMode) {
458  const char * dqm_dir = "AlCaReco/SiStripGainsHarvesting/";
459  this->bookDQMHistos( dqm_dir, dqm_tag_[statCollectionFromMode(m_calibrationMode.c_str())].c_str() );
460  } else {
461  //Check consistency of calibration Mode and BField only for the ALCAPROMPT in the PCL workflow
462  if (!isBFieldConsistentWithMode(iSetup)) {
463  string prevMode = m_calibrationMode;
464  swapBFieldMode();
465  edm::LogInfo("SiStripGainFromCalibTree") << "Switching calibration mode for endorsing BField status: "
466  << prevMode << " ==> " << m_calibrationMode << std::endl;
467  }
468  std::string dqm_dir = m_DQMdir + ((m_splitDQMstat)? m_calibrationMode:"") + "/";
470  this->bookDQMHistos( dqm_dir.c_str(), dqm_tag_[elem].c_str() );
471  }
472 
473 
475  iSetup.get<TrackerDigiGeometryRecord>().get( tkGeom );
476  auto const & Det = tkGeom->dets();
477 
478  NPixelDets = 0;
479  NStripAPVs = 0;
480  unsigned int Index=0;
481  for(unsigned int i=0;i<Det.size();i++){
482  DetId Detid = Det[i]->geographicalId();
483  int SubDet = Detid.subdetId();
484 
485  if( SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID ||
486  SubDet == StripSubdetector::TOB || SubDet == StripSubdetector::TEC ){
487 
488  auto DetUnit = dynamic_cast<const StripGeomDetUnit*> (Det[i]);
489  if(!DetUnit)continue;
490 
491  const StripTopology& Topo = DetUnit->specificTopology();
492  unsigned int NAPV = Topo.nstrips()/128;
493 
494  for(unsigned int j=0;j<NAPV;j++){
495  stAPVGain* APV = new stAPVGain;
496  APV->Index = Index;
497  APV->Bin = -1;
498  APV->DetId = Detid.rawId();
499  APV->APVId = j;
500  APV->SubDet = SubDet;
501  APV->FitMPV = -1;
502  APV->FitMPVErr = -1;
503  APV->FitWidth = -1;
504  APV->FitWidthErr = -1;
505  APV->FitChi2 = -1;
506  APV->FitNorm = -1;
507  APV->Gain = -1;
508  APV->PreviousGain = 1;
509  APV->PreviousGainTick = 1;
510  APV->x = DetUnit->position().basicVector().x();
511  APV->y = DetUnit->position().basicVector().y();
512  APV->z = DetUnit->position().basicVector().z();
513  APV->Eta = DetUnit->position().basicVector().eta();
514  APV->Phi = DetUnit->position().basicVector().phi();
515  APV->R = DetUnit->position().basicVector().transverse();
516  APV->Thickness = DetUnit->surface().bounds().thickness();
517  APV->NEntries = 0;
518  APV->isMasked = false;
519 
520  APVsCollOrdered.push_back(APV);
521  APVsColl[(APV->DetId<<4) | APV->APVId] = APV;
522  Index++;
523  NStripAPVs++;
524  }
525  }
526  }
527 
528  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
529  DetId Detid = Det[i]->geographicalId();
530  int SubDet = Detid.subdetId();
532  auto DetUnit = dynamic_cast<const PixelGeomDetUnit*> (Det[i]);
533  if(!DetUnit) continue;
534 
535  const PixelTopology& Topo = DetUnit->specificTopology();
536  unsigned int NROCRow = Topo.nrows()/(80.);
537  unsigned int NROCCol = Topo.ncolumns()/(52.);
538 
539  for(unsigned int j=0;j<NROCRow;j++){
540  for(unsigned int i=0;i<NROCCol;i++){
541 
542  stAPVGain* APV = new stAPVGain;
543  APV->Index = Index;
544  APV->Bin = -1;
545  APV->DetId = Detid.rawId();
546  APV->APVId = (j<<3 | i);
547  APV->SubDet = SubDet;
548  APV->FitMPV = -1;
549  APV->FitMPVErr = -1;
550  APV->FitWidth = -1;
551  APV->FitWidthErr = -1;
552  APV->FitChi2 = -1;
553  APV->Gain = -1;
554  APV->PreviousGain = 1;
555  APV->x = DetUnit->position().basicVector().x();
556  APV->y = DetUnit->position().basicVector().y();
557  APV->z = DetUnit->position().basicVector().z();
558  APV->Eta = DetUnit->position().basicVector().eta();
559  APV->Phi = DetUnit->position().basicVector().phi();
560  APV->R = DetUnit->position().basicVector().transverse();
561  APV->Thickness = DetUnit->surface().bounds().thickness();
562  APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId());
563  APV->NEntries = 0;
564 
565  APVsCollOrdered.push_back(APV);
566  APVsColl[(APV->DetId<<4) | APV->APVId] = APV;
567  Index++;
568  NPixelDets++;
569  }}
570  }
571  }
572 
573 
575 
576  NEvent = 0;
577  NTrack = 0;
578  NClusterStrip = 0;
579  NClusterPixel = 0;
580  SRun = 1<<31;
581  ERun = 0;
582  GOOD = 0;
583  BAD = 0;
584  MASKED = 0;
585 }
virtual int nstrips() const =0
int i
Definition: DBlmapReader.cc:9
bool isBFieldConsistentWithMode(const edm::EventSetup &iSetup) const
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
virtual int ncolumns() const =0
virtual int nrows() const =0
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::vector< stAPVGain * > APVsCollOrdered
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
int j
Definition: DBlmapReader.cc:9
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
int statCollectionFromMode(const char *tag) const
const T & get() const
Definition: EventSetup.h:56
void bookDQMHistos(const char *dqm_dir, const char *tag)
void SiStripGainFromCalibTree::algoBeginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 606 of file SiStripGainFromCalibTree.cc.

References a, AlgoMode, sistrip::APV, stAPVGain::APVId, APVsCollOrdered, stAPVGain::DetId, cmsRelvalreport::exit, edm::EventSetup::get(), isBFieldConsistentWithMode(), stAPVGain::isMasked, edm::ESHandleBase::isValid(), m_calibrationMode, m_harvestingMode, stAPVGain::PreviousGain, stAPVGain::PreviousGainTick, and swapBFieldMode().

607 {
608  if( !m_harvestingMode && AlgoMode=="PCL") {
609  //Check consistency of calibration Mode and BField only for the ALCAPROMPT in the PCL workflow
610  if (!isBFieldConsistentWithMode(iSetup)) {
611  string prevMode = m_calibrationMode;
612  swapBFieldMode();
613  edm::LogInfo("SiStripGainFromCalibTree") << "Switching calibration mode for endorsing BField status: "
614  << prevMode << " ==> " << m_calibrationMode << std::endl;
615  }
616  }
617 
618  edm::ESHandle<SiStripGain> gainHandle;
619  iSetup.get<SiStripGainRcd>().get(gainHandle);
620  if(!gainHandle.isValid()){edm::LogError("SiStripGainFromCalibTree")<< "gainHandle is not valid\n"; exit(0);}
621 
622  edm::ESHandle<SiStripQuality> SiStripQuality_;
623  iSetup.get<SiStripQualityRcd>().get(SiStripQuality_);
624 
625  for(unsigned int a=0;a<APVsCollOrdered.size();a++){
627 
628  APV->isMasked = SiStripQuality_->IsApvBad(APV->DetId,APV->APVId);
629 // if(!FirstSetOfConstants){
630  if(gainHandle->getNumberOfTags()!=2){edm::LogError("SiStripGainFromCalibTree")<< "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";fflush(stdout);exit(0);};
631  float newPreviousGain = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 1),1);
632  if(APV->PreviousGain!=1 and newPreviousGain!=APV->PreviousGain)edm::LogWarning("SiStripGainFromCalibTree")<< "WARNING: ParticleGain in the global tag changed\n";
633  APV->PreviousGain = newPreviousGain;
634 
635  float newPreviousGainTick = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 0),1);
636  if(APV->PreviousGainTick!=1 and newPreviousGainTick!=APV->PreviousGainTick)edm::LogWarning("SiStripGainFromCalibTree")<< "WARNING: TickMarkGain in the global tag changed\n";
637  APV->PreviousGainTick = newPreviousGainTick;
638 
639 
640  //printf("DETID = %7i APVID=%1i Previous Gain=%8.4f (G1) x %8.4f (G2)\n",APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain);
641 
642 
643 
644 // }
645  }
646 }
bool isBFieldConsistentWithMode(const edm::EventSetup &iSetup) const
std::vector< stAPVGain * > APVsCollOrdered
const T & get() const
Definition: EventSetup.h:56
double a
Definition: hdecay.h:121
bool isValid() const
Definition: ESHandle.h:47
void SiStripGainFromCalibTree::algoComputeMPVandGain ( )
private

Definition at line 989 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, i, stAPVGain::Index, IsGoodLandauFit(), stAPVGain::isMasked, m_calibrationMode, MASKED, stAPVGain::NEntries, NULL, stAPVGain::PreviousGain, statCollectionFromMode(), and stAPVGain::SubDet.

Referenced by algoEndJob().

989  {
990  unsigned int I=0;
991  TH1F* Proj = NULL;
992  double FitResults[6];
993  double MPVmean = 300;
994 
995  int elepos = (AlgoMode == "PCL")? Harvest : statCollectionFromMode(m_calibrationMode.c_str());
996 
997  if ( Charge_Vs_Index[elepos]==0 ) {
998  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not execute algoComputeMPVandGain method because "
999  << m_calibrationMode.c_str() << " statistics cannot be retrieved.\n"
1000  << "Please check if input contains "
1001  << m_calibrationMode.c_str() << " data." << std::endl;
1002  return;
1003  }
1004 
1005  TH2S *chvsidx = (Charge_Vs_Index[elepos])->getTH2S();
1006 
1007 
1008  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
1009  printf("Fitting Charge Distribution :");
1010  int TreeStep = APVsColl.size()/50;
1011  for(__gnu_cxx::hash_map<unsigned int, stAPVGain*, __gnu_cxx::hash<unsigned int>, isEqual >::iterator it = APVsColl.begin();it!=APVsColl.end();it++,I++){
1012  if(I%TreeStep==0){printf(".");fflush(stdout);}
1013  stAPVGain* APV = it->second;
1014  if(APV->Bin<0) APV->Bin = chvsidx->GetXaxis()->FindBin(APV->Index);
1015 
1016  if(APV->isMasked){APV->Gain=APV->PreviousGain; MASKED++; continue;}
1017 
1018  Proj = (TH1F*)(chvsidx->ProjectionY("",chvsidx->GetXaxis()->FindBin(APV->Index),chvsidx->GetXaxis()->FindBin(APV->Index),"e"));
1019  if(!Proj)continue;
1020 
1021  if(CalibrationLevel==0){
1022  }else if(CalibrationLevel==1){
1023  int SecondAPVId = APV->APVId;
1024  if(SecondAPVId%2==0){ SecondAPVId = SecondAPVId+1; }else{ SecondAPVId = SecondAPVId-1; }
1025  stAPVGain* APV2 = APVsColl[(APV->DetId<<4) | SecondAPVId];
1026  if(APV2->Bin<0) APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index);
1027  TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("",APV2->Bin,APV2->Bin,"e"));
1028  if(Proj2){Proj->Add(Proj2,1);delete Proj2;}
1029  }else if(CalibrationLevel==2){
1030  for(unsigned int i=0;i<16;i++){ //loop up to 6APV for Strip and up to 16 for Pixels
1031  __gnu_cxx::hash_map<unsigned int, stAPVGain*, __gnu_cxx::hash<unsigned int>, isEqual >::iterator tmpit;
1032  tmpit = APVsColl.find((APV->DetId<<4) | i);
1033  if(tmpit==APVsColl.end())continue;
1034  stAPVGain* APV2 = tmpit->second;
1035  if(APV2->DetId != APV->DetId || APV2->APVId == APV->APVId)continue;
1036  if(APV2->Bin<0) APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index);
1037  TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("",APV2->Bin,APV2->Bin,"e"));
1038  if(Proj2){Proj->Add(Proj2,1);delete Proj2;}
1039  }
1040  }else{
1041  CalibrationLevel = 0;
1042  printf("Unknown Calibration Level, will assume %i\n",CalibrationLevel);
1043  }
1044 
1045  getPeakOfLandau(Proj,FitResults);
1046  APV->FitMPV = FitResults[0];
1047  APV->FitMPVErr = FitResults[1];
1048  APV->FitWidth = FitResults[2];
1049  APV->FitWidthErr = FitResults[3];
1050  APV->FitChi2 = FitResults[4];
1051  APV->FitNorm = FitResults[5];
1052  APV->NEntries = Proj->GetEntries();
1053 
1054  if(IsGoodLandauFit(FitResults)){
1055  APV->Gain = APV->FitMPV / MPVmean;
1056  if(APV->SubDet>2)GOOD++;
1057  }else{
1058  APV->Gain = APV->PreviousGain;
1059  if(APV->SubDet>2)BAD++;
1060  }
1061  if(APV->Gain<=0) APV->Gain = 1;
1062 
1063  //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);
1064  delete Proj;
1065  }printf("\n");
1066 }
std::vector< MonitorElement * > Charge_Vs_Index
int i
Definition: DBlmapReader.cc:9
#define NULL
Definition: scimark2.h:8
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
bool IsGoodLandauFit(double *FitResults)
const std::complex< double > I
Definition: I.h:8
int statCollectionFromMode(const char *tag) const
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
void SiStripGainFromCalibTree::algoEndJob ( )
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 755 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(), NClusterPixel, NClusterStrip, NPixelDets, NStripAPVs, cppFunctionSkipper::operator, or, saveSummary, statCollectionFromMode(), ConditionDBWriter< SiStripApvGain >::storeOnDbNow(), storeOnTree(), and tfs.

755  {
756  if(AlgoMode == "PCL" && !m_harvestingMode) return;//nothing to do in that case
757 
758  if(AlgoMode == "CalibTree"){
759  edm::LogInfo("SiStripGainFromCalibTree") << "Analyzing calibration tree" << std::endl;
760  // Loop on calibTrees to fill the 2D histograms
762  }else if(m_harvestingMode){
763  NClusterStrip = (Charge_Vs_Index[Harvest])->getTH2S()->Integral(0,NStripAPVs+1, 0, 99999 );
764  NClusterPixel = (Charge_Vs_Index[Harvest])->getTH2S()->Integral(NStripAPVs+2, NStripAPVs+NPixelDets+2, 0, 99999 );
765  }
766 
767  // Now that we have the full statistics we can extract the information of the 2D histograms
769 
770  // Force the DB object writing,
771  // thus setting the IOV as the first processed run (if timeFromEndRun is set to false)
772  storeOnDbNow();
773 
774  if(AlgoMode != "PCL" or saveSummary){
775  edm::LogInfo("SiStripGainFromCalibTree") << "Saving summary into root file" << std::endl;
776 
777  //also save the 2D monitor elements to this file as TH2D tfs
779 
780  //save only the statistics for the calibrationTag
781  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
782 
783  if( Charge_Vs_Index[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_Index[elepos])->getTH2S() );
784  //if( Charge_Vs_Index_Absolute[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_Index_Absolute[elepos])->getTH2S() );
785  if( Charge_Vs_PathlengthTIB[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTIB[elepos])->getTH2S() );
786  if( Charge_Vs_PathlengthTOB[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTOB[elepos])->getTH2S() );
787  if( Charge_Vs_PathlengthTIDP[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTIDP[elepos])->getTH2S() );
788  if( Charge_Vs_PathlengthTIDM[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTIDM[elepos])->getTH2S() );
789  if( Charge_Vs_PathlengthTECP1[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTECP1[elepos])->getTH2S() );
790  if( Charge_Vs_PathlengthTECP2[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTECP2[elepos])->getTH2S() );
791  if( Charge_Vs_PathlengthTECM1[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTECM1[elepos])->getTH2S() );
792  if( Charge_Vs_PathlengthTECM2[elepos]!=0 ) tfs->make<TH2S> ( *(Charge_Vs_PathlengthTECM2[elepos])->getTH2S() );
793 
794  storeOnTree(tfs);
795  }
796 }
std::vector< MonitorElement * > Charge_Vs_Index
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
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
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 648 of file SiStripGainFromCalibTree.cc.

References 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, dbe, Harvest, m_calibrationMode, m_DQMdir, m_harvestingMode, m_splitDQMstat, merge(), statCollectionFromMode(), and AlCaHLTBitMon_QueryRunRegistry::string.

648  {
649  if(AlgoMode == "PCL" && !m_harvestingMode) return;//nothing to do in that case
650 
651  if(AlgoMode == "PCL" and m_harvestingMode){
652  // Load the 2D histograms from the DQM objects
653  // When running in AlCaHarvesting mode the histos are already booked and should be just retrieved from
654  // DQMStore so that they can be used in the fit
655 
656  edm::LogInfo("SiStripGainFromCalibTree") << "Starting harvesting statistics" << std::endl;
657 
658  // check the required tag before adding histograms
659  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
660  if (elepos!=Harvest) {
661 
662  //collect statistics from DQM into the related monitored elements
664  if(stag.size()!=0 && stag[0]!='_') stag.insert(0,1,'_');
665 
666 
667  if (elepos==-1) {
668  //implememt backward compatibility
669  elepos=0;
670  stag="";
671  }
672 
674 
675  std::string cvi = DQM_dir + std::string("/Charge_Vs_Index") + stag;
676  //std::string cviA = DQM_dir + std::string("/Charge_Vs_Index_Absolute") + stag;
677  std::string cvpTIB = DQM_dir + std::string("/Charge_Vs_PathlengthTIB") + stag;
678  std::string cvpTOB = DQM_dir + std::string("/Charge_Vs_PathlengthTOB") + stag;
679  std::string cvpTIDP = DQM_dir + std::string("/Charge_Vs_PathlengthTIDP") + stag;
680  std::string cvpTIDM = DQM_dir + std::string("/Charge_Vs_PathlengthTIDM") + stag;
681  std::string cvpTECP1 = DQM_dir + std::string("/Charge_Vs_PathlengthTECP1") + stag;
682  std::string cvpTECP2 = DQM_dir + std::string("/Charge_Vs_PathlengthTECP2") + stag;
683  std::string cvpTECM1 = DQM_dir + std::string("/Charge_Vs_PathlengthTECM1") + stag;
684  std::string cvpTECM2 = DQM_dir + std::string("/Charge_Vs_PathlengthTECM2") + stag;
685 
686  Charge_Vs_Index[elepos] = dbe->get(cvi.c_str());
687  //Charge_Vs_Index_Absolute[elepos] = dbe->get(cviA.c_str());
688  Charge_Vs_PathlengthTIB[elepos] = dbe->get(cvpTIB.c_str());
689  Charge_Vs_PathlengthTOB[elepos] = dbe->get(cvpTOB.c_str());
690  Charge_Vs_PathlengthTIDP[elepos] = dbe->get(cvpTIDP.c_str());
691  Charge_Vs_PathlengthTIDM[elepos] = dbe->get(cvpTIDM.c_str());
692  Charge_Vs_PathlengthTECP1[elepos] = dbe->get(cvpTECP1.c_str());
693  Charge_Vs_PathlengthTECP2[elepos] = dbe->get(cvpTECP2.c_str());
694  Charge_Vs_PathlengthTECM1[elepos] = dbe->get(cvpTECM1.c_str());
695  Charge_Vs_PathlengthTECM2[elepos] = dbe->get(cvpTECM2.c_str());
696 
697  if (Charge_Vs_Index[elepos]==0) {
698  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvi.c_str()
699  << ", statistics will not be summed!" << std::endl;
700  } else {
701  merge( (Charge_Vs_Index[Harvest])->getTH2S(), (Charge_Vs_Index[elepos])->getTH2S() );
702  edm::LogInfo("SiStripGainFromCalibTree") << "Harvesting "
703  << (Charge_Vs_Index[elepos])->getTH2S()->GetEntries() << " more clusters" << std::endl;
704  }
705 
706  //if (Charge_Vs_Index_Absolute[elepos]==0) {
707  // edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cviA.c_str()
708  // << ", statistics will not be summed!" << std::endl;
709  //} else merge( (Charge_Vs_Index_Absolute[Harvest])->getTH2S(), (Charge_Vs_Index_Absolute[elepos])->getTH2S() );
710 
711  if (Charge_Vs_PathlengthTIB[elepos]==0) {
712  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTIB.c_str()
713  << ", statistics will not be summed!" << std::endl;
714  } else (Charge_Vs_PathlengthTIB[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIB[elepos])->getTH2S());
715 
716  if (Charge_Vs_PathlengthTOB[elepos]==0) {
717  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTOB.c_str()
718  << ", statistics will not be summed!" << std::endl;
719  } else (Charge_Vs_PathlengthTOB[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTOB[elepos])->getTH2S());
720 
721  if (Charge_Vs_PathlengthTIDP[elepos]==0) {
722  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTIDP.c_str()
723  << ", statistics will not be summed!" << std::endl;
724  } else (Charge_Vs_PathlengthTIDP[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIDP[elepos])->getTH2S());
725 
726  if (Charge_Vs_PathlengthTIDM[elepos]==0) {
727  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTIDM.c_str()
728  << ", statistics will not be summed!" << std::endl;
729  } else (Charge_Vs_PathlengthTIDM[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTIDM[elepos])->getTH2S());
730 
731  if (Charge_Vs_PathlengthTECP1[elepos]==0) {
732  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTECP1.c_str()
733  << ", statistics will not be summed!" << std::endl;
734  } else (Charge_Vs_PathlengthTECP1[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECP1[elepos])->getTH2S());
735 
736  if (Charge_Vs_PathlengthTECP2[elepos]==0) {
737  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTECP2.c_str()
738  << ", statistics will not be summed!" << std::endl;
739  } else (Charge_Vs_PathlengthTECP2[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECP2[elepos])->getTH2S());
740 
741  if (Charge_Vs_PathlengthTECM1[elepos]==0) {
742  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTECM1.c_str()
743  << ", statistics will not be summed!" << std::endl;
744  } else (Charge_Vs_PathlengthTECM1[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECM1[elepos])->getTH2S());
745 
746  if (Charge_Vs_PathlengthTECM2[elepos]==0) {
747  edm::LogError("SiStripGainFromCalibTree") << "Harvesting: could not retrieve " << cvpTECM2.c_str()
748  << ", statistics will not be summed!" << std::endl;
749  } else (Charge_Vs_PathlengthTECM2[Harvest])->getTH2S()->Add((Charge_Vs_PathlengthTECM2[elepos])->getTH2S());
750  }
751  }
752 }
std::vector< MonitorElement * > Charge_Vs_Index
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
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::bookDQMHistos ( const char *  dqm_dir,
const char *  tag 
)
private

Definition at line 411 of file SiStripGainFromCalibTree.cc.

References 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, dbe, Harvest, m_harvestingMode, statCollectionFromMode(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by algoBeginJob().

412 {
413  static std::string booked_dir = "";
414 
415  edm::LogInfo("SiStripGainFromCalibTree") << "Setting " << dqm_dir << "in DQM and booking histograms for tag "
416  << tag << std::endl;
417 
418  if ( strcmp(booked_dir.c_str(),dqm_dir)!=0 ) {
419  booked_dir = dqm_dir;
420  dbe->setCurrentFolder(dqm_dir);
421  }
422 
423  std::string stag(tag);
424  if(stag.size()!=0 && stag[0]!='_') stag.insert(0,1,'_');
425 
426  std::string cvi = std::string("Charge_Vs_Index") + stag;
427  //std::string cviA = std::string("Charge_Vs_Index_Absolute") + stag;
428  std::string cvpTIB = std::string("Charge_Vs_PathlengthTIB") + stag;
429  std::string cvpTOB = std::string("Charge_Vs_PathlengthTOB") + stag;
430  std::string cvpTIDP = std::string("Charge_Vs_PathlengthTIDP") + stag;
431  std::string cvpTIDM = std::string("Charge_Vs_PathlengthTIDM") + stag;
432  std::string cvpTECP1 = std::string("Charge_Vs_PathlengthTECP1") + stag;
433  std::string cvpTECP2 = std::string("Charge_Vs_PathlengthTECP2") + stag;
434  std::string cvpTECM1 = std::string("Charge_Vs_PathlengthTECM1") + stag;
435  std::string cvpTECM2 = std::string("Charge_Vs_PathlengthTECM2") + stag;
436 
437  int elepos = (m_harvestingMode && AlgoMode=="PCL")? Harvest : statCollectionFromMode(tag);
438 
439  Charge_Vs_Index[elepos] = dbe->book2S(cvi.c_str() , cvi.c_str() , 88625, 0 , 88624,2000,0,4000);
440  //Charge_Vs_Index_Absolute[elepos] = dbe->book2S(cviA.c_str() , cviA.c_str() , 88625, 0 , 88624,1000,0,4000);
441  Charge_Vs_PathlengthTIB[elepos] = dbe->book2S(cvpTIB.c_str() , cvpTIB.c_str() , 20 , 0.3 , 1.3 , 250,0,2000);
442  Charge_Vs_PathlengthTOB[elepos] = dbe->book2S(cvpTOB.c_str() , cvpTOB.c_str() , 20 , 0.3 , 1.3 , 250,0,2000);
443  Charge_Vs_PathlengthTIDP[elepos] = dbe->book2S(cvpTIDP.c_str() , cvpTIDP.c_str() , 20 , 0.3 , 1.3 , 250,0,2000);
444  Charge_Vs_PathlengthTIDM[elepos] = dbe->book2S(cvpTIDM.c_str() , cvpTIDM.c_str() , 20 , 0.3 , 1.3 , 250,0,2000);
445  Charge_Vs_PathlengthTECP1[elepos] = dbe->book2S(cvpTECP1.c_str(), cvpTECP1.c_str(), 20 , 0.3 , 1.3 , 250,0,2000);
446  Charge_Vs_PathlengthTECP2[elepos] = dbe->book2S(cvpTECP2.c_str(), cvpTECP2.c_str(), 20 , 0.3 , 1.3 , 250,0,2000);
447  Charge_Vs_PathlengthTECM1[elepos] = dbe->book2S(cvpTECM1.c_str(), cvpTECM1.c_str(), 20 , 0.3 , 1.3 , 250,0,2000);
448  Charge_Vs_PathlengthTECM2[elepos] = dbe->book2S(cvpTECM2.c_str(), cvpTECM2.c_str(), 20 , 0.3 , 1.3 , 250,0,2000);
449 }
std::vector< MonitorElement * > Charge_Vs_Index
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
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
template<typename T >
edm::Handle<T> SiStripGainFromCalibTree::connect ( const T *&  ptr,
edm::EDGetTokenT< T token,
const edm::Event evt 
)
inlineprivate

Definition at line 152 of file SiStripGainFromCalibTree.cc.

References edm::Event::getByToken(), patZpeak::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(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().

152  {
154  evt.getByToken(token, handle);
155  ptr = handle.product();
156  return handle; //return handle to keep alive pointer (safety first)
157  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
tuple handle
Definition: patZpeak.py:22
T const * product() const
Definition: Handle.h:81
SiStripApvGain * SiStripGainFromCalibTree::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripApvGain >.

Definition at line 1215 of file SiStripGainFromCalibTree.cc.

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

1216 {
1218  if(!m_harvestingMode) return obj;
1219 
1220  if(!produceTagFilter()){
1221  edm::LogWarning("SiStripGainFromCalibTree")<< "getNewObject -> will not produce a paylaod because produceTagFilter returned false " << endl;
1222  setDoStore(false);
1223  return obj;
1224  }
1225 
1226 
1227  std::vector<float>* theSiStripVector = NULL;
1228  unsigned int PreviousDetId = 0;
1229  for(unsigned int a=0;a<APVsCollOrdered.size();a++){
1231  if(APV==NULL){ printf("Bug\n"); continue; }
1232  if(APV->SubDet<=2)continue;
1233  if(APV->DetId != PreviousDetId){
1234  if(theSiStripVector!=NULL){
1235  SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end());
1236  if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId);
1237  }
1238  theSiStripVector = new std::vector<float>;
1239  PreviousDetId = APV->DetId;
1240  }
1241  theSiStripVector->push_back(APV->Gain);
1242  }
1243  if(theSiStripVector!=NULL){
1244  SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end());
1245  if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId);
1246  }
1247 
1248  return obj;
1249 }
#define NULL
Definition: scimark2.h:8
bool put(const uint32_t &detID, Range input)
std::vector< stAPVGain * > APVsCollOrdered
std::pair< ContainerIterator, ContainerIterator > Range
void setDoStore(const bool doStore)
When set to false the payload will not be written to the db.
double a
Definition: hdecay.h:121
void SiStripGainFromCalibTree::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 50,
double  HighRange = 5400 
)
private

Definition at line 799 of file SiStripGainFromCalibTree.cc.

References MinNrEntries.

Referenced by algoComputeMPVandGain().

800 {
801  FitResults[0] = -0.5; //MPV
802  FitResults[1] = 0; //MPV error
803  FitResults[2] = -0.5; //Width
804  FitResults[3] = 0; //Width error
805  FitResults[4] = -0.5; //Fit Chi2/NDF
806  FitResults[5] = 0; //Normalization
807 
808  if( InputHisto->GetEntries() < MinNrEntries)return;
809 
810  // perform fit with standard landau
811  TF1* MyLandau = new TF1("MyLandau","landau",LowRange, HighRange);
812  MyLandau->SetParameter(1,300);
813  InputHisto->Fit(MyLandau,"0QR WW");
814 
815  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
816  FitResults[0] = MyLandau->GetParameter(1); //MPV
817  FitResults[1] = MyLandau->GetParError(1); //MPV error
818  FitResults[2] = MyLandau->GetParameter(2); //Width
819  FitResults[3] = MyLandau->GetParError(2); //Width error
820  FitResults[4] = MyLandau->GetChisquare() / MyLandau->GetNDF(); //Fit Chi2/NDF
821  FitResults[5] = MyLandau->GetParameter(0);
822 
823  delete MyLandau;
824 }
bool SiStripGainFromCalibTree::isBFieldConsistentWithMode ( const edm::EventSetup iSetup) const
private

Definition at line 587 of file SiStripGainFromCalibTree.cc.

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

Referenced by algoBeginJob(), and algoBeginRun().

587  {
588  edm::ESHandle<RunInfo> runInfo;
589  iSetup.get<RunInfoRcd>().get(runInfo);
590 
591  double average_current = runInfo.product()->m_avg_current;
592  bool isOn = (average_current > MagFieldCurrentTh);
593  bool is0T = (m_calibrationMode.substr( m_calibrationMode.length()-2 )=="0T");
594 
595  return ( (isOn && !is0T) || (!isOn && is0T) );
596 }
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
bool SiStripGainFromCalibTree::IsGoodLandauFit ( double *  FitResults)
private

Definition at line 826 of file SiStripGainFromCalibTree.cc.

Referenced by algoComputeMPVandGain().

826  {
827  if(FitResults[0] <= 0 )return false;
828 // if(FitResults[1] > MaxMPVError )return false;
829 // if(FitResults[4] > MaxChi2OverNDF)return false;
830  return true;
831 }
void SiStripGainFromCalibTree::MakeCalibrationMap ( )
private

Definition at line 1256 of file SiStripGainFromCalibTree.cc.

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

Referenced by algoBeginJob().

1256  {
1257  if(!useCalibration)return;
1258 
1259  TChain* t1 = new TChain("SiStripCalib/APVGain");
1260  t1->Add(m_calibrationPath.c_str());
1261 
1262  unsigned int tree_DetId;
1263  unsigned char tree_APVId;
1264  double tree_Gain;
1265 
1266  t1->SetBranchAddress("DetId" ,&tree_DetId );
1267  t1->SetBranchAddress("APVId" ,&tree_APVId );
1268  t1->SetBranchAddress("Gain" ,&tree_Gain );
1269 
1270  for (unsigned int ientry = 0; ientry < t1->GetEntries(); ientry++) {
1271  t1->GetEntry(ientry);
1272  stAPVGain* APV = APVsColl[(tree_DetId<<4) | (unsigned int)tree_APVId];
1273  APV->CalibGain = tree_Gain;
1274  }
1275 }
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
void SiStripGainFromCalibTree::merge ( TH2 *  A,
TH2 *  B 
)
private

Definition at line 287 of file SiStripGainFromCalibTree.cc.

References x().

Referenced by algoEndRun().

287  {
288  if(A->GetNbinsX() == B->GetNbinsX()){
289  A->Add(B);
290  }else{
291  for(int x=0;x<=B->GetNbinsX()+1; x++){
292  for(int y=0;y<=B->GetNbinsY()+1; y++){
293  A->SetBinContent(x,y,A->GetBinContent(x,y)+B->GetBinContent(x,y));
294  }}
295  }
296 }
void SiStripGainFromCalibTree::processEvent ( )
private

Definition at line 833 of file SiStripGainFromCalibTree.cc.

References AllowSaturation, sistrip::APV, APVsColl, stAPVGain::CalibGain, 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, edm::false, farfromedge, HcalObjRepresent::Fill(), FirstSetOfConstants, firststrip, i, stAPVGain::Index, m_calibrationMode, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackingIteration, MaxTrackMomentum, MinTrackEta, MinTrackHits, MinTrackMomentum, NClusterPixel, NClusterStrip, NEvent, nstrips, NTrack, OldGainRemoving, overlapping, path, stAPVGain::PreviousGain, 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, useCalibration, and Validation.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

833  {
834 
835  edm::LogInfo("SiStripGainFromCalibTree") << "Processing run " << runnumber
836  << " and event " << eventnumber
837  << " for " << m_calibrationMode << " calibration." << std::endl;
838 
841 
842  NEvent++;
843  NTrack+=(*trackp).size();
844 
845  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
846 
847  unsigned int FirstAmplitude=0;
848  for(unsigned int i=0;i<(*chargeoverpath).size();i++){
849  FirstAmplitude+=(*nstrips)[i];
850  int TI = (*trackindex)[i];
851 
852  //printf("%i - %i - %i %i %i\n", (int)(*rawid)[i], (int)(*firststrip)[i]/128, (int)(*farfromedge)[i], (int)(*overlapping)[i], (int)(*saturation )[i] );
853  if((*tracketa )[TI] < MinTrackEta )continue;
854  if((*tracketa )[TI] > MaxTrackEta )continue;
855  if((*trackp )[TI] < MinTrackMomentum )continue;
856  if((*trackp )[TI] > MaxTrackMomentum )continue;
857  if((*trackhitsvalid)[TI] < MinTrackHits )continue;
858  if((*trackchi2ndof )[TI] > MaxTrackChiOverNdf )continue;
859  if((*trackalgo )[TI] > MaxTrackingIteration )continue;
860 
861  stAPVGain* APV = APVsColl[((*rawid)[i]<<4) | ((*firststrip)[i]/128)]; //works for both strip and pixel thanks to firstStrip encoding for pixel in the calibTree
862 
863  if(APV->SubDet>2 && (*farfromedge)[i] == false )continue;
864  if(APV->SubDet>2 && (*overlapping)[i] == true )continue;
865  if(APV->SubDet>2 && (*saturation )[i] && !AllowSaturation)continue;
866  if(APV->SubDet>2 && (*nstrips )[i] > MaxNrStrips )continue;
867 
868 
869  //printf("detId=%7i run=%7i event=%9i charge=%5i cs=%3i\n",(*rawid)[i],runnumber,eventnumber,(*charge)[i],(*nstrips)[i]);
870 
871  //double trans = atan2((*localdiry)[i],(*localdirx)[i])*(180/3.14159265);
872  //double alpha = acos ((*localdirx)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265);
873  //double beta = acos ((*localdiry)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265);
874 
875  //printf("NStrip = %i : Charge = %i --> Path = %f --> ChargeOverPath=%f\n",(*nstrips)[i],(*charge)[i],(*path)[i],(*chargeoverpath)[i]);
876  //printf("Amplitudes: ");
877  //for(unsigned int a=0;a<(*nstrips)[i];a++){printf("%i ",(*amplitude)[FirstAmplitude+a]);}
878  //printf("\n");
879 
880  if(APV->SubDet>2){NClusterStrip++;}else{NClusterPixel++;}
881 
882  int Charge = 0;
883  if(APV->SubDet>2 && (useCalibration || !FirstSetOfConstants)){
884  bool Saturation = false;
885  for(unsigned int s=0;s<(*nstrips)[i];s++){
886  int StripCharge = (*amplitude)[FirstAmplitude-(*nstrips)[i]+s];
887  if(useCalibration && !FirstSetOfConstants){ StripCharge=(int)(StripCharge*(APV->PreviousGain/APV->CalibGain));
888  }else if(useCalibration){ StripCharge=(int)(StripCharge/APV->CalibGain);
889  }else if(!FirstSetOfConstants){ StripCharge=(int)(StripCharge*APV->PreviousGain);}
890  if(StripCharge>1024){
891  StripCharge = 255;
892  Saturation = true;
893  }else if(StripCharge>254){
894  StripCharge = 254;
895  Saturation = true;
896  }
897  Charge += StripCharge;
898  }
899  if(Saturation && !AllowSaturation)continue;
900  }else if(APV->SubDet>2){
901  Charge = (*charge)[i];
902  }else{
903  Charge = (*charge)[i]/265.0; //expected scale factor between pixel and strip charge
904  }
905 
906  //printf("ChargeDifference = %i Vs %i with Gain = %f\n",(*charge)[i],Charge,APV->CalibGain);
907 
908  double ClusterChargeOverPath = ( (double) Charge )/(*path)[i] ;
909  if(APV->SubDet>2){
910  if(Validation) {ClusterChargeOverPath/=(*gainused)[i];}
911  if(OldGainRemoving){ClusterChargeOverPath*=(*gainused)[i];}
912  }
913  //(Charge_Vs_Index_Absolute[elepos])->Fill(APV->Index,Charge);
914  (Charge_Vs_Index[elepos]) ->Fill(APV->Index,ClusterChargeOverPath);
915 
916  if(APV->SubDet==StripSubdetector::TIB){ (Charge_Vs_PathlengthTIB[elepos]) ->Fill((*path)[i],Charge);
917  }else if(APV->SubDet==StripSubdetector::TOB){ (Charge_Vs_PathlengthTOB[elepos]) ->Fill((*path)[i],Charge);
918  }else if(APV->SubDet==StripSubdetector::TID){
919  if(APV->Eta<0){ (Charge_Vs_PathlengthTIDM[elepos]) ->Fill((*path)[i],Charge);
920  }else if(APV->Eta>0){ (Charge_Vs_PathlengthTIDP[elepos]) ->Fill((*path)[i],Charge);
921  }
922  }else if(APV->SubDet==StripSubdetector::TEC){
923  if(APV->Eta<0){
924  if(APV->Thickness<0.04){ (Charge_Vs_PathlengthTECM1[elepos])->Fill((*path)[i],Charge);
925  }else if(APV->Thickness>0.04){ (Charge_Vs_PathlengthTECM2[elepos])->Fill((*path)[i],Charge);
926  }
927  }else if(APV->Eta>0){
928  if(APV->Thickness<0.04){ (Charge_Vs_PathlengthTECP1[elepos])->Fill((*path)[i],Charge);
929  }else if(APV->Thickness>0.04){ (Charge_Vs_PathlengthTECP2[elepos])->Fill((*path)[i],Charge);
930  }
931  }
932  }
933 
934  }// END OF ON-CLUSTER LOOP
935 }//END OF processEvent()
std::vector< MonitorElement * > Charge_Vs_Index
int i
Definition: DBlmapReader.cc:9
const std::vector< float > * trackp
const std::vector< double > * trackchi2ndof
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
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
const std::vector< unsigned short > * firststrip
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
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
volatile std::atomic< bool > shutdown_flag false
const std::vector< double > * path
const std::vector< unsigned short > * nstrips
const std::vector< double > * tracketa
bool SiStripGainFromCalibTree::produceTagFilter ( )
private

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

1185  {
1186 
1187  // The goal of this function is to check wether or not there is enough statistics
1188  // to produce a meaningful tag for the DB
1189  int elepos = (AlgoMode == "PCL")? Harvest : statCollectionFromMode(m_calibrationMode.c_str());
1190  if( Charge_Vs_Index[elepos]==0 ) {
1191  edm::LogError("SiStripGainFromCalibTree") << "produceTagFilter -> Return false: could not retrieve the "
1192  << m_calibrationMode.c_str() << " statistics.\n"
1193  << "Please check if input contains "
1194  << m_calibrationMode.c_str() << " data." << std::endl;
1195  return false;
1196  }
1197 
1198 
1199  float integral = (Charge_Vs_Index[elepos])->getTH2S()->Integral();
1200  if( (Charge_Vs_Index[elepos])->getTH2S()->Integral(0,NStripAPVs+1, 0, 99999 ) < tagCondition_NClusters) {
1201  edm::LogWarning("SiStripGainFromCalibTree")
1202  << "calibrationMode -> " << m_calibrationMode << "\n"
1203  << "produceTagFilter -> Return false: Statistics is too low : " << integral << endl;
1204  return false;
1205  }
1206  if((1.0 * GOOD) / (GOOD+BAD) < tagCondition_GoodFrac) {
1207  edm::LogWarning("SiStripGainFromCalibTree")
1208  << "calibrationMode -> " << m_calibrationMode << "\n"
1209  << "produceTagFilter -> Return false: ratio of GOOD/TOTAL is too low: " << (1.0 * GOOD) / (GOOD+BAD) << endl;
1210  return false;
1211  }
1212  return true;
1213 }
std::vector< MonitorElement * > Charge_Vs_Index
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
int statCollectionFromMode(const char *tag) const
int SiStripGainFromCalibTree::statCollectionFromMode ( const char *  tag) const
inlineprivate

Definition at line 274 of file SiStripGainFromCalibTree.cc.

References FSQ::None, and AlCaHLTBitMon_QueryRunRegistry::string.

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

275 {
276  std::vector<string>::const_iterator it=dqm_tag_.begin();
277  while(it!=dqm_tag_.end()) {
278  if(*it==std::string(tag)) return it-dqm_tag_.begin();
279  it++;
280  }
281 
282  if (std::string(tag)=="") return 0; // return StdBunch calibration mode for backward compatibility
283 
284  return None;
285 }
void SiStripGainFromCalibTree::storeOnTree ( TFileService tfs)
private

Definition at line 1069 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, GOOD, stAPVGain::Index, stAPVGain::isMasked, m_calibrationMode, TFileService::make(), MASKED, NClusterPixel, NClusterStrip, stAPVGain::NEntries, NEvent, NPixelDets, NStripAPVs, NTrack, NULL, OutputGains, stAPVGain::Phi, stAPVGain::PreviousGain, stAPVGain::PreviousGainTick, stAPVGain::R, statCollectionFromMode(), stAPVGain::SubDet, stAPVGain::Thickness, stAPVGain::x, stAPVGain::y, and stAPVGain::z.

Referenced by algoEndJob().

1070 {
1071  unsigned int tree_Index;
1072  unsigned int tree_Bin;
1073  unsigned int tree_DetId;
1074  unsigned char tree_APVId;
1075  unsigned char tree_SubDet;
1076  float tree_x;
1077  float tree_y;
1078  float tree_z;
1079  float tree_Eta;
1080  float tree_R;
1081  float tree_Phi;
1082  float tree_Thickness;
1083  float tree_FitMPV;
1084  float tree_FitMPVErr;
1085  float tree_FitWidth;
1086  float tree_FitWidthErr;
1087  float tree_FitChi2NDF;
1088  float tree_FitNorm;
1089  double tree_Gain;
1090  double tree_PrevGain;
1091  double tree_PrevGainTick;
1092  double tree_NEntries;
1093  bool tree_isMasked;
1094 
1095  TTree* MyTree;
1096  MyTree = tfs->make<TTree> ("APVGain","APVGain");
1097  MyTree->Branch("Index" ,&tree_Index ,"Index/i");
1098  MyTree->Branch("Bin" ,&tree_Bin ,"Bin/i");
1099  MyTree->Branch("DetId" ,&tree_DetId ,"DetId/i");
1100  MyTree->Branch("APVId" ,&tree_APVId ,"APVId/b");
1101  MyTree->Branch("SubDet" ,&tree_SubDet ,"SubDet/b");
1102  MyTree->Branch("x" ,&tree_x ,"x/F");
1103  MyTree->Branch("y" ,&tree_y ,"y/F");
1104  MyTree->Branch("z" ,&tree_z ,"z/F");
1105  MyTree->Branch("Eta" ,&tree_Eta ,"Eta/F");
1106  MyTree->Branch("R" ,&tree_R ,"R/F");
1107  MyTree->Branch("Phi" ,&tree_Phi ,"Phi/F");
1108  MyTree->Branch("Thickness" ,&tree_Thickness ,"Thickness/F");
1109  MyTree->Branch("FitMPV" ,&tree_FitMPV ,"FitMPV/F");
1110  MyTree->Branch("FitMPVErr" ,&tree_FitMPVErr ,"FitMPVErr/F");
1111  MyTree->Branch("FitWidth" ,&tree_FitWidth ,"FitWidth/F");
1112  MyTree->Branch("FitWidthErr" ,&tree_FitWidthErr,"FitWidthErr/F");
1113  MyTree->Branch("FitChi2NDF" ,&tree_FitChi2NDF ,"FitChi2NDF/F");
1114  MyTree->Branch("FitNorm" ,&tree_FitNorm ,"FitNorm/F");
1115  MyTree->Branch("Gain" ,&tree_Gain ,"Gain/D");
1116  MyTree->Branch("PrevGain" ,&tree_PrevGain ,"PrevGain/D");
1117  MyTree->Branch("PrevGainTick" ,&tree_PrevGainTick,"PrevGainTick/D");
1118  MyTree->Branch("NEntries" ,&tree_NEntries ,"NEntries/D");
1119  MyTree->Branch("isMasked" ,&tree_isMasked ,"isMasked/O");
1120 
1121 
1122  FILE* Gains = stdout;
1123  fprintf(Gains,"NEvents = %i\n",NEvent);
1124  fprintf(Gains,"NTracks = %i\n",NTrack);
1125  fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel);
1126  fprintf(Gains,"NClustersStrip = %i\n",NClusterStrip);
1127  fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast<unsigned long>(NPixelDets));
1128  fprintf(Gains,"Number of Strip APVs = %lu\n",static_cast<unsigned long>(NStripAPVs));
1129  fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD), MASKED);
1130 
1131  Gains=fopen(OutputGains.c_str(),"w");
1132  fprintf(Gains,"NEvents = %i\n",NEvent);
1133  fprintf(Gains,"NTracks = %i\n",NTrack);
1134  fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel);
1135  fprintf(Gains,"NClustersStrip = %i\n",NClusterStrip);
1136  fprintf(Gains,"Number of Strip APVs = %lu\n",static_cast<unsigned long>(NStripAPVs));
1137  fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast<unsigned long>(NPixelDets));
1138  fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD), MASKED);
1139 
1140  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
1141 
1142  for(unsigned int a=0;a<APVsCollOrdered.size();a++){
1144  if(APV==NULL)continue;
1145 // printf( "%i | %i | PreviousGain = %7.5f NewGain = %7.5f (#clusters=%8.0f)\n", APV->DetId,APV->APVId,APV->PreviousGain,APV->Gain, APV->NEntries);
1146  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);
1147 
1148  tree_Index = APV->Index;
1149  tree_Bin = (Charge_Vs_Index[elepos])->getTH2S()->GetXaxis()->FindBin(APV->Index);
1150  tree_DetId = APV->DetId;
1151  tree_APVId = APV->APVId;
1152  tree_SubDet = APV->SubDet;
1153  tree_x = APV->x;
1154  tree_y = APV->y;
1155  tree_z = APV->z;
1156  tree_Eta = APV->Eta;
1157  tree_R = APV->R;
1158  tree_Phi = APV->Phi;
1159  tree_Thickness = APV->Thickness;
1160  tree_FitMPV = APV->FitMPV;
1161  tree_FitMPVErr = APV->FitMPVErr;
1162  tree_FitWidth = APV->FitWidth;
1163  tree_FitWidthErr= APV->FitWidthErr;
1164  tree_FitChi2NDF = APV->FitChi2;
1165  tree_FitNorm = APV->FitNorm;
1166  tree_Gain = APV->Gain;
1167  tree_PrevGain = APV->PreviousGain;
1168  tree_PrevGainTick = APV->PreviousGainTick;
1169  tree_NEntries = APV->NEntries;
1170  tree_isMasked = APV->isMasked;
1171 
1172 
1173  if(tree_DetId==402673324){
1174  printf("%i | %i : %f --> %f (%f)\n", tree_DetId, tree_APVId, tree_PrevGain, tree_Gain, tree_NEntries);
1175  }
1176 
1177 
1178  MyTree->Fill();
1179  }
1180  if(Gains)fclose(Gains);
1181 
1182 
1183 }
std::vector< MonitorElement * > Charge_Vs_Index
#define NULL
Definition: scimark2.h:8
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< stAPVGain * > APVsCollOrdered
int statCollectionFromMode(const char *tag) const
double a
Definition: hdecay.h:121
void SiStripGainFromCalibTree::swapBFieldMode ( void  )
private

Definition at line 598 of file SiStripGainFromCalibTree.cc.

References m_calibrationMode.

Referenced by algoBeginJob(), and algoBeginRun().

598  {
599  if ( m_calibrationMode.substr( m_calibrationMode.length()-2 )=="0T" ) {
600  m_calibrationMode.erase( m_calibrationMode.length()-2,2);
601  } else {
602  m_calibrationMode.append( "0T" );
603  }
604 }

Member Data Documentation

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

Definition at line 175 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

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

Definition at line 253 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 253 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

__gnu_cxx::hash_map<unsigned int, stAPVGain*, __gnu_cxx::hash<unsigned int>, isEqual > SiStripGainFromCalibTree::APVsColl
private
std::vector<stAPVGain*> SiStripGainFromCalibTree::APVsCollOrdered
private

Definition at line 269 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), algoBeginRun(), getNewObject(), and storeOnTree().

unsigned int SiStripGainFromCalibTree::BAD
private
string SiStripGainFromCalibTree::CalibPrefix_
private

Definition at line 260 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

int SiStripGainFromCalibTree::CalibrationLevel
private

Definition at line 179 of file SiStripGainFromCalibTree.cc.

Referenced by algoComputeMPVandGain(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::CalibSuffix_
private

Definition at line 261 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

const std::vector<unsigned int>* SiStripGainFromCalibTree::charge =0
private
edm::EDGetTokenT<std::vector<unsigned int> > SiStripGainFromCalibTree::charge_token_
private

Definition at line 250 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
std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTECM2
private
std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTECP1
private
std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTECP2
private
std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTIB
private
std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTIDM
private
std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTIDP
private
std::vector<MonitorElement*> SiStripGainFromCalibTree::Charge_Vs_PathlengthTOB
private
const std::vector<double>* SiStripGainFromCalibTree::chargeoverpath =0
private

Definition at line 252 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 252 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

DQMStore* SiStripGainFromCalibTree::dbe
private
std::vector<string> SiStripGainFromCalibTree::dqm_tag_
private

Definition at line 198 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::ERun
private

Definition at line 218 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and processEvent().

unsigned int SiStripGainFromCalibTree::eventnumber =0
private

Definition at line 226 of file SiStripGainFromCalibTree.cc.

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

string SiStripGainFromCalibTree::EventPrefix_
private

Definition at line 256 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::EventSuffix_
private

Definition at line 257 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

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

Definition at line 249 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 249 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

bool SiStripGainFromCalibTree::FirstSetOfConstants
private

Definition at line 176 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

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

Definition at line 245 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 245 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 254 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 254 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 242 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 242 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 243 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 243 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 244 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 244 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 186 of file SiStripGainFromCalibTree.cc.

Referenced by MakeCalibrationMap(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::m_DQMdir
private

Definition at line 187 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 184 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 221 of file SiStripGainFromCalibTree.cc.

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

double SiStripGainFromCalibTree::MaxChi2OverNDF
private

Definition at line 166 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxMPVError
private

Definition at line 165 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::MaxNrStrips
private

Definition at line 171 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackChiOverNdf
private

Definition at line 173 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackEta
private

Definition at line 170 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

int SiStripGainFromCalibTree::MaxTrackingIteration
private

Definition at line 174 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackMomentum
private

Definition at line 168 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinNrEntries
private

Definition at line 164 of file SiStripGainFromCalibTree.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinTrackEta
private

Definition at line 169 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::MinTrackHits
private

Definition at line 172 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinTrackMomentum
private

Definition at line 167 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::NClusterPixel
private

Definition at line 214 of file SiStripGainFromCalibTree.cc.

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

unsigned int SiStripGainFromCalibTree::NClusterStrip
private

Definition at line 213 of file SiStripGainFromCalibTree.cc.

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

unsigned int SiStripGainFromCalibTree::NEvent
private
int SiStripGainFromCalibTree::NPixelDets
private

Definition at line 216 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 246 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 246 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::NTrack
private

Definition at line 212 of file SiStripGainFromCalibTree.cc.

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

bool SiStripGainFromCalibTree::OldGainRemoving
private

Definition at line 178 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

std::string SiStripGainFromCalibTree::OutputGains
private

Definition at line 193 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree(), and storeOnTree().

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

Definition at line 248 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 248 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 251 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 241 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 241 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::runnumber =0
private

Definition at line 227 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 247 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 247 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

bool SiStripGainFromCalibTree::saveSummary
private

Definition at line 181 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::SRun
private

Definition at line 217 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and processEvent().

double SiStripGainFromCalibTree::tagCondition_GoodFrac
private

Definition at line 190 of file SiStripGainFromCalibTree.cc.

Referenced by produceTagFilter(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::tagCondition_NClusters
private

Definition at line 189 of file SiStripGainFromCalibTree.cc.

Referenced by produceTagFilter(), and SiStripGainFromCalibTree().

TFileService* SiStripGainFromCalibTree::tfs
private

Definition at line 161 of file SiStripGainFromCalibTree.cc.

Referenced by algoEndJob().

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

Definition at line 237 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 237 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 231 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 231 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 234 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 234 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 236 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 236 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 240 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 240 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 232 of file SiStripGainFromCalibTree.cc.

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

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

Definition at line 232 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

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

Definition at line 235 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 235 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::TrackPrefix_
private

Definition at line 258 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

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

Definition at line 233 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 233 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

string SiStripGainFromCalibTree::TrackSuffix_
private

Definition at line 259 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

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

Definition at line 228 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and algoAnalyzeTheTree().

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

Definition at line 228 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripGainFromCalibTree().

bool SiStripGainFromCalibTree::useCalibration
private
bool SiStripGainFromCalibTree::Validation
private

Definition at line 177 of file SiStripGainFromCalibTree.cc.

Referenced by processEvent(), and SiStripGainFromCalibTree().

vector<string> SiStripGainFromCalibTree::VInputFiles
private

Definition at line 194 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().