]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG1/AliAnalysisTaskV0QA.h
Register extra file trending.root
[u/mrichter/AliRoot.git] / PWG1 / AliAnalysisTaskV0QA.h
index 0005510f304f7f3f32d990a6f421f5a4925fb668..d60c69ed57deb5d199156450aba6b50ee9979928 100644 (file)
@@ -1,26 +1,40 @@
-#include "TH1.h"
+#ifndef AliAnalysisTaskV0QA_h
+#define AliAnalysisTaskV0QA_h
+//----------------------------------
+// Class to check the V0 method efficiency for 
+// Author A. Marin   revision 18/10/2009
+//----------------------------------
+
 #include "THnSparse.h"
 #include "TList.h"
-#include "AliESDEvent.h"
-#include "AliESD.h"
-#include "TLorentzVector.h"
-
-#include "AliAnalysisTask.h"
+#include "AliPID.h"
+#include "AliAnalysisTaskSE.h"
 #include "AliAnalysisManager.h"
 #include "AliAnalysisDataContainer.h"
-#include "AliESDtrackCuts.h"
+
+class TH1;
+class THnSparse;
+class TList;
+class AliESDEvent;
+class AliESD;
+class TLorentzVector;
+class AliAnalysisManager;
+class AliAnalysisDataContainer;
 class AliESDtrackCuts;
+class AliMCEventHandler;
+class AliStack;
 class TChain;
 
