EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TaggingModule.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TaggingModule.cc
1 #include "TaggingModule.h"
2 
3 #include "TClonesArray.h"
4 
5 #include "AnalysisFunctions.cc"
6 
7 #include <iostream>
8 #include <iomanip>
9 #include <fstream>
10 
11 #include "TreeHandler.h"
12 
14  : Module(data)
15 {
16 
17 }
18 
20 {
21 
22 }
23 
25 {
26 
27 }
28 
30 {
31 
32 }
33 bool TaggingModule::execute(std::map<std::string, std::any>* DataStore)
34 {
35  auto data = getData();
36 
37  // Construct the general vector of jets
38  std::vector<Jet*> all_jets;
39  for (int ijet = 0; ijet < getJets()->GetEntries(); ijet++)
40  {
41  Jet *jet = (Jet*) getJets()->At(ijet);
42  all_jets.push_back(jet);
43  }
44 
45  // select jets well in the fiducial region
46  std::vector<Jet*> fiducial_jets = SelectorFcn<Jet>(all_jets, [](Jet* j){ return (TMath::Abs(j->Eta) < 3.0 && j->PT > 5.0); });
47 
48 
49  // Retrieve the general tracks list
50  auto tracks = getEFlowTracks();
51 
52  // Produce a list of tagged jets
53  std::vector<Jet*> charmtagged_jets;
54  for (auto jet : fiducial_jets) {
55  if (Tagged_sIP3D(jet, *tracks, 3.75, 1.00, 2.0) == true) {
56  charmtagged_jets.push_back(jet);
57  }
58  }
59  (*DataStore)["CharmJets"] = charmtagged_jets;
60 
61 
62 
63 
64 
65  return true;
66 }
67