CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

RPCFakeCalibration Class Reference

Fake source of RPCStripNoises object. More...

#include <RPCFakeCalibration.h>

Inheritance diagram for RPCFakeCalibration:
RPCPerformanceESSource edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 RPCFakeCalibration (const edm::ParameterSet &)
virtual ~RPCFakeCalibration ()

Private Member Functions

RPCClusterSizemakeCls ()
RPCStripNoisesmakeNoise ()

Private Attributes

RPCCalibSetUptheRPCCalibSetUp

Detailed Description

Fake source of RPCStripNoises object.

Author:
R. Trentadue, B. Pavlov

Definition at line 22 of file RPCFakeCalibration.h.


Constructor & Destructor Documentation

RPCFakeCalibration::RPCFakeCalibration ( const edm::ParameterSet pset)

Definition at line 25 of file RPCFakeCalibration.cc.

References theRPCCalibSetUp.

                                                                    : RPCPerformanceESSource(pset) {
  edm::LogInfo("RPCFakeCalibration::RPCFakeCalibration");
  theRPCCalibSetUp  =  new RPCCalibSetUp(pset);
}
virtual RPCFakeCalibration::~RPCFakeCalibration ( ) [inline, virtual]

Definition at line 27 of file RPCFakeCalibration.h.

{;}

Member Function Documentation

RPCClusterSize * RPCFakeCalibration::makeCls ( ) [private]

Definition at line 57 of file RPCFakeCalibration.cc.

References RPCCalibSetUp::_mapDetClsMap, RPCClusterSize::ClusterSizeItem::clusterSize, RPCClusterSize::ClusterSizeItem::dpid, end, RPCCalibSetUp::getCls(), gen::k, python::multivaluedict::map(), VarParsing::obj, theRPCCalibSetUp, and RPCClusterSize::v_cls.

                                            {
  RPCClusterSize * obj = new RPCClusterSize();
  RPCClusterSize::ClusterSizeItem rpcClsItem;
  
  for(std::map<uint32_t, std::vector<double> >::iterator it 
        = (theRPCCalibSetUp->_mapDetClsMap).begin();
      it != (theRPCCalibSetUp->_mapDetClsMap).end(); it++){
    
    rpcClsItem.dpid =  it->first;
    
    for(unsigned int k = 0; k < 100; k++){
      
      
            rpcClsItem.clusterSize = (theRPCCalibSetUp->getCls(it->first))[k];
            (obj->v_cls).push_back(rpcClsItem);
    }
  }
  return obj;
}
RPCStripNoises * RPCFakeCalibration::makeNoise ( ) [private, virtual]

Implements RPCPerformanceESSource.

Definition at line 30 of file RPCFakeCalibration.cc.

References RPCCalibSetUp::_clsMap, RPCCalibSetUp::_mapDetIdNoise, RPCStripNoises::NoiseItem::dpid, RPCStripNoises::NoiseItem::eff, end, RPCCalibSetUp::getEff(), RPCCalibSetUp::getTime(), gen::k, python::multivaluedict::map(), n, RPCStripNoises::NoiseItem::noise, VarParsing::obj, findQualityFiles::size, theRPCCalibSetUp, RPCStripNoises::NoiseItem::time, RPCStripNoises::v_cls, and RPCStripNoises::v_noises.

                                               { 
  RPCStripNoises * obj = new RPCStripNoises();
  
  std::map< int, std::vector<double> >::iterator itc;
  for(itc = (theRPCCalibSetUp->_clsMap).begin();itc != (theRPCCalibSetUp->_clsMap).end();++itc){
    for(unsigned int n = 0; n < (itc->second).size();++n){
      (obj->v_cls).push_back((itc->second)[n]);
    }
  }
  
  RPCStripNoises::NoiseItem tipoprova;
  for(std::map<uint32_t, std::vector<float> >::iterator it = (theRPCCalibSetUp->_mapDetIdNoise).begin();
      it != (theRPCCalibSetUp->_mapDetIdNoise).end(); it++){
    
    tipoprova.dpid = it->first;
    tipoprova.time =  theRPCCalibSetUp->getTime(it->first);

    for(unsigned int k = 0; k < 96; ++k){
      tipoprova.noise = ((it->second))[k];
      tipoprova.eff = (theRPCCalibSetUp->getEff(it->first))[k];
      (obj->v_noises).push_back(tipoprova);
    }
  }

  return obj;
}

Member Data Documentation

Definition at line 40 of file RPCFakeCalibration.h.

Referenced by makeCls(), makeNoise(), and RPCFakeCalibration().