Difference: HttSusy0lep13 (1 vs. 6)

Revision 62017-06-26 - MaddalenaGiulini

Line: 1 to 1
 
META TOPICPARENT name="MaddalenaGiulini"

Implementation of the HEPTopTagger in the 0 lepton search for the top squark at 13 TeV

Introduction

Added:
>
>
If you have questions just contact me: maddalenagiulini@gmailNOSPAMPLEASE.com
 In this twiki I will collect the information to setup a starting SUSY analysis with the HEPTopTagger. Detailed studies at 8 TeV are reported here: urn:nbn:de:bsz:16-heidok-225868 . In this study one can see that the HEPTopTagger can be used to enhance the search for the stop pair production, characterised by two top quarks in the final state and missing transverse energy.

Revision 52017-06-22 - MaddalenaGiulini

Line: 1 to 1
 
META TOPICPARENT name="MaddalenaGiulini"

Implementation of the HEPTopTagger in the 0 lepton search for the top squark at 13 TeV

Introduction

Line: 23 to 23
 The example given here to produce SUSY1 derivation with calorimeter clusters is performed with the 20.X releases. For 2017 data, the derivation will be performed with 21.X releases and the structure of the packages and compilation is slightly different. In this paragraph we explain only how to run the derivation only in 20.X releases.
Added:
>
>
What will be described in the following can be also found on higgs2: /data/atlas/giulini/13TeVSUSY/Derivation/AD20/ (where aliassetup.sh is the file to source to get the setup)
 First create a new project directory and setup:

mkdir AD20 #(AD20 stands for Atlas Derivation release 20)
Line: 175 to 177
 

Analysis code setup

Changed:
<
<
To set up the analysis code, one needs to check out the Stop0LRun2 package as stated here: DirectStopTopLSP0Lepton
>
>
An example of the analysis code can be found in /data/atlas/giulini/13TeVSUSY/stop-Base-2.4.28/ (the setup script is /data/atlas/giulini/13TeVSUSY/aliassetup.sh)

To set up the analysis code from scratch, one needs to check out the Stop0LRun2 package as stated here: DirectStopTopLSP0Lepton

  The package repository is https://svnweb.cern.ch/trac/atlasinst/browser/Institutes/UOregon/Stop0LRun2
Line: 426 to 430
 
Changed:
<
<
To run it, I created a python script under
>
>
There have been some changes in the Calibration Tools, therefore there are also some lines to be added in the config_HTT.h file.
This file is in the package: BoostedJetTaggers. The most updated version can be found (at the time of writing): https://gitlab.cern.ch/atlas-jetetmiss-substructure/BoostedJetTaggers_v20p7dev
The difference wrt to the svn trunk of BoostedJetTaggers are these lines:

#old line
-  JetCalibrationTool *myJES = new JetCalibrationTool(name, jetAlgo, config, calibSeq, isData);
# to be replaced with:
+  JetCalibrationTool *myJES = new JetCalibrationTool(name);
+  HTT_CHECK(myJES->setProperty("JetCollection", jetAlgo.Data()));   
+  HTT_CHECK(myJES->setProperty("ConfigFile", config.Data()));   
+  HTT_CHECK(myJES->setProperty("CalibSequence", calibSeq.Data()));   
+  HTT_CHECK(myJES->setProperty("IsData", isData));  

After all this, the packages need to be compiled again.

To run it, I created a python script, which can be found on higgs2: /data/atlas/giulini/13TeVSUSY/stop-Base-2.4.28/Stop0LRun2/util/runAll.py

that can be run like this:

python runAll.py --input_file input.txt --zeroLepSkimLevel 0 -d direct --sample_name user.giulini.387198.TT_directTT_800_1.v1_EXT0 --outPath ./
 
Changed:
<
<
that can be run like this
>
>
where input.txt is the file containing the path to the input file and sample_name is the name of the sample in input. It then creates a directory with directory structure that contains a data-* directory with the root file with the infos.
 
