fDisplacedVertex(),
fCollWords(),
fBgWords(),
- fCentMethod("V0M")
+ fCentMethod("V0M"),
+ fminCent(-1.0),
+ fmaxCent(-1.0)
{
//
// Constructor
fDisplacedVertex(),
fCollWords(),
fBgWords(),
- fCentMethod("V0M")
+ fCentMethod("V0M"),
+ fminCent(-1.0),
+ fmaxCent(-1.0)
{
//
// Constructor
fDisplacedVertex(o.fDisplacedVertex),
fCollWords(),
fBgWords(),
- fCentMethod(o.fCentMethod)
+ fCentMethod(o.fCentMethod),
+ fminCent(o.fminCent),
+ fmaxCent(o.fmaxCent)
{
//
// Copy constructor
fUseDisplacedVertices = o.fUseDisplacedVertices;
fDisplacedVertex = o.fDisplacedVertex;
fCentMethod = o.fCentMethod;
+ fminCent = o.fminCent;
+ fmaxCent = o.fmaxCent;
+
if (fList) {
fList->SetName(GetName());
if (fHEventsTr) fList->Add(fHEventsTr);
// Return:
// 0 (or kOk) on success, otherwise a bit mask of error codes
//
- DGUARD(fDebug,1,"Process event in AliFMDEventInspector");
-
+ DGUARD(fDebug,1,"Process event in AliFMDEventInspector");
// --- Check that we have an event ---------------------------------
if (!event) {
AliWarning("No ESD event found for input event");
if (fDebug > 3)
AliWarning("Failed to get centrality");
}
+//check centrality cut
+
+ if(fminCent>0.0&¢<fminCent)
+ return kNoEvent;
+ if(fmaxCent>0.0&¢>fmaxCent)
+ return kNoEvent;
fHCent->Fill(cent);
if (qual == 0) fHCentVsQual->Fill(0., cent);
else {
{
fUseDisplacedVertices = use;
}
+ // Settter for fmincentrality
+ void SetMinCentrality(Double_t mincent=-1.0)
+ {
+ fminCent=mincent;
+ }
+ // Settter for fmincentrality
+ void SetMaxCentrality(Double_t maxcent=-1.0)
+ {
+ fmaxCent=maxcent;
+ }
/**
* Set the centrality method to use. Possible values are
*
*
* @param option Not used
*/
+ // getter for fmincentrality
+ Double_t GetMinCentrality() const { return fminCent;}
+ // gettter for fmaxcentrality
+ Double_t GetMaxCentrality() const { return fmaxCent;}
+
+
+
void Print(Option_t* option="") const;
/**
* Store information about running conditions in output list
TList fCollWords; //! Configured collision words
TList fBgWords; //! Configured background words
TString fCentMethod;
- ClassDef(AliFMDEventInspector,7); // Inspect the event
+ Double_t fminCent; //min centrality
+ Double_t fmaxCent; //max centrailty
+
+ ClassDef(AliFMDEventInspector,8); // Inspect the event
};
#endif
#include "AliForwardCorrectionManager.h"
#include "AliLog.h"
#include <TH2D.h>
+#include <TH3D.h>
#include <TH1I.h>
#include <TProfile.h>
#include <TProfile2D.h>
AliFMDHistCollector::Collect(const AliForwardUtil::Histos& hists,
AliForwardUtil::Histos& sums,
UShort_t vtxbin,
- TH2D& out)
+ TH2D& out,
+ TList* lout,
+ Double_t cent,
+ TList* sumsv)
{
//
// Do the calculations
vMax < 0 ? 'm' : 'p',
int(TMath::Abs(vMax)))));
-
for (UShort_t d=1; d<=3; d++) {
UShort_t nr = (d == 1 ? 1 : 2);
UShort_t db = d << 4;
UShort_t rb = db | ((q+1));
// Skipping selected FMD rings
if (rb & fSkipFMDRings) continue;
-
Char_t r = (q == 0 ? 'I' : 'O');
TH2D* h = hists.Get(d,r);
TH2D* t = static_cast<TH2D*>(h->Clone(Form("FMD%d%c_tmp",d,r)));
Int_t i = (d == 1 ? 1 : 2*d + (q == 0 ? -2 : -1));
TH2D* o = sums.Get(d, r);
-
-
+ TH2D* ovrt=0x0;
+ if(sumsv)
+ {
+ AliForwardUtil::Histos* sumsvhistos=static_cast<AliForwardUtil::Histos*>(sumsv->At(vtxbin-1));
+ if(sumsvhistos)
+ {
+ ovrt=sumsvhistos->Get(d, r);
+ }
+ }
+ TH3D* detavcent=0x0;
+ if(lout)
+ {
+ detavcent=static_cast<TH3D*>(lout->FindObject(Form("FMD%d%cetavcent",d,r)));
+ }
+
// Get valid range
Int_t first = 0;
Int_t last = 0;
}
// Add to our per-ring sum
o->Add(t);
-
+ if(ovrt)
+ ovrt->Add(t);
+ // fillinig the deta v cent histo
+ if(cent>0&&detavcent)
+ {
+ Int_t nYbins=t->GetYaxis()->GetNbins();
+ Int_t nXbins=t->GetXaxis()->GetNbins();
+ Int_t cenbin=detavcent->GetYaxis()->FindBin(cent);
+ if(cenbin>0&&cenbin<=detavcent->GetYaxis()->GetNbins())
+ {
+ TH1D* projectionX=(TH1D*)t->ProjectionX("tmp",1,nYbins);
+ for (int ibineta=1;ibineta<nXbins;ibineta++)
+ {
+ Double_t v1=projectionX->GetBinContent(ibineta);
+ Double_t e1=projectionX->GetBinError(ibineta);
+ Double_t v2=detavcent->GetBinContent(ibineta,cenbin,1);
+ Double_t e2=detavcent->GetBinError(ibineta,cenbin,1);
+ detavcent->SetBinContent(ibineta,cenbin,1,v1+v2);
+ detavcent->SetBinError(ibineta,cenbin,1,TMath::Sqrt(e1*e1+e2*e2));
+ if (t->GetBinContent(ibineta,0)>0.0)
+ detavcent->SetBinContent(ibineta,cenbin,0,detavcent->GetBinContent(ibineta,cenbin,0)+t->GetBinContent(ibineta,0));
+ if (t->GetBinContent(ibineta,nYbins+1)>0.0)
+ detavcent->SetBinContent(ibineta,cenbin,2,detavcent->GetBinContent(ibineta,cenbin,2)+t->GetBinContent(ibineta,nYbins+1));
+ }
+ }
+ }
+
+
// Outer rings have better phi segmentation - rebin to same as inner.
if (q == 1) t->RebinY(2);
delete t;
} // for r
} // for d
- return kTRUE;
+ return kTRUE;
}
//____________________________________________________________________
virtual Bool_t Collect(const AliForwardUtil::Histos& hists,
AliForwardUtil::Histos& sums,
UShort_t vtxBin,
- TH2D& out);
+ TH2D& out,
+ TList* lout=0x0,
+ Double_t cent=-1.0,
+ TList* sumsv=0x0);
/**
* Output diagnostic histograms to directory
*
fCorrections(),
fHistCollector(),
fEventPlaneFinder(),
- fList(0)
+ fList(0),
+ fListVertexBins(0)
+
{
//
// Constructor
fCorrections("corrections"),
fHistCollector("collector"),
fEventPlaneFinder("eventplane"),
- fList(0)
+ fList(0),
+ fListVertexBins(0)
{
//
// Constructor
fCorrections(o.fCorrections),
fHistCollector(o.fHistCollector),
fEventPlaneFinder(o.fEventPlaneFinder),
- fList(o.fList)
+ fList(o.fList),
+ fListVertexBins(o.fListVertexBins)
{
//
// Copy constructor
fMCRingSums = o.fMCRingSums;
fPrimary = o.fPrimary;
fList = o.fList;
-
+ fListVertexBins = o.fListVertexBins;
return *this;
}
fMCRingSums.Get(3, 'I')->SetMarkerColor(AliForwardUtil::RingColor(3, 'I'));
fMCRingSums.Get(3, 'O')->SetMarkerColor(AliForwardUtil::RingColor(3, 'O'));
+
+ for(int i=1;i<=pv->GetNbins();i++)
+ {
+ TString nametmp=Form("vtxbin%03d",i);
+ //TList* lbin= new TList();
+ //lbin->SetName(nametmp.Data());
+ //lbin->SetOwner();
+ //fListVertexBins->Add(lbin);
+ AliForwardUtil::Histos* bin=new AliForwardUtil::Histos();
+ bin->Init(*pe);
+ bin->Get(1, 'I')->SetName(Form("%s%s",bin->Get(1, 'I')->GetName(),nametmp.Data()));
+ bin->Get(2, 'I')->SetName(Form("%s%s",bin->Get(2, 'I')->GetName(),nametmp.Data()));
+ bin->Get(2, 'O')->SetName(Form("%s%s",bin->Get(2, 'O')->GetName(),nametmp.Data()));
+ bin->Get(3, 'I')->SetName(Form("%s%s",bin->Get(3, 'I')->GetName(),nametmp.Data()));
+ bin->Get(3, 'O')->SetName(Form("%s%s",bin->Get(3, 'O')->GetName(),nametmp.Data()));
+ fList->Add(bin->Get(1, 'I'));
+ fList->Add(bin->Get(2, 'I'));
+ fList->Add(bin->Get(2, 'O'));
+ fList->Add(bin->Get(3, 'I'));
+ fList->Add(bin->Get(3, 'O'));
+ fListVertexBins->Add(bin);
+
+}
fEventInspector.SetupForData(*pv);
fSharingFilter.SetupForData(*pe);
fDensityCalculator.SetupForData(*pe);
fList = new TList;
fList->SetOwner();
+ fListVertexBins=new TList();
+ fListVertexBins->SetOwner();
+ //fList->Add(fListVertexBins);
+
AliAnalysisManager* am = AliAnalysisManager::GetAnalysisManager();
AliAODHandler* ah =
dynamic_cast<AliAODHandler*>(am->GetOutputEventHandler());
fHistCollector.CreateOutputObjects(fList);
fEventPlaneFinder.CreateOutputObjects(fList);
+
+
+
PostData(1, fList);
}
//____________________________________________________________________
fCorrections.CompareResults(fHistos, fMCHistos);
if (!fHistCollector.Collect(fHistos, fRingSums,
- ivz, fAODFMD.GetHistogram())) {
+ ivz, fAODFMD.GetHistogram(),0x0,-1,fListVertexBins)) {
AliWarning("Histogram collector failed");
return;
}
AliFMDEventPlaneFinder fEventPlaneFinder; // Algorithm
TList* fList; // Output list
+ TList* fListVertexBins; // list of the signal in vertex bin
- ClassDef(AliForwardMCMultiplicityTask,2) // Forward multiplicity class
+ ClassDef(AliForwardMCMultiplicityTask,3) // Forward multiplicity class
};
#endif
#include "AliForwardCorrectionManager.h"
#include "AliAnalysisManager.h"
#include <TH1.h>
+#include <TH3D.h>
#include <TDirectory.h>
#include <TTree.h>
#include <TROOT.h>
fCorrections(),
fHistCollector(),
fEventPlaneFinder(),
+ fFMD1icent(0),
+ fFMD2icent(0),
+ fFMD2ocent(0),
+ fFMD3icent(0),
+ fFMD3ocent(0),
fList(0)
+
{
//
// Constructor
fCorrections("corrections"),
fHistCollector("collector"),
fEventPlaneFinder("eventplane"),
+ fFMD1icent(0),
+ fFMD2icent(0),
+ fFMD2ocent(0),
+ fFMD3icent(0),
+ fFMD3ocent(0),
fList(0)
+
+
{
//
// Constructor
fCorrections(o.fCorrections),
fHistCollector(o.fHistCollector),
fEventPlaneFinder(o.fEventPlaneFinder),
- fList(o.fList)
+ fFMD1icent(o.fFMD1icent),
+ fFMD2icent(o.fFMD2icent),
+ fFMD2ocent(o.fFMD2ocent),
+ fFMD3icent(o.fFMD3icent),
+ fFMD3ocent(o.fFMD3ocent),
+ fList(o.fList)
+
{
//
// Copy constructor
fAODFMD = o.fAODFMD;
fAODEP = o.fAODEP;
fRingSums = o.fRingSums;
+ fFMD1icent = o.fFMD1icent;
+ fFMD2icent = o.fFMD2icent;
+ fFMD2ocent = o.fFMD2ocent;
+ fFMD3icent = o.fFMD3icent;
+ fFMD3ocent = o.fFMD3ocent;
fList = o.fList;
return *this;
fCorrections.SetupForData(*pe);
fHistCollector.SetupForData(*pv,*pe);
fEventPlaneFinder.SetupForData(*pe);
+
+ fFMD1icent=new TH3D("FMD1Ietavcent","FMD1ietavcent;#eta;cent",pe->GetNbins(),pe->GetXmin(),pe->GetXmax(),101,-0.5,100.5,1,0,1);
+ fFMD2icent=new TH3D("FMD2Ietavcent","FMD2ietavcent;#eta;cent",pe->GetNbins(),pe->GetXmin(),pe->GetXmax(),101,-0.5,100.5,1,0,1);
+ fFMD2ocent=new TH3D("FMD2Oetavcent","FMD2oetavcent;#eta;cent",pe->GetNbins(),pe->GetXmin(),pe->GetXmax(),101,-0.5,100.5,1,0,1);
+ fFMD3icent=new TH3D("FMD3Ietavcent","FMD3ietavcent;#eta;cent",pe->GetNbins(),pe->GetXmin(),pe->GetXmax(),101,-0.5,100.5,1,0,1);
+ fFMD3ocent=new TH3D("FMD3Oetavcent","FMD3oetavcent;#eta;cent",pe->GetNbins(),pe->GetXmin(),pe->GetXmax(),101,-0.5,100.5,1,0,1);
+ fList->Add(fFMD1icent);
+ fList->Add(fFMD2icent);
+ fList->Add(fFMD2ocent);
+ fList->Add(fFMD3icent);
+ fList->Add(fFMD3ocent);
+
+
this->Print();
return true;
}
if (!fHistCollector.Collect(fHistos, fRingSums,
- ivz, fAODFMD.GetHistogram())) {
+ ivz, fAODFMD.GetHistogram(),fList,fAODFMD.GetCentrality())) {
AliWarning("Histogram collector failed");
return;
}
class AliESDEvent;
class TH2D;
class TList;
+class TH3D;
/**
* Calculate the multiplicity in the forward regions event-by-event
AliFMDHistCollector fHistCollector; // Algorithm
AliFMDEventPlaneFinder fEventPlaneFinder; // Algorithm
+ TH3D* fFMD1icent; // Histogram for dndeta FMD1i vs centrality
+ TH3D* fFMD2icent; // Histogram for dndeta FMD2i vs centrality
+ TH3D* fFMD2ocent; // Histogram for dndeta FMD2o vs centrality
+ TH3D* fFMD3icent; // Histogram for dndeta FMD3i vs centrality
+ TH3D* fFMD3ocent; // Histogram for dndeta FMD3o vs centrality
+
+
TList* fList; // Output list
+
- ClassDef(AliForwardMultiplicityTask,2) // Forward multiplicity class
+ ClassDef(AliForwardMultiplicityTask,3) // Forward multiplicity class
};
#endif