7 #include <TClonesArray.h>
12 #include <THnSparse.h>
15 #include <TLorentzVector.h>
21 #include <AliAnalysisDataSlot.h>
22 #include <AliAnalysisDataContainer.h>
25 #include "TMatrixDSym.h"
26 #include "TMatrixDSymEigen.h"
29 #include "AliVCluster.h"
30 #include "AliVTrack.h"
35 #include "AliMCEvent.h"
36 #include "AliGenPythiaEventHeader.h"
37 #include "AliAODMCHeader.h"
38 #include "AliMCEvent.h"
39 #include "AliAnalysisManager.h"
46 #include "AliAODEvent.h"
70 fTreeRecursive_Det(0),
71 fTreeRecursive_True(0)
74 for(
Int_t i=0;i<4;i++){
78 SetMakeGeneralHistograms(kTRUE);
79 DefineOutput(1, TList::Class());
80 DefineOutput(2, TTree::Class());
81 DefineOutput(3, TTree::Class());
97 fTreeRecursive_Det(0),
98 fTreeRecursive_True(0)
101 for(
Int_t i=0;i<4;i++){
106 DefineOutput(1, TList::Class());
107 DefineOutput(2, TTree::Class());
108 DefineOutput(3, TTree::Class());
124 Bool_t oldStatus = TH1::AddDirectoryStatus();
125 TH1::AddDirectory(kFALSE);
126 TH1::AddDirectory(oldStatus);
128 const char* nameoutput = GetOutputSlot(2)->GetContainer()->GetName();
130 const char* nameoutput2 = GetOutputSlot(3)->GetContainer()->GetName();
133 const Int_t intBranches = 4;
135 std::vector<TString> fShapesVarNames_Det(intBranches), fShapesVarNames_True(intBranches);
138 fShapesVarNames_Det[0] =
"Pt";
139 fShapesVarNames_Det[1] =
"Z";
140 fShapesVarNames_Det[2] =
"Theta";
141 fShapesVarNames_Det[3] =
"N";
142 fShapesVarNames_True[0] =
"Pt_Truth";
143 fShapesVarNames_True[1] =
"Z_Truth";
144 fShapesVarNames_True[2] =
"Theta_Truth";
145 fShapesVarNames_True[3] =
"N_Truth";
147 for(
Int_t ivar=0; ivar < intBranches; ivar++){
148 cout<<
"looping over variables"<<endl;
154 fhJetPt=
new TH1F(
"fhJetPt",
"Jet Pt",1500,-0.5,149.5 );
156 fhJetPhi=
new TH1F(
"fhJetPhi",
"Jet Phi",360 , -1.5*(TMath::Pi()), 1.5*(TMath::Pi()));
158 fhJetEta=
new TH1F(
"fhJetEta",
"Jet Eta",100,-2,2);
187 JetCont->ResetCurrentID();
191 else JetPt_ForThreshold = Jet1->
Pt();
198 if(JetPhi < -1*TMath::Pi()) JetPhi += (2*TMath::Pi());
199 else if (JetPhi > TMath::Pi()) JetPhi -= (2*TMath::Pi());
212 std::vector<fastjet::PseudoJet> fInputVectors;
213 fInputVectors.clear();
214 fastjet::PseudoJet PseudoTracks;
219 AliVParticle *fTrk = fJet->
TrackAt(i, fTrackCont->GetArray());
221 PseudoTracks.reset(fTrk->Px(), fTrk->Py(), fTrk->Pz(),fTrk->E());
222 PseudoTracks.set_user_index(fJet->
TrackAt(i)+100);
223 fInputVectors.push_back(PseudoTracks);
229 fastjet::JetAlgorithm jetalgo(fastjet::antikt_algorithm);
230 if(ReclusterAlgo==0){ xflagalgo=0.5;
231 jetalgo=fastjet::kt_algorithm ;}
233 if(ReclusterAlgo==1){ xflagalgo=1.5;
234 jetalgo=fastjet::cambridge_algorithm;
236 if(ReclusterAlgo==2){ xflagalgo=2.5;
237 jetalgo=fastjet::antikt_algorithm;
240 fastjet::JetDefinition fJetDef(jetalgo, 1., static_cast<fastjet::RecombinationScheme>(0), fastjet::BestFJ30 );
243 fastjet::ClusterSequence fClustSeqSA(fInputVectors, fJetDef);
244 std::vector<fastjet::PseudoJet> fOutputJets;
246 fOutputJets=fClustSeqSA.inclusive_jets(0);
248 fastjet::PseudoJet jj;
249 fastjet::PseudoJet j1;
250 fastjet::PseudoJet j2;
254 while(jj.has_parents(j1,j2)){
256 if(j1.perp() < j2.perp())
swap(j1,j2);
257 double delta_R=j1.delta_R(j2);
258 double z=j2.perp()/(j1.perp()+j2.perp());
276 }
catch (fastjet::Error) {
277 AliError(
" [w] FJ Exception caught.");
void Terminate(Option_t *option)
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
void RecursiveParents(AliEmcalJet *fJet, AliJetContainer *fJetCont, Int_t ReclusterAlgo, Bool_t bTruth)
AliJetContainer * GetJetContainer(Int_t i=0) const
Bool_t RetrieveEventObjects()
Bool_t FillHistograms()
Function filling histograms.
Container for particles within the EMCAL framework.
Int_t TrackAt(Int_t idx) const
UShort_t GetNumberOfTracks() const
AliParticleContainer * GetParticleContainer() const
AliAnalysisTaskRecursiveSoftDrop()
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
virtual ~AliAnalysisTaskRecursiveSoftDrop()
Double_t fCent
!event centrality
void UserCreateOutputObjects()
AliEmcalJet * GetNextAcceptJet()
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Double_t fShapesVar_Det[4]
Double_t fShapesVar_True[4]
Double_t GetRhoVal(Int_t i=0) const
AliEmcalList * fOutput
!output list
TTree * fTreeRecursive_Det
TTree * fTreeRecursive_True
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
void swap(AliEmcalContainerIndexMap< X, Y > &first, AliEmcalContainerIndexMap< X, Y > &second)
void UserCreateOutputObjects()
Main initialization function on the worker.
Container for jet within the EMCAL jet framework.