name change Int/Diff RP/POI
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Mar 2009 12:05:04 +0000 (12:05 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Mar 2009 12:05:04 +0000 (12:05 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.h
PWG2/FLOW/AliFlowCommon/AliFlowTrackSimple.h
PWG2/FLOW/FlowEventMakers/FlowEventSimpleMaker.cxx
PWG2/FLOW/FlowEventMakers/FlowEventSimpleMaker.h

index fb34022..eb88514 100644 (file)
@@ -43,10 +43,10 @@ ClassImp(AliFlowEventSimple)
 AliFlowEventSimple::AliFlowEventSimple():
   fTrackCollection(NULL),
   fNumberOfTracks(0),
-  fEventNSelTracksIntFlow(0),
+  fEventNSelTracksRP(0),
   fMCReactionPlaneAngle(0.),
   fNumberOfTracksWrap(NULL),
-  fEventNSelTracksIntFlowWrap(NULL),
+  fEventNSelTracksRPWrap(NULL),
   fMCReactionPlaneAngleWrap(NULL)
 {
   cout << "AliFlowEventSimple: Default constructor to be used only by root for io" << endl;
@@ -57,10 +57,10 @@ AliFlowEventSimple::AliFlowEventSimple():
 AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght):
   fTrackCollection(NULL),
   fNumberOfTracks(0),
-  fEventNSelTracksIntFlow(0),
+  fEventNSelTracksRP(0),
   fMCReactionPlaneAngle(0.),
   fNumberOfTracksWrap(NULL),
-  fEventNSelTracksIntFlowWrap(NULL),
+  fEventNSelTracksRPWrap(NULL),
   fMCReactionPlaneAngleWrap(NULL)
 {
   //constructor 
@@ -73,10 +73,10 @@ AliFlowEventSimple::AliFlowEventSimple(const AliFlowEventSimple& anEvent):
   TObject(),
   fTrackCollection(anEvent.fTrackCollection),
   fNumberOfTracks(anEvent.fNumberOfTracks),
-  fEventNSelTracksIntFlow(anEvent.fEventNSelTracksIntFlow),
+  fEventNSelTracksRP(anEvent.fEventNSelTracksRP),
   fMCReactionPlaneAngle(anEvent.fMCReactionPlaneAngle),
   fNumberOfTracksWrap(anEvent.fNumberOfTracksWrap),
-  fEventNSelTracksIntFlowWrap(anEvent.fEventNSelTracksIntFlowWrap),
+  fEventNSelTracksRPWrap(anEvent.fEventNSelTracksRPWrap),
   fMCReactionPlaneAngleWrap(anEvent.fMCReactionPlaneAngleWrap)
 {
   //copy constructor 
@@ -88,10 +88,10 @@ AliFlowEventSimple& AliFlowEventSimple::operator=(const AliFlowEventSimple& anEv
 {
   *fTrackCollection = *anEvent.fTrackCollection ;
   fNumberOfTracks = anEvent.fNumberOfTracks;
-  fEventNSelTracksIntFlow = anEvent.fEventNSelTracksIntFlow;
+  fEventNSelTracksRP = anEvent.fEventNSelTracksRP;
   fMCReactionPlaneAngle = anEvent.fMCReactionPlaneAngle;
   fNumberOfTracksWrap = anEvent.fNumberOfTracksWrap; 
-  fEventNSelTracksIntFlowWrap = anEvent.fEventNSelTracksIntFlowWrap;
+  fEventNSelTracksRPWrap = anEvent.fEventNSelTracksRPWrap;
   fMCReactionPlaneAngleWrap=anEvent.fMCReactionPlaneAngleWrap;
 
   return *this;
@@ -104,7 +104,7 @@ AliFlowEventSimple::~AliFlowEventSimple()
   //destructor
   if (fTrackCollection) fTrackCollection->Delete(); delete fTrackCollection;
   if (fNumberOfTracksWrap) delete fNumberOfTracksWrap;
-  if (fEventNSelTracksIntFlowWrap) delete fEventNSelTracksIntFlowWrap;
+  if (fEventNSelTracksRPWrap) delete fEventNSelTracksRPWrap;
   if (fMCReactionPlaneAngleWrap) delete fMCReactionPlaneAngleWrap;
 }
 
@@ -189,7 +189,7 @@ AliFlowVector AliFlowEventSimple::GetQ(Int_t n, TList *weightsList, Bool_t usePh
    pTrack = (AliFlowTrackSimple*)TrackCollection()->At(i); 
    if(pTrack)
    {
-    if(pTrack->UseForIntegratedFlow()) 
+    if(pTrack->InRPSelection()) 
     {
      dPhi = pTrack->Phi();
      dPt  = pTrack->Pt();
@@ -227,7 +227,7 @@ AliFlowVector AliFlowEventSimple::GetQ(Int_t n, TList *weightsList, Bool_t usePh
      dSumOfWeightsToPower7+=pow(wPhi*wPt*wEta, 7); 
      dSumOfWeightsToPower8+=pow(wPhi*wPt*wEta, 8); 
      
-    } // end of if (pTrack->UseForIntegratedFlow())
+    } // end of if (pTrack->InRPSelection())
    } // end of if (pTrack)
    else {cerr << "no particle!!!"<<endl;}
   } // loop over particles
@@ -320,7 +320,7 @@ AliFlowVector AliFlowEventSimple::GetQsub(Double_t etaMin, Double_t etaMax, Int_
    pTrack = (AliFlowTrackSimple*)TrackCollection()->At(i); 
    if(pTrack)
    {
-    if(pTrack->UseForIntegratedFlow())
+    if(pTrack->InRPSelection())
     {
      dPhi = pTrack->Phi();
      dPt  = pTrack->Pt();
@@ -358,7 +358,7 @@ AliFlowVector AliFlowEventSimple::GetQsub(Double_t etaMin, Double_t etaMax, Int_
        dSumOfWeightsToPower7+=pow(wPhi*wPt*wEta, 7); 
        dSumOfWeightsToPower8+=pow(wPhi*wPt*wEta, 8); 
      } // end of if dEta in eta range
-    } // end of if (pTrack->UseForIntegratedFlow())
+    } // end of if (pTrack->InRPSelection())
    } // end of if (pTrack)
    else {cerr << "no particle!!!"<<endl;}
   } // loop over particles
@@ -385,7 +385,7 @@ void AliFlowEventSimple::Print(Option_t *option) const
   //             ===============================================
   //   printf( "TH1.Print Name  = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights());
   printf( "Class.Print Name = %s, Total number of tracks= %d, Number of selected tracks= %d, MC EventPlaneAngle= %f",
-         GetName(),fNumberOfTracks, fEventNSelTracksIntFlow, fMCReactionPlaneAngle );
+         GetName(),fNumberOfTracks, fEventNSelTracksRP, fMCReactionPlaneAngle );
 
   if (fTrackCollection) {  
     fTrackCollection->Print(option);
@@ -403,9 +403,9 @@ void AliFlowEventSimple::Print(Option_t *option) const
     fNumberOfTracksWrap = new TParameter<int>("fNumberOfTracks", fNumberOfTracks);
     b->Add(fNumberOfTracksWrap);
   }
-  if (!fEventNSelTracksIntFlowWrap) {
-    fEventNSelTracksIntFlowWrap = new TParameter<int>("fEventNSelTracksIntFlow", fEventNSelTracksIntFlow);
-    b->Add(fEventNSelTracksIntFlowWrap);
+  if (!fEventNSelTracksRPWrap) {
+    fEventNSelTracksRPWrap = new TParameter<int>("fEventNSelTracksRP", fEventNSelTracksRP);
+    b->Add(fEventNSelTracksRPWrap);
   }
   if (!fMCReactionPlaneAngleWrap) {
     fMCReactionPlaneAngleWrap = new TParameter<double>(" fMCReactionPlaneAngle",  fMCReactionPlaneAngle);
index 4964be2..de2f4b0 100644 (file)
@@ -38,11 +38,13 @@ class AliFlowEventSimple: public TObject {
   void Print(Option_t* option = "") const;      //method to print stats
   
   Int_t NumberOfTracks() const              { return this->fNumberOfTracks; }
-  void SetNumberOfTracks(Int_t nr)          { this->fNumberOfTracks = nr; }
-  Int_t GetEventNSelTracksIntFlow() const   { return this->fEventNSelTracksIntFlow; }
-  void SetEventNSelTracksIntFlow(Int_t nr)  { this->fEventNSelTracksIntFlow = nr; }
-  Double_t GetMCReactionPlaneAngle() const   { return this->fMCReactionPlaneAngle; }
-  void SetMCReactionPlaneAngle(Double_t fPhiRP)  { this->fMCReactionPlaneAngle = fPhiRP; }
+  void  SetNumberOfTracks(Int_t nr)         { this->fNumberOfTracks = nr; }
+  Int_t GetEventNSelTracksIntFlow() const   { return this->fEventNSelTracksRP; }
+  void  SetEventNSelTracksIntFlow(Int_t nr) { this->fEventNSelTracksRP = nr; }
+  Int_t GetEventNSelTracksRP() const        { return this->fEventNSelTracksRP; } //will replace GetEventNSelTracksIntFlow()
+  void  SetEventNSelTracksRP(Int_t nr)      { this->fEventNSelTracksRP = nr; }  //will replace SetEventNSelTracksIntFlow
+  Double_t GetMCReactionPlaneAngle() const  { return this->fMCReactionPlaneAngle; }
+  void  SetMCReactionPlaneAngle(Double_t fPhiRP)  { this->fMCReactionPlaneAngle = fPhiRP; }
  
   AliFlowTrackSimple* GetTrack(Int_t i);
   TObjArray* TrackCollection() const        { return this->fTrackCollection; }
@@ -54,12 +56,12 @@ class AliFlowEventSimple: public TObject {
  private:
   TObjArray*              fTrackCollection;        // collection of tracks
   Int_t                   fNumberOfTracks;         // number of tracks
-  Int_t                   fEventNSelTracksIntFlow; // number of tracks selected for integrated flow calculation
+  Int_t                   fEventNSelTracksRP;      // number of tracks that have passed the RP selection
   Double_t                fMCReactionPlaneAngle;   // the angle of the reaction plane from the MC truth
-  TParameter<Int_t>*      fNumberOfTracksWrap;         //! number of tracks in TBrowser
-  TParameter<Int_t>*      fEventNSelTracksIntFlowWrap; //! number of tracks selected for integrated flow calculation in TBrowser
+  TParameter<Int_t>*      fNumberOfTracksWrap;     //! number of tracks in TBrowser
+  TParameter<Int_t>*      fEventNSelTracksRPWrap;  //! number of tracks that have passed the RP selection in TBrowser
   TParameter<Double_t>*   fMCReactionPlaneAngleWrap;   //! the angle of the reaction plane from the MC truth in TBrowser
-  ClassDef(AliFlowEventSimple,1)                   // simplified event used in flow analysis 
+  ClassDef(AliFlowEventSimple,1)                       // simplified event used in flow analysis 
 };
 
 #endif
index a518a8e..d17528f 100644 (file)
@@ -30,12 +30,16 @@ class AliFlowTrackSimple: public TObject {
   TBits    GetFlowBits() const;
   Bool_t   UseForIntegratedFlow() const;
   Bool_t   UseForDifferentialFlow() const;
+  Bool_t   InRPSelection() const; //will replace UseForIntegratedFlow()
+  Bool_t   InPOISelection() const; //will replace UseForDifferentialFlow()
   
   void SetEta(Double_t eta);
   void SetPt(Double_t pt); 
   void SetPhi(Double_t phi);
   void SetForIntegratedFlow(Bool_t b);
   void SetForDifferentialFlow(Bool_t b);
+  void SetForRPSelection(Bool_t b); //will replace SetForIntegratedFlow
+  void SetForPOISelection(Bool_t b); //will replace SetForDifferentialFlow
   
  private:
   Double_t fEta;    // eta
@@ -61,6 +65,10 @@ inline Bool_t AliFlowTrackSimple::UseForIntegratedFlow() const {
   return this->fFlowBits.TestBitNumber(0); }
 inline Bool_t AliFlowTrackSimple::UseForDifferentialFlow() const { 
   return this->fFlowBits.TestBitNumber(1); }
+inline Bool_t AliFlowTrackSimple::InRPSelection() const { 
+  return this->fFlowBits.TestBitNumber(0); }
+inline Bool_t AliFlowTrackSimple::InPOISelection() const { 
+  return this->fFlowBits.TestBitNumber(1); }
 
 inline void AliFlowTrackSimple::SetEta(Double_t val) {
   fEta = val; }
@@ -69,9 +77,13 @@ inline void AliFlowTrackSimple::SetPt(Double_t val) {
   //  cout << "pt set to:" << fPt << endl;}
 inline void AliFlowTrackSimple::SetPhi(Double_t val) {
   fPhi = val; }
-inline void AliFlowTrackSimple::SetForIntegratedFlow(Bool_t val) {
+inline void AliFlowTrackSimple::SetForIntegratedFlow(Bool_t val) { //replace
+  fFlowBits.SetBitNumber(0,val); }
+inline void AliFlowTrackSimple::SetForDifferentialFlow(Bool_t val) { //replace
+  fFlowBits.SetBitNumber(1,val); }
+inline void AliFlowTrackSimple::SetForRPSelection(Bool_t val) {
   fFlowBits.SetBitNumber(0,val); }
-inline void AliFlowTrackSimple::SetForDifferentialFlow(Bool_t val) {
+inline void AliFlowTrackSimple::SetForPOISelection(Bool_t val) {
   fFlowBits.SetBitNumber(1,val); }
 #endif
 
index 7e91e78..41ccf6f 100644 (file)
@@ -43,33 +43,33 @@ FlowEventSimpleMaker::~FlowEventSimpleMaker()
 }
 
 //-----------------------------------------------------------------------   
-AliFlowEventSimple* FlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* intCuts, AliFlowTrackSimpleCuts* diffCuts)
+AliFlowEventSimple* FlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* RPCuts, AliFlowTrackSimpleCuts* POICuts)
 {
   //fills the event from a TTree of kinematic.root files
   
   // number of times to use the same particle (trick to introduce nonflow)
   Int_t iLoops = 1;
   
-  //flags for particles passing int. and diff. flow cuts
-  Bool_t bPassedIntFlowCuts  = kFALSE;
-  Bool_t bPassedDiffFlowCuts = kFALSE;
+  //flags for particles passing RP and POI cuts
+  Bool_t bPassedRPCuts  = kFALSE;
+  Bool_t bPassedPOICuts = kFALSE;
   
   //track cut values
-  Double_t dPtMaxInt  = intCuts->GetPtMax();
-  Double_t dPtMinInt  = intCuts->GetPtMin();
-  Double_t dEtaMaxInt = intCuts->GetEtaMax();
-  Double_t dEtaMinInt = intCuts->GetEtaMin();
-  Double_t dPhiMaxInt = intCuts->GetPhiMax();
-  Double_t dPhiMinInt = intCuts->GetPhiMin();
-  Int_t iPIDInt       = intCuts->GetPID();
+  Double_t dPtMaxRP  = RPCuts->GetPtMax();
+  Double_t dPtMinRP  = RPCuts->GetPtMin();
+  Double_t dEtaMaxRP = RPCuts->GetEtaMax();
+  Double_t dEtaMinRP = RPCuts->GetEtaMin();
+  Double_t dPhiMaxRP = RPCuts->GetPhiMax();
+  Double_t dPhiMinRP = RPCuts->GetPhiMin();
+  Int_t iPIDRP       = RPCuts->GetPID();
   
-  Double_t dPtMaxDiff  = diffCuts->GetPtMax();
-  Double_t dPtMinDiff  = diffCuts->GetPtMin();
-  Double_t dEtaMaxDiff = diffCuts->GetEtaMax();
-  Double_t dEtaMinDiff = diffCuts->GetEtaMin();
-  Double_t dPhiMaxDiff = diffCuts->GetPhiMax();
-  Double_t dPhiMinDiff = diffCuts->GetPhiMin();
-  Int_t iPIDDiff       = diffCuts->GetPID();
+  Double_t dPtMaxPOI  = POICuts->GetPtMax();
+  Double_t dPtMinPOI  = POICuts->GetPtMin();
+  Double_t dEtaMaxPOI = POICuts->GetEtaMax();
+  Double_t dEtaMinPOI = POICuts->GetEtaMin();
+  Double_t dPhiMaxPOI = POICuts->GetPhiMax();
+  Double_t dPhiMinPOI = POICuts->GetPhiMin();
+  Int_t iPIDPOI       = POICuts->GetPID();
   
   Int_t iNumberOfInputTracks = anInput->GetEntries() ;
   //cerr<<"iNumberOfInputTracks = "<<iNumberOfInputTracks<<endl;
@@ -86,27 +86,27 @@ AliFlowEventSimple* FlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrac
   
   Int_t iGoodTracks = 0;
   Int_t itrkN = 0;
-  Int_t iSelParticlesDiff = 0;
-  Int_t iSelParticlesInt = 0;
+  Int_t iSelParticlesPOI = 0;
+  Int_t iSelParticlesRP  = 0;
   
   while (itrkN < iNumberOfInputTracks) {
     anInput->GetEntry(itrkN);   //get input particle
     //checking the cuts for int. and diff. flow
-    if (pParticle->Pt() > dPtMinInt && pParticle->Pt() < dPtMaxInt &&
-       pParticle->Eta() > dEtaMinInt && pParticle->Eta() < dEtaMaxInt &&
-       pParticle->Phi() > dPhiMinInt && pParticle->Phi() < dPhiMaxInt &&
-       TMath::Abs(pParticle->GetPdgCode()) == iPIDInt) { 
-      bPassedIntFlowCuts = kTRUE; 
+    if (pParticle->Pt() > dPtMinRP && pParticle->Pt() < dPtMaxRP &&
+       pParticle->Eta() > dEtaMinRP && pParticle->Eta() < dEtaMaxRP &&
+       pParticle->Phi() > dPhiMinRP && pParticle->Phi() < dPhiMaxRP &&
+       TMath::Abs(pParticle->GetPdgCode()) == iPIDRP) { 
+      bPassedRPCuts = kTRUE; 
     } 
     
-    if (pParticle->Pt() > dPtMinDiff && pParticle->Pt() < dPtMaxDiff &&
-       pParticle->Eta() > dEtaMinDiff && pParticle->Eta() < dEtaMaxDiff &&
-       pParticle->Phi() > dPhiMinDiff && pParticle->Phi() < dPhiMaxDiff &&
-       TMath::Abs(pParticle->GetPdgCode()) == iPIDDiff){ 
-      bPassedDiffFlowCuts = kTRUE; 
+    if (pParticle->Pt() > dPtMinPOI && pParticle->Pt() < dPtMaxPOI &&
+       pParticle->Eta() > dEtaMinPOI && pParticle->Eta() < dEtaMaxPOI &&
+       pParticle->Phi() > dPhiMinPOI && pParticle->Phi() < dPhiMaxPOI &&
+       TMath::Abs(pParticle->GetPdgCode()) == iPIDPOI){ 
+      bPassedPOICuts = kTRUE; 
     }
     
-    if (bPassedIntFlowCuts || bPassedDiffFlowCuts) {
+    if (bPassedRPCuts || bPassedPOICuts) {
       for(Int_t d=0;d<iLoops;d++) {
        AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
        pTrack->SetPt(pParticle->Pt());
@@ -114,14 +114,15 @@ AliFlowEventSimple* FlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrac
        pTrack->SetPhi(pParticle->Phi());
        
        //marking the particles used for int. flow:
-       if(bPassedIntFlowCuts && iSelParticlesInt < iN*iLoops) {  
-         pTrack->SetForIntegratedFlow(kTRUE);
-         iSelParticlesInt++;
+       if(bPassedRPCuts && iSelParticlesRP < iN*iLoops) {  
+         //pTrack->SetForIntegratedFlow(kTRUE);
+         pTrack->SetForPRSelection(kTRUE);
+         iSelParticlesRP++;
        }
        //marking the particles used for diff. flow:
-       if(bPassedDiffFlowCuts) {
-         pTrack->SetForDifferentialFlow(kTRUE);
-         iSelParticlesDiff++;
+       if(bPassedPOICuts) {
+         pTrack->SetForPOISelection(kTRUE);
+         iSelParticlesPOI++;
        }
        //adding a particles which were used either for int. or diff. flow to the list
        pEvent->TrackCollection()->Add(pTrack);
@@ -129,16 +130,16 @@ AliFlowEventSimple* FlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrac
       }//end of for(Int_t d=0;d<iLoops;d++)
     }//end of if(bPassedIntFlowCuts || bPassedDiffFlowCuts) 
     itrkN++;  
-    bPassedIntFlowCuts  = kFALSE;
-    bPassedDiffFlowCuts = kFALSE;
+    bPassedRPCuts  = kFALSE;
+    bPassedPOICuts = kFALSE;
   }//end of while (itrkN < iNumberOfInputTracks)
   
-  pEvent->SetEventNSelTracksIntFlow(iSelParticlesInt);  
+  pEvent->SetEventNSelTracksRP(iSelParticlesRP);  
   pEvent->SetNumberOfTracks(iGoodTracks);//tracks used either for int. or for diff. flow
 
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
-  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout<<" # of selected tracks for RP  = "<<iSelParticlesRP<<endl;
+  cout<<" # of selected tracks for POI = "<<iSelParticlesPOI<<endl;  
 
   delete pParticle;
   return pEvent;
index 87bd44c..58189c0 100644 (file)
@@ -23,7 +23,7 @@ class FlowEventSimpleMaker {
   virtual  ~FlowEventSimpleMaker();   //destructor
   
   //TTree
-  AliFlowEventSimple* FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* intCuts, AliFlowTrackSimpleCuts* diffCuts);   //use own cut class
+  AliFlowEventSimple* FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* RPCuts, AliFlowTrackSimpleCuts* POICuts);   //use own cut class
     
  private:
   FlowEventSimpleMaker(const FlowEventSimpleMaker& anAnalysis);            //copy constructor