Changed:
<
<
python runAll.py --input_file input.txt --zeroLepSkimLevel 0 -d direct --sample_name user.giulini.387198.TT_directTT_800_1.v1_EXT0 --outPath ./
>
>
In order to run on the grid in the Stop0LRun2 folder, execute the setupGrid.sh file which creates a zipped folder to be submitted to the grid. The subsequent command for grid submission is in file util/sendGrid.py which can be run:
python util/sendGrid.py v1
 
Changed:
<
<
where input.txt is the file containing the path to the input file and sample_name is the name of the sample in input.
>
>
The grid submission of MC worked fine, but not that for data, which have to be adjusted with flags that do not ask for the mc_channel_number.
  -- MaddalenaGiulini - 2017-06-19

Revision 42017-06-22 - MaddalenaGiulini

Line: 1 to 1
 
META TOPICPARENT name="MaddalenaGiulini"

Implementation of the HEPTopTagger in the 0 lepton search for the top squark at 13 TeV

Introduction

In this twiki I will collect the information to setup a starting SUSY analysis with the HEPTopTagger. Detailed studies at 8 TeV are reported here: urn:nbn:de:bsz:16-heidok-225868

Changed:
<
<
In this study one can see that the HEPTopTagger can be used to enhance the search for the stop pair production, characterised by two top quarks in the final state and missing transverse energy.
>
>
. In this study one can see that the HEPTopTagger can be used to enhance the search for the stop pair production, characterised by two top quarks in the final state and missing transverse energy.
 The top quarks can be reconstructed by the HEPTopTagger, and the kinematic information provided by the algorithm can be used to calculate the stransverse mass mT2. The analysis code setup at 8 TeV cannot be directly used at 13 TeV, since the data format has changed in Run 2. Therefore the analysis is based on the Run 2 analysis code from the DirectStopTopLSP0Lepton analysis team.
Line: 33 to 34
 
Changed:
<
<
Create now the folder structure
>
>
Create now the folder structure, compile
 
setupWorkArea.py
Changed:
<
<
cd WorkArea/cmt cmt bro cmt config cmt bro gmake cd ../run
>
>
cd WorkArea/cmt cmt bro cmt config cmt bro gmake

Now we need to modify the package that governs the SUSY1 derivation. We need to checkout the version associated to the release we are using (20.7.6.4,AtlasDerivation).
To do this:

more /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc49-opt/20.7.6/AtlasDerivation/20.7.6.4/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/cmt/version.cmt

The version is: DerivationFrameworkSUSY -00-02-83

The code that retrieves the cluster information and save it in the output of the derivations can be found in DerivationFrameworkExotics.
After checking out both DerivationFrameworkSUSY -00-02-83 and DerivationFrameworkExotics -00-04-34 (which is the tag of our release), the lines regarding the C/A 1.5 and CaloCalTopoClusters of the file

PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT7.py

and

PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/python/EXOT7ContentList.py

should be added to:

PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/share/SUSY1.py

(like in the following svn diff output)

===================================================================
--- share/SUSY1.py    (revision 805245)
+++ share/SUSY1.py    (working copy)
Line: 11 to 11
Added:
>
>
from TauTruthCommon import * from InDetCommon import * from DerivationFrameworkJetEtMiss.METCommon import * + +from ExtendedJetCommon import * if DerivationFrameworkIsMonteCarlo: from MCTruthCommon import *

Line: 45 to 47
Added:
>
>
TriggerChains = 'HLT_(' + ' | '.join(triggerRegEx) + ')' AppendToStream( SUSY1Stream )

+# add C/A jets for HTT

+from JetRecStandard import jtm +from JetRecConf import JetAlgorithm +if globalflags.DataSource()=='geant4': + addStandardJets("CamKt", 1.5, "Truth", mods = "truth", algseq = SeqSUSY1, outputGroup = "SUSY1") +addStandardJets("CamKt", 1.5, "PV0Track", mods = "track_ungroomed", algseq = SeqSUSY1, outputGroup = "SUSY1") +addStandardJets("CamKt", 1.5, "LCTopo", mods = "calib", algseq = SeqSUSY1, outputGroup = "SUSY1") + #==================================================================== # THINNING TOOL #====================================================================

