CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

DTFakeVDriftESProducer Class Reference

#include <DTFakeVDriftESProducer.h>

Inheritance diagram for DTFakeVDriftESProducer:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 DTFakeVDriftESProducer (const edm::ParameterSet &)
DTMtimeproduce (const DTMtimeRcd &)
virtual ~DTFakeVDriftESProducer ()

Private Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)

Private Attributes

double reso
double vDrift

Detailed Description

ESProducer to store in the EventSetup fake vDrift value read from cfg

Date:
2008/09/19 15:56:17
Revision:
1.1
Author:
S. Maselli - INFN Torino

Definition at line 28 of file DTFakeVDriftESProducer.h.


Constructor & Destructor Documentation

DTFakeVDriftESProducer::DTFakeVDriftESProducer ( const edm::ParameterSet pset)

Definition at line 25 of file DTFakeVDriftESProducer.cc.

References edm::ParameterSet::getParameter(), produce(), reso, edm::ESProducer::setWhatProduced(), and vDrift.

{
  //framework
  setWhatProduced(this,&DTFakeVDriftESProducer::produce);
  findingRecord<DTMtimeRcd>();
  
  //read constant value for ttrig from cfg
  vDrift = pset.getParameter<double>("vDrift");
  reso = pset.getParameter<double>("reso");
}
DTFakeVDriftESProducer::~DTFakeVDriftESProducer ( ) [virtual]

Definition at line 37 of file DTFakeVDriftESProducer.cc.

                                               {
}

Member Function Documentation

DTMtime * DTFakeVDriftESProducer::produce ( const DTMtimeRcd iRecord)

Definition at line 41 of file DTFakeVDriftESProducer.cc.

References DTVelocityUnits::cm_per_ns, DTChamberId, reso, DTMtime::set(), relativeConstraints::station, and vDrift.

Referenced by DTFakeVDriftESProducer().

                                                                 {

  DTMtime* mTimerMap = new DTMtime();

  for (int wheel=-2; wheel<3; wheel++){
    for(int station=1; station<5; station++){
      for(int sector=1; sector<13; sector++){
        for(int superlayer=1; superlayer<4; superlayer++){
          if(superlayer==2 && station==4) continue;
          DTSuperLayerId slId(DTChamberId(wheel, station, sector),superlayer);
          mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
        }
      }
    }
  }

   for (int wheel=-2; wheel<3; wheel++){
     for(int superlayer=1; superlayer<4; superlayer++){
       if(superlayer==2) continue;
       DTSuperLayerId slId(DTChamberId(wheel, 4, 13),superlayer);
         mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
     }  
   }

   for (int wheel=-2; wheel<3; wheel++){
     for(int superlayer=1; superlayer<4; superlayer++){
       if(superlayer==2) continue;
       DTSuperLayerId slId(DTChamberId(wheel, 4, 14),superlayer);
         mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
     }  
   }
   
   return mTimerMap;
}
void DTFakeVDriftESProducer::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
) [private, virtual]

Member Data Documentation

double DTFakeVDriftESProducer::reso [private]

Definition at line 39 of file DTFakeVDriftESProducer.h.

Referenced by DTFakeVDriftESProducer(), and produce().

Definition at line 38 of file DTFakeVDriftESProducer.h.

Referenced by DTFakeVDriftESProducer(), and produce().