Fork me on GitHub

Opened 3 years ago

#1511 new How to

B-tagged

Reported by: brade1994 Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: BTag Cc:

Description

Good day everyone

I am trying to do p p > Z' > t t~ , (t > b w+, w+ > j j), (t~ > b~ w-, w- > mu- vm) using madgraph with number of events = 10,000. I am using FCChh.tcl and from 10,000 events simulated, i only get 44 events reconstructed, I got the following cuts, p T >3 TeV and |η| < 3 and delta(η1,η2)<2.4 and in this, 2 jets must be tagged as b-jets.
I dont know, if i am getting a reasonable result. I attached the macro code that i create in constructing.

#ifdef __CLING__
R__LOAD_LIBRARY(libDelphes)
#include "classes/DelphesClasses.h"
#include "external/ExRootAnalysis/ExRootTreeReader.h"
#endif




void TTBAR_reconstruction2(const char *fileName){

  gSystem->Load("libDelphes");

  // Create chain of root trees
  TChain chain("Delphes");
  chain.Add(fileName);

  // Create object of class ExRootTreeReader
  ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
  Long64_t numberOfEntries = treeReader->GetEntries();

  // Get pointers to branches used in this analysis
  TClonesArray *branchElectron = treeReader->UseBranch("Electron");
  TClonesArray *branchMuon = treeReader->UseBranch("Muon");
  TClonesArray *branchJet = treeReader->UseBranch("Jet");
  TClonesArray *branchMissingET = treeReader->UseBranch("MissingET");
  // ...

  TH1 *histTopTop_Mass = new TH1F("top_top_mass", "top_top_mass", 50, 0.0, 30000.0);
 for(Int_t entry = 0; entry < numberOfEntries; ++entry)
 {
  treeReader->ReadEntry(entry);

  Jet *jet1, *jet2, *jet3, *jet4;
  Electron *electron1, electron2;
  Muon *muon1, muon2;
  TLorentzVector vec1,  vec2, vec3, vec4;

  if(branchJet->GetEntries() >=4 && branchMuon->GetEntries() == 1 )
  {
    Jet *jet1 = (Jet*) branchJet->At(0);
    Jet *jet2 = (Jet*) branchJet->At(1);
    Jet *jet3 = (Jet*) branchJet->At(2);
    Jet *jet4 = (Jet*) branchJet->At(3);

    Muon *muon1 = (Muon*) branchMuon->At(0);



    if ((jet1->BTag & (1 << 0) && jet2->BTag & (1 << 0))  )
    {
        if(jet1->PT > 3000 && abs(jet1->Eta) <3 && jet2->PT > 3000 && abs(jet2->Eta) && abs(jet1->Eta - jet2->Eta) < 2.4 )
        {
          MissingET *MissET = (MissingET*) branchMissingET->At(0);

          histTopTop_Mass->Fill(sqrt(pow(jet1->Mass,2) + pow(jet1->PT,2)) +
            + sqrt(pow(jet2->Mass,2) + pow(jet2->PT,2))
             + sqrt(pow(jet3->Mass,2) + pow(jet3->PT,2))
             + sqrt(pow(jet4->Mass,2) + pow(jet4->PT,2))
            + (muon1->P4()).Energy()
          +  MissET->MET );

        }

    }



    else  if((jet1->BTag & (1 << 0) && jet3->BTag & (1 << 0)) )
      {
        if(jet1->PT >= 3000 && abs(jet1->Eta) <3 && jet3->PT >= 3000 && abs(jet3->Eta) && abs(jet1->Eta - jet3->Eta) < 2.4 )
        {
          MissingET *MissET = (MissingET*) branchMissingET->At(0);

          histTopTop_Mass->Fill(sqrt(pow(jet1->Mass,2) + pow(jet1->PT,2)) +
            + sqrt(pow(jet2->Mass,2) + pow(jet2->PT,2))
             + sqrt(pow(jet3->Mass,2) + pow(jet3->PT,2))
             + sqrt(pow(jet4->Mass,2) + pow(jet4->PT,2))
            + (muon1->P4()).Energy()
          +  MissET->MET );
        }
      }

      else  if((jet1->BTag & (1 << 0) && jet4->BTag & (1 << 0)))
        {
          if(jet1->PT > 3000 && abs(jet1->Eta) <3 && jet4->PT > 3000 && abs(jet4->Eta) && abs(jet1->Eta - jet4->Eta) < 2.4 )
          {
            MissingET *MissET = (MissingET*) branchMissingET->At(0);

            histTopTop_Mass->Fill(sqrt(pow(jet1->Mass,2) + pow(jet1->PT,2)) +
              + sqrt(pow(jet2->Mass,2) + pow(jet2->PT,2))
               + sqrt(pow(jet3->Mass,2) + pow(jet3->PT,2))
               + sqrt(pow(jet4->Mass,2) + pow(jet4->PT,2))
              + (muon1->P4()).Energy()
            +  MissET->MET );
          }
        }

        else  if((jet2->BTag & (1 << 0) && jet3->BTag & (1 << 0)) == true)
          {
            if(jet2->PT > 3000 && abs(jet2->Eta) <3 && jet3->PT > 3000 && abs(jet3->Eta) && abs(jet2->Eta - jet3->Eta) < 2.4 )
            {
              MissingET *MissET = (MissingET*) branchMissingET->At(0);

              histTopTop_Mass->Fill(sqrt(pow(jet1->Mass,2) + pow(jet1->PT,2)) +
                + sqrt(pow(jet2->Mass,2) + pow(jet2->PT,2))
                 + sqrt(pow(jet3->Mass,2) + pow(jet3->PT,2))
                 + sqrt(pow(jet4->Mass,2) + pow(jet4->PT,2))
                + (muon1->P4()).Energy()
              +  MissET->MET );
            }
          }

          else  if((jet2->BTag & (1 << 0) && jet4->BTag & (1 << 0)) == true)
            {
              if(jet2->PT > 3000 && abs(jet2->Eta) <3 && jet4->PT > 3000 && abs(jet4->Eta) && abs(jet2->Eta - jet4->Eta) < 2.4 )
              {
                MissingET *MissET = (MissingET*) branchMissingET->At(0);

                histTopTop_Mass->Fill(sqrt(pow(jet1->Mass,2) + pow(jet1->PT,2)) +
                  + sqrt(pow(jet2->Mass,2) + pow(jet2->PT,2))
                   + sqrt(pow(jet3->Mass,2) + pow(jet3->PT,2))
                   + sqrt(pow(jet4->Mass,2) + pow(jet4->PT,2))
                  + (muon1->P4()).Energy()
                +  MissET->MET );
              }
            }

            else  if((jet3->BTag & (1 << 0) && jet4->BTag & (1 << 0)) == true)
              {
                if(jet3->PT > 3000 && abs(jet3->Eta) <3 && jet4->PT > 3000 && abs(jet4->Eta) && abs(jet3->Eta - jet4->Eta) < 2.4 )
                {
                  MissingET *MissET = (MissingET*) branchMissingET->At(0);

                  histTopTop_Mass->Fill(sqrt(pow(jet1->Mass,2) + pow(jet1->PT,2)) +
                    + sqrt(pow(jet2->Mass,2) + pow(jet2->PT,2))
                     + sqrt(pow(jet3->Mass,2) + pow(jet3->PT,2))
                     + sqrt(pow(jet4->Mass,2) + pow(jet4->PT,2))
                    + (muon1->P4()).Energy()
                  +  MissET->MET );
                }
                }




  }





}
TCanvas *c = new TCanvas("c","c");
histTopTop_Mass->Draw();

}

Change History (0)

Note: See TracTickets for help on using tickets.