Line: 132 to 142
Added:
>
>
# ConeSize = 0) #ToolSvc += SUSY1aKt4CCThinningTool #thinningTools.append(SUSY1aKt4CCThinningTool) - +from DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning +SUSY1CA15JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(name = "SUSYCA15JetTPThinningTool", + ThinningService = ThinningSvc(), + JetKey = "CamKt15LCTopoJets", + SelectionString = "CamKt15LCTopoJets.pt > 150*GeV && CamKt15LCTopoJets.eta > -2.7 && CamKt15LCTopoJets.eta < 2.7", + InDetTrackParticlesKey = "InDetTrackParticles") +ToolSvc += SUSY1CA15JetTPThinningTool +thinningTools.append(SUSY1CA15JetTPThinningTool) +from DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning +SUSY1CA15CCThinningTool = DerivationFramework__JetCaloClusterThinning(name = "SUSY1CA15CCThinningTool", + ThinningService = ThinningSvc(), + SGKey = "CamKt15LCTopoJets", + TopoClCollectionSGKey = "CaloCalTopoClusters", + SelectionString = "CamKt15LCTopoJets.pt > 150*GeV", + ConeSize = 0) +ToolSvc += SUSY1CA15CCThinningTool +thinningTools.append(SUSY1CA15CCThinningTool) +print "ciao2" #==================================================================== # TRUTH THINNING #====================================================================
Line: 337 to 364
Added:
>
>
"MuonTruthParticles.barcode.decayVtxLink.e.m.pdgId.prodVtxLink.px.py.pz.recoMuonLink.status.truthOrigin.truthType", "AntiKt4TruthJets.eta.m.phi.pt.TruthLabelDeltaR_B.TruthLabelDeltaR_C.TruthLabelDeltaR_T.TruthLabelID.ConeTruthLabelID.PartonTruthLabelID", "InDetTrackParticles.TrkIsoPt1000_ptcone20.TrkIsoPt1000_ptcone30.TrkIsoPt1000_ptcone40.TrkIsoPt500_ptcone20.TrkIsoPt500_ptcone30.TrkIsoPt500_ptcone40", + "CaloCalTopoClusters.calE.calEta.calPhi.calM.rawM.rawE.rawEta.rawPhi.e_sampl.eta_sampl.etaCalo.phiCalo", + "CamKt15LCTopoJets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.NTrimSubjets.Parent.GhostAntiKt2TrackJet.NTrimSubjets.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.constituentLinks" ] if globalflags.DataSource()=='geant4':

Line: 353 to 382
Added:
>
>
"xAOD::TruthParticleAuxContainer#TruthPhotonsAux.", "xAOD::TruthParticleContainer#TruthNeutrinos", "xAOD::TruthParticleAuxContainer#TruthNeutrinosAux.", + "xAOD::TruthParticleAuxContainer#TruthTop.", ] +SUSY1SlimmingHelper.StaticContent += [ + "xAOD::JetContainer#CamKt15LCTopoJets", + "xAOD::JetAuxContainer#CamKt15LCTopoJetsAux.", +]

IncludeMuonTriggerContent = True IncludeEGammaTriggerContent = True

Line: 396 to 430
Added:
>
>
AllVariables += ["TruthTop", "TruthBSM", "TruthBoson"]

+SUSY1SlimmingHelper.AppendToDictionary['CamKt15LCTopoJets']= 'xAOD::JetContainer' +SUSY1SlimmingHelper.AppendToDictionary['CamKt15LCTopoJetsAux']= 'xAOD::JetAuxContainer' + AppendContentToStream(SUSY1Stream) -

Afterwards you should recompile.

To run

cd ../run
pathena --trf "Reco_tf.py --inputAODFile %IN --outputDAODFile CamKt.pool.root --reductionConf SUSY1" --extOutFile DAOD_SUSY1.CamKt.pool.root --nFilesPerJob=1 --outDS user.giulini.387198.TT_directTT_800_1.v1 --inDS  mc15_13TeV.387198.MadGraphPythia8EvtGen_A14NNPDF23LO_TT_directTT_800_1.merge.AOD.e3969_a766_a821_r7676

