File indexing completed on 2024-09-28 07:03:10
0001 #include "TaggingModule.h"
0002
0003 #include "TClonesArray.h"
0004
0005 #include "AnalysisFunctions.cc"
0006
0007 #include <iostream>
0008 #include <iomanip>
0009 #include <fstream>
0010
0011 #include "TreeHandler.h"
0012
0013 TaggingModule::TaggingModule(ExRootTreeReader* data)
0014 : Module(data)
0015 {
0016
0017 }
0018
0019 TaggingModule::~TaggingModule()
0020 {
0021
0022 }
0023
0024 void TaggingModule::initialize()
0025 {
0026
0027 }
0028
0029 void TaggingModule::finalize()
0030 {
0031
0032 }
0033 bool TaggingModule::execute(std::map<std::string, std::any>* DataStore)
0034 {
0035 auto data = getData();
0036
0037
0038 std::vector<Jet*> all_jets;
0039 for (int ijet = 0; ijet < getJets()->GetEntries(); ijet++)
0040 {
0041 Jet *jet = (Jet*) getJets()->At(ijet);
0042 all_jets.push_back(jet);
0043 }
0044
0045
0046 std::vector<Jet*> fiducial_jets = SelectorFcn<Jet>(all_jets, [](Jet* j){ return (TMath::Abs(j->Eta) < 3.0 && j->PT > 5.0); });
0047
0048
0049
0050 auto tracks = getEFlowTracks();
0051
0052
0053 std::vector<Jet*> charmtagged_jets;
0054 for (auto jet : fiducial_jets) {
0055 if (Tagged_sIP3D(jet, *tracks, 3.75, 1.00, 2.0) == true) {
0056 charmtagged_jets.push_back(jet);
0057 }
0058 }
0059 (*DataStore)["CharmJets"] = charmtagged_jets;
0060
0061
0062
0063
0064
0065 return true;
0066 }
0067