CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

DTFakeTTrigESProducer Class Reference

#include <DTFakeTTrigESProducer.h>

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

List of all members.

Public Member Functions

 DTFakeTTrigESProducer (const edm::ParameterSet &)
DTTtrigproduce (const DTTtrigRcd &)
virtual ~DTFakeTTrigESProducer ()

Private Member Functions

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

Private Attributes

double kFact
double sigma
double tMean

Detailed Description

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

Date:
2008/12/09 22:44:10
Revision:
1.2
Author:
S. Bolognesi - INFN Torino

Definition at line 28 of file DTFakeTTrigESProducer.h.


Constructor & Destructor Documentation

DTFakeTTrigESProducer::DTFakeTTrigESProducer ( const edm::ParameterSet pset)

Definition at line 25 of file DTFakeTTrigESProducer.cc.

References edm::ParameterSet::getParameter(), kFact, produce(), edm::ESProducer::setWhatProduced(), sigma, and tMean.

{
  //framework
  setWhatProduced(this,&DTFakeTTrigESProducer::produce);
  findingRecord<DTTtrigRcd>();
  
  //read constant value for ttrig from cfg
  tMean = pset.getParameter<double>("tMean");
  sigma = pset.getParameter<double>("sigma");
  kFact = pset.getParameter<double>("kFactor");
}
DTFakeTTrigESProducer::~DTFakeTTrigESProducer ( ) [virtual]

Definition at line 38 of file DTFakeTTrigESProducer.cc.

                                             {
}

Member Function Documentation

DTTtrig * DTFakeTTrigESProducer::produce ( const DTTtrigRcd iRecord)

Definition at line 42 of file DTFakeTTrigESProducer.cc.

References DTChamberId, kFact, DTTimeUnits::ns, DTTtrig::set(), sigma, relativeConstraints::station, and tMean.

Referenced by DTFakeTTrigESProducer().

                                                                {

  DTTtrig* tTrigMap = new DTTtrig();

  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);
          tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::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);
         tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::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);
         tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::ns);
     }  
   }
   
   return tTrigMap;
}
void DTFakeTTrigESProducer::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
) [private, virtual]

Member Data Documentation

double DTFakeTTrigESProducer::kFact [private]

Definition at line 40 of file DTFakeTTrigESProducer.h.

Referenced by DTFakeTTrigESProducer(), and produce().

double DTFakeTTrigESProducer::sigma [private]

Definition at line 39 of file DTFakeTTrigESProducer.h.

Referenced by DTFakeTTrigESProducer(), and produce().

double DTFakeTTrigESProducer::tMean [private]

Definition at line 38 of file DTFakeTTrigESProducer.h.

Referenced by DTFakeTTrigESProducer(), and produce().