The samples created in this way are

#signal
user.giulini.387198.TT_directTT_800_1.v1_EXT0
#background
user.giulini.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.v1_EXT0
#data 16 period B
user.giulini.data16_13TeV.00300908.physics_Main.merge.AOD.f708_m1606.v1_EXT0
user.giulini.data16_13TeV.00300863.physics_Main.merge.AOD.f708_m1606.v1_EXT0
user.giulini.data16_13TeV.00300800.physics_Main.merge.AOD.f708_m1606.v1_EXT0
user.giulini.data16_13TeV.00300784.physics_Main.merge.AOD.f708_m1606.v1_EXT0
user.giulini.data16_13TeV.00300687.physics_Main.merge.AOD.f708_m1606.v1_EXT0
user.giulini.data16_13TeV.00300655.physics_Main.merge.AOD.f708_m1606.v1_EXT0
user.giulini.data16_13TeV.00300600.physics_Main.merge.AOD.f708_m1606.v1_EXT0
user.giulini.data16_13TeV.00300571.physics_Main.merge.AOD.f705_m1606.v1_EXT0
user.giulini.data16_13TeV.00300540.physics_Main.merge.AOD.f705_m1606.v1_EXT0
user.giulini.data16_13TeV.00300487.physics_Main.merge.AOD.f705_m1606.v1_EXT0
user.giulini.data16_13TeV.00300418.physics_Main.merge.AOD.f705_m1606.v1_EXT0
user.giulini.data16_13TeV.00300415.physics_Main.merge.AOD.f705_m1606.v1_EXT0
user.giulini.data16_13TeV.00300345.physics_Main.merge.AOD.f705_m1606.v1_EXT0

To setup the transformation in 21.1 releases, the procedure is similar but to checkout and compile the instructions to follow are here: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/SUSYxAODDerivationsr20#Release_21

Analysis code setup

To set up the analysis code, one needs to check out the Stop0LRun2 package as stated here: DirectStopTopLSP0Lepton

The package repository is https://svnweb.cern.ch/trac/atlasinst/browser/Institutes/UOregon/Stop0LRun2

We setup the environment slightly differently with respect to what stated in the README file:

mkdir stop-Base-2.4.28
cd stop-Base-2.4.28
setupATLAS -q
lsetup rucio
lsetup pyAMI
voms-proxy-init -voms atlas -valid 95:00
lsetup 'rcsetup Top,2.4.28a' # instead of rcSetup Base,2.4.28

In fact we need AnalysisTop to get the packages related to TopTagging (like BoostedJetTaggers).
After having checked out the package (for p2666 derivation tag, I used the trunk of Revision: 426537), then you check out all the packages needed by Stop0LRun2

# Check out the following packages with the following commands:
rc checkout Stop0LRun2/packages.txt
rc checkout_pkg $SVNOFF/PhysicsAnalysis/SUSYPhys/SUSYTools/tags/SUSYTools-00-08-54
rc checkout SUSYTools/doc/packages.txt
git clone https://github.com/lawrenceleejr/Ext_RestFrames.git
##### Compiling #####
rc find_packages
rc clean
rc compile

everything should compile fine.

Now we have to add the components for the HEPTopTagger . I took as an example https://svnweb.cern.ch/trac/atlasphys-top/browser/Physics/Top/PhysAnalysis/Run2/HQTTtResonancesTools/trunk/Root/TtresEventSaverFlatNtuple.cxx

First we add new package dependencies in cmt/Makefile.RootCore:

PACKAGE_DEP = .....  JetRec BoostedJetTaggers JetCalibTools

in Stop0LRun2 /Stop0LRun2.h:

