EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CharmJetModule.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CharmJetModule.cc
1 #include "CharmJetModule.h"
2 
3 #include "TClonesArray.h"
4 
5 #include "classes/DelphesClasses.h"
6 
7 #include "AnalysisFunctions.cc"
8 
9 #include <iostream>
10 
12  : Module(data)
13 {
14 
15 }
16 
18 {
19 
20 }
21 
22 
23 
24 bool CharmJetModule::execute(std::map<std::string, std::any>* DataStore)
25 {
26  auto data = getData();
27 
28  // If event contains at least 1 jet
29  std::vector<Jet*> all_jets;
30  for (int ijet = 0; ijet < getJets()->GetEntries(); ijet++)
31  {
32  // Take first jet
33  Jet *jet = (Jet*) getJets()->At(ijet);
34  all_jets.push_back(jet);
35  }
36 
37  std::vector<Jet*> fiducial_jets = SelectorFcn<Jet>(all_jets, [](Jet* j){ return (TMath::Abs(j->Eta) < 3.0 && j->PT > 5.0); });
38  std::vector<Jet*> charmJets = SelectorFcn<Jet>(fiducial_jets, [](Jet* j){ return (j->Flavor == 4); });
39 
40 
41  (*DataStore)["CharmJets"] = charmJets;
42 
43  // for (int igjet = 0; igjet < getGenJets()->GetEntries(); igjet++)
44  // {
45  // Jet *tru_jet = (Jet*) getGenJets()->At(igjet);
46  // // if (jet->P4().DeltaR(tru_jet->P4()) < 0.5 &) {
47 
48  // // }
49  // }
50 
51  // auto jet_constituents = jet->Constituents;
52 
53  // for (int iconst = 0; iconst < jet_constituents.GetEntries(); iconst++) {
54  // auto constituent = jet_constituents.At(iconst);
55 
56  // if(constituent == 0) continue;
57 
58  // if (constituent->IsA() == Track::Class()) {
59  // auto track = static_cast<Track*>(constituent);
60  // }
61  // }
62 
63 
64 
65  return true;
66 }
67