CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TrackProbabilityXMLtoDB Class Reference

#include <RecoBTag/TrackProbabilityXMLtoDB/src/TrackProbabilityXMLtoDB.cc>

Inheritance diagram for TrackProbabilityXMLtoDB:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
virtual void endJob ()
 
 TrackProbabilityXMLtoDB (const edm::ParameterSet &)
 
 ~TrackProbabilityXMLtoDB ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

int count
 
edm::InputTag m_assoc
 
double m_cutMaxChiSquared
 
double m_cutMaxDecayLen
 
double m_cutMaxDistToAxis
 
double m_cutMaxLIP
 
double m_cutMaxTIP
 
double m_cutMinProb
 
double m_cutMinPt
 
int m_cutPixelHits
 
int m_cutTotalHits
 
edm::InputTag m_jets
 
edm::InputTag m_primaryVertexProducer
 
int ntracks
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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 edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 81 of file TrackProbabilityXMLtoDB.cc.

Constructor & Destructor Documentation

TrackProbabilityXMLtoDB::TrackProbabilityXMLtoDB ( const edm::ParameterSet parameters)
explicit

Definition at line 150 of file TrackProbabilityXMLtoDB.cc.

151 {
152 }
TrackProbabilityXMLtoDB::~TrackProbabilityXMLtoDB ( )
inline

Definition at line 121 of file TrackProbabilityXMLtoDB.cc.

122  {
123  }

Member Function Documentation

void TrackProbabilityXMLtoDB::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 155 of file TrackProbabilityXMLtoDB.cc.

156 {
157 }
virtual void TrackProbabilityXMLtoDB::endJob ( void  )
inlinevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 85 of file TrackProbabilityXMLtoDB.cc.

References CalibrationInterface< T, CO >::categoriesWithData(), TrackProbabilityCalibration::Entry::category, cond::service::PoolDBOutputService::createNewIOV(), TrackProbabilityCalibration::data, data, cond::service::PoolDBOutputService::endOfTime(), edm::FileInPath::fullPath(), TrackProbabilityCalibration::Entry::histogram, i, edm::Service< T >::isAvailable(), and CalibrationInterface< T, CO >::size().

86  {
88  if( !mydbservice.isAvailable() ) return;
89 
90  edm::FileInPath f2d("RecoBTag/TrackProbability/data/2DHisto.xml");
91  edm::FileInPath f3d("RecoBTag/TrackProbability/data/3DHisto.xml");
94 
95  vector<pair<TrackClassFilterCategory, CalibratedHistogramXML> > data = calibrationOld->categoriesWithData();
96  vector<pair<TrackClassFilterCategory, CalibratedHistogramXML> > data2d = calibration2dOld->categoriesWithData();
99  for(int i = 0 ; i < data.size();i++)
100  {
102  entry.category=data[i].first.categoryData();
103  entry.histogram=data[i].second;
104  calibration->data.push_back(entry);
105  }
106  for(int i = 0 ; i < data2d.size();i++)
107  {
109  entry.category=data2d[i].first.categoryData();
110  entry.histogram=data2d[i].second;
111  calibration2d->data.push_back(entry);
112  }
113 
114 
115  mydbservice->createNewIOV<TrackProbabilityCalibration>(calibration, mydbservice->endOfTime(),"BTagTrackProbability3DRcd");
116 
117  mydbservice->createNewIOV<TrackProbabilityCalibration>(calibration2d, mydbservice->endOfTime(),"BTagTrackProbability2DRcd");
118 
119 
120  }
int i
Definition: DBlmapReader.cc:9
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
bool isAvailable() const
Definition: Service.h:47
const std::vector< std::pair< T, CO > > & categoriesWithData() const
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
PhysicsTools::Calibration::HistogramF histogram
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82

Member Data Documentation

int TrackProbabilityXMLtoDB::count
private

Definition at line 130 of file TrackProbabilityXMLtoDB.cc.

edm::InputTag TrackProbabilityXMLtoDB::m_assoc
private

Definition at line 142 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxChiSquared
private

Definition at line 137 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxDecayLen
private

Definition at line 136 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxDistToAxis
private

Definition at line 139 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxLIP
private

Definition at line 138 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMaxTIP
private

Definition at line 134 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMinProb
private

Definition at line 140 of file TrackProbabilityXMLtoDB.cc.

double TrackProbabilityXMLtoDB::m_cutMinPt
private

Definition at line 135 of file TrackProbabilityXMLtoDB.cc.

int TrackProbabilityXMLtoDB::m_cutPixelHits
private

Definition at line 132 of file TrackProbabilityXMLtoDB.cc.

int TrackProbabilityXMLtoDB::m_cutTotalHits
private

Definition at line 133 of file TrackProbabilityXMLtoDB.cc.

edm::InputTag TrackProbabilityXMLtoDB::m_jets
private

Definition at line 143 of file TrackProbabilityXMLtoDB.cc.

edm::InputTag TrackProbabilityXMLtoDB::m_primaryVertexProducer
private

Definition at line 144 of file TrackProbabilityXMLtoDB.cc.

int TrackProbabilityXMLtoDB::ntracks
private

Definition at line 131 of file TrackProbabilityXMLtoDB.cc.