--- Stop0LRun2/Stop0LRun2.h     (revision 426537)
+++ Stop0LRun2/Stop0LRun2.h     (working copy)
Line: 74 to 74
Added:
>
>
#include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" #include "PATInterfaces/SystematicCode.h" +//HTT +#include "BoostedJetTaggers/HEPTopTagger.h" +#include "JetCalibTools/JetCalibrationTool.h" +#include "JetRec/JetRecTool.h" #ifdef MAKECINT #pragma link C++ class std::vector < std::vector >+; #pragma link C++ class std::vector < std::vector<vector > >+;
Line: 285 to 288
Added:
>
>
float m_mt2_rcjet; //! float m_mt2_drmin; //!

+ //HTT + JetRecTool* m_fullJetTool;//! + bool m_runHtt=true; + int HTT_masswindow_n; + int HTT_n; + std::vector TLorentzHTT; + std::vector HTT_pt;//! + std::vector HTT_m; + std::vector HTT_eta; + std::vector HTT_phi; + + std::vector HTT_m23m123;//! + std::vector HTT_atan1312;//! + + std::vector HTT_tt_mt2;//! + int CA15_n;//! + std::vector CA15_pt;//! + std::vector CA15_eta;//! + std::vector CA15_phi;//! + std::vector CA15_m;//! + std::vector TLorentzCA15;//! + std::vector CA15_trk_bjets_n;//!

And in Root/Stop0LRun2.cxx the real initialization and running of the HEPTopTagger:

  • Add the include at the beginning of the file: #include "BoostedJetTaggers/configHTT.h"
  • Add the branches where the ttree is initialized:
  • +         if (m_runHtt) {
    +           // HEPTopTagger branches
    +           m_outTrees[rI][systI]->Branch("CA15_n"           , &CA15_n          );
    +           m_outTrees[rI][systI]->Branch("CA15_pt"          , &CA15_pt         );
    +           m_outTrees[rI][systI]->Branch("CA15_m"           , &CA15_m          );
    +           m_outTrees[rI][systI]->Branch("CA15_eta"         , &CA15_eta        );
    +           m_outTrees[rI][systI]->Branch("CA15_phi"         , &CA15_phi        );
    +           m_outTrees[rI][systI]->Branch("CA15_trk_bjets_n" , &CA15_trk_bjets_n);
    +           m_outTrees[rI][systI]->Branch("HTT_pt"           , &HTT_pt          );
    +           m_outTrees[rI][systI]->Branch("HTT_m"            , &HTT_m           );
    +           m_outTrees[rI][systI]->Branch("HTT_eta"          , &HTT_eta         );
    +           m_outTrees[rI][systI]->Branch("HTT_phi"          , &HTT_phi         );
    +
    +           m_outTrees[rI][systI]->Branch("HTT_n"            , &HTT_n           );
    +           m_outTrees[rI][systI]->Branch("HTT_masswindow_n" , &HTT_masswindow_n);
    +           m_outTrees[rI][systI]->Branch("HTT_atan1312"     , &HTT_atan1312    );
    +           m_outTrees[rI][systI]->Branch("HTT_m23m123"      , &HTT_m23m123     );
    +           // Di-top variables
    +           m_outTrees[rI][systI]->Branch("HTT_tt_mt2"       , &HTT_tt_mt2      );
    +         }
  • again in the initialize, add:
    if (m_runHtt) m_fullJetTool = buildFullHTTagger();
  • in the execute function add:
