8 int max_istrip, id_layer, max_ring, max_cham;
15 for (
int iendcap =
detId.minEndcapId(); iendcap <=
detId.maxEndcapId(); iendcap++) {
16 for (
int istation =
detId.minStationId(); istation <=
detId.maxStationId(); istation++) {
17 max_ring =
detId.maxRingId();
29 for (
int iring =
detId.minRingId(); iring <= max_ring; iring++) {
31 max_cham =
detId.maxChamberId();
32 if (istation == 1 && iring == 1)
34 if (istation == 1 && iring == 2)
36 if (istation == 1 && iring == 3)
38 if (istation == 2 && iring == 1)
40 if (istation == 2 && iring == 2)
42 if (istation == 3 && iring == 1)
44 if (istation == 3 && iring == 2)
46 if (istation == 4 && iring == 1)
49 for (
int ichamber =
detId.minChamberId(); ichamber <= max_cham; ichamber++) {
50 for (
int ilayer =
detId.minLayerId(); ilayer <=
detId.maxLayerId(); ilayer++) {
52 if (istation == 1 && iring == 3)
55 std::vector<CSCPedestals::Item> itemvector;
56 itemvector.resize(max_istrip);
57 id_layer = 100000 * iendcap + 10000 * istation + 1000 * iring + 10 * ichamber + ilayer;
59 for (
int istrip = 0; istrip < max_istrip; istrip++) {
60 itemvector[istrip].ped = ((double)rand() / ((double)(RAND_MAX) + (double)(1))) * 100 +
meanped;
61 itemvector[istrip].rms = ((double)rand() / ((double)(RAND_MAX) + (double)(1))) +
meanrms;
62 cnpedestals->
pedestals[id_layer] = itemvector;
76 findingRecord<CSCPedestalsRcd>();
CSCFakePedestalsConditions(const edm::ParameterSet &)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
std::unique_ptr< CSCPedestals > ReturnType
static const IOVSyncValue & endOfTime()
std::pair< Time_t, Time_t > ValidityInterval
ReturnType producePedestals(const CSCPedestalsRcd &)
static const IOVSyncValue & beginOfTime()
CSCPedestals * prefillPedestals()
~CSCFakePedestalsConditions() override
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override