Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection criteria #4

Open
maxwellcui opened this issue Feb 23, 2018 · 1 comment
Open

Selection criteria #4

maxwellcui opened this issue Feb 23, 2018 · 1 comment
Assignees

Comments

@maxwellcui
Copy link
Owner

Event should only be selected when b-jet present, but the code has an ambiguous criteria.

for(Int_t i=0;i<nentries;i++)
    {
      oldTree->GetEntry(i);
      bjet=0;
      if(SSee_2016 || SSem_2016 || SSmm_2016 || eee_2016 || eem_2016 || emm_2016 || mmm_2016)
      	{
      	  for(unsigned int ibjet=0;ibjet<jet_mv2c10->size();ibjet++)
      	    {
      	      ///     if  (jet_mv2c10->at(ibjet) > 0.1758475) {  // 85% WP 
	      if  (jet_mv2c10->at(ibjet) > 0.645925) 
		{  // 77% WP
		  //if (jet_mv2c10->at(ibjet) > 0.8244273) {  // 70% WP
		bjet++;
		}      
      	    }
	  bjetBranch->Fill();
      	}
    }
@maxwellcui
Copy link
Owner Author

The code is now changed to the following, where b-jet is a hard requirement.

  for(Long64_t i=0;i<nentries;i++)
    {
      //Get entry
      oldTree->GetEntry(i);
      bjet=0;                    //Initilization

      //B-tagging
      if(SSee_2016 || SSem_2016 || SSmm_2016 || eee_2016 || eem_2016 || emm_2016 || mmm_2016)
      	{
      	  for(unsigned int ibjet=0;ibjet<jet_mv2c10->size();ibjet++)
      	    {
      	      //0.1758475 85% WP
	      //0.8244273 70% WP
	      if  (jet_mv2c10->at(ibjet) > 0.645925)  // 77% WP 		 
		{ 
		  bjet++;
		}      
      	    }
      	}
      
      //Event weight calculation
      //Calculate event weight
      if(bjet!=0)
	{
	  evtWeight=weight_mc*weight_jvt*(weight_leptonSF_tightLeps/weight_indiv_SF_MU_TTVA)*weight_pileup*weight_bTagSF_77*lumi/mcnorm;
	  newTree->Fill();
	}
    
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant