fV0ampl(0)
{
// Constructor
- AliInfo("Constructor AliAnaFwdDetsQA");
// Define input and output slots here
// Input slot #0 works with a TChain
+ AliInfo("Constructor AliAnaFwdDetsQA");
DefineInput(0, TChain::Class());
// Output slot #1 TList
DefineOutput(1, TList::Class());
Double_t xMin, Double_t xMax,
const char* xLabel, const char* yLabel)
{
- // create a histogram
+ // helper method which can be used
+ // in order to create a histogram
TH1F* result = new TH1F(name, title, nBins, xMin, xMax);
result->SetOption("E");
if (xLabel) result->GetXaxis()->SetTitle(xLabel);
TH1F *AliAnaFwdDetsQA::CreateEffHisto(const TH1F* hGen, const TH1F* hRec)
{
- // create an efficiency histogram
+ // helper method which can be used
+ // in order create an efficiency histogram
Int_t nBins = hGen->GetNbinsX();
TH1F* hEff = (TH1F*) hGen->Clone("hEff");
hEff->SetTitle("");
Double_t eff = nRecEff/nGenEff;
hEff->SetBinContent(iBin, 100. * eff);
Double_t error = sqrt(eff*(1.-eff) / nGenEff);
- if (error == 0) error = 0.0001;
+ if (error < 1e-12) error = 0.0001;
hEff->SetBinError(iBin, 100. * error);
}
else {
Bool_t AliAnaFwdDetsQA::FitHisto(TH1* histo, Double_t& res, Double_t& resError)
{
- // fit a gaussian to a histogram
+ // fit a gaussian to
+ // a histogram
static TF1* fitFunc = new TF1("fitFunc", "gaus");
fitFunc->SetLineWidth(2);
fitFunc->SetFillStyle(0);
void AliAnaFwdDetsQA::UserCreateOutputObjects()
{
// Create histograms
- AliInfo("AliAnaFwdDetsQA::UserCreateOutputObjects");
// Create output container
+ AliInfo("AliAnaFwdDetsQA::UserCreateOutputObjects");
fListOfHistos = new TList();
fT0vtxRec = CreateHisto("hT0vtxRec", "Z vertex reconstructed with T0", 100, -25, 25, "Z_{vtx} [cm]", "");
void AliAnaFwdDetsQA::UserExec(Option_t */*option*/)
{
-
+ // The analysis code
+ // goes here
AliMCEvent* mcEvent = MCEvent();
if (!mcEvent) {
Printf("ERROR: Could not retrieve MC event");
void AliAnaFwdDetsQA::Terminate(Option_t *)
{
+ // Terminate
+ // Store the output histos
fListOfHistos = dynamic_cast<TList*>(GetOutputData(1));
if (!fListOfHistos) {
Printf("ERROR: fListOfHistos not available");
private:
- TList* fListOfHistos;
-
- TH1F* fT0vtxRec;
- TH2F* fT0vtxRecGen;
- TH1F* fT0time;
- TH1F* fT0time2;
- TH1F* fT0mult;
- TH1F* fT0vtxRes;
- TH1F* fT0ampl;
-
- TH1F* fV0a;
- TH1F* fV0c;
- TH1F* fV0multA;
- TH1F* fV0multC;
- TH2F* fV0multAcorr;
- TH2F* fV0multCcorr;
- TH2F* fV0Acorr;
- TH2F* fV0Ccorr;
- TH1F* fV0ampl;
+ TList* fListOfHistos; // Container for output histos
+
+ TH1F* fT0vtxRec; // T0 reconstructed z vertex
+ TH2F* fT0vtxRecGen; // T0 reconstructed vs generate z vertex
+ TH1F* fT0time; // T0 time0
+ TH1F* fT0time2; // T0 time0
+ TH1F* fT0mult; // T0 multiplicity
+ TH1F* fT0vtxRes; // T0 z vertex resolution
+ TH1F* fT0ampl; // T0 signals amplitude
+
+ TH1F* fV0a; // V0 number of fired PMs A side
+ TH1F* fV0c; // V0 number of fired PMs C side
+ TH1F* fV0multA; // V0 multiplicity on A side
+ TH1F* fV0multC; // V0 multiplicity on C side
+ TH2F* fV0multAcorr; // V0 reconstructed vs generated multiplicity on A side
+ TH2F* fV0multCcorr; // V0 reconstructed vs generated multiplicity on C side
+ TH2F* fV0Acorr; // V0 number of fired PMs (reco vs gen) A side
+ TH2F* fV0Ccorr; // V0 number of fired PMs (reco vs gen) C side
+ TH1F* fV0ampl; // V0 multiplicity in single channel
AliAnaFwdDetsQA(const AliAnaFwdDetsQA&); // not implemented
AliAnaFwdDetsQA& operator=(const AliAnaFwdDetsQA&); // not implemented