]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGHF/vertexingHF/AliAnalysisTaskSELc2V0bachelor.h
Updates
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / AliAnalysisTaskSELc2V0bachelor.h
index 2ec97534eca62adbf5592a3890e9bb4a192a4cb5..817c4021b63890630d80a821065c3e15c5ea02d2 100644 (file)
 #include "AliAODEvent.h"
 #include "AliPID.h"
 #include "AliAODTrack.h"
-#include "AliPIDResponse.h"
-#include "AliTPCPIDResponse.h"
 #include "AliRDHFCutsLctoV0.h"
 #include "AliNormalizationCounter.h"
 
 class TH1F;
+class TClonesArray;
+class AliAODRecoCascade;
 
 class AliAnalysisTaskSELc2V0bachelor : public AliAnalysisTaskSE 
 {
@@ -37,8 +37,8 @@ class AliAnalysisTaskSELc2V0bachelor : public AliAnalysisTaskSE
  public:
   
   AliAnalysisTaskSELc2V0bachelor();
-  AliAnalysisTaskSELc2V0bachelor(const Char_t* name, AliRDHFCutsLctoV0* cutsA, AliRDHFCutsLctoV0* cutsB,
-                                Bool_t useOnTheFly=kFALSE, Bool_t writeVariableTree=kTRUE);
+  AliAnalysisTaskSELc2V0bachelor(const Char_t* name, AliRDHFCutsLctoV0* cuts,
+                                Bool_t useOnTheFly=kFALSE, Bool_t writeVariableTree=kTRUE, Bool_t additionalChecks=kFALSE, Bool_t trackRotation=kFALSE);
   virtual ~AliAnalysisTaskSELc2V0bachelor();
 
   // Implementation of interface methods  
@@ -50,66 +50,115 @@ class AliAnalysisTaskSELc2V0bachelor : public AliAnalysisTaskSE
  
   // histos
   void FillLc2pK0Sspectrum(AliAODRecoCascadeHF *part, Int_t isLc,
-                          Int_t &nSelectedProd, AliRDHFCutsLctoV0 *cutsProd,
                           Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
                           TClonesArray *mcArray);
 
-  void DefineHistograms();
-  Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPartCandidate) const;
-
-  void MakeAnalysisForLc2prK0S(TClonesArray *arrayLctopK0s,
+  void MakeAnalysisForLc2prK0S(TClonesArray *arrayLctopK0S,
                               TClonesArray *mcArray,
-                              Int_t &nSelectedProd, AliRDHFCutsLctoV0 *cutsProd,
                               Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal);
  
-  Int_t MatchToMC(AliAODRecoCascadeHF *lc2bacV0,
-                 Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0,
-                 TClonesArray *mcArray);
-
-  void SearchLcDaughter(TClonesArray *arrayMC);
-
-  void DefineK0SHistos();
-
   // set MC usage
   void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
   Bool_t GetMC() const {return fUseMCInfo;}
 
-  void FillArmPodDistribution(AliAODv0 *vZero, TString histoTitle, TList *histoList);
+  // set flag for additional checks
+  void SetAdditionalChecks(Bool_t additionalChecks) {fAdditionalChecks = additionalChecks;}
+  Bool_t GetAdditionalChecks() const {return fAdditionalChecks;}
+
+  void FillArmPodDistribution(AliAODRecoDecay *vZero,TString histoTitle, Bool_t isCandidateSelectedCuts, Bool_t isBachelorID);
 
-  void SetK0sAnalysis(Bool_t a) {fIsK0sAnalysis=a;}
-  Bool_t GetK0sAnalysis() const {return fIsK0sAnalysis;}
+  void SetK0SAnalysis(Bool_t a) {fIsK0SAnalysis=a;}
+  Bool_t GetK0SAnalysis() const {return fIsK0SAnalysis;}
 
   void SetUseOnTheFlyV0(Bool_t a) { fUseOnTheFlyV0=a; }
   Bool_t GetUseOnTheFlyV0() { return fUseOnTheFlyV0; }
 
+  Int_t MatchToMClabelC(AliAODRecoCascadeHF *candidate,TClonesArray *mcArray);
+
+
+  void SetNRotations(Int_t nRot=9) { fNRotations=nRot; }
+  Int_t GetNRotations() { return fNRotations; }
+
+  void SetPtMinToFillTheTree(Double_t pTmin=  0.) { fPtMinToFillTheTree=pTmin; }
+  void SetPtMaxToFillTheTree(Double_t pTmax=999.) { fPtMaxToFillTheTree=pTmax; }
+  Double_t GetPtMinToFillTheTree() { return fPtMinToFillTheTree; }
+  Double_t GetPtMaxToFillTheTree() { return fPtMaxToFillTheTree; }
+
+  void SetMinAngleForRot(Double_t min=5.*TMath::Pi()/6.) { fMinAngleForRot=min; }
+  void SetMaxAngleForRot(Double_t max=7.*TMath::Pi()/6.) { fMaxAngleForRot=max; }
+  Double_t GetMinAngleForRot() { return fMinAngleForRot; }
+  Double_t GetMaxAngleForRot() { return fMaxAngleForRot; }
+
  private:
   
+  void CheckEventSelection(AliAODEvent *aodEvent);
+  void CheckEventSelectionWithCandidates(AliAODEvent *aodEvent);
+  void CheckCandidatesAtDifferentLevels(AliAODRecoCascadeHF *part,AliRDHFCutsLctoV0* cutsAnal);
+  void FillTheTree(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t isLc);
+  void DefineTreeVariables();
+
+  Int_t MatchToMC(AliAODRecoCascadeHF *lc2bacV0,
+                 Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0,
+                 TClonesArray *mcArray);
+
+  Int_t SearchLcDaughter(TClonesArray *arrayMC, Int_t iii);
+
+  void DefineGeneralHistograms();
+  void DefineAnalysisHistograms();
+  void DefineK0SHistos();
+  void FillAnalysisHistograms(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TString appendthis);
+  void TrackRotation(AliRDHFCutsLctoV0 *cutsAnal, AliAODRecoCascadeHF *part, TString appendthis);
+
   AliAnalysisTaskSELc2V0bachelor(const AliAnalysisTaskSELc2V0bachelor &source);
   AliAnalysisTaskSELc2V0bachelor& operator=(const AliAnalysisTaskSELc2V0bachelor& source); 
   
+  Double_t Det(Double_t a00,Double_t a01,
+              Double_t a10,Double_t a11) const;
+  Double_t Det(Double_t a00,Double_t a01,Double_t a02,
+              Double_t a10,Double_t a11,Double_t a12,
+              Double_t a20,Double_t a21,Double_t a22) const;
+  Double_t PropagateToDCA(AliAODv0 *v, AliAODTrack *bachelor, Double_t b,
+                         Double_t &xVtxLc, Double_t &yVtxLc, Double_t &zVtxLc,
+                         Double_t &pxVtxLc, Double_t &pyVtxLc, Double_t &pzVtxLc);
+
+  Double_t GetAlpha(Double_t xyz[3],Double_t pxpypz[3]);
+
+  Int_t SearchForCommonMother(TClonesArray *mcArray,
+                             Int_t dgLabels[10],Int_t ndg,
+                             Int_t &ndgCk, Int_t *pdgDg, Int_t &labelMother, Int_t &nDauCand) const;
+
   Bool_t fUseMCInfo;          // Use MC info
-  TList *fOutput;             // User output1 // general histos
-  TList *fOutputAll;          // User output2 // histos without pid and cut on V0
-  TList *fOutputPIDBach;      // User output3 // histos with PID on Bachelor
+  TList *fOutput;             // User output slot 1 // general histos
+  TList *fOutputAll;          // User output slot 4 // histos without pid and cut on V0
+  TList *fOutputPIDBach;      // User output slot 5 // histos with PID on Bachelor
 
-  // define the histograms
   TH1F *fCEvents;                    // Histogram to check selected events
-  AliPIDResponse *fPIDResponse;      //! PID response object
-  Bool_t fIsK0sAnalysis;             // switch between Lpi and K0sp
-  AliNormalizationCounter *fCounter; // AliNormalizationCounter on output slot 4
-  AliRDHFCutsLctoV0 *fProdCuts;      // Cuts - sent to output slot 5
-  AliRDHFCutsLctoV0 *fAnalCuts;      // Cuts - sent to output slot 5
-  TList *fListCuts;                  // list of cuts
+  Bool_t fIsK0SAnalysis;             // switch between Lpi and K0Sp
+  AliNormalizationCounter *fCounter; // AliNormalizationCounter on output slot 2
+  AliRDHFCutsLctoV0 *fAnalCuts;      // Cuts - sent to output slot 3
+  //TList *fListCuts;                  // list of cuts
   Bool_t fUseOnTheFlyV0;             // flag to analyze also on-the-fly V0 candidates
   Bool_t fIsEventSelected;           // flag for event selected
 
   Bool_t    fWriteVariableTree;       // flag to decide whether to write the candidate variables on a tree variables
-  TTree    *fVariablesTree;           //! tree of the candidate variables after track selection on output slot 6
+  TTree    *fVariablesTree;           //! tree of the candidate variables after track selection on output slot 4
   Float_t *fCandidateVariables;       //! variables to be written to the tree
   AliAODVertex *fVtx1;                // primary vertex
   Float_t fBzkG;                      // magnetic field value [kG]
+  Bool_t fAdditionalChecks;           // flag to fill additional histograms
+
+  Bool_t fTrackRotation;              // flag to check track rotation
+  TList *fOutputPIDBachTR;            // User output slot 6 // histos with PID on Bachelor and track rotation
+
+  Double_t fMinAngleForRot;//=5*TMath::Pi()/6;
+  Double_t fMaxAngleForRot;//=7*TMath::Pi()/6;
+  Double_t fMinMass;//=mLcPDG-0.250;
+  Double_t fMaxMass;//=mLcPDG+0.250;
+  Int_t fNRotations;//=9;
+  Double_t fPtMinToFillTheTree;//0.
+  Double_t fPtMaxToFillTheTree;//999.
 
-  ClassDef(AliAnalysisTaskSELc2V0bachelor,3); // class for Lc->p K0
+  ClassDef(AliAnalysisTaskSELc2V0bachelor,7); // class for Lc->p K0
 };
 
 #endif