Skip to content

Commit

Permalink
Merge pull request #18394 from calabria/updateMe0DigiVal
Browse files Browse the repository at this point in the history
Update me0Digi validation
  • Loading branch information
davidlange6 committed Apr 27, 2017
2 parents b07eeae + fe19ab2 commit 2c1aaa7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Validation/MuonME0Validation/interface/ME0DigisValidation.h
Expand Up @@ -46,6 +46,9 @@ class ME0DigisValidation : public ME0BaseValidation
MonitorElement* me0_strip_dg_bkg_rad_tot;
MonitorElement* me0_strip_dg_bkgElePos_rad;
MonitorElement* me0_strip_dg_bkgNeutral_rad;
MonitorElement* me0_strip_exp_bkg_rad_tot;
MonitorElement* me0_strip_exp_bkgElePos_rad;
MonitorElement* me0_strip_exp_bkgNeutral_rad;

edm::EDGetToken InputTagToken_Digi;
double sigma_x_, sigma_y_;
Expand Down
Expand Up @@ -119,7 +119,7 @@ TH1F* MuonME0DigisHarvestor::ComputeBKG(TH1F* hist1, TH1F* hist2, std::string na
}

int nEvts = hist2->GetEntries();
float scale = 6*2*nEvts*9*25e-9;
float scale = 6*2*nEvts*3*25e-9; //New redigitizer saves hits only in the BX range: [-1,+1], so the number of background hits has to be divided by 3
hist1->Scale(1.0/scale);
return hist1;

Expand Down
39 changes: 35 additions & 4 deletions Validation/MuonME0Validation/src/ME0DigisValidation.cc
Expand Up @@ -36,12 +36,43 @@ void ME0DigisValidation::bookHistograms(DQMStore::IBooker & ibooker, edm::Run co
me0_strip_dg_den_eta_tot = ibooker.book1D( "me0_strip_dg_den_eta_tot", "Denominator; #eta; Entries", 12, 1.8, 3.0);
me0_strip_dg_num_eta_tot = ibooker.book1D( "me0_strip_dg_num_eta_tot", "Numerator; #eta; Entries", 12, 1.8, 3.0);

float bins[] = {62.3, 68.2, 74.1, 81.1, 88.2, 96.6, 104.9, 115.1, 125.2, 137.3, 149.5};
float bins[] = {62.3, 70.0, 77.7, 87.1, 96.4, 108.2, 119.9, 134.7, 149.5};
int binnum = sizeof(bins)/sizeof(float) - 1;

me0_strip_dg_bkg_rad_tot = ibooker.book1D( "me0_strip_dg_bkg_radius_tot", "Total neutron background; Radius; Entries", binnum, bins);
me0_strip_dg_bkgElePos_rad = ibooker.book1D( "me0_strip_dg_bkgElePos_radius", "Neutron background: electrons+positrons; Radius; Entries", binnum, bins);
me0_strip_dg_bkgNeutral_rad = ibooker.book1D( "me0_strip_dg_bkgNeutral_radius", "Neutron background: gammas+neutrons; Radius; Entries", binnum, bins);
me0_strip_dg_bkg_rad_tot = ibooker.book1D( "me0_strip_dg_bkg_radius_tot", "Total neutron background; Radius [cm]; Entries", binnum, bins);
me0_strip_dg_bkgElePos_rad = ibooker.book1D( "me0_strip_dg_bkgElePos_radius", "Neutron background: electrons+positrons; Radius [cm]; Entries", binnum, bins);
me0_strip_dg_bkgNeutral_rad = ibooker.book1D( "me0_strip_dg_bkgNeutral_radius", "Neutron background: gammas+neutrons; Radius [cm]; Entries", binnum, bins);

me0_strip_exp_bkg_rad_tot = ibooker.book1D( "me0_strip_exp_bkg_radius_tot", "Total expected neutron background; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);
me0_strip_exp_bkgElePos_rad = ibooker.book1D( "me0_strip_exp_bkgElePos_radius", "Expected neutron background: electrons+positrons; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);
me0_strip_exp_bkgNeutral_rad = ibooker.book1D( "me0_strip_exp_bkgNeutral_radius", "Expected neutron background: gammas+neutrons; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);

std::vector<double> neuBkg, eleBkg;
neuBkg.push_back(899644.0); neuBkg.push_back(-30841.0); neuBkg.push_back(441.28);
neuBkg.push_back(-3.3405); neuBkg.push_back(0.0140588); neuBkg.push_back(-3.11473e-05); neuBkg.push_back(2.83736e-08);
eleBkg.push_back(4.68590e+05); eleBkg.push_back(-1.63834e+04); eleBkg.push_back(2.35700e+02);
eleBkg.push_back(-1.77706e+00); eleBkg.push_back(7.39960e-03); eleBkg.push_back(-1.61448e-05); eleBkg.push_back(1.44368e-08);

for(int i = 1; i < me0_strip_exp_bkgNeutral_rad->getTH1F()->GetSize(); i++){

double pos = me0_strip_exp_bkgNeutral_rad->getTH1F()->GetBinCenter(i);
double neutral = 0;
double charged = 0;

double pos_helper = 1.0;
for(int j = 0; j < 7; ++j) {

neutral += neuBkg[j]*pos_helper;
charged += eleBkg[j]*pos_helper;
pos_helper *= pos;

}

me0_strip_exp_bkgNeutral_rad->setBinContent(i, neutral);
me0_strip_exp_bkgElePos_rad->setBinContent(i, charged);
me0_strip_exp_bkg_rad_tot->setBinContent(i, neutral+charged);

}

for( unsigned int region_num = 0 ; region_num < nregion ; region_num++ ) {
me0_strip_dg_zr_tot[region_num] = BookHistZR(ibooker,"me0_strip_dg_tot","Digi",region_num);
Expand Down

0 comments on commit 2c1aaa7

Please sign in to comment.