+
+
+      int top_cands = 0;
+      if (m_runHtt) {
+         // Execute HTT
+         //httTool->execute();
+         //std::string treeName = (*m_config->systAllTTreeNames())[event.m_hashValue];
+         //m_HTT[treeName]
+         m_fullJetTool->execute();           
+
+         const xAOD::JetContainer* CamKt15jets_HTT = 0;
+         //m_event->retrieve(CamKt15jets_HTT, "CamKt15LCTopoJets_HTT");
+         if (m_event->retrieve(CamKt15jets_HTT, "CamKt15LCTopoJets_HTT").isSuccess()) {
+             //top::check(evtStore()->event()->retrieve(CamKt15jets_HTT,  Form("CA15LCTopoJets_HTT_%s", treeName.c_str())), "FAILURE");
+             // HTT Branches
+             CA15_pt.resize(CamKt15jets_HTT->size());
+             CA15_m.resize(CamKt15jets_HTT->size());
+             CA15_eta.resize(CamKt15jets_HTT->size());
+             CA15_phi.resize(CamKt15jets_HTT->size());
+             CA15_trk_bjets_n.resize(CamKt15jets_HTT->size());
+             TLorentzHTT.resize(CamKt15jets_HTT->size());
+             TLorentzCA15.resize(CamKt15jets_HTT->size());
+
+             HTT_pt.resize(CamKt15jets_HTT->size());
+             HTT_m.resize(CamKt15jets_HTT->size());
+             HTT_eta.resize(CamKt15jets_HTT->size());
+             HTT_phi.resize(CamKt15jets_HTT->size());
+             HTT_atan1312.resize(CamKt15jets_HTT->size());
+             HTT_m23m123.resize(CamKt15jets_HTT->size());
+
+             HTT_tt_mt2.resize(1);       
+
+             int i = 0;
+             int top_cands_masswindow = 0;
+
+             int n_CA15 = 0;
+             i = 0; // restart counter
+             for (xAOD::JetContainer::const_iterator jet_itr = CamKt15jets_HTT->begin(); jet_itr != CamKt15jets_HTT->end(); ++jet_itr) {
+               const xAOD::Jet* CamKt15jet_HTT = *jet_itr;
+               //std::cout<<"!!!!!!!!!!!!!CamKt 1.5 pt "<<CamKt15jet_HTT->pt()/1000.<<std::endl;
+               CA15_pt[i] = 0;
+               CA15_m[i] = 0;
+               CA15_eta[i] = -5000;
+               CA15_phi[i] = -5000;
+
+               CA15_trk_bjets_n[i] = -1;
+               HTT_pt[i] = 0;
+               HTT_m[i] = 0;           
+               HTT_eta[i] = -5000;           
+               HTT_phi[i] = -5000;           
+
+               HTT_m23m123[i] = 0;           
+               HTT_atan1312[i] = 0;           
+
+               HTT_tt_mt2[0] = 0;
+
+               if (CamKt15jet_HTT->pt() < 150000) continue;
+               if (abs(CamKt15jet_HTT->eta()) > 2.0) continue;
+               n_CA15 +=1;
+               //everything should be stored in GeV
+               try { CA15_pt[i] = CamKt15jet_HTT->pt()/1000.;} catch (...) { }
+               try { CA15_m[i] = CamKt15jet_HTT->m()/1000.;} catch (...) { }
+               try { CA15_eta[i] = CamKt15jet_HTT->eta();} catch (...) { }
+               try { CA15_phi[i] = CamKt15jet_HTT->phi();} catch (...) { }
+               TLorentzCA15[i] = TLorentzVector();           
+               TLorentzCA15[i].SetPtEtaPhiM(CA15_pt[i],CA15_eta[i],CA15_phi[i],CA15_m[i]);
+               // count trk b-jets "inside" CA15 jet     
+               int trk_bjet_CA15_n=0;
+       //            if (m_trackjetcollection != "") {
+       //              const xAOD::JetContainer* trackjets_0 = 0;
+       //              top::check(evtStore()->event()->retrieve(trackjets_0, m_trackjetcollection), "FAILURE");
+       //              int j = 0;       
+       //              for (xAOD::JetContainer::const_iterator trackjet_itr = trackjets_0->begin(); trackjet_itr != trackjets_0->end(); ++trackjet_itr) {               
+       //                const xAOD::Jet *trackjetPtr = trackjets_0->at(j);       
+       //                double mvx = -999;
+       //                trackjetPtr->btagging()->MVx_discriminant("MV2c10", mvx); // Get track jet MV2c10
+       //                TLorentzVector trackjet_lv;
+       // 
+       //                if (trackjetPtr->pt() > 10e3 && std::fabs(trackjetPtr->eta()) < 2.5 && mvx > m_trackjetMv2c10Cut && trackjetPtr->numConstituents() >= 2)
+       //                  {           
+       //                    trackjet_lv.SetPtEtaPhiM(trackjetPtr->pt(),trackjetPtr->eta(),trackjetPtr->phi(),100.);
+       //                    double deltaR_fj_bjet = trackjet_lv.DeltaR(TLorentzCA15[i]);                             
+       //                    if (deltaR_fj_bjet<1.5) {                   
+       //                      trk_bjet_CA15_n+=1;
+       //                    }             
+       //                  }             
+       //                j++;
+       //              }
+       //            }                         
+               // end of trk matching to CA15
+               CA15_trk_bjets_n[i] = trk_bjet_CA15_n;
+               // Get top candidate if there is one
+               const xAOD::Jet* topCandidate = 0;
+               //const xAOD::Jet* topCandidateTag = 0;
+               bool ok = CamKt15jet_HTT->getAssociatedObject("HTTnormal", topCandidate);       
+               //bool okTag = CamKt15jet_HTT->getAssociatedObject("CamKt15HTTagged", topCandidateTag);   
+               //std::cout<<"atan "<<topCandidate->getAttribute<float>("Atan1312")<<" tag "<<topCandidateTag->getAttribute<float>("Atan1312")<<endl;    
+               TLorentzHTT[i] = TLorentzVector();           
+               TLorentzHTT[i].SetPtEtaPhiM(0,0,0,0);
+               if( ok && topCandidate!=0 ) {
+                 try { HTT_pt[i] =  topCandidate->pt()/1000.; } catch (...) { }
+                 try { HTT_m[i] =  topCandidate->m()/1000.; } catch (...) { }
+                 try { HTT_eta[i] =  topCandidate->eta(); } catch (...) { }
+                 try { HTT_phi[i] =  topCandidate->phi(); } catch (...) { }
+                 try { HTT_m23m123[i] =  topCandidate->getAttribute<float>("M23")/topCandidate->getAttribute<float>("M123"); } catch (...) { }           
+                 try { HTT_atan1312[i] =  topCandidate->getAttribute<float>("Atan1312"); } catch (...) { }           
+                 TLorentzHTT[i].SetPtEtaPhiM(topCandidate->pt()/1000.,topCandidate->eta(),topCandidate->phi(),topCandidate->m()/1000.);
+                 std::cout<<"!!!!!!!!HTT pt "<< topCandidate->pt()/1000.<<" m "<<topCandidate->m()/1000.<<std::endl;
+
+                 if (topCandidate->m()/1000.>140. && topCandidate->m()/1000.<210.){       
+                   top_cands_masswindow+=1;
+                 }
+                 top_cands+=1;   
+               }     
+               i++;
+             }
+             CA15_n = n_CA15;
+             HTT_n = top_cands;
+             HTT_masswindow_n = top_cands_masswindow;
+             // order top candidates by pt
+             std::sort(TLorentzHTT.begin(), TLorentzHTT.end(), [](TLorentzVector left, TLorentzVector right) {
+                 return left.Pt() > right.Pt();
+               });
+                  }
+                  else {
+                          ::Error(APP_NAME, "Could not retrieve MET_RefFinal");
+                          throw std::runtime_error("Could not retrieve MET_RefFinal");
+                  }
+      }
+
+
  • And then after setVars is called (which sets m_metX,...), let's build mt2