-class AliAnalysisTaskV0QA : public AliAnalysisTask {
+class AliAnalysisTaskV0QA : public AliAnalysisTaskSE {
  public:
   //  AliAnalysisTaskV0QA() : AliAnalysisTask(), fESD(0), fChain(0) {}
-  AliAnalysisTaskV0QA(const char *name);
+    AliAnalysisTaskV0QA();
+    AliAnalysisTaskV0QA(const char *name);
+  
   virtual ~AliAnalysisTaskV0QA();
   
-  virtual void   ConnectInputData(Option_t *);
-  virtual void   CreateOutputObjects();
-  virtual void   Exec(Option_t *option);
+  virtual void   UserCreateOutputObjects();
+  virtual void   UserExec(Option_t *option);
   virtual void   Terminate(Option_t *);
 
   void InspectListOfChargedParticles();
@@ -48,123 +62,125 @@ class AliAnalysisTaskV0QA : public AliAnalysisTask {
 
 
 
-  AliESDEvent *fESD; //ESD object
-  AliStack * stack;
-  AliMCEventHandler* mctruth; 
+  AliESDEvent *fESD;                // ESD object
+  AliStack * fStack;                // The MC Stack
+  AliMCEventHandler* fMCtruth;      // The mc info
  
-  TChain * fChain;
+  TChain * fChain;                  // Input chian
   TList * fOutputContainer; // ! output data container
 
-  THnSparse   *fSparseV0;
-  THnSparse   *fSparseK0;
-  THnSparse   *fSparseL;
-  THnSparse   *fSparseAL;
+  THnSparse   *fSparseV0;   // THnSparse with Gamma info 
+  THnSparse   *fSparseK0;   // THnSparse with K0 info
+  THnSparse   *fSparseL;    // THnSparse with L info
+  THnSparse   *fSparseAL;   // THnSparse with antiL info
 
   //////////////////////////////////
 
-  Int_t nEv;
+  Int_t fnEv;               // Number of event to analyse
+  Int_t fgDim;              // Dimension of the THnSparse
 
-  Int_t nConvGamGeant;
+  Int_t fnConvGamGeant;     // number of conversions in mc 
 
-  Int_t * gConvGamGeantIndex;
-  Int_t * eNegConvGamGeantIndex;
-  Int_t * ePosConvGamGeantIndex;
-  Float_t * eNegConvGamGeantLength;
-  Float_t * ePosConvGamGeantLength;
+  Int_t * fgConvGamGeantIndex; //[fgDim] index of conversions in mc 
+  Int_t * feNegConvGamGeantIndex; //[fgDim] index of e- from conversions in mc 
+  Int_t * fePosConvGamGeantIndex; //[fgDim] index of e+ from conversions in mc 
+  Float_t * feNegConvGamGeantLength; //[fgDim]  length of the e- from conv 
+  Float_t * fePosConvGamGeantLength; //[fgDim]  length of the e+ from conv 
 
 
-  Int_t * eNegConvGamSingleRecIndex;
-  Int_t * ePosConvGamSingleRecIndex;
-  Int_t * eNegConvGamV0RecIndex;
-  Int_t * ePosConvGamV0RecIndex;
-  Int_t * ConvGamV0RecIndexPos;
-  Int_t * ConvGamV0RecIndexNeg;
+  Int_t * feNegConvGamSingleRecIndex; //[fgDim] index of e- from conversions reconstructed single
+  Int_t * fePosConvGamSingleRecIndex; //[fgDim] index of e+ from conversions reconstructed single
+  Int_t * feNegConvGamV0RecIndex;     //[fgDim] index of e- from conversions reconstructed in V0
+  Int_t * fePosConvGamV0RecIndex;     //[fgDim] index of e- from conversions reconstructed in V0
+  Int_t * fConvGamV0RecIndexPos;      //[fgDim] index of V0 from conversions reconstructed
+  Int_t * fConvGamV0RecIndexNeg;      //[fgDim] index of V0 from conversions reconstructed
 
 
-  Int_t gDim;
-  // Lambda
-  Int_t nDecayLGeant;
-  Int_t * lDecayLGeantIndex;
-  Int_t * piNegDecayLGeantIndex;
-  Int_t * pPosDecayLGeantIndex;
-  Float_t * piNegDecayLGeantLength;
-  Float_t * pPosDecayLGeantLength;
 
-  Int_t * piNegDecayLSingleRecIndex;
-  Int_t * pPosDecayLSingleRecIndex;
-  Int_t * piNegDecayLV0RecIndex;
-  Int_t * pPosDecayLV0RecIndex;
-  Int_t * DecayLV0RecIndexPos;
-  Int_t * DecayLV0RecIndexNeg;
+   // Lambda  
+  Int_t fnDecayLGeant;                // number of Lambda in mc 
+  Int_t * flDecayLGeantIndex;         //[fgDim] index of Lambda in MC
+  Int_t * fpiNegDecayLGeantIndex;     //[fgDim] index of pi- from L in MC
+  Int_t * fpPosDecayLGeantIndex;      //[fgDim] index of proton from L in MC 
+  Float_t * fpiNegDecayLGeantLength;  //[fgDim] length of the pi- from MC
+  Float_t * fpPosDecayLGeantLength;   //[fgDim] length of the proton from MC
+
+  Int_t * fpiNegDecayLSingleRecIndex; //[fgDim] index of pi- from L reconstr. single
+  Int_t * fpPosDecayLSingleRecIndex;  //[fgDim] index of proton from L reconstr. single
+  Int_t * fpiNegDecayLV0RecIndex;     //[fgDim] index of pi- from L reconstr. V0
+  Int_t * fpPosDecayLV0RecIndex;      //[fgDim] index of proton from L reconstr. V0
+  Int_t * fDecayLV0RecIndexPos;       //[fgDim] index of pi- from L reconstr. V0
+  Int_t * fDecayLV0RecIndexNeg;       //[fgDim] index of proton from L reconstr.
 
 
   // AntiLambda
-  Int_t nDecayALGeant;
-  Int_t * alDecayALGeantIndex;
-  Int_t * piPosDecayALGeantIndex;
-  Int_t * apNegDecayALGeantIndex;
-  Float_t * piPosDecayALGeantLength;
-  Float_t * apNegDecayALGeantLength;
+  Int_t fnDecayALGeant;               // number of Lambdabar in mc 
+  Int_t * falDecayALGeantIndex;       //[fgDim] index of Lambdabar in MC
+  Int_t * fpiPosDecayALGeantIndex;    //[fgDim] index of pi+ from AL in MC
+  Int_t * fapNegDecayALGeantIndex;    //[fgDim] index of antiproton from AL in MC
+  Float_t * fpiPosDecayALGeantLength; //[fgDim] Length of pi+ in MC 
+  Float_t * fapNegDecayALGeantLength; //[fgDim] Length of antiproton in MC 
 
-  Int_t * piPosDecayALSingleRecIndex;
-  Int_t * apNegDecayALSingleRecIndex;
-  Int_t * piPosDecayALV0RecIndex;
-  Int_t * apNegDecayALV0RecIndex;
-  Int_t * DecayALV0RecIndexPos;
-  Int_t * DecayALV0RecIndexNeg;
+  Int_t * fpiPosDecayALSingleRecIndex; //[fgDim] index of pi+ from AL reconstr. single
+  Int_t * fapNegDecayALSingleRecIndex; //[fgDim] index of antiproton from AL reconstr. single
+  Int_t * fpiPosDecayALV0RecIndex;     //[fgDim] index of pi+ from AL reconstr. V0 
+  Int_t * fapNegDecayALV0RecIndex;     //[fgDim] index of antiproton from AL reconstr. V0  
+  Int_t * fDecayALV0RecIndexPos;       //[fgDim] index of pi+ V0
+  Int_t * fDecayALV0RecIndexNeg;       //[fgDim] index of antiproton V0
 
 
   // K0S
-  Int_t nDecayK0Geant;
-  Int_t * K0DecayK0GeantIndex;
-  Int_t * piNegDecayK0GeantIndex;
-  Int_t * piPosDecayK0GeantIndex;
-  Float_t * piNegDecayK0GeantLength;
-  Float_t * piPosDecayK0GeantLength;
-
-  Int_t * piNegDecayK0SingleRecIndex;
-  Int_t * piPosDecayK0SingleRecIndex;
-  Int_t * piNegDecayK0V0RecIndex;
-  Int_t * piPosDecayK0V0RecIndex;
-  Int_t * DecayK0V0RecIndexPos;
-  Int_t * DecayK0V0RecIndexNeg;
-
-  Int_t piPosK0Index;
-  Int_t piNegK0Index;
+  Int_t fnDecayK0Geant;                // number of K0s in mc  
+  Int_t * fK0DecayK0GeantIndex;        //[fgDim] index of K0S in MC
+  Int_t * fpiNegDecayK0GeantIndex;     //[fgDim] index of pi- from K0s in MC
+  Int_t * fpiPosDecayK0GeantIndex;     //[fgDim] index of pi+ from K0s in MC
+  Float_t * fpiNegDecayK0GeantLength;  //[fgDim] length of the pi- from K0s in MC
+  Float_t * fpiPosDecayK0GeantLength;  //[fgDim] length of the pi+ from K0s in MC
+
+  Int_t * fpiNegDecayK0SingleRecIndex;  //[fgDim] index of pi- from K0S reconstr. single
+  Int_t * fpiPosDecayK0SingleRecIndex;  //[fgDim] index of pi+ from K0S reconstr. single 
+  Int_t * fpiNegDecayK0V0RecIndex;      //[fgDim] index of pi- from K0S reconstr. V0    
+  Int_t * fpiPosDecayK0V0RecIndex;      //[fgDim] index of pi+ from K0S reconstr. V0
+  Int_t * fDecayK0V0RecIndexPos;        //[fgDim] index of pi+ V0 
+  Int_t * fDecayK0V0RecIndexNeg;        //[fgDim] index of pi- V0  
+
+  Int_t fpiPosK0Index;    //      
+  Int_t fpiNegK0Index;    //
 
   
-  Int_t nTracksPrim;
+  Int_t fnTracksPrim;    // number of primary tracks contributing to vertex
+
 
+  Int_t ftpcRefit;    // tpcRefit condition
+  Int_t fitsRefit;    // itsRefit condition
+  Int_t ftrdRefit;    // trdRefit condition
+  Int_t ftrdOut;      // trdOut condition
 
-  Int_t tpcRefit;
-  Int_t itsRefit;
-  Int_t trdRefit;
-  Int_t trdOut;
 
 
 
+  Double_t fprobabilityPos[AliPID::kSPECIES];
+  Double_t fprobabilityNeg[AliPID::kSPECIES];
 
-  Double_t probabilityPos[AliPID::kSPECIES];
-  Double_t probabilityNeg[AliPID::kSPECIES];
+  Int_t    fDim;        // number of dimensions THnSparse
+  Double_t * fValueL;   //[fDim] values to THnSparse for L
+  Double_t * fValueAL;  //[fDim] values to THnSparse for AL
+  Double_t * fValueK0;  //[fDim] values to THnSparse for K0
+  Double_t * fValueV0;  //[fDim] values to THnSparse for Gamma
 
-  Double_t * fValueL;
-  Double_t * fValueAL;
-  Double_t * fValueK0;
-  Double_t * fValueV0;
+  Double_t * fxminV0;   //[fDim] min value to THnSparse
+  Double_t * fxmaxV0;   //[fDim] max value to THnSparse
+  Int_t    * fbinsV0;   //[fDim] number of bins to THnSparse
 
-  Double_t * xminV0;
-  Double_t * xmaxV0;
-  Int_t    * binsV0;
-  Int_t    fDim;
 
 
 
-  TObjArray* fRefTPC;
-  int fLabelsTPC[100000];
+  TObjArray* fRefTPC;   // references for the tpc
+  int fLabelsTPC[100000]; // labels for the tpc
 
 
-  TClonesArray *clRefsN;
-  TClonesArray *clRefsP;
+  TClonesArray *fclRefsN;  // negative references for the tpc
+  TClonesArray *fclRefsP;  // positive references for the tpc
 
   // MC variables
 
@@ -175,3 +191,6 @@ class AliAnalysisTaskV0QA : public AliAnalysisTask {
 
   ClassDef(AliAnalysisTaskV0QA, 1); // example of analysis
 };
+
+
+#endif