-> Trigger configuration for p-Pb: modifications to cascade code
authorddobrigk <ddobrigk@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Jan 2013 15:05:25 +0000 (15:05 +0000)
committerddobrigk <ddobrigk@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Jan 2013 15:05:25 +0000 (15:05 +0000)
-> Coverity Fixes (long overdue)

PWGLF/STRANGENESS/Cascades/AliAnalysisTaskExtractCascade.cxx
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskExtractCascade.h
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskExtractPerformanceCascade.cxx
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskExtractPerformanceCascade.h
PWGLF/STRANGENESS/Cascades/macros/AddTaskExtractCascade.C
PWGLF/STRANGENESS/Cascades/macros/AddTaskExtractPerformanceCascade.C

index 8109ef2..3aa562c 100644 (file)
@@ -98,7 +98,51 @@ ClassImp(AliAnalysisTaskExtractCascade)
 AliAnalysisTaskExtractCascade::AliAnalysisTaskExtractCascade() 
   : AliAnalysisTaskSE(), fListHist(0), fTreeCascade(0), fPIDResponse(0), fESDtrackCuts(0),
    fkIsNuclear   ( kFALSE ), 
-   fkLowEnergyPP ( kFALSE ),
+   fkSwitchINT7  ( kFALSE ),
+
+//------------------------------------------------
+// Tree Variables
+//------------------------------------------------
+
+   fTreeCascVarCharge(0),
+   fTreeCascVarMassAsXi(0),
+   fTreeCascVarMassAsOmega(0),
+   fTreeCascVarPt(0),
+   fTreeCascVarPtMC(0),
+   fTreeCascVarRapMC(0),
+   fTreeCascVarRapXi(0),
+   fTreeCascVarRapOmega(0),
+   fTreeCascVarNegEta(0),
+   fTreeCascVarPosEta(0),
+   fTreeCascVarBachEta(0),
+   fTreeCascVarDCACascDaughters(0),
+   fTreeCascVarDCABachToPrimVtx(0),
+   fTreeCascVarDCAV0Daughters(0),
+   fTreeCascVarDCAV0ToPrimVtx(0),
+   fTreeCascVarDCAPosToPrimVtx(0),
+   fTreeCascVarDCANegToPrimVtx(0),
+   fTreeCascVarCascCosPointingAngle(0),
+   fTreeCascVarCascRadius(0),
+   fTreeCascVarV0Mass(0),
+   fTreeCascVarV0CosPointingAngle(0),
+   fTreeCascVarV0Radius(0),
+   fTreeCascVarLeastNbrClusters(0),
+   fTreeCascVarMultiplicity(0),
+   fTreeCascVarDistOverTotMom(0),
+   fTreeCascVarPID(0),
+   fTreeCascVarPIDBachelor(0),
+   fTreeCascVarPIDNegative(0),
+   fTreeCascVarPIDPositive(0),
+   fTreeCascVarPosTransMom(0),
+   fTreeCascVarNegTransMom(0),
+   fTreeCascVarPosTransMomMC(0),
+   fTreeCascVarNegTransMomMC(0),
+   fTreeCascVarNegNSigmaPion(0),
+   fTreeCascVarNegNSigmaProton(0),
+   fTreeCascVarPosNSigmaPion(0),
+   fTreeCascVarPosNSigmaProton(0),
+   fTreeCascVarBachNSigmaPion(0),
+   fTreeCascVarBachNSigmaKaon(0),
 
 //------------------------------------------------
 // HISTOGRAMS
@@ -127,9 +171,53 @@ AliAnalysisTaskExtractCascade::AliAnalysisTaskExtractCascade()
 AliAnalysisTaskExtractCascade::AliAnalysisTaskExtractCascade(const char *name) 
   : AliAnalysisTaskSE(name), fListHist(0), fTreeCascade(0), fPIDResponse(0), fESDtrackCuts(0),
    fkIsNuclear   ( kFALSE ), 
-   fkLowEnergyPP ( kFALSE ),
+   fkSwitchINT7  ( kFALSE ),
      
 //------------------------------------------------
