fRandTracks(0),
fRandCaloClusters(0),
fRho(0),
+ fEmbeddedClusterId(-1),
+ fEmbeddedTrackId(-1),
fHistCentrality(0),
+ fHistDeltaVectorPt(0),
fHistRhoVSleadJetPt(0),
fHistRCPhiEta(0),
fHistRCPtExLJVSDPhiLJ(0),
fHistRhoVSRCPt(0),
+ fHistEmbNotFoundPhiEta(0),
fHistEmbJetPhiEta(0),
fHistEmbPartPhiEta(0),
fHistRhoVSEmbBkg(0)
fRandTracks(0),
fRandCaloClusters(0),
fRho(0),
+ fEmbeddedClusterId(-1),
+ fEmbeddedTrackId(-1),
fHistCentrality(0),
+ fHistDeltaVectorPt(0),
fHistRhoVSleadJetPt(0),
fHistRCPhiEta(0),
fHistRCPtExLJVSDPhiLJ(0),
fHistRhoVSRCPt(0),
+ fHistEmbNotFoundPhiEta(0),
fHistEmbJetPhiEta(0),
fHistEmbPartPhiEta(0),
fHistRhoVSEmbBkg(0)
fHistCentrality->GetYaxis()->SetTitle("counts");
fOutput->Add(fHistCentrality);
+ fHistDeltaVectorPt = new TH1F("fHistDeltaVectorPt", "fHistDeltaVectorPt", fNbins, -50, 50);
+ fHistDeltaVectorPt->GetXaxis()->SetTitle("#deltap_{T} [GeV/c]");
+ fHistDeltaVectorPt->GetYaxis()->SetTitle("counts");
+ fOutput->Add(fHistDeltaVectorPt);
+
fHistRhoVSleadJetPt = new TH2F("fHistRhoVSleadJetPt","fHistRhoVSleadJetPt", fNbins, fMinBinPt, fMaxBinPt, fNbins, fMinBinPt, fMaxBinPt);
fHistRhoVSleadJetPt->GetXaxis()->SetTitle("#rho * area [GeV/c]");
fHistRhoVSleadJetPt->GetYaxis()->SetTitle("Leading jet p_{T} [GeV/c]");
fOutput->Add(fHistRhoVSRCPt);
if (!fEmbJetsName.IsNull()) {
+ fHistEmbNotFoundPhiEta = new TH2F("fHistEmbNotFoundPhiEta","Phi-Eta distribution of not found embedded particles", 40, -2, 2, 64, 0, 6.4);
+ fHistEmbNotFoundPhiEta->GetXaxis()->SetTitle("#eta");
+ fHistEmbNotFoundPhiEta->GetYaxis()->SetTitle("#phi");
+ fOutput->Add(fHistEmbNotFoundPhiEta);
+
fHistEmbJetPhiEta = new TH2F("fHistEmbJetPhiEta","Phi-Eta distribution of embedded jets", 40, -2, 2, 64, 0, 6.4);
fHistEmbJetPhiEta->GetXaxis()->SetTitle("#eta");
fHistEmbJetPhiEta->GetYaxis()->SetTitle("#phi");
DoEmbJetLoop(embJet, embPart);
if (embJet) {
-
- fHistEmbJetsPt[fCentBin]->Fill(embJet->Pt());
- fHistEmbJetsCorrPt[fCentBin]->Fill(embJet->Pt() - rho * embJet->Area());
- fHistEmbPart[fCentBin]->Fill(embJet->MCPt());
- fHistEmbJetPhiEta->Fill(embJet->Eta(), embJet->Phi());
- fHistDeltaPtEmb[fCentBin]->Fill(embJet->Pt() - embJet->Area() * rho - embJet->MCPt());
- fHistRhoVSEmbBkg->Fill(embJet->Area() * rho, embJet->Pt() - embJet->MCPt());
+ Double_t probePt = 0;
AliVCluster *cluster = dynamic_cast<AliVCluster*>(embPart);
if (cluster) {
- Float_t pos[3];
- cluster->GetPosition(pos);
- TVector3 clusVec(pos);
+ TLorentzVector nPart;
+ cluster->GetMomentum(nPart, fVertex);
- fHistEmbPartPhiEta->Fill(clusVec.Eta(), clusVec.Phi());
+ fHistEmbPartPhiEta->Fill(nPart.Eta(), nPart.Phi());
+ probePt = nPart.Pt();
}
else {
AliVTrack *track = dynamic_cast<AliVTrack*>(embPart);
if (track) {
fHistEmbPartPhiEta->Fill(track->Eta(), track->Phi());
+ probePt = track->Pt();
}
else {
- AliWarning(Form("%s - Embedded particle type not found or not recognized (neither AliVCluster nor AliVTrack)!", GetName()));
+ AliWarning(Form("%s - Embedded jet found but embedded particle not found (wrong type?)!", GetName()));
return kTRUE;
}
}
+ fHistEmbJetsPt[fCentBin]->Fill(embJet->Pt());
+ fHistEmbJetsCorrPt[fCentBin]->Fill(embJet->Pt() - rho * embJet->Area());
+ fHistEmbPart[fCentBin]->Fill(probePt);
+ fHistEmbJetPhiEta->Fill(embJet->Eta(), embJet->Phi());
+ fHistDeltaPtEmb[fCentBin]->Fill(embJet->Pt() - embJet->Area() * rho - probePt);
+ fHistRhoVSEmbBkg->Fill(embJet->Area() * rho, embJet->Pt() - probePt);
+
}
else {
- AliWarning(Form("%s - Embedded jet not found in the event!", GetName()));
+ if (fEmbeddedTrackId >= 0) {
+ AliVTrack *track2 = static_cast<AliVTrack*>(fTracks->At(fEmbeddedTrackId));
+ fHistEmbNotFoundPhiEta->Fill(track2->Eta(), track2->Phi());
+ }
+ else if (fEmbeddedClusterId >= 0) {
+ AliVCluster *cluster2 = static_cast<AliVCluster*>(fCaloClusters->At(fEmbeddedClusterId));
+ TLorentzVector nPart;
+ cluster2->GetMomentum(nPart, fVertex);
+ fHistEmbNotFoundPhiEta->Fill(nPart.Eta(), nPart.Phi());
+ }
+ else {
+ AliWarning(Form("%s - Embedded particle not found!", GetName()));
+ }
}
return kTRUE;
if (!fCaloClusters)
return;
+ fEmbeddedClusterId = -1;
+
Int_t nclusters = fCaloClusters->GetEntriesFast();
for (Int_t iClusters = 0; iClusters < nclusters; iClusters++) {
if (!AcceptCluster(cluster, kTRUE))
continue;
+ if (cluster->Chi2() == 100)
+ fEmbeddedClusterId = iClusters;
+
fHistClustersPt[fCentBin]->Fill(cluster->E());
}
}
if (!fTracks)
return;
+ fEmbeddedTrackId = -1;
+
Int_t ntracks = fTracks->GetEntriesFast();
for (Int_t i = 0; i < ntracks; i++) {
if (vtrack && !AcceptTrack(vtrack, kTRUE))
continue;
+
+ if (track->GetLabel() == 100)
+ fEmbeddedTrackId = i;
fHistTracksPt[fCentBin]->Fill(track->Pt());
}
fHistJetsNEFvsPt[fCentBin]->Fill(jet->NEF(), jet->Pt());
}
+ Float_t scalarpt = 0;
+
if (fTracks) {
for (Int_t it = 0; it < jet->GetNumberOfTracks(); it++) {
AliVParticle *track = jet->TrackAt(it, fTracks);
- if (track)
+ if (track) {
fHistJetsZvsPt[fCentBin]->Fill(track->Pt() / jet->Pt(), jet->Pt());
+ scalarpt += track->Pt();
+ }
}
}
TLorentzVector nPart;
cluster->GetMomentum(nPart, fVertex);
fHistJetsZvsPt[fCentBin]->Fill(nPart.Et() / jet->Pt(), jet->Pt());
+ scalarpt += nPart.Pt();
}
}
}
+
+ fHistDeltaVectorPt->Fill(scalarpt - jet->Pt());
} //jet loop
}
void UserExec(Option_t* /*option*/);
void SetClusName(const char *n) { fCaloName = n; }
- void SetTracksName(const char *n) { fTracksName = n; }
- void SetEtaRange(Float_t min, Float_t max) { fEtaMin = min; fEtaMax = max; }
- void SetPhiRange(Float_t min, Float_t max) { fPhiMin = min; fPhiMax = max; }
- void SetPtRange(Float_t min, Float_t max) { fPtMin = min; fPtMax = max; }
void SetCopyArray(Bool_t copy) { fCopyArray = copy; }
+ void SetEtaRange(Float_t min, Float_t max) { fEtaMin = min; fEtaMax = max; }
+ void SetGeometryName(const char *n) { fGeomName = n; }
+ void SetMarkMC(Bool_t m) { fMarkMC = m; }
void SetNClusters(Int_t n) { fNClusters = n; }
void SetNTracks(Int_t n) { fNTracks = n; }
- void SetGeometryName(const char *n) { fGeomName = n; }
- void SetSuffix(const char *s) { fSuffix = s; }
+ void SetPhiRange(Float_t min, Float_t max) { fPhiMin = min; fPhiMax = max; }
+ void SetPtRange(Float_t min, Float_t max) { fPtMin = min; fPtMax = max; }
void SetPtSpectrum(TF1 *f) { fPtSpectrum = f; }
+ void SetSuffix(const char *s) { fSuffix = s; }
+ void SetTracksName(const char *n) { fTracksName = n; }
protected:
AliVCluster *AddCluster(Double_t e = -1, Double_t eta = -999, Double_t phi = -1); // add a cluster; if values are -1 generate random parameters
Bool_t fCopyArray; // whether or not the array will be copied to a new one before modelling
Int_t fNClusters; // how many clusters are being processed
Int_t fNTracks; // how many tracks are being processed
+ Bool_t fMarkMC; // whether or not mark new tracks/cluster as MC
TF1 *fPtSpectrum; // pt spectrum parametrization to extract random pt values
Bool_t fIsInit; //=true if initialized
AliEMCALGeometry *fGeom; //!pointer to EMCal geometry