23 #include "AliAODMCParticle.h"
27 #include "AliMCParticle.h"
28 #include "AliMCEvent.h"
30 #include "AliVEvent.h"
31 #include "AliVParticle.h"
32 #include "AliVVertex.h"
45 namespace EMCalTriggerPtAnalysis {
50 AliEMCalTriggerMCJetAnalysisComponent::AliEMCalTriggerMCJetAnalysisComponent():
74 std::map<std::string, std::string> triggerCombinations;
84 const TAxis *trackaxes[6] = {
86 DefineAxis(
"jettpt", jetptbinning ? *jetptbinning : *ptbinning),
93 const TAxis *jetaxes[4] = {
94 DefineAxis(
"jetpt", jetptbinning ? *jetptbinning : *ptbinning),
101 for(std::map<std::string,std::string>::iterator it = triggerCombinations.begin(); it != triggerCombinations.end(); ++it){
102 const std::string name = it->first, &
title = it->second;
103 fHistos->
CreateTHnSparse(Form(
"hParticleJetHist%s%s", jetptstring.Data(), name.c_str()), Form(
"Track-based data for tracks in jets in %s events",
title.c_str()), 6, trackaxes,
"s");
104 fHistos->
CreateTHnSparse(Form(
"hMCJetHist%s%s", jetptstring.Data(), name.c_str()), Form(
"Reconstructed jets in %s-triggered events", name.c_str()), 4, jetaxes);
107 for(
int iaxis = 0; iaxis < 6; iaxis++)
delete trackaxes[iaxis];
118 AliError(
"No Jet container for MC found");
121 std::vector<std::string> triggernames;
131 cont->ResetCurrentID();
133 AliAODMCParticle *foundtrack(NULL);
134 while(reconstructedJet){
136 for(std::vector<std::string>::iterator name = triggernames.begin(); name != triggernames.end(); ++name)
137 FillJetHistogram(Form(
"hMCJetHist%s%s", jetptstring.Data(), name->c_str()), reconstructedJet, data->
GetRecEvent()->GetPrimaryVertex()->GetZ(), weight);
141 if(!
fKineCuts->IsSelected(foundtrack))
continue;
142 if(!foundtrack->Charge())
continue;
143 if(!foundtrack->IsPhysicalPrimary())
continue;
145 for(std::vector<std::string>::iterator name = triggernames.begin(); name != triggernames.end(); ++name){
146 FillHistogram(Form(
"hParticleJetHist%s%s", jetptstring.Data(), name->c_str()), foundtrack, reconstructedJet, data->
GetRecEvent()->GetPrimaryVertex()->GetZ(), weight);
164 double vz,
double weight) {
179 double data[4] = {TMath::Abs(recjet->
Pt()), recjet->
Eta(), recjet->
Phi(), vz};
AliVEvent * GetRecEvent() const
virtual void CreateHistos()
Class creating a linear binning, used in the histogram manager.
void GetMachingTriggerNames(std::vector< std::string > &triggernames) const
const AliEMCalTriggerWeightHandler * fWeightHandler
Event weight handler.
bool HasMinBiasTrigger() const
TBinning * GetBinning(const char *name) const
Interface for binnings used by the histogram handler.
AliEMCalTriggerMCJetAnalysisComponent()
UShort_t GetNumberOfTracks() const
AliParticleContainer * GetParticleContainer() const
Declaration of a management class for trigger classes.
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
Double_t fMinimumJetPt
Min. request for the jet.
void GetAllTriggerNamesAndTitles(std::map< std::string, std::string > &triggers) const
void FillJetHistogram(const TString &histname, const AliEmcalJet *recjet, double vz, double weight)
Analysis component for particles in jets at generator level.
THistManager * fHistos
Histogram container of the analysis component.
const AliEMCalTriggerAnaClassManager * fTriggerClassManager
Global trigger class manager.
Definition of class AliEMCalTriggerMCJetAnalysisComponent.
AliEmcalJet * GetNextAcceptJet()
const AliEMCalTriggerKineCuts * fKineCuts
Kinematical cuts for tracks and particle selection.
Base class for analysis components in the analysis of EMCAL-triggered events.
double GetEventWeight(const AliMCEvent *const event) const
Short_t TrackAt(Int_t idx) const
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
virtual void Process(const AliEMCalTriggerEventData *const data)
Represent a jet reconstructed using the EMCal jet framework.
Simple event container within the high- track analysis.
AliJetContainer * GetJetContainerMC() const
void FillHistogram(const TString &histname, const AliVParticle *track, const AliEmcalJet *jet, double vz, double weight)
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
const AliEMCalTriggerBinningComponent * fBinning
Global binning handler.
virtual void CreateHistos()
Event Data used in exchange to the different analysis components.
AliMCEvent * GetMCEvent() const
Container for jet within the EMCAL jet framework.
TAxis * DefineAxis(const char *name, const TBinning &binning)