+                  if (m_runHtt){
+                      if (top_cands>=2){
+                         HTT_tt_mt2[0]=0.;
+                         //TLorentzVector add_V = TLorentzHTT[0] + TLorentzHTT[1];    
+                         HTT_tt_mt2[0]= FillMT2(
+                                           TLorentzHTT[0].Pt(),TLorentzHTT[0].Eta(),TLorentzHTT[0].Phi(),TLorentzHTT[0].M(), 
+                                           TLorentzHTT[1].Pt(),TLorentzHTT[1].Eta(),TLorentzHTT[1].Phi(),TLorentzHTT[1].M(), 
+                                           m_metX, m_metY, m_met, m_mt2InvisValues
+                                           );
+                         //(m_trueTopPt, m_trueTopEta, m_trueTopPhi, m_trueTopM, m_trueAntitopPt, m_trueAntitopEta,m_trueAntitopPhi, m_trueAntitopM, m_metXTruth, m_metYTruth, m_metTruth, m_mt2InvisValues);;
+                         std::cout<<"!!!!MT2 GeV "<<HTT_tt_mt2[0]<<" "<<m_mt2InvisValues[0]<<" "<<m_mt2InvisValues[1]<<" "<<m_mt2InvisValues[2]<<" "<<m_mt2InvisValues[3]<<std::endl;
+                      }                                   
+                  }