+// Tree Variables
+//------------------------------------------------
+
+   fTreeCascVarCharge(0),
+   fTreeCascVarMassAsXi(0),
+   fTreeCascVarMassAsOmega(0),
+   fTreeCascVarPt(0),
+   fTreeCascVarPtMC(0),
+   fTreeCascVarRapMC(0),
+   fTreeCascVarRapXi(0),
+   fTreeCascVarRapOmega(0),
+   fTreeCascVarNegEta(0),
+   fTreeCascVarPosEta(0),
+   fTreeCascVarBachEta(0),
+   fTreeCascVarDCACascDaughters(0),
+   fTreeCascVarDCABachToPrimVtx(0),
+   fTreeCascVarDCAV0Daughters(0),
+   fTreeCascVarDCAV0ToPrimVtx(0),
+   fTreeCascVarDCAPosToPrimVtx(0),
+   fTreeCascVarDCANegToPrimVtx(0),
+   fTreeCascVarCascCosPointingAngle(0),
+   fTreeCascVarCascRadius(0),
+   fTreeCascVarV0Mass(0),
+   fTreeCascVarV0CosPointingAngle(0),
+   fTreeCascVarV0Radius(0),
+   fTreeCascVarLeastNbrClusters(0),
+   fTreeCascVarMultiplicity(0),
+   fTreeCascVarDistOverTotMom(0),
+   fTreeCascVarPID(0),
+   fTreeCascVarPIDBachelor(0),
+   fTreeCascVarPIDNegative(0),
+   fTreeCascVarPIDPositive(0),
+   fTreeCascVarPosTransMom(0),
+   fTreeCascVarNegTransMom(0),
+   fTreeCascVarPosTransMomMC(0),
+   fTreeCascVarNegTransMomMC(0),
+   fTreeCascVarNegNSigmaPion(0),
+   fTreeCascVarNegNSigmaProton(0),
+   fTreeCascVarPosNSigmaPion(0),
+   fTreeCascVarPosNSigmaProton(0),
+   fTreeCascVarBachNSigmaPion(0),
+   fTreeCascVarBachNSigmaKaon(0),
+
+//------------------------------------------------
 // HISTOGRAMS
 // --- Filled on an Event-by-event basis
 //------------------------------------------------
@@ -471,12 +559,9 @@ void AliAnalysisTaskExtractCascade::UserExec(Option_t *)
    Bool_t isSelected = 0;
    isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
 
