AliAnalysisTaskEmcalJet("correlations",kFALSE),
fPhimin(-10), fPhimax(10),
fEtamin(-0.9), fEtamax(0.9),
- fAreacut(0.0), fTrkBias(5), fClusBias(5), fTrkEta(0.9), fJetPtcut(15.0), fJetRad(0.4),
+ fAreacut(0.0), fTrkBias(5), fClusBias(5), fTrkEta(0.9),
+ fJetPtcut(15.0), fJetRad(0.4), fConstituentCut(0.15),
fDoEventMixing(0), fMixingTracks(50000),
doPlotGlobalRho(0), doVariableBinning(0), dovarbinTHnSparse(0),
makeQAhistos(0), makeBIAShistos(0), makeextraCORRhistos(0),
useAOD(0), fcutType("EMCAL"), doPID(0), doPIDtrackBIAS(0),
+ doComments(0),
fLocalRhoVal(0),
fTracksName(""), fJetsName(""),
event(0),
AliAnalysisTaskEmcalJet(name,kTRUE),
fPhimin(-10), fPhimax(10),
fEtamin(-0.9), fEtamax(0.9),
- fAreacut(0.0), fTrkBias(5), fClusBias(5), fTrkEta(0.9), fJetPtcut(15.0), fJetRad(0.4),
+ fAreacut(0.0), fTrkBias(5), fClusBias(5), fTrkEta(0.9),
+ fJetPtcut(15.0), fJetRad(0.4), fConstituentCut(0.15),
fDoEventMixing(0), fMixingTracks(50000),
doPlotGlobalRho(0), doVariableBinning(0), dovarbinTHnSparse(0),
makeQAhistos(0), makeBIAShistos(0), makeextraCORRhistos(0),
useAOD(0), fcutType("EMCAL"), doPID(0), doPIDtrackBIAS(0),
+ doComments(0),
fLocalRhoVal(0),
fTracksName(""), fJetsName(""),
event(0),
else centralityBins[ic]=10.0*ic;
}
*/
+
// setup for Pb-Pb collisions
Int_t nCentralityBins = 100;
Double_t centralityBins[nCentralityBins+1];
AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
if(!inputHandler) {
AliFatal("Input handler needed");
+ return;
}
// PID response object
fPIDResponse = inputHandler->GetPIDResponse();
if (!fPIDResponse) {
AliError("PIDResponse object was not created");
+ return;
}
// *****************************************************************************************
AliEmcalJet *jet = static_cast<AliEmcalJet*>(jets->At(ijet));
if (!jet) continue;
+ // apply jet cuts
if ((jet->Phi()<fPhimin)||(jet->Phi()>fPhimax)) continue;
if ((jet->Eta()<fEtamin)||(jet->Eta()>fEtamax)) continue;
if (makeextraCORRhistos) fHistAreavsRawPt[centbin]->Fill(jet->Pt(),jet->Area());
// (should probably be higher..., but makes a cut on jet pT)
if (jet->Pt()<0.1) continue;
- // do we accept jet?
+ // do we accept jet? apply jet cuts
if (!AcceptMyJet(jet)) continue;
// check on lead jet
// calculate and get some track parameters
Double_t tracketa=track->Eta(); // eta of track
Double_t deta=tracketa-jeteta; // dETA between track and jet
- Int_t ieta=GetEtaBin(deta); // bin of eta
+ Int_t ieta = -1;
+ if (makeextraCORRhistos) {
+ ieta=GetEtaBin(deta); // bin of eta
+ if(ieta<0) continue; // double check we don't have a negative array index
+ }
// dPHI between jet and hadron
Double_t dphijh = RelativePhi(jet->Phi(), track->Phi()); // angle between jet and hadron
// jet pt bins
- Int_t iptjet=-1; // initialize jet pT bin
+ Int_t iptjet = -1; // initialize jet pT bin
// iptjet=GetpTjetBin(jetPt); // bin of jet pT
- iptjet=GetpTjetBin(jet->Pt());
+ iptjet=GetpTjetBin(jet->Pt()); // bin of jet pt
+ if(iptjet<0) continue; // double check we don't have a negative array index
Double_t dR=sqrt(deta*deta+dphijh*dphijh); // difference of R between jet and hadron track
// fill some jet-hadron histo's
if(ptmax < fTrkBias) continue; // force PID to happen when max track pt > 5.0 GeV
}
- if(doPID){
- // data information for pid
- Double_t eta, pt, dEdx, ITSsig, TOFsig, charge = -99.;
+ // some variables for PID
+ Double_t eta, pt, dEdx, ITSsig, TOFsig, charge = -99.;
- // nSigma of particles in TPC, TOF, and ITS
- Double_t nSigmaPion_TPC, nSigmaProton_TPC, nSigmaKaon_TPC = -99.;
- Double_t nSigmaPion_TOF, nSigmaProton_TOF, nSigmaKaon_TOF = -99.;
- Double_t nSigmaPion_ITS, nSigmaProton_ITS, nSigmaKaon_ITS = -99.;
+ // nSigma of particles in TPC, TOF, and ITS
+ Double_t nSigmaPion_TPC, nSigmaProton_TPC, nSigmaKaon_TPC = -99.;
+ Double_t nSigmaPion_TOF, nSigmaProton_TOF, nSigmaKaon_TOF = -99.;
+ Double_t nSigmaPion_ITS, nSigmaProton_ITS, nSigmaKaon_ITS = -99.;
+ if(doPID){
// get parameters of track
charge = track->Charge(); // charge of track
eta = track->Eta(); // ETA of track
// print some stats on the event
event++;
- cout<<"Event #: "<<event<<endl;
- cout<<"# of jets: "<<Njets<<" Highest jet pt: "<<highestjetpt<<endl;
- cout<<"# tracks: "<<Ntracks<<" Highest track pt: "<<ptmax<<endl;
- cout<<" =============================================== "<<endl;
+ if (doComments) {
+ cout<<"Event #: "<<event<<" Jet Radius: "<<fJetRad<<" Constituent Pt Cut: "<<fConstituentCut<<endl;
+ cout<<"# of jets: "<<Njets<<" Highest jet pt: "<<highestjetpt<<endl;
+ cout<<"# tracks: "<<Ntracks<<" Highest track pt: "<<ptmax<<endl;
+ cout<<" =============================================== "<<endl;
+ }
return kTRUE; // used when the function is of type bool
} // end of RUN
{
// Get eta bin for histos.
Int_t etabin = -1;
- if (TMath::Abs(eta)<=0.4) etabin = 0;
+ if (TMath::Abs(eta)<=0.4) etabin = 0;
else if (TMath::Abs(eta)>0.4 && TMath::Abs(eta)<0.8) etabin = 1;
- else if (TMath::Abs(eta)>=0.8) etabin = 2;
+ else if (TMath::Abs(eta)>=0.8) etabin = 2;
return etabin;
} // end of get-eta-bin
else if (pt>=20 && pt<25) ptbin = 1;
else if (pt>=25 && pt<40) ptbin = 2;
else if (pt>=40 && pt<60) ptbin = 3;
- else if (pt>=60) ptbin = 4;
+ else if (pt>=60) ptbin = 4;
return ptbin;
} // end of get-jet-pt-bin
{
// get z-vertex bin for histo.
int zVbin= -1;
- if (zVtx>=-10 && zVtx<-8) zVbin = 0;
+ if (zVtx>=-10 && zVtx<-8) zVbin = 0;
else if (zVtx>=-8 && zVtx<-6) zVbin = 1;
else if (zVtx>=-6 && zVtx<-4) zVbin = 2;
else if (zVtx>=-4 && zVtx<-2) zVbin = 3;
virtual void GetDimParams(Int_t iEntry,TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax);
virtual THnSparse* NewTHnSparseFPID(const char* name, UInt_t entries);
virtual void GetDimParamsPID(Int_t iEntry,TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax);
+ // set a bun of histogram switches up
void SetPlotGlobalRho(Bool_t g) { doPlotGlobalRho = g; } // plot global rho switch
void SetVariableBinning(Bool_t v) { doVariableBinning = v; } // do variable binning switch
void SetvarbinTHnSparse(Bool_t vb) { dovarbinTHnSparse = vb; } // variable THnSparse bin switch
void SetmakeQAhistos(Bool_t QAhist) { makeQAhistos = QAhist; } // make QA histos
void SetmakeBIAShistos(Bool_t BIAShist) { makeBIAShistos = BIAShist; } // make bias histos
void SetmakeextraCORRhistos(Bool_t Xhist) { makeextraCORRhistos = Xhist; } // make extra correlations histos
+
+ // set data, detectors type, and PID and PID w bias switches
void SetDataType(Bool_t data) { useAOD = data; } // data type switch
void SetcutType(TString cut) { fcutType = cut; } // EMCAL / TPC acceptance cut
void SetdoPID(Bool_t p) { doPID = p; } // do PID switch
void SetdoPIDtrackBIAS(Bool_t PIDbias) { doPIDtrackBIAS = PIDbias; } // do PID track bias switch
+ // give comments setter
+ void SetdoComments(Bool_t comm) { doComments = comm; } // give comment switch
+
// getters
TString GetLocalRhoName() const {return fLocalRhoName; }
virtual void SetTrkEta(Double_t e) { fTrkEta = e; } //eta range of the associated tracks
virtual void SetJetPtcut(Double_t jpt) { fJetPtcut = jpt; } // jet pt cut
virtual void SetJetRad(Double_t jrad) { fJetRad = jrad; } // jet radius
+ virtual void SetConstituentCut(Double_t constCut) { fConstituentCut = constCut; } // constituent Cut
// eta and phi limits of jets - setters
virtual void SetJetEta(Double_t emin, Double_t emax) { fEtamin = emin; fEtamax = emax; }
void ExecOnce();
Bool_t Run();
virtual void Terminate(Option_t *);
- virtual Int_t AcceptMyJet(AliEmcalJet *jet);
+ virtual Int_t AcceptMyJet(AliEmcalJet *jet); // applies basic jet tests/cuts before accepting
virtual Int_t GetCentBin(Double_t cent) const; // centrality bin of event
Float_t RelativePhi(Double_t mphi,Double_t vphi) const; // relative jet track angle
Float_t RelativeEPJET(Double_t jetAng, Double_t EPAng) const; // relative jet event plane angle
Double_t fTrkEta; // eta min/max of tracks
Double_t fJetPtcut; // jet pt to cut on for correlations
Double_t fJetRad; // jet radius
+ Double_t fConstituentCut; // jet constituent cut
// event mixing
Int_t fDoEventMixing;
Bool_t doPID;
Bool_t doPIDtrackBIAS;
+ // do comment switch
+ Bool_t doComments;
+
// local rho value
Double_t fLocalRhoVal;