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  * $Date: 2008/12/09 22:44:10 $
5  * $Revision: 1.3 $
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<DTTtrigRcd>();
30 
31  //read constant value for ttrig from cfg
32  tMean = pset.getParameter<double>("tMean");
33  sigma = pset.getParameter<double>("sigma");
34  kFact = pset.getParameter<double>("kFactor");
35 }
36 
37 
39 }
40 
41 // ------------ method called to produce the data ------------
43 
44  DTTtrig* tTrigMap = new DTTtrig();
45 
46  for (int wheel=-2; wheel<3; wheel++){
47  for(int station=1; station<5; station++){
48  for(int sector=1; sector<13; sector++){
49  for(int superlayer=1; superlayer<4; superlayer++){
50  if(superlayer==2 && station==4) continue;
51  DTSuperLayerId slId(DTChamberId(wheel, station, sector),superlayer);
52  tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::ns);
53  }
54  }
55  }
56  }
57 
58  for (int wheel=-2; wheel<3; wheel++){
59  for(int superlayer=1; superlayer<4; superlayer++){
60  if(superlayer==2) continue;
61  DTSuperLayerId slId(DTChamberId(wheel, 4, 13),superlayer);
62  tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::ns);
63  }
64  }
65 
66  for (int wheel=-2; wheel<3; wheel++){
67  for(int superlayer=1; superlayer<4; superlayer++){
68  if(superlayer==2) continue;
69  DTSuperLayerId slId(DTChamberId(wheel, 4, 14),superlayer);
70  tTrigMap->set(slId, tMean, sigma, kFact, DTTimeUnits::ns);
71  }
72  }
73 
74  return tTrigMap;
75 }
76 
78  edm::ValidityInterval & oValidity)
79  {
81 
82  }
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:262
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 &)