-   //pp at 2.76TeV: special case, ignore FastOnly
-   if ( (fkLowEnergyPP == kTRUE) && (maskIsSelected& AliVEvent::kFastOnly) ){
-        PostData(1, fListHist);
-        PostData(2, fTreeCascade);
-      return;
-   } 
+   //pA triggering: CINT7
+   if( fkSwitchINT7 ) isSelected = (maskIsSelected & AliVEvent::kINT7) == AliVEvent::kINT7;
+
    //Standard Min-Bias Selection
    if ( ! isSelected ) { 
         PostData(1, fListHist);
@@ -487,7 +572,7 @@ void AliAnalysisTaskExtractCascade::UserExec(Option_t *)
 //------------------------------------------------
 // Rerun cascade vertexer! 
 //------------------------------------------------
-
+/*
   lESDevent->ResetCascades();
   lESDevent->ResetV0s();
 
@@ -499,7 +584,7 @@ void AliAnalysisTaskExtractCascade::UserExec(Option_t *)
 
   lV0vtxer.Tracks2V0vertices(lESDevent);
   lCascVtxer.V0sTracks2CascadeVertices(lESDevent);
-
+*/
 //------------------------------------------------
 // After Trigger Selection
 //------------------------------------------------
index ebf6fbe..dcc856b 100644 (file)
@@ -54,7 +54,7 @@ class AliAnalysisTaskExtractCascade : public AliAnalysisTaskSE {
   Double_t MyRapidity(Double_t rE, Double_t rPz) const;
 
   void SetIsNuclear           (Bool_t lIsNuclear   = kTRUE ) { fkIsNuclear   = lIsNuclear;   }
-  void SetIsLowEnergyPP       (Bool_t lLowEnergyPP = kTRUE ) { fkLowEnergyPP = lLowEnergyPP; }
+  void SetINT7Trigger         (Bool_t lSwitchINT7  = kTRUE ) { fkSwitchINT7   = lSwitchINT7; }
   
  private:
         // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
@@ -71,7 +71,7 @@ class AliAnalysisTaskExtractCascade : public AliAnalysisTaskSE {
   // (have to be streamed too or configuration is lost)
   
   Bool_t fkIsNuclear;   //if true, replace multiplicity est. by centrality (default FALSE) 
-  Bool_t fkLowEnergyPP; //if true, skip FASTOnly (default FALSE)
+  Bool_t fkSwitchINT7;  //if true, skip FASTOnly (default FALSE)
 
        Double_t        fV0Sels[7];                     // Array to store the 7 values for the different selections V0 related
        Double_t        fCascSels[8];                   // Array to store the 8 values for the different selections Casc. related
index 717c357..c561e81 100644 (file)
@@ -97,7 +97,51 @@ ClassImp(AliAnalysisTaskExtractPerformanceCascade)
 AliAnalysisTaskExtractPerformanceCascade::AliAnalysisTaskExtractPerformanceCascade() 
   : AliAnalysisTaskSE(), fListHist(0), fTreeCascade(0), fPIDResponse(0), fESDtrackCuts(0),
    fkIsNuclear   ( kFALSE ), 
-   fkLowEnergyPP ( kFALSE ),
+   fkSwitchINT7  ( kFALSE ),
+
+//------------------------------------------------
+// Tree Variables
+//------------------------------------------------
+
+   fTreeCascVarCharge(0),
+   fTreeCascVarMassAsXi(0),
+   fTreeCascVarMassAsOmega(0),
+   fTreeCascVarPt(0),
+   fTreeCascVarPtMC(0),
+   fTreeCascVarRapMC(0),
+   fTreeCascVarRapXi(0),
+   fTreeCascVarRapOmega(0),
+   fTreeCascVarNegEta(0),
+   fTreeCascVarPosEta(0),
+   fTreeCascVarBachEta(0),
+   fTreeCascVarDCACascDaughters(0),
+   fTreeCascVarDCABachToPrimVtx(0),
+   fTreeCascVarDCAV0Daughters(0),
+   fTreeCascVarDCAV0ToPrimVtx(0),
+   fTreeCascVarDCAPosToPrimVtx(0),
+   fTreeCascVarDCANegToPrimVtx(0),
+   fTreeCascVarCascCosPointingAngle(0),
+   fTreeCascVarCascRadius(0),
+   fTreeCascVarV0Mass(0),
+   fTreeCascVarV0CosPointingAngle(0),
+   fTreeCascVarV0Radius(0),
+   fTreeCascVarLeastNbrClusters(0),
+   fTreeCascVarMultiplicity(0),
+   fTreeCascVarDistOverTotMom(0),
+   fTreeCascVarPID(0),
+   fTreeCascVarPIDBachelor(0),
+   fTreeCascVarPIDNegative(0),
+   fTreeCascVarPIDPositive(0),
+   fTreeCascVarPosTransMom(0),
+   fTreeCascVarNegTransMom(0),
+   fTreeCascVarPosTransMomMC(0),
+   fTreeCascVarNegTransMomMC(0),
+   fTreeCascVarNegNSigmaPion(0),
+   fTreeCascVarNegNSigmaProton(0),
+   fTreeCascVarPosNSigmaPion(0),
+   fTreeCascVarPosNSigmaProton(0),
+   fTreeCascVarBachNSigmaPion(0),
+   fTreeCascVarBachNSigmaKaon(0),
 
 //------------------------------------------------
 // HISTOGRAMS
@@ -139,9 +183,53 @@ AliAnalysisTaskExtractPerformanceCascade::AliAnalysisTaskExtractPerformanceCasca
 AliAnalysisTaskExtractPerformanceCascade::AliAnalysisTaskExtractPerformanceCascade(const char *name) 
   : AliAnalysisTaskSE(name), fListHist(0), fTreeCascade(0), fPIDResponse(0), fESDtrackCuts(0),
    fkIsNuclear   ( kFALSE ), 
-   fkLowEnergyPP ( kFALSE ),
+   fkSwitchINT7  ( kFALSE ),
      
 //------------------------------------------------
+// Tree Variables
+//------------------------------------------------
+
+   fTreeCascVarCharge(0),
+   fTreeCascVarMassAsXi(0),
+   fTreeCascVarMassAsOmega(0),
+   fTreeCascVarPt(0),
+   fTreeCascVarPtMC(0),
+   fTreeCascVarRapMC(0),
+   fTreeCascVarRapXi(0),
+   fTreeCascVarRapOmega(0),
+   fTreeCascVarNegEta(0),
+   fTreeCascVarPosEta(0),
+   fTreeCascVarBachEta(0),
+   fTreeCascVarDCACascDaughters(0),
+   fTreeCascVarDCABachToPrimVtx(0),
+   fTreeCascVarDCAV0Daughters(0),
+   fTreeCascVarDCAV0ToPrimVtx(0),
+   fTreeCascVarDCAPosToPrimVtx(0),
+   fTreeCascVarDCANegToPrimVtx(0),
+   fTreeCascVarCascCosPointingAngle(0),
+   fTreeCascVarCascRadius(0),
+   fTreeCascVarV0Mass(0),
+   fTreeCascVarV0CosPointingAngle(0),
+   fTreeCascVarV0Radius(0),
+   fTreeCascVarLeastNbrClusters(0),
+   fTreeCascVarMultiplicity(0),
+   fTreeCascVarDistOverTotMom(0),
+   fTreeCascVarPID(0),
+   fTreeCascVarPIDBachelor(0),
+   fTreeCascVarPIDNegative(0),
+   fTreeCascVarPIDPositive(0),
+   fTreeCascVarPosTransMom(0),
+   fTreeCascVarNegTransMom(0),
+   fTreeCascVarPosTransMomMC(0),
+   fTreeCascVarNegTransMomMC(0),
+   fTreeCascVarNegNSigmaPion(0),
+   fTreeCascVarNegNSigmaProton(0),
+   fTreeCascVarPosNSigmaPion(0),
+   fTreeCascVarPosNSigmaProton(0),
+   fTreeCascVarBachNSigmaPion(0),
+   fTreeCascVarBachNSigmaKaon(0),
+
+//------------------------------------------------
 // HISTOGRAMS
 // --- Filled on an Event-by-event basis
 //------------------------------------------------
@@ -655,12 +743,9 @@ void AliAnalysisTaskExtractPerformanceCascade::UserExec(Option_t *)
    Bool_t isSelected = 0;
    isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
 
-   //pp at 2.76TeV: special case, ignore FastOnly
-   if ( (fkLowEnergyPP == kTRUE) && (maskIsSelected& AliVEvent::kFastOnly) ){
-        PostData(1, fListHist);
-        PostData(2, fTreeCascade);
-      return;
-   } 
+   //pA triggering: CINT7
+   if( fkSwitchINT7 ) isSelected = (maskIsSelected & AliVEvent::kINT7) == AliVEvent::kINT7;
+
    //Standard Min-Bias Selection
    if ( ! isSelected ) { 
         PostData(1, fListHist);
@@ -671,7 +756,7 @@ void AliAnalysisTaskExtractPerformanceCascade::UserExec(Option_t *)
 //------------------------------------------------
 // Rerun cascade vertexer! 
 //------------------------------------------------
-
+/*
   lESDevent->ResetCascades();
   lESDevent->ResetV0s();
 
@@ -683,7 +768,7 @@ void AliAnalysisTaskExtractPerformanceCascade::UserExec(Option_t *)
 
   lV0vtxer.Tracks2V0vertices(lESDevent);
   lCascVtxer.V0sTracks2CascadeVertices(lESDevent);
-
+*/
 //------------------------------------------------
 // After Trigger Selection
 //------------------------------------------------
index 83ba1fe..9ee2b77 100644 (file)
@@ -54,7 +54,7 @@ class AliAnalysisTaskExtractPerformanceCascade : public AliAnalysisTaskSE {
   Double_t MyRapidity(Double_t rE, Double_t rPz) const;
 
   void SetIsNuclear           (Bool_t lIsNuclear   = kTRUE ) { fkIsNuclear   = lIsNuclear;   }
-  void SetIsLowEnergyPP       (Bool_t lLowEnergyPP = kTRUE ) { fkLowEnergyPP = lLowEnergyPP; }
+  void SetINT7Trigger         (Bool_t lSwitchINT7  = kTRUE ) { fkSwitchINT7   = lSwitchINT7; }
   
  private:
         // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
@@ -71,7 +71,7 @@ class AliAnalysisTaskExtractPerformanceCascade : public AliAnalysisTaskSE {
   // (have to be streamed too or configuration is lost)
   
   Bool_t fkIsNuclear;   //if true, replace multiplicity est. by centrality (default FALSE) 
-  Bool_t fkLowEnergyPP; //if true, skip FASTOnly (default FALSE)
+  Bool_t fkSwitchINT7 ; //if true, skip FASTOnly (default FALSE)
 
        Double_t        fV0Sels[7];                     // Array to store the 7 values for the different selections V0 related
        Double_t        fCascSels[8];                   // Array to store the 8 values for the different selections Casc. related
@@ -114,7 +114,6 @@ class AliAnalysisTaskExtractPerformanceCascade : public AliAnalysisTaskSE {
   Float_t fTreeCascVarNegTransMom;   //!
   Float_t fTreeCascVarPosTransMomMC; //!
   Float_t fTreeCascVarNegTransMomMC; //!
-
   Float_t fTreeCascVarNegNSigmaPion;   //!
   Float_t fTreeCascVarNegNSigmaProton; //!
   Float_t fTreeCascVarPosNSigmaPion;   //! 
index 21d9538..0eaae68 100644 (file)
@@ -1,5 +1,5 @@
 AliAnalysisTaskExtractCascade *AddTaskExtractCascade( Bool_t lSwitchIsNuclear     = kFALSE, 
-                                                                  Bool_t lSwitchIsLowEnergyPP = kFALSE,
+                                                                  Bool_t lSwitchINT7 = kFALSE,
                                                                   const TString lMasterJobSessionFlag = "")
 {
 // Creates, configures and attaches to the train a cascades check task.
@@ -24,7 +24,7 @@ AliAnalysisTaskExtractCascade *AddTaskExtractCascade( Bool_t lSwitchIsNuclear
 
    //Configuration
    taskextract -> SetIsNuclear     ( lSwitchIsNuclear     );
-   taskextract -> SetIsLowEnergyPP ( lSwitchIsLowEnergyPP );
+   taskextract -> SetINT7Trigger   ( lSwitchINT7          );
 
    mgr->AddTask(taskextract);
 
index 33e9ce6..e040fdb 100644 (file)
@@ -1,5 +1,5 @@
 AliAnalysisTaskExtractPerformanceCascade *AddTaskExtractPerformanceCascade( Bool_t lSwitchIsNuclear     = kFALSE, 
-                                                                  Bool_t lSwitchIsLowEnergyPP = kFALSE,
+                                                                  Bool_t lSwitchINT7 = kFALSE,
                                                                   const TString lMasterJobSessionFlag = "")
 {
 // Creates, configures and attaches to the train a cascades check task.
@@ -24,7 +24,7 @@ AliAnalysisTaskExtractPerformanceCascade *AddTaskExtractPerformanceCascade( Bool
 
    //Configuration
    taskextractperformance -> SetIsNuclear     ( lSwitchIsNuclear     );
-   taskextractperformance -> SetIsLowEnergyPP ( lSwitchIsLowEnergyPP );
+   taskextractperformance -> SetINT7Trigger   ( lSwitchINT7          );
 
    mgr->AddTask(taskextractperformance);