Additional cuts for leading particle alignment in event mixing. (Alessandro Grelli)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Oct 2009 09:05:59 +0000 (09:05 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Oct 2009 09:05:59 +0000 (09:05 +0000)
ANALYSIS/AliEventPoolOTF.cxx
ANALYSIS/AliEventPoolOTF.h
STEER/AliEventTagCuts.cxx
STEER/AliEventTagCuts.h

index 2f87e32..90d759b 100644 (file)
@@ -136,19 +136,26 @@ TChain* AliEventPoolOTF::GetNextChain()
     if (fNoMore) {
        return 0;
     } else {
-       printf("Current bin (lower) %13.3f %13.3f %13.3f \n", fValue[kMultiplicity], fValue[kZVertex], fValue[kEventPlane]);
-       printf("Current bin (upper) %13.3f %13.3f %13.3f \n", fValue[kMultiplicity] + fValueStep[kMultiplicity], 
-                                                             fValue[kZVertex]      + fValueStep[kZVertex], 
-                                                             fValue[kEventPlane]   + fValueStep[kEventPlane]);
-       
+    printf("Current bin (lower) %13.3f %13.3f %13.3f %13.3f %13.3f \n", fValue[kMultiplicity], fValue[kZVertex], fValue[kEventPlane],fValue[kLeadingParticleEta],fValue[kLeadingParticlePhi]);
+    printf("Current bin (upper) %13.3f %13.3f %13.3f %13.3f %13.3f \n", fValue[kMultiplicity] + fValueStep[kMultiplicity], 
+          fValue[kZVertex]      + fValueStep[kZVertex], 
+          fValue[kEventPlane]   + fValueStep[kEventPlane],
+          fValue[kLeadingParticleEta]   + fValueStep[kLeadingParticleEta],
+           fValue[kLeadingParticlePhi]   + fValueStep[kLeadingParticlePhi]
+    
+          );
+
        fEventCuts->SetMultiplicityRange(Int_t(fValue[kMultiplicity]) , Int_t(fValue[kMultiplicity] + fValueStep[kMultiplicity]));
        fEventCuts->SetPrimaryVertexZRange(fValue[kZVertex] , fValue[kZVertex] + fValueStep[kZVertex]);
-       fEventCuts->SetEventPlaneAngleRange(fValue[kEventPlane] , fValue[kEventPlane] + fValueStep[kEventPlane]);
+        fEventCuts->SetEtaLeadingParticleRange(fValue[kLeadingParticleEta] , fValue[kLeadingParticleEta] + fValueStep[kLeadingParticleEta]);
+        fEventCuts->SetPhiLeadingParticleRange(fValue[kLeadingParticlePhi] , fValue[kLeadingParticlePhi] + fValueStep[kLeadingParticlePhi]);
+        fEventCuts->SetEventPlaneAngleRange(fValue[kEventPlane] , fValue[kEventPlane] + fValueStep[kEventPlane]);
+    
        fChain = fTagAnalysis->QueryTags(fRunCuts, fLHCCuts, fDetectorCuts, fEventCuts);
 //
 //      Next bin 
 //
-       for (Int_t i = 2; i >= 0; i--) 
+       for (Int_t i = 5; i >= 0; i--) 
        {
            fValue[i] += fValueStep[i];
            if (i > 0  && fValue[i] >= fValueMax[i]) {
@@ -171,7 +178,7 @@ void  AliEventPoolOTF::GetCurrentBin(Float_t* /*bin*/)
 Int_t AliEventPoolOTF::GetDimension()
 {
     //
-    return (3);
+    return (5);
 }
 
 void AliEventPoolOTF::InitArrays()
@@ -181,7 +188,9 @@ void AliEventPoolOTF::InitArrays()
     SetMultiplicityBinning(0, 20000, 20000);
     SetZVertexBinning(-1000., 1000., 2000.);
     SetEventPlaneBinning(-1000., 1000., 2000.);
-    SetLeadingParticleEtaBinning(-1.0, 1.0, 2.);    
+    SetEventPlaneBinning(-1000., 1000., 2000.);
+    SetLeadingParticleEtaBinning(-13.0, 13.0, 26.); 
+    SetLeadingParticlePhiBinning(0, 2*(TMath::Pi()),2*(TMath::Pi()));   
     for (Int_t i = 0; i < 4; i++) fValue[i] = fValueMin[i];
 }
 
index 7d7dc86..702da78 100644 (file)
@@ -19,7 +19,7 @@ class AliEventTagCuts;
 class AliTagAnalysis;
 class TGridResult;
 
-typedef enum {kMultiplicity, kZVertex, kEventPlane, kLeadingParticleEta, kUser1, kUser2}  EventPoolAxis_t;
+typedef enum {kMultiplicity, kZVertex, kEventPlane, kLeadingParticleEta, kLeadingParticlePhi, kUser1, kUser2}  EventPoolAxis_t;
 
 class AliEventPoolOTF : public AliVEventPool
 {
@@ -44,6 +44,8 @@ class AliEventPoolOTF : public AliVEventPool
        {fValueMin[kEventPlane] = min; fValueMax[kEventPlane] = max; fValueStep[kEventPlane] = step;}
     virtual void  SetLeadingParticleEtaBinning(Float_t min, Float_t max, Float_t step)
        {fValueMin[kLeadingParticleEta] = min; fValueMax[kLeadingParticleEta] = max; fValueStep[kLeadingParticleEta] = step;}
+  virtual void  SetLeadingParticlePhiBinning(Float_t min, Float_t max, Float_t step)
+       {fValueMin[kLeadingParticlePhi] = min; fValueMax[kLeadingParticlePhi] = max; fValueStep[kLeadingParticlePhi] = step;}
 
     //
     void SetTagDirectory(const char* dirname) {fTagDirectory = dirname;};
@@ -66,10 +68,10 @@ class AliEventPoolOTF : public AliVEventPool
     const char*          fTagDirectory;  // Directory with local tag files
     // Common pool cuts
     // Multiplicity
-    Float_t              fValueMin[6];  // Minimum value
-    Float_t              fValueMax[6];  // Maximum value
-    Float_t              fValueStep[6]; // Step size
-    Float_t              fValue[6];     // Current value
+    Float_t              fValueMin[10];  // Minimum value
+    Float_t              fValueMax[10];  // Maximum value
+    Float_t              fValueStep[10]; // Step size
+    Float_t              fValue[10];     // Current value
     //
     Int_t                fBinNumber;    // Current bin number
     Bool_t               fNoMore;       // No more bins 
index 6bc771d..4d3da6f 100644 (file)
@@ -22,6 +22,7 @@
 class AliLog;
 class AliESD;
 
+#include "TMath.h"
 #include "AliEventTag.h"
 #include "AliEventTagCuts.h"
 
@@ -36,12 +37,14 @@ AliEventTagCuts::AliEventTagCuts() :
   fBunchCrossNumberMin(0), fBunchCrossNumberMax(0xFFFF), 
   fBunchCrossNumberFlag(kFALSE),
   fEventType(7), fEventTypeFlag(kFALSE),
-
   fNParticipantsMin(-1), fNParticipantsMax(10000),
   fNParticipantsFlag(kFALSE),
   fImpactParamMin(-1.0), fImpactParamMax(1000.0),
   fImpactParamFlag(kFALSE),
-
+  fEtaMin(-13.0), fEtaMax(13.0), 
+  fEtaFlag(kFALSE),
+  fPhiMin(0.), fPhiMax(2*(TMath::Pi())), 
+  fPhiFlag(kFALSE),
   fVxMin(-1000.0), fVxMax(1000.0), 
   fVxFlag(kFALSE),
   fVyMin(-1000.0), fVyMax(1000.0),  
@@ -187,6 +190,8 @@ void AliEventTagCuts::Reset() {
   fNParticipantsFlag = kFALSE;
   fImpactParamFlag = kFALSE;
 
+  fEtaFlag = kFALSE;
+  fPhiFlag = kFALSE;
   fVxFlag = kFALSE;
   fVyFlag = kFALSE;
   fVzFlag = kFALSE;
@@ -258,6 +263,8 @@ void AliEventTagCuts::Reset() {
 
   fEventType = 7;
 
+  fEtaMin = -13.0; fEtaMax = 13.0;
+  fPhiMin = 0.; fPhiMax = 2*(TMath::Pi());
   fVxMin = -1000.0; fVxMax = 1000.0; 
   fVyMin = -1000.0; fVyMax = 1000.0;  
   fVzMin = -1000.0; fVzMax = 1000.0;
@@ -415,6 +422,23 @@ void AliEventTagCuts::SetPrimaryVertexZRange(Float_t low, Float_t high) {
   fVzFlag = kTRUE;
 }
 
+//___________________________________________________________________________
+ void AliEventTagCuts::SetEtaLeadingParticleRange(Float_t low, Float_t high) {
+  //Sets the eta range of LP 
+  //and the corresponding flag to kTRUE if the cut is used.
+  fEtaMin = low;
+  fEtaMax = high; 
+  fEtaFlag = kTRUE;
+}
+//__________________________________________________________________________
+void AliEventTagCuts::SetPhiLeadingParticleRange(Float_t low, Float_t high) {
+  //Sets the eta range of LP 
+  //and the corresponding flag to kTRUE if the cut is used.
+  fPhiMin = low;
+  fPhiMax = high; 
+  fPhiFlag = kTRUE;
+} 
+
 //___________________________________________________________________________
 void AliEventTagCuts::SetPrimaryVertexZErrorRange(Float_t low, Float_t high) {
   //Sets the primary vertex z error range 
@@ -931,6 +955,14 @@ Bool_t AliEventTagCuts::IsAccepted(AliEventTag *EvTag) const {
       return kFALSE;
 
 
+ if(fEtaFlag)
+    if((EvTag->GetEtaMaxPt() < fEtaMin) || (EvTag->GetEtaMaxPt() > fEtaMax))
+      return kFALSE;
+
+  if(fPhiFlag)
+    if((EvTag->GetPhiMaxPt() < fPhiMin) || (EvTag->GetPhiMaxPt() > fPhiMax))
+      return kFALSE;
+
   if(fVzFlag)
     if((EvTag->GetVertexZ() < fVzMin) || (EvTag->GetVertexZ() > fVzMax))
       return kFALSE;
index f2f2fc3..9909c58 100644 (file)
@@ -33,6 +33,8 @@ class AliEventTagCuts : public TObject {
   void SetNParticipantsRange(Int_t low, Int_t high);
   void SetImpactParamRange(Float_t low, Float_t high);
 
+  void SetEtaLeadingParticleRange(Float_t low, Float_t high);
+  void SetPhiLeadingParticleRange(Float_t low, Float_t high);
   void SetPrimaryVertexXRange(Float_t low, Float_t high);
   void SetPrimaryVertexYRange(Float_t low, Float_t high);
   void SetPrimaryVertexZRange(Float_t low, Float_t high);
@@ -121,6 +123,11 @@ class AliEventTagCuts : public TObject {
   Float_t fImpactParamMin, fImpactParamMax;                   // Impact parameter range
   Bool_t fImpactParamFlag;                                    // Shows whether this cut is used or not
 
+  Float_t fEtaMin, fEtaMax;                                   // Definition of the range of the eta leading
+  Bool_t fEtaFlag;                                            // Shows whether this cut is used or not
+  Float_t fPhiMin, fPhiMax;                                   // Definition of the range of the phi leading
+  Bool_t fPhiFlag;                                            // Shows whether this cut is used or not  
+         
   Float_t fVxMin, fVxMax;                                     // Definition of the range of the Vx
   Bool_t fVxFlag;                                             // Shows whether this cut is used or not
   Float_t fVyMin, fVyMax;                                     // Definition of the range of the Vy