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  * \author S. Bolognesi - INFN Torino
5  */
6 
7 // system include files
8 #include <memory>
9 #include "boost/shared_ptr.hpp"
10 
11 // user include files
15 
18 
22 
24 {
25  //framework
27  findingRecord<DTMtimeRcd>();
28 
29  //read constant value for ttrig from cfg
30  vDrift = pset.getParameter<double>("vDrift");
31  reso = pset.getParameter<double>("reso");
32 }
33 
34 
36 }
37 
38 // ------------ method called to produce the data ------------
40 
41  DTMtime* mTimerMap = new DTMtime();
42 
43  for (int wheel=-2; wheel<3; wheel++){
44  for(int station=1; station<5; station++){
45  for(int sector=1; sector<13; sector++){
46  for(int superlayer=1; superlayer<4; superlayer++){
47  if(superlayer==2 && station==4) continue;
48  DTSuperLayerId slId(DTChamberId(wheel, station, sector),superlayer);
49  mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
50  }
51  }
52  }
53  }
54 
55  for (int wheel=-2; wheel<3; wheel++){
56  for(int superlayer=1; superlayer<4; superlayer++){
57  if(superlayer==2) continue;
58  DTSuperLayerId slId(DTChamberId(wheel, 4, 13),superlayer);
59  mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
60  }
61  }
62 
63  for (int wheel=-2; wheel<3; wheel++){
64  for(int superlayer=1; superlayer<4; superlayer++){
65  if(superlayer==2) continue;
66  DTSuperLayerId slId(DTChamberId(wheel, 4, 14),superlayer);
67  mTimerMap->set(slId, vDrift, reso, DTVelocityUnits::cm_per_ns);
68  }
69  }
70 
71  return mTimerMap;
72 }
73 
75  edm::ValidityInterval & oValidity)
76  {
78 
79  }
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()
DTFakeVDriftESProducer(const edm::ParameterSet &)
DTMtime * produce(const DTMtimeRcd &)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)