9 int max_istrip,id_layer,max_ring,max_cham;
22 if(istation==1) max_ring=3;
23 if(istation==2) max_ring=2;
24 if(istation==3) max_ring=2;
25 if(istation==4) max_ring=1;
27 for(
int iring=detId.
minRingId(); iring<=max_ring; iring++){
30 if(istation==1 && iring==1) max_cham=36;
31 if(istation==1 && iring==2) max_cham=36;
32 if(istation==1 && iring==3) max_cham=36;
33 if(istation==2 && iring==1) max_cham=18;
34 if(istation==2 && iring==2) max_cham=36;
35 if(istation==3 && iring==1) max_cham=18;
36 if(istation==3 && iring==2) max_cham=36;
37 if(istation==4 && iring==1) max_cham=18;
39 for(
int ichamber=detId.
minChamberId(); ichamber<=max_cham; ichamber++){
42 if(istation==1 && iring==3) max_istrip=64;
44 std::vector<CSCGains::Item> itemvector;
45 itemvector.resize(max_istrip);
46 id_layer = 100000*iendcap + 10000*istation + 1000*iring + 10*ichamber + ilayer;
48 for(
int istrip=0;istrip<max_istrip;istrip++){
52 itemvector[istrip].gain_slope=((double)
rand()/((double)(RAND_MAX)+(double)(1)))+
mean;
53 itemvector[istrip].gain_intercept=((double)
rand()/((double)(RAND_MAX)+(double)(1)))+
min;
54 itemvector[istrip].gain_chi2=((double)
rand()/((double)(RAND_MAX)+(double)(1)))+
minchi;
55 cngains->
gains[id_layer]=itemvector;
70 findingRecord<CSCGainsRcd>();
ReturnType produceGains(const CSCGainsRcd &)
CSCGains * prefillGains()
static const IOVSyncValue & endOfTime()
std::pair< Time_t, Time_t > ValidityInterval
static int maxStationId()
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
static int minChamberId()
static const IOVSyncValue & beginOfTime()
static int minStationId()
CSCFakeGainsConditions(const edm::ParameterSet &)
std::unique_ptr< CSCGains > ReturnType
static int maxChamberId()
~CSCFakeGainsConditions() override