16 #include <TClonesArray.h> 18 #include "AliVEvent.h" 20 #include "AliEMCALGeometry.h" 37 fJetType(kUndefinedJetType),
38 fJetAlgorithm(undefined_jet_algorithm),
39 fRecombinationScheme(undefined_scheme),
40 fJetAcceptanceType(0),
56 fLeadingHadronType(0),
58 fMinNConstituents(-1),
61 fParticleContainer(0),
196 AliError(Form(
"%s: Could not retrieve rho %s!",
GetName(),
fRhoName.Data()));
257 if (option.Contains(
"rho")) {
265 if (jet->
Pt() > jetMax->
Pt()) jetMax = jet;
281 if (i < 0 || i >
fClArray->GetEntriesFast())
return 0;
295 UInt_t rejectionReason = 0;
297 if(!
AcceptJet(jet, rejectionReason))
return 0;
350 return jet->
Pt() -
fRho->GetVal()*jet->
Area();
376 Double_t e = TMath::Sqrt(mass*mass + p*p);
378 mom.SetPtEtaPhiE(jet->
Pt(), jet->
Eta(), jet->
Phi(), e);
402 mom.SetPtEtaPhiM(0, 0, 0, 0);
474 if (!s)
return kFALSE;
478 if (!r)
return kFALSE;
496 if (!s)
return kFALSE;
500 if (!r)
return kFALSE;
519 AliDebug(11,
"No jet found");
525 AliDebug(11,
"Cut rejecting jet: Bit map");
531 AliDebug(11,
"Cut rejecting jet: Area");
537 AliDebug(11,
"Cut rejecting jet: AreaEmc");
543 AliDebug(11,
"Cut rejecting jet: ZLeading");
549 AliDebug(11,
"Cut rejecting jet: ZLeadEmc");
555 AliDebug(11,
"Cut rejecting jet: NEF");
561 AliDebug(11,
"Cut rejecting jet: minimum number of constituents");
568 AliDebug(11,
"Cut rejecting jet: Bias");
575 AliDebug(11,
"Cut rejecting jet: Bias");
582 AliDebug(11,
"Cut rejecting jet: Bias");
589 AliDebug(11,
"Cut rejecting jet: MaxTrackPt");
596 AliDebug(11,
"Cut rejecting jet: MaxClusPt");
602 AliDebug(11,
"Cut rejecting jet: Flavour");
608 AliDebug(11,
"Cut rejecting jet: tag status");
666 TLorentzVector nPart;
667 cluster->GetMomentum(nPart, const_cast<Double_t*>(
fVertex));
669 maxClusterEta = nPart.Eta();
670 maxClusterPhi = nPart.Phi();
671 maxClusterPt = nPart.Pt();
678 maxTrackEta = track->Eta();
679 maxTrackPhi = track->Phi();
680 maxTrackPt = track->Pt();
684 if (maxTrackPt > maxClusterPt)
685 mom.SetPtEtaPhiM(maxTrackPt,maxTrackEta,maxTrackPhi,0.139);
687 mom.SetPtEtaPhiM(maxClusterPt,maxClusterEta,maxClusterPhi,0.139);
702 cluster->GetMomentum(mom,
fVertex);
704 return GetZ(jet,mom);
723 mom.SetPtEtaPhiM(track->Pt(),track->Eta(),track->Phi(),0.139);
725 return GetZ(jet,mom);
744 AliWarning(Form(
"%s: strange, pjet*pjet seems to be zero pJetSq: %.3f",
GetName(), pJetSq));
748 Double_t z = (mom.Px()*jet->
Px() + mom.Py()*jet->
Py() + mom.Pz()*jet->
Pz()) / pJetSq;
751 AliWarning(Form(
"%s: z = %.3ff < 0, returning 0...",
GetName(), z));
764 Printf(
"Print jet cuts for %s",arrName.Data());
767 Printf(
"JetPtCut: %f",
fMinPt);
768 Printf(
"JetPtCutMax: %f",
fMaxPt);
771 Printf(
"JetMinEta: %f",
fMinEta);
772 Printf(
"JetMaxEta: %f",
fMaxEta);
773 Printf(
"JetMinPhi: %f",
fMinPhi);
774 Printf(
"JetMaxPhi: %f",
fMaxPhi);
824 if (!jet2)
return -1;
827 if (jetPt2 <= 0)
return -1;
830 if (!cont2) bgeom = kFALSE;
832 AliVParticle *vpf = 0x0;
837 AliVParticle *p2 = 0x0;
838 if (bgeom) p2 =
static_cast<AliVParticle*
>(jet2->
Track(icc));
841 if (!bgeom && idx == jet1->
TrackAt(icf) && iFound == 0 ) {
843 vpf = jet1->
Track(icf);
844 if (vpf) sumPt += vpf->Pt();
848 vpf = jet1->
Track(icf);
850 if (!
SamePart(vpf, p2, 1.e-4))
continue;
884 ::Warning(
"AliJetContainer::GenerateJetName",
"Unknown jet finding algorithm '%d'!", jetAlgo);
894 typeString =
"Charged";
897 typeString =
"Neutral";
900 typeString =
"Undefined";
904 TString radiusString = TString::Format(
"R%03.0f", radius*100.0);
917 switch (recoScheme) {
919 recombSchemeString =
"E_scheme";
922 recombSchemeString =
"pt_scheme";
925 recombSchemeString =
"pt2_scheme";
928 recombSchemeString =
"Et_scheme";
931 recombSchemeString =
"Et2_scheme";
934 recombSchemeString =
"BIpt_scheme";
937 recombSchemeString =
"BIpt2_scheme";
940 recombSchemeString =
"ext_scheme";
943 ::Error(
"AliJetContainer::GenerateJetName",
"Recombination %d scheme not recognized.", recoScheme);
946 TString name = TString::Format(
"%s_%s%s%s%s%s_%s",
947 tag.Data(), algoString.Data(), typeString.Data(), radiusString.Data(), trackString.Data(), clusterString.Data(), recombSchemeString.Data());
1007 return jetString.Data();
1018 AliDebug(11,
"No jet found");
1025 AliDebug(11,
"Jet overlaps with TPC hole");
UInt_t fJetTrigger
jet trigger
UInt_t fJetAcceptanceType
Jet acceptance type cut, see AliEmcalJet::JetAcceptanceType.
const char * GetTitle() const
Float_t fMinTrackPt
maximum track constituent pt to accept the jet
Float_t fJetAreaCut
cut on jet area
Double_t GetRhoVal() const
Float_t fJetRadius
jet radius
Double_t fTpcHolePos
position(in radians) of the malfunctioning TPC sector
void LoadRho(const AliVEvent *event)
AliVParticle * GetLeadingTrack(TClonesArray *tracks=0) const
Double_t fMinPhi
Min. cut on particle .
AliEmcalJet * ClosestJet() const
Cut on the z of the leading particle in the EMCAL.
AliRhoParameter * fRhoMass
! event rho mass for these jets
Int_t GetTagStatus() const
virtual Bool_t ApplyJetCuts(const AliEmcalJet *clus, UInt_t &rejectionReason) const
const char * GetTitle() const
Cut on the jet area in the EMCAL.
AliRhoParameter * fRho
! event rho for these jets
Double_t GetLocalVal(Double_t phi, Double_t r, Double_t n) const
Declaration of class AliTLorentzVector.
static Double_t RelativePhi(Double_t ang1, Double_t ang2)
Calculates the relative phi between two angle values and returns it in [-Pi, +Pi] range...
UInt_t fBitMap
bitmap mask
Float_t fNEFMinCut
minimum NEF in a jet
void SetMinPt(Double_t min)
Double_t GetJetPtCorrLocal(Int_t i) const
AliVParticle * Track(Int_t idx) const
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
ERecoScheme_t fRecombinationScheme
Recombination scheme.
void LoadRhoMass(const AliVEvent *event)
Double_t fMinPt
Min. cut on particle .
AliParticleContainer * fParticleContainer
particle container (jet constituents)
EJetType_t fJetType
Jet type.
virtual Bool_t CheckTpcHolesOverlap(const AliEmcalJet *clus, UInt_t &rejectionReason) const
Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const
static TString GenerateJetName(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, AliParticleContainer *partCont, AliClusterContainer *clusCont, TString tag)
UShort_t GetNumberOfConstituents() const
Container for particles within the EMCAL framework.
const AliJetIterableMomentumContainer all_momentum() const
Int_t TrackAt(Int_t idx) const
Cut on flavour content in the jet.
UShort_t GetNumberOfTracks() const
AliLocalRhoParameter * fLocalRho
! event local rho for these jets
Float_t fAreaEmcCut
minimum cut on jet emcal area
void GetMomentum(TLorentzVector &vec) const
Int_t fLeadingHadronType
0 = charged, 1 = neutral, 2 = both
Double_t fTpcHoleWidth
width of the malfunctioning TPC area
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
EJetAlgo_t fJetAlgorithm
Jet algorithm.
const AliJetIterableMomentumContainer accepted_momentum() const
Int_t fRunNumber
! run number
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
Double_t GetMinPt() const
UInt_t GetJetAcceptanceType() const
Float_t fMaxClusterPt
maximum cluster constituent pt to accept the jet
Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
const char * GetTitle() const
Double_t fMaxPhi
Max. cut on particle .
Cut on the z of the leading charged constituent.
Float_t fMinClusterPt
maximum cluster constituent pt to accept the jet
Double_t MaxTrackPt() const
TString fLocalRhoName
Name of local rho object.
Float_t fZLeadingChCut
maximum z,leading charged
AliVCluster * GetLeadingCluster(TClonesArray *clusters=0) const
void SetClassName(const char *clname)
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)
const TString & GetArrayName() const
Double_t fMassHypothesis
if < 0 it will use a PID mass when available
Double_t fVertex[3]
! event vertex array
AliEmcalJet * GetNextJet()
const char * GetName() const
Double_t fMaxPt
Max. cut on particle .
AliEMCALGeometry * fGeom
! emcal geometry
Int_t fNLeadingJets
how many jets are to be considered the leading jet(s)
TString fRhoMassName
Name of rho mass object.
Cut on the minimum of the leading particle.
Double_t GetZLeadingCharged(const AliEmcalJet *jet) const
Cut on the neutral energy fraction.
static Bool_t SamePart(const AliVParticle *part1, const AliVParticle *part2, Double_t dist=1.e-4)
Helper function to calculate the distance between two jets or a jet and a particle.
Cut on the regions of acceptance with bad sectors.
Double_t fMinEta
Min. cut on particle .
Bool_t TestFlavourTag(Int_t tag) const
EMCALIterableContainer::AliEmcalIterableContainerT< AliEmcalJet, EMCALIterableContainer::operator_star_object< AliEmcalJet > > AliJetIterableContainer
void SetArray(const AliVEvent *event)
void LoadLocalRho(const AliVEvent *event)
virtual void SetArray(const AliVEvent *event)
Int_t fTagStatus
jet tag status
EMCALIterableContainer::AliEmcalIterableContainerT< AliEmcalJet, EMCALIterableContainer::operator_star_pair< AliEmcalJet > > AliJetIterableMomentumContainer
Float_t fZLeadingEmcCut
maximum z,leading neutral
AliEmcalJet * GetAcceptJet(Int_t i) const
TString fBaseClassName
name of the base class that this container can handle
Cut on the minimum number of constituents.
Double_t MaxClusterPt() const
Represent a jet reconstructed using the EMCal jet framework.
Double_t GetZLeadingEmc(const AliEmcalJet *jet) const
Float_t fMaxTrackPt
maximum track constituent pt to accept the jet
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
Double_t fMaxEta
Max. cut on particle .
virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector &mom, UInt_t &rejectionReason) const
Cut on the maximum cluster .
TClonesArray * fClArray
! Pointer to array in input event
Int_t GetNEntries() const
const AliJetIterableContainer accepted() const
Cut on the maximum track .
Float_t fNEFMaxCut
maximum NEF in a jet
Bool_t GetMomentumFromJet(TLorentzVector &mom, const AliEmcalJet *jet, Double_t mass) const
Int_t fCurrentID
! current ID for automatic loops
AliClusterContainer * fClusterContainer
cluster container (jet constituents)
Bool_t GetNextMomentum(TLorentzVector &mom)
Container structure for EMCAL clusters.
void ResetCurrentID(Int_t i=-1)
Reset the iterator to a given index.
Int_t fMinNConstituents
minimum number of constituents in jet
Double_t MaxPartPt() const
Container for jet within the EMCAL jet framework.
Double_t GetZ(const AliEmcalJet *jet, const TLorentzVector &mom) const
TString fRhoName
Name of rho object.
AliEmcalJet * GetJet(Int_t i) const
const AliJetIterableContainer all() const
Double_t GetJetPtCorr(Int_t i) const
Int_t fFlavourSelection
selection on jet flavour