CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTFakeVDriftESProducer.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * $Date: 2008/09/19 15:56:25 $
5  * $Revision: 1.1 $
6  * \author S. Bolognesi - INFN Torino
7  */
8 
9 // system include files
10 #include <memory>
11 #include "boost/shared_ptr.hpp"
12 
13 // user include files
17 
20 
24 
26 {
27  //framework
29  findingRecord<DTMtimeRcd>();
30 
31  //read constant value for ttrig from cfg
32  vDrift = pset.getParameter<double>("vDrift");
33  reso = pset.getParameter<double>("reso");
34 }
35 
36 
38 }
39 
40 // ------------ method called to produce the data ------------
42 
43  DTMtime* mTimerMap = new DTMtime();
44 
45  for (int wheel=-2; wheel<3; wheel++){
46  for(int station=1; station<5; station++){
47  for(int sector=1; sector<13; sector++){
48  for(int superlayer=1; superlayer<4; superlayer++){
49  if(superlayer==2 && station==4) continue;
50  DTSuperLayerId slId(DTChamberId(wheel, station, sector),superlayer);
51  mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
52  }
53  }
54  }
55  }
56 
57  for (int wheel=-2; wheel<3; wheel++){
58  for(int superlayer=1; superlayer<4; superlayer++){
59  if(superlayer==2) continue;
60  DTSuperLayerId slId(DTChamberId(wheel, 4, 13),superlayer);
61  mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
62  }
63  }
64 
65  for (int wheel=-2; wheel<3; wheel++){
66  for(int superlayer=1; superlayer<4; superlayer++){
67  if(superlayer==2) continue;
68  DTSuperLayerId slId(DTChamberId(wheel, 4, 14),superlayer);
69  mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
70  }
71  }
72 
73  return mTimerMap;
74 }
75 
77  edm::ValidityInterval & oValidity)
78  {
80 
81  }
T getParameter(std::string const &) const
int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.cc:266
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
static const IOVSyncValue & beginOfTime()
tuple pset
Definition: CrabTask.py:85
DTFakeVDriftESProducer(const edm::ParameterSet &)
DTMtime * produce(const DTMtimeRcd &)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)