diff --git a/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEGeneric.h b/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEGeneric.h index 8a670088c458d..56a91cca8f3d7 100644 --- a/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEGeneric.h +++ b/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEGeneric.h @@ -43,8 +43,6 @@ #include #include -#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc - #if 0 /** \class PixelCPEGeneric * Perform the position and error evaluation of pixel hits using @@ -82,15 +80,9 @@ class PixelCPEGeneric : public PixelCPEBase float dx2 ; // CPE Generic x-bias for single double-pixel cluster }; -#ifdef NEW_CPEERROR PixelCPEGeneric(edm::ParameterSet const& conf, const MagneticField *, const TrackerGeometry&, const TrackerTopology&, const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, const SiPixelLorentzAngle *); -#else - PixelCPEGeneric(edm::ParameterSet const& conf, const MagneticField *, const TrackerGeometry&, const TrackerTopology&, - const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, - const SiPixelTemplateDBObject *,const SiPixelLorentzAngle *); -#endif ~PixelCPEGeneric() {;} @@ -165,11 +157,6 @@ class PixelCPEGeneric : public PixelCPEBase std::vector< SiPixelGenErrorStore > thePixelGenError_; //SiPixelCPEGenericDBErrorParametrization * genErrorsFromDB_; -#ifndef NEW_CPEERROR - // For old template errors - std::vector< SiPixelTemplateStore > thePixelTemp_; -#endif - }; #endif diff --git a/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEGenericESProducer.cc b/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEGenericESProducer.cc index 59b530e1971b8..1501f3dccc044 100644 --- a/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEGenericESProducer.cc +++ b/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEGenericESProducer.cc @@ -19,8 +19,6 @@ #include #include -#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc - using namespace edm; PixelCPEGenericESProducer::PixelCPEGenericESProducer(const edm::ParameterSet & p) @@ -77,7 +75,6 @@ PixelCPEGenericESProducer::produce(const TkPixelCPERecord & iRecord){ const SiPixelGenErrorDBObject * genErrorDBObjectProduct = 0; -#ifdef NEW_CPEERROR // Errors take only from new GenError ESHandle genErrorDBObject; if(UseErrorsFromTemplates_) { // do only when generrors are needed @@ -91,24 +88,6 @@ PixelCPEGenericESProducer::produce(const TkPixelCPERecord & iRecord){ *hTT.product(),lorentzAngle.product(), genErrorDBObjectProduct,lorentzAngleWidthProduct); -#else // old full templates, not used anymore - // Errors can be used from tempaltes or from GenError, for testing only - const bool useNewSimplerErrors = false; - if(useNewSimplerErrors) { // new genError object - ESHandle genErrorDBObject; - iRecord.getRecord().get(genErrorDBObject); //needs new TKPixelCPERecord.h - genErrorDBObjectProduct = genErrorDBObject.product(); - } - - // errors come from templates - ESHandle templateDBobject; - iRecord.getRecord().get(templateDBobject); - - cpe_ = std::make_shared( - pset_,magfield.product(),*pDD.product(),*hTT.product(),lorentzAngle.product(),genErrorDBObjectProduct, - templateDBobject.product(),lorentzAngleWidthProduct); -#endif - return cpe_; } diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc index 3c118ea72b6ab..15155a0f9b040 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc @@ -25,15 +25,6 @@ using namespace std; -#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc - -namespace { -#ifndef NEW_CPEERROR - //const bool useNewSimplerErrors = true; - const bool useNewSimplerErrors = false; // must be tha same as in generic -#endif -} - //----------------------------------------------------------------------------- // A constructor run for generic and templates // @@ -67,11 +58,7 @@ PixelCPEBase::PixelCPEBase(edm::ParameterSet const & conf, //cout<<" new errors "<getGenErrorID(p.theDet->geographicalId().rawId()); -#else - if(useNewSimplerErrors) - p.detTemplateId = genErrorDBObject_->getGenErrorID(p.theDet->geographicalId().rawId()); - else - p.detTemplateId = templateDBobject_->getTemplateID(p.theDet->geographicalId().rawId()); -#endif } else { // for templates p.detTemplateId = templateDBobject_->getTemplateID(p.theDet->geographicalId()); } diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc index a04dabf5919c5..499dcea0a8a69 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc @@ -17,8 +17,6 @@ #include using namespace std; -#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc - namespace { constexpr float micronsToCm = 1.0e-4; const bool MYDEBUG = false; @@ -27,7 +25,6 @@ namespace { //----------------------------------------------------------------------------- //! The constructor. //----------------------------------------------------------------------------- -#ifdef NEW_CPEERROR PixelCPEGeneric::PixelCPEGeneric(edm::ParameterSet const & conf, const MagneticField * mag, const TrackerGeometry& geom, @@ -36,17 +33,6 @@ PixelCPEGeneric::PixelCPEGeneric(edm::ParameterSet const & conf, const SiPixelGenErrorDBObject * genErrorDBObject, const SiPixelLorentzAngle * lorentzAngleWidth=0) : PixelCPEBase(conf, mag, geom, ttopo, lorentzAngle, genErrorDBObject, 0,lorentzAngleWidth,0) { -#else -PixelCPEGeneric::PixelCPEGeneric(edm::ParameterSet const & conf, - const MagneticField * mag, - const TrackerGeometry& geom, - const TrackerTopology& ttopo, - const SiPixelLorentzAngle * lorentzAngle, - const SiPixelGenErrorDBObject * genErrorDBObject, - const SiPixelTemplateDBObject * templateDBobject, - const SiPixelLorentzAngle * lorentzAngleWidth=0) - : PixelCPEBase(conf, mag, geom, ttopo, lorentzAngle, genErrorDBObject, templateDBobject,lorentzAngleWidth,0) { -#endif if (theVerboseLevel > 0) LogDebug("PixelCPEGeneric") @@ -95,8 +81,6 @@ PixelCPEGeneric::PixelCPEGeneric(edm::ParameterSet const & conf, // Use errors from templates or from GenError if ( UseErrorsFromTemplates_ ) { -#ifdef NEW_CPEERROR - if ( LoadTemplatesFromDB_ ) { // From DB if ( !SiPixelGenError::pushfile( *genErrorDBObject_, thePixelGenError_) ) throw cms::Exception("InvalidCalibrationLoaded") @@ -109,24 +93,6 @@ PixelCPEGeneric::PixelCPEGeneric(edm::ParameterSet const & conf, << "ERROR: GenErrors not loaded correctly from text file. Reconstruction will fail."; } // if load from DB -#else - - if ( LoadTemplatesFromDB_ ) { - // Initialize template store to the selected ID [Morris, 6/25/08] - if ( !SiPixelTemplate::pushfile( *templateDBobject_, thePixelTemp_) ) - throw cms::Exception("InvalidCalibrationLoaded") - << "ERROR: Templates not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version " - << ( *templateDBobject_ ).version(); - if(MYDEBUG) cout<<"Loaded templateDBobject "<<( *templateDBobject_ ).version()<getTemplateID(theDetParam.theDet->geographicalId().rawId()); - //if(templID0!=templID_) cout<<" different id"<< templID_<<" "<