maxwellcui / VLQ_BDT

Multivariate selection of VLQ events
MIT License
0 stars 0 forks source link

Selection criteria #4

Open maxwellcui opened 6 years ago

maxwellcui commented 6 years ago

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 commented 6 years ago

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();
    }

    }