CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTFakeTTrigESProducer.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<DTTtrigRcd>();
28 
29  //read constant value for ttrig from cfg
30  tMean = pset.getParameter<double>("tMean");
31  sigma = pset.getParameter<double>("sigma");
32  kFact = pset.getParameter<double>("kFactor");
33 }
34 
35 
37 }
38 
39 // ------------ method called to produce the data ------------
41 
42  DTTtrig* tTrigMap = new DTTtrig();
43 
44  for (int wheel=-2; wheel<3; wheel++){
45  for(int station=1; station<5; station++){
46  for(int sector=1; sector<13; sector++){
47  for(int superlayer=1; superlayer<4; superlayer++){
48  if(superlayer==2 && station==4) continue;
49  DTSuperLayerId slId(DTChamberId(wheel, station, sector),superlayer);
50  tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::ns);
51  }
52  }
53  }
54  }
55 
56  for (int wheel=-2; wheel<3; wheel++){
57  for(int superlayer=1; superlayer<4; superlayer++){
58  if(superlayer==2) continue;
59  DTSuperLayerId slId(DTChamberId(wheel, 4, 13),superlayer);
60  tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::ns);
61  }
62  }
63 
64  for (int wheel=-2; wheel<3; wheel++){
65  for(int superlayer=1; superlayer<4; superlayer++){
66  if(superlayer==2) continue;
67  DTSuperLayerId slId(DTChamberId(wheel, 4, 14),superlayer);
68  tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::ns);
69  }
70  }
71 
72  return tTrigMap;
73 }
74 
76  edm::ValidityInterval & oValidity)
77  {
79 
80  }
T getParameter(std::string const &) const
int set(int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit)
Definition: DTTtrig.cc:261
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
DTFakeTTrigESProducer(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
DTTtrig * produce(const DTTtrigRcd &)
static const IOVSyncValue & beginOfTime()
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)