To run it, I created a python script under

that can be run like this

python runAll.py --input_file input.txt --zeroLepSkimLevel 0 -d direct --sample_name user.giulini.387198.TT_directTT_800_1.v1_EXT0 --outPath ./

where input.txt is the file containing the path to the input file and sample_name is the name of the sample in input.

  -- MaddalenaGiulini - 2017-06-19 \ No newline at end of file

Revision 32017-06-22 - MaddalenaGiulini

Line: 1 to 1
 
META TOPICPARENT name="MaddalenaGiulini"

Implementation of the HEPTopTagger in the 0 lepton search for the top squark at 13 TeV

Introduction

Revision 22017-06-21 - MaddalenaGiulini

Line: 1 to 1
 
META TOPICPARENT name="MaddalenaGiulini"

Implementation of the HEPTopTagger in the 0 lepton search for the top squark at 13 TeV

Added:
>
>

Introduction

In this twiki I will collect the information to setup a starting SUSY analysis with the HEPTopTagger.

Detailed studies at 8 TeV are reported here: urn:nbn:de:bsz:16-heidok-225868

In this study one can see that the HEPTopTagger can be used to enhance the search for the stop pair production, characterised by two top quarks in the final state and missing transverse energy.

The top quarks can be reconstructed by the HEPTopTagger, and the kinematic information provided by the algorithm can be used to calculate the stransverse mass mT2.

The analysis code setup at 8 TeV cannot be directly used at 13 TeV, since the data format has changed in Run 2.

Therefore the analysis is based on the Run 2 analysis code from the DirectStopTopLSP0Lepton analysis team.

Derivation

Before setting up the analysis code, the sample with the calorimeter clusters must be produced.

The SUSY 0 lepton analysis code runs on SUSY1 derivations.

These derivations do not contain any cluster information.

Therefore to produce the samples with the calorimeter clusters, we need to change the shared python file used by the transformation script for transformation from AOD to DAOD_SUSY1.

EXOT7 derivations contain the information needed by the HEPTopTagger.

Therefore the lines needed to get the calorimeter clusters can be taken from the EXOT7 derivation and placed into the SUSY1 derivation files.

Detailed instructions follow.

Example of production of p2666 SUSY1 derivation with the calorimeter clusters information

The example given here to produce SUSY1 derivation with calorimeter clusters is performed with the 20.X releases. For 2017 data, the derivation will be performed with 21.X releases and the structure of the packages and compilation is slightly different.

In this paragraph we explain only how to run the derivation only in 20.X releases.

First create a new project directory and setup:

mkdir AD20 #(AD20 stands for Atlas Derivation release 20)
alias asetup='source $AtlasSetup/scripts/asetup.sh'
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh
cd source
asetup 20.7.6.4,AtlasDerivation,here

Create now the folder structure

setupWorkArea.py
<code>cd WorkArea/cmt</code> 
<code>cmt bro cmt config</code> 
<code>cmt bro gmake</code> 
<code>cd ../run</code> 
<code></code>
  -- MaddalenaGiulini - 2017-06-19 \ No newline at end of file

Revision 12017-06-19 - MaddalenaGiulini

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="MaddalenaGiulini"

Implementation of the HEPTopTagger in the 0 lepton search for the top squark at 13 TeV

-- MaddalenaGiulini - 2017-06-19

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback