]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding conv fixes
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Jul 2010 10:41:21 +0000 (10:41 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Jul 2010 10:41:21 +0000 (10:41 +0000)
PWG1/AliAnaFwdDetsQA.cxx
PWG1/AliAnaFwdDetsQA.h

index ae8cac0482c0d65b34c96cb4cdb47d63ffe2cf5c..beeb9c5d032ed4d720d9756ba57cefdbc9cfcef4 100644 (file)
@@ -96,9 +96,9 @@ AliAnalysisTaskSE(name),
   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());
@@ -108,7 +108,8 @@ TH1F * AliAnaFwdDetsQA::CreateHisto(const char* name, const char* title,Int_t nB
                                            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);
@@ -119,7 +120,8 @@ TH1F * AliAnaFwdDetsQA::CreateHisto(const char* name, const char* title,Int_t nB
 
 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("");
@@ -135,7 +137,7 @@ TH1F *AliAnaFwdDetsQA::CreateEffHisto(const TH1F* hGen, const TH1F* hRec)
       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 {
@@ -149,7 +151,8 @@ TH1F *AliAnaFwdDetsQA::CreateEffHisto(const TH1F* hGen, const TH1F* hRec)
 
 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);
@@ -172,8 +175,8 @@ Bool_t AliAnaFwdDetsQA::FitHisto(TH1* histo, Double_t& res, Double_t& resError)
 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]", "");
@@ -229,7 +232,8 @@ void AliAnaFwdDetsQA::UserCreateOutputObjects()
 
 void AliAnaFwdDetsQA::UserExec(Option_t */*option*/)
 {
-
+  // The analysis code
+  // goes here
   AliMCEvent* mcEvent = MCEvent();
   if (!mcEvent) {
     Printf("ERROR: Could not retrieve MC event");
@@ -311,6 +315,8 @@ void AliAnaFwdDetsQA::UserExec(Option_t */*option*/)
 
 void AliAnaFwdDetsQA::Terminate(Option_t *)
 {
+  // Terminate
+  // Store the output histos
   fListOfHistos = dynamic_cast<TList*>(GetOutputData(1));
   if (!fListOfHistos) {
     Printf("ERROR: fListOfHistos not available");
index f46f9986e61ba08e4f42a9206f5263d8ac2a5484..99fedb3f73de0908dd12ba92f4c7e363249bc9b9 100644 (file)
@@ -33,25 +33,25 @@ class AliAnaFwdDetsQA : public AliAnalysisTaskSE
   
  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