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<CSCGains::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++) {
63 itemvector[istrip].gain_slope = ((double)rand() / ((double)(RAND_MAX) + (double)(1))) +
mean;
64 itemvector[istrip].gain_intercept = ((double)rand() / ((double)(RAND_MAX) + (double)(1))) +
min;
65 itemvector[istrip].gain_chi2 = ((double)rand() / ((double)(RAND_MAX) + (double)(1))) +
minchi;
66 cngains->
gains[id_layer] = itemvector;
80 findingRecord<CSCGainsRcd>();
ReturnType produceGains(const CSCGainsRcd &)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
CSCGains * prefillGains()
static const IOVSyncValue & endOfTime()
std::pair< Time_t, Time_t > ValidityInterval
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
static const IOVSyncValue & beginOfTime()
CSCFakeGainsConditions(const edm::ParameterSet &)
std::unique_ptr< CSCGains > ReturnType
~CSCFakeGainsConditions() override