fRecoVtxITSTPC(kFALSE),
fOnlyITSTPCTracks(kFALSE),
fOnlyITSSATracks(kFALSE),
+fFillNtuple(kFALSE),
fESD(0),
fOutput(0),
fNtupleVertexESD(0),
+fhSPDVertexX(0),
+fhSPDVertexY(0),
+fhSPDVertexZ(0),
+fhTRKVertexX(0),
+fhTRKVertexY(0),
+fhTRKVertexZ(0),
+fhTPCVertexX(0),
+fhTPCVertexY(0),
+fhTPCVertexZ(0),
fhTrackRefs(0)
{
// Constructor
fOutput->Add(fNtupleVertexESD);
+ fhSPDVertexX = new TH1F("fhSPDVertexX","SPDVertex x; x vertex [cm]; events",200,-1,1);
+ fOutput->Add(fhSPDVertexX);
+ fhSPDVertexY = new TH1F("fhSPDVertexY","SPDVertex y; y vertex [cm]; events",200,-1,1);
+ fOutput->Add(fhSPDVertexY);
+ fhSPDVertexZ = new TH1F("fhSPDVertexZ","SPDVertex z; z vertex [cm]; events",200,-20,20);
+ fOutput->Add(fhSPDVertexZ);
+ fhTRKVertexX = new TH1F("fhTRKVertexX","TRKVertex x; x vertex [cm]; events",200,-1,1);
+ fOutput->Add(fhTRKVertexX);
+ fhTRKVertexY = new TH1F("fhTRKVertexY","TRKVertex y; y vertex [cm]; events",200,-1,1);
+ fOutput->Add(fhTRKVertexY);
+ fhTRKVertexZ = new TH1F("fhTRKVertexZ","TRKVertex z; z vertex [cm]; events",200,-20,20);
+ fOutput->Add(fhTRKVertexZ);
+ fhTPCVertexX = new TH1F("fhTPCVertexX","TPCVertex x; x vertex [cm]; events",200,-3,3);
+ fOutput->Add(fhTPCVertexX);
+ fhTPCVertexY = new TH1F("fhTPCVertexY","TPCVertex y; y vertex [cm]; events",200,-3,3);
+ fOutput->Add(fhTPCVertexY);
+ fhTPCVertexZ = new TH1F("fhTPCVertexZ","TPCVertex z; z vertex [cm]; events",200,-20,20);
+ fOutput->Add(fhTPCVertexZ);
+
fhTrackRefs = new TH2F("fhTrackRefs","Track references; x; y",1000,-4,4,1000,-4,4);
fOutput->Add(fhTrackRefs);
}
spd0cls = alimult->GetNumberOfSingleClusters()+ntrklets;
}
+
+ // fill histos
+
+ if(spdv) {
+ if(spdv->GetNContributors()>0) {
+ TString title=spdv->GetTitle();
+ if(title.Contains("3D")) {
+ fhSPDVertexX->Fill(spdv->GetXv());
+ fhSPDVertexY->Fill(spdv->GetYv());
+ }
+ fhSPDVertexZ->Fill(spdv->GetZv());
+ }
+ }
+
+ if(trkv) {
+ if(trkv->GetNContributors()>0) {
+ fhTRKVertexX->Fill(trkv->GetXv());
+ fhTRKVertexY->Fill(trkv->GetYv());
+ fhTRKVertexZ->Fill(trkv->GetZv());
+ }
+ }
+
+ if(tpcv) {
+ if(tpcv->GetNContributors()>0) {
+ fhTPCVertexX->Fill(tpcv->GetXv());
+ fhTPCVertexY->Fill(tpcv->GetYv());
+ fhTPCVertexZ->Fill(tpcv->GetZv());
+ }
+ }
+
-
+ // fill ntuple
Int_t isize=37;
Float_t xnt[37];
if(index!=isize) printf("AliAnalysisTaskVertexESD: ERROR, index!=isize\n");
- fNtupleVertexESD->Fill(xnt);
+ if(fFillNtuple) fNtupleVertexESD->Fill(xnt);
// Post the data already here
PostData(0, fOutput);
void SetRerecoVertexITSTPC(Bool_t flag=kTRUE) { fRecoVtxITSTPC=flag; }
void SetOnlyITSTPCTracks() {fOnlyITSTPCTracks=kTRUE;}
void SetOnlyITSSATracks() {fOnlyITSSATracks=kTRUE;}
-
+ void SetFillNtuple(Bool_t fill=kTRUE) {fFillNtuple=fill;}
+
protected:
Bool_t fCheckEventType; // read only events of type 7
Bool_t fReadMC; // read Monte Carlo
Bool_t fRecoVtxITSTPC; // reco ITS+TPC vertex on the flight
Bool_t fOnlyITSTPCTracks; // only ITS-TPC tracks to redo ITSTPC vertex
Bool_t fOnlyITSSATracks; // only ITS-SA tracks to redo ITSTPC vertex
+ Bool_t fFillNtuple; // fill ntuple
AliESDEvent *fESD; // ESD object
TList *fOutput; //! list send on output slot 0
TNtuple *fNtupleVertexESD;//! output ntuple
+ TH1F *fhSPDVertexX; //! output histo
+ TH1F *fhSPDVertexY; //! output histo
+ TH1F *fhSPDVertexZ; //! output histo
+ TH1F *fhTRKVertexX; //! output histo
+ TH1F *fhTRKVertexY; //! output histo
+ TH1F *fhTRKVertexZ; //! output histo
+ TH1F *fhTPCVertexX; //! output histo
+ TH1F *fhTPCVertexY; //! output histo
+ TH1F *fhTPCVertexZ; //! output histo
TH2F *fhTrackRefs; //! output histo
private:
AliESDVertex* ReconstructPrimaryVertexTPC() const;
AliESDVertex* ReconstructPrimaryVertexITSTPC() const;
- ClassDef(AliAnalysisTaskVertexESD,6); // primary vertex analysis
+ ClassDef(AliAnalysisTaskVertexESD,7); // primary vertex analysis
};
#endif