10 int max_istrip,id_layer,max_ring,max_cham;
21 if(istation==1) max_ring=3;
22 if(istation==2) max_ring=2;
23 if(istation==3) max_ring=2;
24 if(istation==4) max_ring=1;
26 for(
int iring=detId.
minRingId(); iring<=max_ring; iring++){
29 if(istation==1 && iring==1) max_cham=36;
30 if(istation==1 && iring==2) max_cham=36;
31 if(istation==1 && iring==3) max_cham=36;
32 if(istation==2 && iring==1) max_cham=18;
33 if(istation==2 && iring==2) max_cham=36;
34 if(istation==3 && iring==1) max_cham=18;
35 if(istation==3 && iring==2) max_cham=36;
36 if(istation==4 && iring==1) max_cham=18;
39 for(
int ichamber=detId.
minChamberId(); ichamber<=max_cham; ichamber++){
43 if(istation==1 && iring==3) max_istrip=64;
45 std::vector<CSCcrosstalk::Item> itemvector;
46 itemvector.resize(max_istrip);
47 id_layer = 100000*iendcap + 10000*istation + 1000*iring + 10*ichamber + ilayer;
49 for(
int istrip=0;istrip<max_istrip;istrip++){
51 itemvector[istrip].xtalk_slope_right=-((double)
rand()/((double)(RAND_MAX)+(double)(1)))/10000+
mean;
52 itemvector[istrip].xtalk_intercept_right=((double)
rand()/((double)(RAND_MAX)+(double)(1)))/100+
min;
53 itemvector[istrip].xtalk_chi2_right=((double)
rand()/((double)(RAND_MAX)+(double)(1)))+
minchi;
54 itemvector[istrip].xtalk_slope_left=-((double)
rand()/((double)(RAND_MAX)+(double)(1)))/10000+
mean;
55 itemvector[istrip].xtalk_intercept_left=((double)
rand()/((double)(RAND_MAX)+(double)(1)))/100+
min;
56 itemvector[istrip].xtalk_chi2_left=((double)
rand()/((double)(RAND_MAX)+(double)(1)))+
minchi;
57 cncrosstalk->
crosstalk[id_layer]=itemvector;
60 itemvector[istrip].xtalk_slope_right=-((double)
rand()/((double)(RAND_MAX)+(double)(1)))/10000+
mean;
61 itemvector[istrip].xtalk_intercept_right=((double)
rand()/((double)(RAND_MAX)+(double)(1)))/100+
min;
62 itemvector[istrip].xtalk_chi2_right=((double)
rand()/((double)(RAND_MAX)+(double)(1)))+
minchi;
63 itemvector[istrip].xtalk_slope_left=0.0;
64 itemvector[istrip].xtalk_intercept_left=0.0;
65 itemvector[istrip].xtalk_chi2_left=0.0;
66 cncrosstalk->
crosstalk[id_layer]=itemvector;
70 itemvector[istrip].xtalk_slope_right=0.0;
71 itemvector[istrip].xtalk_intercept_right=0.0;
72 itemvector[istrip].xtalk_chi2_right=0.0;
73 itemvector[istrip].xtalk_slope_left=-((double)
rand()/((double)(RAND_MAX)+(double)(1)))/10000+
mean;
74 itemvector[istrip].xtalk_intercept_left=((double)
rand()/((double)(RAND_MAX)+(double)(1)))/100+
min;
75 itemvector[istrip].xtalk_chi2_left=((double)
rand()/((double)(RAND_MAX)+(double)(1)))+
minchi;
76 cncrosstalk->
crosstalk[id_layer]=itemvector;
93 findingRecord<CSCcrosstalkRcd>();
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
static const IOVSyncValue & endOfTime()
CSCcrosstalk * prefillCrosstalk()
std::pair< Time_t, Time_t > ValidityInterval
std::unique_ptr< CSCcrosstalk > ReturnType
static int maxStationId()
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
static int minChamberId()
static const IOVSyncValue & beginOfTime()
static int minStationId()
ReturnType produceCrosstalk(const CSCcrosstalkRcd &)
static int maxChamberId()
~CSCFakeCrosstalkConditions() override
CSCFakeCrosstalkConditions(const edm::ParameterSet &)