12 #ifndef SCORRELATORJETTREE_H
13 #define SCORRELATORJETTREE_H
15 #pragma GCC diagnostic push
16 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
57 #include <calobase/RawCluster.h>
58 #include <calobase/RawClusterUtility.h>
59 #include <calobase/RawClusterContainer.h>
60 #include <calobase/RawTower.h>
61 #include <calobase/RawTowerGeom.h>
62 #include <calobase/RawTowerContainer.h>
63 #include <calobase/RawTowerGeomContainer.h>
64 #include <calotrigger/CaloTriggerInfo.h>
66 #include <particleflowreco/ParticleFlowElement.h>
67 #include <particleflowreco/ParticleFlowElementContainer.h>
69 #include <fastjet/PseudoJet.hh>
70 #include <fastjet/JetDefinition.hh>
71 #include <fastjet/ClusterSequence.hh>
72 #include <fastjet/FunctionOfPseudoJet.hh>
74 #include <HepMC/GenEvent.h>
75 #include <HepMC/GenVertex.h>
76 #include <HepMC/GenParticle.h>
87 #include <TDirectory.h>
89 #pragma GCC diagnostic pop
92 using namespace fastjet;
93 using namespace findNode;
117 namespace SColdQcdCorrelatorAnalysis {
140 SCorrelatorJetTree(
const string&
name =
"SCorrelatorJetTree",
const string& outFile =
"correlator_jet_tree.root",
const bool isMC =
false,
const bool isEmbed =
false,
const bool debug =
false);
160 void SetIsMC(
const bool isMC) {m_isMC = isMC;}
162 void SetJetR(
const double jetR) {m_jetR = jetR;}
168 void SetEvtVzRange(
const pair<double, double> vzRange);
169 void SetEvtVrRange(
const pair<double, double> vrRange);
170 void SetParPtRange(
const pair<double, double> ptRange);
171 void SetParEtaRange(
const pair<double, double> etaRange);
172 void SetTrackPtRange(
const pair<double, double> ptRange);
173 void SetTrackEtaRange(
const pair<double, double> etaRange);
174 void SetTrackQualityRange(
const pair<double, double> qualRange);
175 void SetTrackNMvtxRange(
const pair<double, double> nMvtxRange);
176 void SetTrackNInttRange(
const pair<double, double> nInttRange);
177 void SetTrackNTpcRange(
const pair<double, double> nTpcRange);
178 void SetTrackDcaRangeXY(
const pair<double, double> dcaRangeXY);
179 void SetTrackDcaRangeZ(
const pair<double, double> dcaRangeZ);
180 void SetTrackDeltaPtRange(
const pair<double, double> deltaPtRange);
181 void SetTrackDcaSigmaParameters(
const bool doDcaSigmaCut,
const pair<double, double> ptFitMax,
const pair<double, double> nSigma,
const vector<double> paramDcaXY,
const vector<double> paramDcaZ);
182 void SetFlowPtRange(
const pair<double, double> ptRange);
183 void SetFlowEtaRange(
const pair<double, double> etaRange);
184 void SetECalPtRange(
const pair<double, double> ptRange);
185 void SetECalEtaRange(
const pair<double, double> etaRange);
186 void SetHCalPtRange(
const pair<double, double> ptRange);
187 void SetHCalEtaRange(
const pair<double, double> etaRange);
188 void SetJetAlgo(
const ALGO jetAlgo);
189 void SetRecombScheme(
const RECOMB recombScheme);
190 void SetJetParameters(
const double rJet,
const uint32_t jetType,
const ALGO jetAlgo,
const RECOMB recombScheme);
280 enum INFO {
PT, ETA, PHI, ENE,
QUAL, DCAXY, DCAZ, DELTAPT, NTPC};
283 bool IsGoodVertex(
const CLHEP::Hep3Vector vtx);
303 bool IsGoodParticle(HepMC::GenParticle* par,
const bool ignoreCharge =
false);
306 bool IsGoodECal(CLHEP::Hep3Vector& hepVecECal);
307 bool IsGoodHCal(CLHEP::Hep3Vector& hepVecHCal);
309 bool IsGoodTrackPhi(
SvtxTrack* track,
const float phiMaskSize = 0.01);
321 void InitVariables();
330 void ResetVariables();
347 TFile* m_outFile = NULL;
348 TTree* m_recoTree = NULL;
349 TTree* m_trueTree = NULL;
350 string m_outFileName =
"";
351 string m_jetTreeName =
"";
356 bool isMvtxLayerHit[CONST::NMvtxLayer] = {
false};
357 bool isInttLayerHit[CONST::NInttLayer] = {
false};
358 bool isTpcLayerHit[CONST::NTpcLayer] = {
false};
363 TH1D* m_hJetArea[CONST::NJetType];
364 TH1D* m_hJetNumCst[CONST::NJetType];
365 TH1D* m_hNumObject[CONST::NObjType];
366 TH1D* m_hSumCstEne[CONST::NCstType];
367 TH1D* m_hObjectQA[CONST::NObjType][CONST::NInfoQA];
368 TH1D* m_hNumCstAccept[CONST::NCstType][CONST::NMoment];
369 TNtuple* m_ntTrkQA = NULL;
370 TNtuple* m_ntWeirdTracks = NULL;
373 bool m_doVtxCut =
false;
374 bool m_doQualityPlots =
true;
375 bool m_requireSiSeeds =
true;
376 bool m_useOnlyPrimVtx =
true;
377 bool m_doDcaSigmaCut =
false;
378 bool m_maskTpcSectors =
false;
379 bool m_saveDST =
false;
381 bool m_isEmbed =
false;
382 bool m_doDebug =
false;
383 bool m_checkWeirdTrks =
false;
384 bool m_addTracks =
true;
385 bool m_addFlow =
false;
386 bool m_addECal =
false;
387 bool m_addHCal =
false;
422 TF1* m_fSigDcaXY = NULL;
423 TF1* m_fSigDcaZ = NULL;
424 double m_dcaPtFitMaxXY = 15.;
425 double m_dcaPtFitMaxZ = 15.;
426 double m_nSigCutXY = 1.;
427 double m_nSigCutZ = 1.;
428 array<double, CONST::NParam> m_parSigDcaXY = {1., 1., 1., 1.};
429 array<double, CONST::NParam> m_parSigDcaZ = {1., 1., 1., 1.};
433 uint32_t m_jetType = 0;
435 JetDefinition* m_trueJetDef = NULL;
436 JetDefinition* m_recoJetDef = NULL;
437 ClusterSequence* m_trueClust = NULL;
438 ClusterSequence* m_recoClust = NULL;
442 long long m_partonID[CONST::NPart];
443 CLHEP::Hep3Vector m_partonMom[CONST::NPart];
451 long long m_truePartonID[CONST::NPart];
452 double m_truePartonMomX[CONST::NPart];
453 double m_truePartonMomY[CONST::NPart];
454 double m_truePartonMomZ[CONST::NPart];