]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added first version of cut monitoring + style format applied
authorfbellini <fbellini@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 10 Dec 2011 11:05:37 +0000 (11:05 +0000)
committerfbellini <fbellini@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 10 Dec 2011 11:05:37 +0000 (11:05 +0000)
108 files changed:
PWG2/RESONANCES/AliRsnAnalysisTask.cxx
PWG2/RESONANCES/AliRsnAnalysisTask.h
PWG2/RESONANCES/AliRsnCut.cxx
PWG2/RESONANCES/AliRsnCut.h
PWG2/RESONANCES/AliRsnCutDaughterKStar2010PP.cxx
PWG2/RESONANCES/AliRsnCutDaughterKStar2010PP.h
PWG2/RESONANCES/AliRsnCutDaughterLStar2010.cxx
PWG2/RESONANCES/AliRsnCutDaughterLStar2010.h
PWG2/RESONANCES/AliRsnCutDaughterSigmaStar2010PP.cxx
PWG2/RESONANCES/AliRsnCutDaughterSigmaStar2010PP.h
PWG2/RESONANCES/AliRsnCutKaon.cxx
PWG2/RESONANCES/AliRsnCutKaon.h
PWG2/RESONANCES/AliRsnCutKaonForPhi2010.cxx
PWG2/RESONANCES/AliRsnCutKaonForPhi2010.h
PWG2/RESONANCES/AliRsnCutKaonForPhi2010PP.cxx
PWG2/RESONANCES/AliRsnCutKaonForPhi2010PP.h
PWG2/RESONANCES/AliRsnCutManager.cxx
PWG2/RESONANCES/AliRsnCutManager.h
PWG2/RESONANCES/AliRsnCutMiniPair.cxx
PWG2/RESONANCES/AliRsnCutMiniPair.h
PWG2/RESONANCES/AliRsnCutMomentumComparison.cxx
PWG2/RESONANCES/AliRsnCutMomentumComparison.h
PWG2/RESONANCES/AliRsnCutPID.cxx
PWG2/RESONANCES/AliRsnCutPID.h
PWG2/RESONANCES/AliRsnCutPIDITS.cxx
PWG2/RESONANCES/AliRsnCutPIDITS.h
PWG2/RESONANCES/AliRsnCutPIDNSigma.cxx
PWG2/RESONANCES/AliRsnCutPIDNSigma.h
PWG2/RESONANCES/AliRsnCutPIDTOF.cxx
PWG2/RESONANCES/AliRsnCutPIDTOF.h
PWG2/RESONANCES/AliRsnCutPIDTPC.cxx
PWG2/RESONANCES/AliRsnCutPIDTPC.h
PWG2/RESONANCES/AliRsnCutPion.cxx
PWG2/RESONANCES/AliRsnCutPion.h
PWG2/RESONANCES/AliRsnCutPion2010PP.cxx
PWG2/RESONANCES/AliRsnCutPion2010PP.h
PWG2/RESONANCES/AliRsnCutPrimaryVertex.cxx
PWG2/RESONANCES/AliRsnCutPrimaryVertex.h
PWG2/RESONANCES/AliRsnCutProton2010PP.cxx
PWG2/RESONANCES/AliRsnCutProton2010PP.h
PWG2/RESONANCES/AliRsnCutSet.cxx
PWG2/RESONANCES/AliRsnCutSet.h
PWG2/RESONANCES/AliRsnCutTrackQuality.cxx
PWG2/RESONANCES/AliRsnCutTrackQuality.h
PWG2/RESONANCES/AliRsnCutTrue.cxx
PWG2/RESONANCES/AliRsnCutTrue.h
PWG2/RESONANCES/AliRsnCutV0.cxx
PWG2/RESONANCES/AliRsnCutV0.h
PWG2/RESONANCES/AliRsnCutValue.cxx
PWG2/RESONANCES/AliRsnCutValue.h
PWG2/RESONANCES/AliRsnDaughter.cxx
PWG2/RESONANCES/AliRsnDaughter.h
PWG2/RESONANCES/AliRsnDaughterDef.cxx
PWG2/RESONANCES/AliRsnDaughterDef.h
PWG2/RESONANCES/AliRsnDaughterSelector.cxx
PWG2/RESONANCES/AliRsnDaughterSelector.h
PWG2/RESONANCES/AliRsnEvent.cxx
PWG2/RESONANCES/AliRsnEvent.h
PWG2/RESONANCES/AliRsnExpression.cxx
PWG2/RESONANCES/AliRsnExpression.h
PWG2/RESONANCES/AliRsnInputHandler.cxx
PWG2/RESONANCES/AliRsnInputHandler.h
PWG2/RESONANCES/AliRsnListOutput.cxx
PWG2/RESONANCES/AliRsnListOutput.h
PWG2/RESONANCES/AliRsnLoop.cxx
PWG2/RESONANCES/AliRsnLoop.h
PWG2/RESONANCES/AliRsnLoopDaughter.cxx
PWG2/RESONANCES/AliRsnLoopDaughter.h
PWG2/RESONANCES/AliRsnLoopEff.cxx
PWG2/RESONANCES/AliRsnLoopEff.h
PWG2/RESONANCES/AliRsnLoopEffPair.cxx
PWG2/RESONANCES/AliRsnLoopEffPair.h
PWG2/RESONANCES/AliRsnLoopEvent.cxx
PWG2/RESONANCES/AliRsnLoopEvent.h
PWG2/RESONANCES/AliRsnLoopPair.cxx
PWG2/RESONANCES/AliRsnLoopPair.h
PWG2/RESONANCES/AliRsnMiniAnalysisTask.cxx
PWG2/RESONANCES/AliRsnMiniAnalysisTask.h
PWG2/RESONANCES/AliRsnMiniAxis.h
PWG2/RESONANCES/AliRsnMiniEvent.cxx
PWG2/RESONANCES/AliRsnMiniEvent.h
PWG2/RESONANCES/AliRsnMiniMonitor.cxx
PWG2/RESONANCES/AliRsnMiniMonitor.h
PWG2/RESONANCES/AliRsnMiniMonitorTask.cxx
PWG2/RESONANCES/AliRsnMiniMonitorTask.h
PWG2/RESONANCES/AliRsnMiniOutput.cxx
PWG2/RESONANCES/AliRsnMiniOutput.h
PWG2/RESONANCES/AliRsnMiniPair.cxx
PWG2/RESONANCES/AliRsnMiniPair.h
PWG2/RESONANCES/AliRsnMiniParticle.cxx
PWG2/RESONANCES/AliRsnMiniParticle.h
PWG2/RESONANCES/AliRsnMiniValue.cxx
PWG2/RESONANCES/AliRsnMiniValue.h
PWG2/RESONANCES/AliRsnMother.cxx
PWG2/RESONANCES/AliRsnMother.h
PWG2/RESONANCES/AliRsnPairDef.cxx
PWG2/RESONANCES/AliRsnPairDef.h
PWG2/RESONANCES/AliRsnTarget.cxx
PWG2/RESONANCES/AliRsnTarget.h
PWG2/RESONANCES/AliRsnValue.cxx
PWG2/RESONANCES/AliRsnValue.h
PWG2/RESONANCES/AliRsnValueDaughter.cxx
PWG2/RESONANCES/AliRsnValueDaughter.h
PWG2/RESONANCES/AliRsnValueEvent.cxx
PWG2/RESONANCES/AliRsnValueEvent.h
PWG2/RESONANCES/AliRsnValuePair.cxx
PWG2/RESONANCES/AliRsnValuePair.h
PWG2/RESONANCES/AliRsnVariableExpression.h

index dc4c2ed73c3d623754369d4c4696c9a3bfc36711..a08718e6c5c15b299e72a5f57831d0ef5f3d2020 100644 (file)
@@ -48,7 +48,7 @@ AliRsnAnalysisTask::AliRsnAnalysisTask(const char *name) :
 }
 
 //__________________________________________________________________________________________________
-AliRsnAnalysisTask::AliRsnAnalysisTask(const AliRsnAnalysisTaskcopy) :
+AliRsnAnalysisTask::AliRsnAnalysisTask(const AliRsnAnalysisTask &copy) :
    AliAnalysisTaskSE(copy),
    fOutput(0),
    fRsnObjects(copy.fRsnObjects),
@@ -64,7 +64,7 @@ AliRsnAnalysisTask::AliRsnAnalysisTask(const AliRsnAnalysisTask& copy) :
 }
 
 //__________________________________________________________________________________________________
-AliRsnAnalysisTask& AliRsnAnalysisTask::operator=(const AliRsnAnalysisTask& copy)
+AliRsnAnalysisTask &AliRsnAnalysisTask::operator=(const AliRsnAnalysisTask &copy)
 {
 //
 // Assignment operator.
@@ -73,12 +73,12 @@ AliRsnAnalysisTask& AliRsnAnalysisTask::operator=(const AliRsnAnalysisTask& copy
 //
    AliAnalysisTaskSE::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fRsnObjects = copy.fRsnObjects;
    fInputEHMain = copy.fInputEHMain;
    fInputEHMix = copy.fInputEHMix;
    fBigOutput = copy.fBigOutput;
-   
+
    return (*this);
 }
 
@@ -86,7 +86,7 @@ AliRsnAnalysisTask& AliRsnAnalysisTask::operator=(const AliRsnAnalysisTask& copy
 AliRsnAnalysisTask::~AliRsnAnalysisTask()
 {
 //
-// Destructor. 
+// Destructor.
 // Clean-up the output list, but not the histograms that are put inside
 // (the list is owner and will clean-up these histograms). Protect in PROOF case.
 //
@@ -121,14 +121,31 @@ void AliRsnAnalysisTask::UserCreateOutputObjects()
    if (fBigOutput) OpenFile(1);
    fOutput = new TList();
    fOutput->SetOwner();
-   
+
    // loop on computators and initialize all their outputs
    TObjArrayIter next(&fRsnObjects);
-   AliRsnLoop *obj = 0x0;
-   while ( (obj = (AliRsnLoop*)next()) ) {
-      obj->Init(GetName(), fOutput);
+   AliRsnLoop *objLoop = 0x0;
+   while ( (objLoop = (AliRsnLoop *)next()) ) {
+      objLoop->Init(GetName(), fOutput);
    }
 
+   if (fInputEHMain) {
+      TObjArrayIter nextIH(fInputEHMain->InputEventHandlers());
+      TObject *obj = 0x0;
+      while ( (obj = nextIH()) ) {
+         if (obj->IsA() == AliRsnInputHandler::Class()) {
+            AliRsnInputHandler *rsnIH = (AliRsnInputHandler *) obj;
+            AliRsnDaughterSelector *s = rsnIH->GetSelector();
+            TClonesArray *c = s->GetCutSetC();
+            for (Int_t is = 0; is < c->GetEntries(); is++) {
+               AliRsnCutSet *cuts = (AliRsnCutSet *)c->At(is);
+               cuts->Init(fOutput);
+            }
+         }
+      }
+   }
+
+
    // post data for ALL output slots >0 here, to get at least an empty histogram
    PostData(1, fOutput);
 }
@@ -150,28 +167,28 @@ void AliRsnAnalysisTask::UserExec(Option_t *)
       TObject *obj = 0x0;
       while ( (obj = next()) ) {
          if (obj->IsA() == AliRsnInputHandler::Class()) {
-            rsnIH = (AliRsnInputHandler*)obj;
+            rsnIH = (AliRsnInputHandler *)obj;
             //AliInfo(Form("Found object '%s' which is RSN input handler", obj->GetName()));
             evMain = rsnIH->GetRsnEvent();
             break;
          }
       }
    }
-   
+
    if (!evMain) return;
 
    TObjArrayIter next(&fRsnObjects);
    AliRsnLoop *obj = 0x0;
-   while ( (obj = (AliRsnLoop*)next()) ) {
+   while ( (obj = (AliRsnLoop *)next()) ) {
       if (obj->IsMixed()) continue;
       obj->DoLoop(evMain, rsnIH->GetSelector());
    }
-   
+
    PostData(1, fOutput);
 }
 
 //__________________________________________________________________________________________________
-void AliRsnAnalysisTask::UserExecMix(Option_t*)
+void AliRsnAnalysisTask::UserExecMix(Option_t *)
 {
 //
 // Main loop for event-mixing computations
@@ -189,7 +206,7 @@ void AliRsnAnalysisTask::UserExecMix(Option_t*)
       TObject *obj = 0x0;
       while ( (obj = next()) ) {
          if (obj->IsA() == AliRsnInputHandler::Class()) {
-            rsnIH = (AliRsnInputHandler*)obj;
+            rsnIH = (AliRsnInputHandler *)obj;
             //AliInfo(Form("Found object '%s' which is RSN input handler", obj->GetName()));
             evMain = rsnIH->GetRsnEvent();
             id = fInputEHMain->InputEventHandlers()->IndexOf(obj);
@@ -197,26 +214,26 @@ void AliRsnAnalysisTask::UserExecMix(Option_t*)
          }
       }
    }
-   
+
    if (!evMain) return;
 
    // gets first input handler form mixing buffer
-   AliMultiInputEventHandler *ihMultiMix = dynamic_cast<AliMultiInputEventHandler*>(fInputEHMix->InputEventHandler(0));
+   AliMultiInputEventHandler *ihMultiMix = dynamic_cast<AliMultiInputEventHandler *>(fInputEHMix->InputEventHandler(0));
    if (ihMultiMix) {
-      rsnMixIH = dynamic_cast<AliRsnInputHandler*>(ihMultiMix->InputEventHandler(id));
+      rsnMixIH = dynamic_cast<AliRsnInputHandler *>(ihMultiMix->InputEventHandler(id));
       if (rsnMixIH) {
          evMix = rsnMixIH->GetRsnEvent();
          if (!evMix) return;
 
          TObjArrayIter next(&fRsnObjects);
          AliRsnLoop *obj = 0x0;
-         while ( (obj = (AliRsnLoop*)next()) ) {
+         while ( (obj = (AliRsnLoop *)next()) ) {
             if (!obj->IsMixed()) continue;
             obj->DoLoop(evMain, rsnIH->GetSelector(), evMix, rsnMixIH->GetSelector());
          }
       }
    }
-   
+
    PostData(1, fOutput);
 }
 
@@ -228,7 +245,7 @@ void AliRsnAnalysisTask::Terminate(Option_t *)
 // Called once at the end of the query
 //
 
-   fOutput = dynamic_cast<TList*>(GetOutputData(1));
+   fOutput = dynamic_cast<TList *>(GetOutputData(1));
    if (!fOutput) { AliError("Could not retrieve TList fOutput"); return; }
 }
 
index cc2b5552def939665642fc338acdc7b5134ccdf2..4e02ed44ecfc7656167c86f7127ad6f45b1abf47 100644 (file)
@@ -18,21 +18,21 @@ public:
 
    AliRsnAnalysisTask();
    AliRsnAnalysisTask(const char *name);
-   AliRsnAnalysisTask(const AliRsnAnalysisTask&);
-   AliRsnAnalysisTask& operator=(const AliRsnAnalysisTask&);
+   AliRsnAnalysisTask(const AliRsnAnalysisTask &);
+   AliRsnAnalysisTask &operator=(const AliRsnAnalysisTask &);
    virtual ~AliRsnAnalysisTask();
 
    virtual void     UserCreateOutputObjects();
    virtual void     UserExec(Option_t *option);
-   virtual void     UserExecMix(Option_t*);
+   virtual void     UserExecMix(Option_t *);
    virtual void     Terminate(Option_t *);
-   
+
    void             AddLoop(AliRsnLoop *object);
    void             InitInputHandlers();
 
    void             UseBigOutput(Bool_t b=kTRUE) { fBigOutput = b; }
    Bool_t           IsBigOutput() { return fBigOutput; }
-   
+
 private:
 
    TList                      *fOutput;        //  output list
index 692edb5aa6b476418f10353047e8ea2d6d0be36b..464e092b13acfc1c761394ffdc15f9e583c65d60 100644 (file)
@@ -70,7 +70,7 @@ AliRsnCut::AliRsnCut
 }
 
 //______________________________________________________________________________
-AliRsnCut::AliRsnCut(const AliRsnCutcopy) :
+AliRsnCut::AliRsnCut(const AliRsnCut &copy) :
    AliRsnTarget(copy),
    fMinI(copy.fMinI),
    fMaxI(copy.fMaxI),
@@ -87,16 +87,16 @@ AliRsnCut::AliRsnCut(const AliRsnCut& copy) :
 }
 
 //______________________________________________________________________________
-AliRsnCut& AliRsnCut::operator=(const AliRsnCut& copy)
+AliRsnCut &AliRsnCut::operator=(const AliRsnCut &copy)
 {
 //
 // Assignment operator.
 // Don't duplicate memory occupancy for pointer
 //
 
-  AliRsnTarget::operator=(copy);
+   AliRsnTarget::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
 
    fMinI      = copy.fMinI;
    fMaxI      = copy.fMaxI;
@@ -210,7 +210,7 @@ Bool_t AliRsnCut::OkRangeD()
 }
 
 //______________________________________________________________________________
-void AliRsnCut::Print(Option_t*) const
+void AliRsnCut::Print(Option_t *) const
 {
 //
 // Override TObject::Print() method,
index 1c42a478bbaa30a402eb9efffdb88f4bdf17454f..b6c91ec48c94883956ecf187bcf14734ebb91e64 100644 (file)
@@ -26,8 +26,8 @@ public:
    AliRsnCut(const char *name = "dummy", RSNTARGET target = AliRsnTarget::kTargetTypes);
    AliRsnCut(const char *name, RSNTARGET target, Int_t    imin, Int_t    imax = 0 , Double_t dmin = 0., Double_t dmax = 0.);
    AliRsnCut(const char *name, RSNTARGET target, Double_t dmin, Double_t dmax = 0., Int_t    imin = 0 , Int_t    imax = 0);
-   AliRsnCut(const AliRsnCutcopy);
-   AliRsnCut& operator=(const AliRsnCut& copy);
+   AliRsnCut(const AliRsnCut &copy);
+   AliRsnCut &operator=(const AliRsnCut &copy);
    virtual ~AliRsnCut() { };
 
    Int_t            GetMinI()      const {return fMinI;}
index 2c9ec05d72efc82f14324e2bf009ce5dd6fe3da4..2ac8ffcc29cf9dcc78ce0678aae95acda81ca27a 100644 (file)
@@ -48,29 +48,29 @@ Bool_t AliRsnCutDaughterKStar2010PP::IsSelected(TObject *obj)
 
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
-   AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
    if (!track) return kFALSE;
-   
+
    // check flags
    if ((track->GetStatus() & AliESDtrack::kTPCin   ) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
-   
+
    // quality
    if (!fCutQuality.IsSelected(obj)) return kFALSE;
-   
+
    // if no PID is required, accept
    if (fNoPID) return kTRUE;
-   
+
    // check initialization of PID object
    AliPIDResponse *pid = fEvent->GetPIDResponse();
    if (!pid) {
       AliFatal("NULL PID response");
       return kFALSE;
    }
-   
+
    // check if TOF is matched
    // and computes all values used in the PID cut
    Bool_t   isTOF  = MatchTOF(track);
@@ -80,7 +80,7 @@ Bool_t AliRsnCutDaughterKStar2010PP::IsSelected(TObject *obj)
    Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
    Double_t maxTPC = 1E20;
    Double_t maxTOF = 1E20;
-   
+
    // applies the cut differently depending on the PID and the momentum
    if (isTOF) {
       // TPC: 5sigma cut for all
@@ -89,18 +89,18 @@ Bool_t AliRsnCutDaughterKStar2010PP::IsSelected(TObject *obj)
       if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
       return (nsTOF <= maxTOF);
    } else {
-      // TPC: 
+      // TPC:
       // all   below   350         MeV: 5sigma
       // all   between 350 and 500 MeV: 3sigma
       // pions above   500         MeV: 2sigma
       // kaons between 500 and 700 MeV: 2sigma
       // kaons above   700         MeV: rejected
-      if (pTPC <= 0.35) 
+      if (pTPC <= 0.35)
          maxTPC = 5.0;
       else if (pTPC > 0.35 && pTPC <= 0.5)
          maxTPC = 3.0;
-      else {  
-         if (fPID == AliPID::kPion) 
+      else {
+         if (fPID == AliPID::kPion)
             maxTPC = 2.0;
          else if (fPID == AliPID::kKaon) {
             if (pTPC <= 0.7)
index b9c7f1b366014e5d2334f6b0f5a2ab1e8bc45340..2737c6d187be2f0d1b512e172b682e8cb647d328 100644 (file)
@@ -18,9 +18,9 @@ public:
 
    AliRsnCutDaughterKStar2010PP(const char *name = "", AliPID::EParticleType pid = AliPID::kPion);
    virtual ~AliRsnCutDaughterKStar2010PP() { }
-   
+
    void                   SetNoPID(Bool_t yn = kTRUE)        {fNoPID = yn;}
-   
+
    void                   SetPID(AliPID::EParticleType type) {fPID = type;}
    AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
    Bool_t                 MatchTOF(const AliVTrack *vtrack);
@@ -29,7 +29,7 @@ public:
 private:
 
    Bool_t                fNoPID;            // flag to switch off PID check
-   
+
    AliPID::EParticleType fPID;              // PID for track
    AliRsnCutTrackQuality fCutQuality;       // track quality cut
 
index a43681ef4861f33e51ebc8ddad37faa0b181fe15..cac3302fc218294c1a68650245b0b82c98d8246a 100644 (file)
@@ -47,29 +47,29 @@ Bool_t AliRsnCutDaughterLStar2010::IsSelected(TObject *obj)
 
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
    AliVTrack *track = fDaughter->Ref2Vtrack();
    if (!track) {
       if (!fDaughter->GetRef()) AliWarning("NULL ref");
       return kFALSE;
    }
-   
+
    // check flags
    if ((track->GetStatus() & AliESDtrack::kTPCin   ) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
-   
+
    // quality
    if (!fCutQuality.IsSelected(obj)) return kFALSE;
-   
+
    // check initialization of PID object
    AliPIDResponse *pid = fEvent->GetPIDResponse();
    if (!pid) {
       AliFatal("NULL PID response");
       return kFALSE;
    }
-   
+
    // check if TOF is matched
    // and computes all values used in the PID cut
    Bool_t   isTOF  = MatchTOF(track);
@@ -79,7 +79,7 @@ Bool_t AliRsnCutDaughterLStar2010::IsSelected(TObject *obj)
    Double_t nsTOF  = TMath::Abs(pid->NumberOfSigmasTOF(track, fPID));
    Double_t maxTPC = 1E20;
    Double_t maxTOF = 1E20;
-   
+
    // applies the cut differently depending on the PID and the momentum
    if (isTOF) {
       // TPC: 5sigma cut for all
@@ -88,14 +88,14 @@ Bool_t AliRsnCutDaughterLStar2010::IsSelected(TObject *obj)
       if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
       return (nsTOF <= maxTOF);
    } else {
-      // TPC: 
+      // TPC:
       // below 350 MeV: 5sigma
       // between 350 and 500 MeV: 3sigma
       // pions above 500 MeV: 2sigma
       // kaons between 500 and 700 MeV: 2sigma
       // kaons above 700 MeV: rejected
       // protons above 1200 MeV: rejected
-     if (pTPC <= 0.35) 
+      if (pTPC <= 0.35)
          maxTPC = 5.0;
       else if (pTPC <= 0.5)
          maxTPC = 3.0;
index 2e7cc3828137fbdb7d2885109424c7de5a2ce1a1..48a074c35344d734d69d55b10e9fa2695916cf29 100644 (file)
@@ -18,7 +18,7 @@ public:
 
    AliRsnCutDaughterLStar2010(const char *name = "", AliPID::EParticleType pid = AliPID::kKaon);
    virtual ~AliRsnCutDaughterLStar2010() { }
-   
+
    void                   SetPID(AliPID::EParticleType type) {fPID = type;}
    AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
    Bool_t                 MatchTOF(const AliVTrack *vtrack);
index 3933d10353ac57f723ea33e36e81af36698b59b5..8a1b0d91867a5ae6c25a3fcc9d078a222f731ca5 100644 (file)
@@ -48,29 +48,29 @@ Bool_t AliRsnCutDaughterSigmaStar2010PP::IsSelected(TObject *obj)
 
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
    AliVTrack *track = fDaughter->Ref2Vtrack();
    if (!track) {
       if (!fDaughter->GetRef()) AliWarning("NULL ref");
       return kFALSE;
    }
-   
+
    // check flags
    if ((track->GetStatus() & AliESDtrack::kTPCin   ) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
-   
+
    // quality
    if (!fCutQuality.IsSelected(obj)) return kFALSE;
-   
+
    // check initialization of PID object
    AliPIDResponse *pid = fEvent->GetPIDResponse();
    if (!pid) {
       AliFatal("NULL PID response");
       return kFALSE;
    }
-   
+
    // check if TOF is matched
    // and computes all values used in the PID cut
    //Bool_t   isTOF  = MatchTOF(track);
@@ -80,37 +80,37 @@ Bool_t AliRsnCutDaughterSigmaStar2010PP::IsSelected(TObject *obj)
    //Double_t nsTOF  = TMath::Abs(pid->NumberOfSigmasTOF(track, fPID));
    //*Double_t maxTPC = 1E20;
    //Double_t maxTOF = 1E20;
-   
+
    // applies the cut differently depending on the PID and the momentum
    //if (isTOF) {
-      // TPC: 5sigma cut for all
-      //if (nsTPC > 5.0) return kFALSE;
-      // TOF: 3sigma below 1.5 GeV, 2sigma above
-      //if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
-      //return (nsTOF <= maxTOF);
+   // TPC: 5sigma cut for all
+   //if (nsTPC > 5.0) return kFALSE;
+   // TOF: 3sigma below 1.5 GeV, 2sigma above
+   //if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
+   //return (nsTOF <= maxTOF);
    //} else {
-   
+
    //For the moment TOF is not used - PID ONLY WITH TPC - 3 sigmas in the whole range
-   
-      // TPC: 
-      // below 350 MeV: 5sigma
-      // between 350 and 500 MeV: 3sigma
-      // pions above 500 MeV: 2sigma
-      // kaons between 500 and 700 MeV: 2sigma
-      // kaons above 700 MeV: rejected
-      /*if (pTPC <= 0.35) 
-         maxTPC = 5.0;
-      else if (pTPC <= 0.5)
-         maxTPC = 3.0;
-      else if (pTPC > 0.5 && fPID == AliPID::kPion)
-         maxTPC = 2.0;
-      else if (pTPC > 0.5 && pTPC <= 0.7 && fPID == AliPID::kKaon)
-         maxTPC = 2.0;
-      else
-         return kFALSE;*/
-       //* maxTPC = 3.0;
-      //*return (nsTPC <= maxTPC);
-      
+
+   // TPC:
+   // below 350 MeV: 5sigma
+   // between 350 and 500 MeV: 3sigma
+   // pions above 500 MeV: 2sigma
+   // kaons between 500 and 700 MeV: 2sigma
+   // kaons above 700 MeV: rejected
+   /*if (pTPC <= 0.35)
+      maxTPC = 5.0;
+   else if (pTPC <= 0.5)
+      maxTPC = 3.0;
+   else if (pTPC > 0.5 && fPID == AliPID::kPion)
+      maxTPC = 2.0;
+   else if (pTPC > 0.5 && pTPC <= 0.7 && fPID == AliPID::kKaon)
+      maxTPC = 2.0;
+   else
+      return kFALSE;*/
+   //* maxTPC = 3.0;
+   //*return (nsTPC <= maxTPC);
+
    AliDebugClass(2, "Good Pion (hallelujah)");
    return kTRUE;
-   }
+}
index f10c70dba5a71779159d19dee99de4beed7507a3..5599bdcf235475f1b2241ee162e048fe569f72d3 100644 (file)
@@ -18,7 +18,7 @@ public:
 
    AliRsnCutDaughterSigmaStar2010PP(const char *name = "", AliPID::EParticleType pid = AliPID::kPion);
    virtual ~AliRsnCutDaughterSigmaStar2010PP() { }
-   
+
    void                   SetPID(AliPID::EParticleType type) {fPID = type;}
    AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
    Bool_t                 MatchTOF(const AliVTrack *vtrack);
index d1bb630d75b6fb4483d20ed01a7fc311babf825c..b43cddf32762a27213d1f524740e617f94c54c87 100644 (file)
 
 ClassImp(AliRsnCutKaon)
 
-const char* AliRsnCutKaon::fgkCutName[AliRsnCutKaon::kNkaonCuts]={
-  "kQuality_Std2010",
-  "kTOFMatch_Std2010",
-  "kFastTPCpid_Nsigma",
-  "kFastTPCpid_1point5sigma",
-  "kFastTPCpid_2sigma",
-  "kFastTPCpid_3sigma",
-  "kFastTOFpid_Nsigma",
-  "kFastTOFpid_1point5sigma",
-  "kFastTOFpid_2sigma",
-  "kFastTOFpid_3sigma",
-  "kTPCTOFpid_DefaultKstarPP2010" 
+const char *AliRsnCutKaon::fgkCutName[AliRsnCutKaon::kNkaonCuts]= {
+   "kQuality_Std2010",
+   "kTOFMatch_Std2010",
+   "kFastTPCpid_Nsigma",
+   "kFastTPCpid_1point5sigma",
+   "kFastTPCpid_2sigma",
+   "kFastTPCpid_3sigma",
+   "kFastTOFpid_Nsigma",
+   "kFastTOFpid_1point5sigma",
+   "kFastTOFpid_2sigma",
+   "kFastTOFpid_3sigma",
+   "kTPCTOFpid_DefaultKstarPP2010"
 };
 
 //__________________________________________________________________________________________________
 AliRsnCutKaon::AliRsnCutKaon(const char *name, AliRsnCutKaon::ERsnKaonCut cutID, AliPID::EParticleType pid) :
-  AliRsnCut(name, AliRsnTarget::kDaughter),
-  fNoPID(kFALSE),
-  fPID(pid),
-  fCutQuality(Form("%sQuality", name)),
-  fAppliedCutID(cutID),
-  fNsigmaCutTPC(1E6),
-  fNsigmaCutTOF(1E6)
+   AliRsnCut(name, AliRsnTarget::kDaughter),
+   fNoPID(kFALSE),
+   fPID(pid),
+   fCutQuality(Form("%sQuality", name)),
+   fAppliedCutID(cutID),
+   fNsigmaCutTPC(1E6),
+   fNsigmaCutTOF(1E6)
 {
-  //
-  // Constructor
-  // Initialize track quality cuts to 2010 defaults
-  //
-  fCutQuality.SetPtRange(0.15, 1E+20);
-  fCutQuality.SetEtaRange(-0.8, 0.8);
-  fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01");
-  fCutQuality.SetDCAZmax(2.0);
-  fCutQuality.SetSPDminNClusters(1);
-  fCutQuality.SetITSminNClusters(0);
-  fCutQuality.SetITSmaxChi2(1E+20);
-  fCutQuality.SetTPCminNClusters(70);
-  fCutQuality.SetTPCmaxChi2(4.0);
-  fCutQuality.SetRejectKinkDaughters();
-  fCutQuality.SetAODTestFilterBit(5);
-  AliInfo(Form("Applied cut on kaon candidate: %s", AliRsnCutKaon::fgkCutName[fAppliedCutID]));
+   //
+   // Constructor
+   // Initialize track quality cuts to 2010 defaults
+   //
+   fCutQuality.SetPtRange(0.15, 1E+20);
+   fCutQuality.SetEtaRange(-0.8, 0.8);
+   fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01");
+   fCutQuality.SetDCAZmax(2.0);
+   fCutQuality.SetSPDminNClusters(1);
+   fCutQuality.SetITSminNClusters(0);
+   fCutQuality.SetITSmaxChi2(1E+20);
+   fCutQuality.SetTPCminNClusters(70);
+   fCutQuality.SetTPCmaxChi2(4.0);
+   fCutQuality.SetRejectKinkDaughters();
+   fCutQuality.SetAODTestFilterBit(5);
+   AliInfo(Form("Applied cut on kaon candidate: %s", AliRsnCutKaon::fgkCutName[fAppliedCutID]));
 }
 
 //__________________________________________________________________________________________________
@@ -80,109 +80,109 @@ Bool_t AliRsnCutKaon::IsSelected(TObject *obj)
 //
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
-   AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
    if (!track) return kFALSE;
-  
+
    Bool_t isSelected=kFALSE;
    switch (fAppliedCutID)
-     {
-     case    AliRsnCutKaon::kQualityStd2010:
-       isSelected=IsSelectedByQualityStd2010(obj, 1, 1, 1);
-       break;
-     
-     case    AliRsnCutKaon::kTOFMatchStd2010:
-       isSelected=IsSelectedByTOFMatchStd2010(obj);
-       break;
-     
-     case    AliRsnCutKaon::kFastTPCpidNsigma:
-       isSelected=IsSelectedByFastTPCpidNsigma(obj,fNsigmaCutTPC);
-       break;
-     
-     case    AliRsnCutKaon::kFastTPCpid1point5sigma:
-       isSelected=IsSelectedByFastTPCpid1point5sigma(obj);
-        break;
-     
-     case    AliRsnCutKaon::kFastTPCpid2sigma:
-       isSelected=IsSelectedByFastTPCpid2sigma(obj);
-       break;
-       
-     case    AliRsnCutKaon::kFastTPCpid3sigma:
-       isSelected=IsSelectedByFastTPCpid3sigma(obj);
-       break;
-       
-     case    AliRsnCutKaon::kFastTOFpidNsigma:
-       isSelected=IsSelectedByFastTOFpidNsigma(obj,fNsigmaCutTOF);
-       break;
-       
-     case    AliRsnCutKaon::kFastTOFpid1point5sigma:
-       isSelected=IsSelectedByFastTOFpid1point5sigma(obj);
-       break;
-       
-     case    AliRsnCutKaon::kFastTOFpid2sigma:
-       isSelected=IsSelectedByFastTOFpid2sigma(obj);
-       break;
-     
-     case    AliRsnCutKaon::kFastTOFpid3sigma:
-       isSelected=IsSelectedByFastTOFpid3sigma(obj);
-       break;
-       
-     case    AliRsnCutKaon::kTPCTOFpidDefaultKstarPP2010:
-       isSelected=IsSelectedByTPCTOFpidDefaultKstarPP2010(obj);
-       break;
-       
-     default :
-       break;
-     }
-   
+   {
+      case    AliRsnCutKaon::kQualityStd2010:
+         isSelected=IsSelectedByQualityStd2010(obj, 1, 1, 1);
+         break;
+
+      case    AliRsnCutKaon::kTOFMatchStd2010:
+         isSelected=IsSelectedByTOFMatchStd2010(obj);
+         break;
+
+      case    AliRsnCutKaon::kFastTPCpidNsigma:
+         isSelected=IsSelectedByFastTPCpidNsigma(obj,fNsigmaCutTPC);
+         break;
+
+      case    AliRsnCutKaon::kFastTPCpid1point5sigma:
+         isSelected=IsSelectedByFastTPCpid1point5sigma(obj);
+         break;
+
+      case    AliRsnCutKaon::kFastTPCpid2sigma:
+         isSelected=IsSelectedByFastTPCpid2sigma(obj);
+         break;
+
+      case    AliRsnCutKaon::kFastTPCpid3sigma:
+         isSelected=IsSelectedByFastTPCpid3sigma(obj);
+         break;
+
+      case    AliRsnCutKaon::kFastTOFpidNsigma:
+         isSelected=IsSelectedByFastTOFpidNsigma(obj,fNsigmaCutTOF);
+         break;
+
+      case    AliRsnCutKaon::kFastTOFpid1point5sigma:
+         isSelected=IsSelectedByFastTOFpid1point5sigma(obj);
+         break;
+
+      case    AliRsnCutKaon::kFastTOFpid2sigma:
+         isSelected=IsSelectedByFastTOFpid2sigma(obj);
+         break;
+
+      case    AliRsnCutKaon::kFastTOFpid3sigma:
+         isSelected=IsSelectedByFastTOFpid3sigma(obj);
+         break;
+
+      case    AliRsnCutKaon::kTPCTOFpidDefaultKstarPP2010:
+         isSelected=IsSelectedByTPCTOFpidDefaultKstarPP2010(obj);
+         break;
+
+      default :
+         break;
+   }
+
    return isSelected;
 }
 
 //-----------------------------------------------------------
 Bool_t AliRsnCutKaon::IsSelectedByQualityStd2010(TObject *obj, Bool_t requireTPCin=kTRUE, Bool_t requireTPCrefit=kTRUE,  Bool_t requireITSrefit=kTRUE)
 {
-  //Checks if track passes the standard quality cuts
-  //defined for analysis in 2010 pp and PbPb data
-  
-  if (!obj) {
-    AliError("Invalid track object passed to function. Please check!");
-    return kFALSE;
-  }
-  
-  fAppliedCutID= AliRsnCutKaon::kQualityStd2010;
-   AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
+   //Checks if track passes the standard quality cuts
+   //defined for analysis in 2010 pp and PbPb data
+
+   if (!obj) {
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
+   }
+
+   fAppliedCutID= AliRsnCutKaon::kQualityStd2010;
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
    if (!track) return kFALSE;
-  
-  //optionally check refit flags (to be used for Phi and kStar analysis)
-  if (requireTPCin && ((track->GetStatus() & AliESDtrack::kTPCin) == 0) ) return kFALSE;
-  if (requireTPCrefit && ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) ) return kFALSE;
-  if (requireITSrefit && ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) ) return kFALSE;
-  
-  // quality
-  if (!fCutQuality.IsSelected(obj)) return kFALSE;
-  return kTRUE;
+
+   //optionally check refit flags (to be used for Phi and kStar analysis)
+   if (requireTPCin && ((track->GetStatus() & AliESDtrack::kTPCin) == 0) ) return kFALSE;
+   if (requireTPCrefit && ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) ) return kFALSE;
+   if (requireITSrefit && ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) ) return kFALSE;
+
+   // quality
+   if (!fCutQuality.IsSelected(obj)) return kFALSE;
+   return kTRUE;
 }
 
 //-----------------------------------------------------------
 Bool_t AliRsnCutKaon::IsSelectedByTOFMatchStd2010(TObject *obj)
 {
-  /*
-  fbellini@cern.ch, 05.dec.2011
-  definition of TOF match: quality cuts 2010 + kTOFout + kTIME 
-  (optionally) L > 350. cm cut can be added
-  */
+   /*
+   fbellini@cern.ch, 05.dec.2011
+   definition of TOF match: quality cuts 2010 + kTOFout + kTIME
+   (optionally) L > 350. cm cut can be added
+   */
    if (!obj) {
-     AliError("Invalid track object passed to function. Please check!");
-     return kFALSE;
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
    }
 
    fAppliedCutID=AliRsnCutKaon::kTOFMatchStd2010;
-   
+
    if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
-     return kFALSE;
-   
-   AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
+      return kFALSE;
+
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
    if (!track) return kFALSE;
    return MatchTOF(track);
 }
@@ -190,122 +190,122 @@ Bool_t AliRsnCutKaon::IsSelectedByTOFMatchStd2010(TObject *obj)
 //-----------------------------------------------------------
 Bool_t AliRsnCutKaon::IsSelectedByFastTPCpidNsigma(TObject *obj,Float_t nSigmaCut=10.)
 {
-  /*
-  fbellini@cern.ch, 05.dec.2011   Double_t pTPC   = track->GetTPCmomentum();
-  definition of fast TPC pid N-sigma: quality cuts 2010 + sigma cut on dE/dx without p dependence
-  */   
-  if (!obj) {
-    AliError("Invalid track object passed to function. Please check!");
-    return kFALSE;
-  }
-  fAppliedCutID=AliRsnCutKaon::kFastTPCpidNsigma;
-  
-  // check initialization of PID object
-  AliPIDResponse *pid = fEvent->GetPIDResponse();
-  if (!pid) {
-    AliFatal("NULL PID response");
-    return kFALSE;
-  }
-  
-  if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
-    return kFALSE;
-  
-  AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
-  if (!track) return kFALSE;
-  
-  Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track,fPID));
-  return (nsTPC <= nSigmaCut); 
+   /*
+   fbellini@cern.ch, 05.dec.2011   Double_t pTPC   = track->GetTPCmomentum();
+   definition of fast TPC pid N-sigma: quality cuts 2010 + sigma cut on dE/dx without p dependence
+   */
+   if (!obj) {
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
+   }
+   fAppliedCutID=AliRsnCutKaon::kFastTPCpidNsigma;
+
+   // check initialization of PID object
+   AliPIDResponse *pid = fEvent->GetPIDResponse();
+   if (!pid) {
+      AliFatal("NULL PID response");
+      return kFALSE;
+   }
+
+   if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
+      return kFALSE;
+
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
+   if (!track) return kFALSE;
+
+   Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track,fPID));
+   return (nsTPC <= nSigmaCut);
 }
 //-----------------------------------------------------------
 Bool_t AliRsnCutKaon::IsSelectedByFastTOFpidNsigma(TObject *obj,Float_t nSigmaCut=10.)
 {
-  /*
-  fbellini@cern.ch, 05.dec.2011
-  definition of fast TOF pid N-sigma: quality cuts 2010 + sigma cut on t-t_0-t_exp without p dependence
-  */  
-  if (!obj) {
-    AliError("Invalid track object passed to function. Please check!");
-    return kFALSE;
-  }
-  
-  fAppliedCutID=AliRsnCutKaon::kFastTOFpidNsigma;
-  
-  // check initialization of PID object
-  AliPIDResponse *pid = fEvent->GetPIDResponse();
-  if (!pid) {
-    AliFatal("NULL PID response");
-    return kFALSE;
-  }
-  
-  if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
-    return kFALSE;
-  
-  AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
-  if (!track) return kFALSE;
-  Bool_t isTOF = MatchTOF(track);
-  Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
-  
-  return (nsTOF <= nSigmaCut); 
+   /*
+   fbellini@cern.ch, 05.dec.2011
+   definition of fast TOF pid N-sigma: quality cuts 2010 + sigma cut on t-t_0-t_exp without p dependence
+   */
+   if (!obj) {
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
+   }
+
+   fAppliedCutID=AliRsnCutKaon::kFastTOFpidNsigma;
+
+   // check initialization of PID object
+   AliPIDResponse *pid = fEvent->GetPIDResponse();
+   if (!pid) {
+      AliFatal("NULL PID response");
+      return kFALSE;
+   }
+
+   if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
+      return kFALSE;
+
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
+   if (!track) return kFALSE;
+   Bool_t isTOF = MatchTOF(track);
+   Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
+
+   return (nsTOF <= nSigmaCut);
 }
 
 //-----------------------------------------------------------
 Bool_t AliRsnCutKaon::IsSelectedByTPCTOFpidDefaultKstarPP2010(TObject *obj)
 {
-  /*
-  fbellini@cern.ch, 05.dec.2011
-  definition of TPC-TOF pid for pp phi and Kstar analysis on 2010 data: 
-  quality cuts 2010 + sigma cut on dE/dx with pTPC dependence + sigma cut on t-t_0-t_exp with p dependence
-  */  
-
-  if (!obj) {
-    AliError("Invalid track object passed to function. Please check!");
-    return kFALSE;
-  }
-    fAppliedCutID=AliRsnCutKaon::kTPCTOFpidDefaultKstarPP2010;
-  
-  // check initialization of PID object
-  AliPIDResponse *pid = fEvent->GetPIDResponse();
-  if (!pid) {
-    AliFatal("NULL PID response");
-    return kFALSE;
-  }
-  
-  if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE)) //require ITS+TPCrefit and TPCin
-    return kFALSE;
-   
-  AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
-  if (!track) return kFALSE;
-  
-  Bool_t   isTOF  = MatchTOF(track);
-  Double_t pTPC   = track->GetTPCmomentum();
-  Double_t p      = track->P();
-  Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
-  Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
-  Double_t maxTPC = 1E20;
-  Double_t maxTOF = 1E20;
-
-  if (isTOF) {
-    // TPC: 5sigma cut for all
-    if (nsTPC > 5.0) return kFALSE;
-    // TOF: 3sigma below 1.5 GeV, 2sigma above
-    if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
-    return (nsTOF <= maxTOF);
-  } else {
-    // TPC: 
-    // all   below   350         MeV: 5sigma
-    // all   between 350 and 500 MeV: 3sigma
-    // pios above   500         MeV: 2sigma
-    // kaons between 500 and 700 MeV: 2sigma
-    // kaons above   700         MeV: rejected
-    if (pTPC <= 0.35) 
-      maxTPC = 5.0;
-    else if (pTPC > 0.35 && pTPC <= 0.5)
-      maxTPC = 3.0;
-    else {  
-      if (pTPC <= 0.7) maxTPC = 2.0;
-      else
-       return kFALSE;
-    }
-    return (nsTPC <= maxTPC);
-  } 
+   /*
+   fbellini@cern.ch, 05.dec.2011
+   definition of TPC-TOF pid for pp phi and Kstar analysis on 2010 data:
+   quality cuts 2010 + sigma cut on dE/dx with pTPC dependence + sigma cut on t-t_0-t_exp with p dependence
+   */
+
+   if (!obj) {
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
+   }
+   fAppliedCutID=AliRsnCutKaon::kTPCTOFpidDefaultKstarPP2010;
+
+   // check initialization of PID object
+   AliPIDResponse *pid = fEvent->GetPIDResponse();
+   if (!pid) {
+      AliFatal("NULL PID response");
+      return kFALSE;
+   }
+
+   if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE)) //require ITS+TPCrefit and TPCin
+      return kFALSE;
+
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
+   if (!track) return kFALSE;
+
+   Bool_t   isTOF  = MatchTOF(track);
+   Double_t pTPC   = track->GetTPCmomentum();
+   Double_t p      = track->P();
+   Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
+   Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
+   Double_t maxTPC = 1E20;
+   Double_t maxTOF = 1E20;
+
+   if (isTOF) {
+      // TPC: 5sigma cut for all
+      if (nsTPC > 5.0) return kFALSE;
+      // TOF: 3sigma below 1.5 GeV, 2sigma above
+      if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
+      return (nsTOF <= maxTOF);
+   } else {
+      // TPC:
+      // all   below   350         MeV: 5sigma
+      // all   between 350 and 500 MeV: 3sigma
+      // pios above   500         MeV: 2sigma
+      // kaons between 500 and 700 MeV: 2sigma
+      // kaons above   700         MeV: rejected
+      if (pTPC <= 0.35)
+         maxTPC = 5.0;
+      else if (pTPC > 0.35 && pTPC <= 0.5)
+         maxTPC = 3.0;
+      else {
+         if (pTPC <= 0.7)  maxTPC = 2.0;
+         else
+            return kFALSE;
+      }
+      return (nsTPC <= maxTPC);
+   }
 }
index f40da84ea40b3ccb73abecccb2d7ccfaef4018b2..6bb705db332bd177526077024ae01d957f9b7ecd 100644 (file)
 class AliRsnCutKaon : public AliRsnCut {
 
 public:
-  enum ERsnKaonCut {
-    kQualityStd2010,
-    kTOFMatchStd2010,
-    kFastTPCpidNsigma,
-    kFastTPCpid1point5sigma,
-    kFastTPCpid2sigma,
-    kFastTPCpid3sigma,
-    kFastTOFpidNsigma,
-    kFastTOFpid1point5sigma,
-    kFastTOFpid2sigma,
-    kFastTOFpid3sigma,
-    kTPCTOFpidDefaultKstarPP2010,
-    kNkaonCuts
-  };
-
-  AliRsnCutKaon(const char *name = "", AliRsnCutKaon::ERsnKaonCut cutID = AliRsnCutKaon::kQualityStd2010 , AliPID::EParticleType pid = AliPID::kKaon);
-  virtual ~AliRsnCutKaon() { }
-  
-  void                   SetNoPID(Bool_t yn = kTRUE)        {fNoPID = yn;}  
-  AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
-  Bool_t                 MatchTOF(const AliVTrack *vtrack);
-  Bool_t         IsSelected(TObject *obj);
-  
-  Bool_t         IsSelectedByQualityStd2010(TObject *obj, Bool_t requireTPCin, Bool_t requireTPCrefit,  Bool_t requireITSrefit );
-  Bool_t         IsSelectedByTOFMatchStd2010(TObject *obj);
-  
-  Bool_t         IsSelectedByFastTPCpidNsigma(TObject *obj,Float_t nSigmaCut);
-  Bool_t         IsSelectedByFastTPCpid1point5sigma(TObject *obj)   {return IsSelectedByFastTPCpidNsigma(obj, 1.5);}
-  Bool_t         IsSelectedByFastTPCpid2sigma(TObject *obj)         {return IsSelectedByFastTPCpidNsigma(obj, 2.0);}
-  Bool_t         IsSelectedByFastTPCpid3sigma(TObject *obj)         {return IsSelectedByFastTPCpidNsigma(obj, 3.0);}
-
-  Bool_t         IsSelectedByFastTOFpidNsigma(TObject *obj,Float_t nSigmaCut);
-  Bool_t         IsSelectedByFastTOFpid1point5sigma(TObject *obj)   {return IsSelectedByFastTOFpidNsigma(obj, 1.5);}
-  Bool_t         IsSelectedByFastTOFpid2sigma(TObject *obj)         {return IsSelectedByFastTOFpidNsigma(obj, 2.0);}
-  Bool_t         IsSelectedByFastTOFpid3sigma(TObject *obj)         {return IsSelectedByFastTOFpidNsigma(obj, 3.0);}
-
-  Bool_t         IsSelectedByTPCTOFpidDefaultKstarPP2010(TObject *obj);
-  
-  //setters
-  void     SetNsigmaCutTPC(Float_t nMaxSigmaCut=1E6){fNsigmaCutTPC=nMaxSigmaCut; return;}
-  void     SetNsigmaCutTOF(Float_t nMaxSigmaCut=1E6){fNsigmaCutTOF=nMaxSigmaCut; return;}
-
-  //getters
-  const char *  GetAppliedKaonCutName() { if (fAppliedCutID>0){ return fgkCutName[fAppliedCutID];} else {return "none";}}
-  Int_t   GetAppliedKaonCutId() { return fAppliedCutID;}
-  const char *  GetKaonCutName(const AliRsnCutKaon::ERsnKaonCut cutID) { return fgkCutName[cutID];}
-  
- private:
-  
-  Bool_t                fNoPID;            // flag to switch off PID check
-  AliPID::EParticleType fPID;              // PID for track
-  AliRsnCutTrackQuality fCutQuality;       // track quality cut
-  Int_t                 fAppliedCutID;     // ID of applied cut
-  static const char*    fgkCutName[kNkaonCuts]; //array with cuts names
-  Float_t               fNsigmaCutTPC;     //  max sigma for TPC dE/dx fast cut
-  Float_t               fNsigmaCutTOF;     //  max sigma for TOF t-t0-t_exp fast cut
-
-  ClassDef(AliRsnCutKaon, 1) // cut definitions for K*
-     
+   enum ERsnKaonCut {
+      kQualityStd2010,
+      kTOFMatchStd2010,
+      kFastTPCpidNsigma,
+      kFastTPCpid1point5sigma,
+      kFastTPCpid2sigma,
+      kFastTPCpid3sigma,
+      kFastTOFpidNsigma,
+      kFastTOFpid1point5sigma,
+      kFastTOFpid2sigma,
+      kFastTOFpid3sigma,
+      kTPCTOFpidDefaultKstarPP2010,
+      kNkaonCuts
+   };
+
+   AliRsnCutKaon(const char *name = "", AliRsnCutKaon::ERsnKaonCut cutID = AliRsnCutKaon::kQualityStd2010 , AliPID::EParticleType pid = AliPID::kKaon);
+   virtual ~AliRsnCutKaon() { }
+
+   void                   SetNoPID(Bool_t yn = kTRUE)        {fNoPID = yn;}
+   AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
+   Bool_t                 MatchTOF(const AliVTrack *vtrack);
+
+   Bool_t         IsSelected(TObject *obj);
+
+   Bool_t         IsSelectedByQualityStd2010(TObject *obj, Bool_t requireTPCin, Bool_t requireTPCrefit,  Bool_t requireITSrefit );
+   Bool_t         IsSelectedByTOFMatchStd2010(TObject *obj);
+
+   Bool_t         IsSelectedByFastTPCpidNsigma(TObject *obj,Float_t nSigmaCut);
+   Bool_t         IsSelectedByFastTPCpid1point5sigma(TObject *obj)   {return IsSelectedByFastTPCpidNsigma(obj, 1.5);}
+   Bool_t         IsSelectedByFastTPCpid2sigma(TObject *obj)         {return IsSelectedByFastTPCpidNsigma(obj, 2.0);}
+   Bool_t         IsSelectedByFastTPCpid3sigma(TObject *obj)         {return IsSelectedByFastTPCpidNsigma(obj, 3.0);}
+
+   Bool_t         IsSelectedByFastTOFpidNsigma(TObject *obj,Float_t nSigmaCut);
+   Bool_t         IsSelectedByFastTOFpid1point5sigma(TObject *obj)   {return IsSelectedByFastTOFpidNsigma(obj, 1.5);}
+   Bool_t         IsSelectedByFastTOFpid2sigma(TObject *obj)         {return IsSelectedByFastTOFpidNsigma(obj, 2.0);}
+   Bool_t         IsSelectedByFastTOFpid3sigma(TObject *obj)         {return IsSelectedByFastTOFpidNsigma(obj, 3.0);}
+
+   Bool_t         IsSelectedByTPCTOFpidDefaultKstarPP2010(TObject *obj);
+
+   //setters
+   void     SetNsigmaCutTPC(Float_t nMaxSigmaCut=1E6) {fNsigmaCutTPC=nMaxSigmaCut; return;}
+   void     SetNsigmaCutTOF(Float_t nMaxSigmaCut=1E6) {fNsigmaCutTOF=nMaxSigmaCut; return;}
+
+   //getters
+   const char   *GetAppliedKaonCutName() { if (fAppliedCutID>0) { return fgkCutName[fAppliedCutID];} else {return "none";}}
+   Int_t   GetAppliedKaonCutId() { return fAppliedCutID;}
+   const char   *GetKaonCutName(const AliRsnCutKaon::ERsnKaonCut cutID) { return fgkCutName[cutID];}
+
+private:
+
+   Bool_t                fNoPID;            // flag to switch off PID check
+   AliPID::EParticleType fPID;              // PID for track
+   AliRsnCutTrackQuality fCutQuality;       // track quality cut
+   Int_t                 fAppliedCutID;     // ID of applied cut
+   static const char    *fgkCutName[kNkaonCuts]; //array with cuts names
+   Float_t               fNsigmaCutTPC;     //  max sigma for TPC dE/dx fast cut
+   Float_t               fNsigmaCutTOF;     //  max sigma for TOF t-t0-t_exp fast cut
+
+   ClassDef(AliRsnCutKaon, 1) // cut definitions for K*
+
 };
 
 #endif
index 559671ac95d0208381ef6535b8e672a0460e48a0..67d098b49c2ee670808e1f688e252dc2c9e53432 100644 (file)
@@ -1,6 +1,6 @@
 //
 // This cut implements all the checks done to accept a track as a Kaon
-// for the PbPb analysis using 2010 runs. 
+// for the PbPb analysis using 2010 runs.
 // It is based on standard cuts on track quality and nsigma cuts
 // with respect to the TPC and TOF signals for the PID.
 //
@@ -65,7 +65,7 @@ AliRsnCutKaonForPhi2010::AliRsnCutKaonForPhi2010(const AliRsnCutKaonForPhi2010 &
 }
 
 //__________________________________________________________________________________________________
-AliRsnCutKaonForPhi2010AliRsnCutKaonForPhi2010::operator=(const AliRsnCutKaonForPhi2010 &copy)
+AliRsnCutKaonForPhi2010 &AliRsnCutKaonForPhi2010::operator=(const AliRsnCutKaonForPhi2010 &copy)
 {
 //
 // Assignment operator
@@ -73,14 +73,14 @@ AliRsnCutKaonForPhi2010& AliRsnCutKaonForPhi2010::operator=(const AliRsnCutKaonF
 
    AliRsnCut::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fMode = copy.fMode;
    fCutTPC = copy.fCutTPC;
    fCutTOF = copy.fCutTOF;
    fTOFthreshold = copy.fTOFthreshold;
    fMyPID = copy.fMyPID;
    fCutQuality = copy.fCutQuality;
-   
+
    return *this;
 }
 
@@ -91,7 +91,7 @@ void AliRsnCutKaonForPhi2010::InitMyPID(Bool_t isMC, Bool_t isESD)
 // Initialize manual PID object
 //
 
-   if (isESD) 
+   if (isESD)
       fMyPID = new AliESDpid(isMC);
    else
       fMyPID = new AliAODpidUtil(isMC);
@@ -106,31 +106,31 @@ Bool_t AliRsnCutKaonForPhi2010::IsSelected(TObject *obj)
 
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
    AliVTrack *track = fDaughter->Ref2Vtrack();
    if (!track) {
       if (!fDaughter->GetRef()) AliWarning("NULL ref");
       return kFALSE;
    }
-   
+
    // check flags
    if ((track->GetStatus() & AliESDtrack::kTPCin   ) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
-   
+
    // check quality and reject always bad quality tracks
    if (!fCutQuality.IsSelected(obj)) {
       AliDebugClass(1, Form("[%s] Track quality is bad", GetName()));
       return kFALSE;
    }
-   
+
    // initialize check variables
    Bool_t   accept = kFALSE;
    Bool_t   isTOF  = MatchTOF(track);
    Double_t nsTPC  = 1E20;
    Double_t nsTOF  = 1E20;
-   
+
    // if PID is required, compute it check initialization of PID object
    if (fMode >= kOnlyTPC && fMode <= kDefaultPID) {
       AliPIDResponse *pid = fEvent->GetPIDResponse();
@@ -139,14 +139,14 @@ Bool_t AliRsnCutKaonForPhi2010::IsSelected(TObject *obj)
          return kFALSE;
       }
       // TPC PID
-      if (fMyPID) 
+      if (fMyPID)
          nsTPC = TMath::Abs(fMyPID->NumberOfSigmasTPC(track, AliPID::kKaon));
       else
          nsTPC = TMath::Abs(pid->NumberOfSigmasTPC(track, AliPID::kKaon));
       // TOF PID
       nsTOF = TMath::Abs(pid->NumberOfSigmasTOF(track, AliPID::kKaon));
    }
-   
+
    // decide cut result depending on mode
    switch (fMode) {
       case kQuality:
@@ -201,7 +201,7 @@ Bool_t AliRsnCutKaonForPhi2010::IsSelected(TObject *obj)
          AliDebugClass(1, Form("[%s] Wrong mode", GetName()));
          accept = kFALSE;
    }
-   
+
    AliDebugClass(1, Form("[%s] Track %s", GetName(), (accept ? "accepted" : "rejected")));
    return accept;
 }
index 1be0709b93289d0ece5d0262d84b791b67c2185f..0d4e3bb194ea5d64abd4085a25ed99177e642cf5 100644 (file)
@@ -3,7 +3,7 @@
 
 //
 // This cut implements all the checks done to accept a track as a Kaon
-// for the PbPb analysis using 2010 runs. 
+// for the PbPb analysis using 2010 runs.
 // It is based on standard cuts on track quality and nsigma cuts
 // with respect to the TPC and TOF signals for the PID.
 //
@@ -26,20 +26,20 @@ public:
 
    AliRsnCutKaonForPhi2010(const char *name = "", Double_t nSigmaTPC = 3.0, Double_t nSigmaTOF = 3.0, Double_t tofLimit = 0.8);
    AliRsnCutKaonForPhi2010(const AliRsnCutKaonForPhi2010 &copy);
-   AliRsnCutKaonForPhi2010operator=(const AliRsnCutKaonForPhi2010 &copy);
+   AliRsnCutKaonForPhi2010 &operator=(const AliRsnCutKaonForPhi2010 &copy);
    virtual ~AliRsnCutKaonForPhi2010() { }
-   
+
    virtual Bool_t IsSelected(TObject *obj);
-   
+
    AliRsnCutTrackQuality *CutQuality()            {return &fCutQuality;}
    Double_t               GetTOFthreshold() const {return fTOFthreshold;}
    AliPIDResponse        *MyPID()                 {return fMyPID;}
-   
+
    void   SetMode(ECutMode mode)            {fMode = mode;}
    void   SetCutTPC(Double_t cut)           {fCutTPC = cut;}
    void   SetCutTOF(Double_t cut)           {fCutTOF = cut;}
    void   SetTOFthreshold(Double_t value)   {fTOFthreshold = value;}
-   
+
    void   InitMyPID(Bool_t isMC, Bool_t isESD);
    Bool_t MatchTOF(const AliVTrack *vtrack);
 
index 39c5449028690e3874a57a6ee2eca7e1fb1fdd4a..26650e2a85addf2f3960f3da99067ea5d6d82e88 100644 (file)
@@ -1,6 +1,6 @@
 //
 // This cut implements all the checks done to accept a track as a Kaon
-// for the pp analysis using 2010 runs. 
+// for the pp analysis using 2010 runs.
 // It is based on standard cuts on track quality and nsigma cuts
 // with respect to the TPC and TOF signals for the PID.
 //
@@ -64,7 +64,7 @@ AliRsnCutKaonForPhi2010PP::AliRsnCutKaonForPhi2010PP(const AliRsnCutKaonForPhi20
 }
 
 //__________________________________________________________________________________________________
-AliRsnCutKaonForPhi2010PPAliRsnCutKaonForPhi2010PP::operator=(const AliRsnCutKaonForPhi2010PP &copy)
+AliRsnCutKaonForPhi2010PP &AliRsnCutKaonForPhi2010PP::operator=(const AliRsnCutKaonForPhi2010PP &copy)
 {
 //
 // Assignment operator
@@ -72,14 +72,14 @@ AliRsnCutKaonForPhi2010PP& AliRsnCutKaonForPhi2010PP::operator=(const AliRsnCutK
 
    AliRsnCut::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fNSigmaTPCLow = copy.fNSigmaTPCLow;
    fNSigmaTPCHigh = copy.fNSigmaTPCHigh;
    fLimitTPC = copy.fLimitTPC;
    fNSigmaTOF = copy.fNSigmaTOF;
    fMyPID = copy.fMyPID;
    fCutQuality = copy.fCutQuality;
-   
+
    return *this;
 }
 
@@ -90,7 +90,7 @@ void AliRsnCutKaonForPhi2010PP::InitMyPID(Bool_t isMC, Bool_t isESD)
 // Initialize manual PID object
 //
 
-   if (isESD) 
+   if (isESD)
       fMyPID = new AliESDpid(isMC);
    else
       fMyPID = new AliAODpidUtil(isMC);
@@ -105,44 +105,44 @@ Bool_t AliRsnCutKaonForPhi2010PP::IsSelected(TObject *obj)
 
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
-   AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
    if (!track) return kFALSE;
-   
+
    // check flags
    if ((track->GetStatus() & AliESDtrack::kTPCin   ) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
-   
+
    // quality
    if (!fCutQuality.IsSelected(obj)) return kFALSE;
-   
+
    // check initialization of PID object
    AliPIDResponse *pid = fEvent->GetPIDResponse();
    if (!pid) {
       AliFatal("NULL PID response");
       return kFALSE;
    }
-   
+
    // PID TPC :
    // depends on momentum
    // and if local PID object is initialized, it is used instead of that got from manager
    Double_t mom = track->GetTPCmomentum();
    mom = TMath::Abs(mom);
-   if (mom < fLimitTPC) 
+   if (mom < fLimitTPC)
       SetRangeD(0.0, fNSigmaTPCLow);
    else
       SetRangeD(0.0, fNSigmaTPCHigh);
-   if (fMyPID) 
+   if (fMyPID)
       fCutValueD = TMath::Abs(fMyPID->NumberOfSigmasTPC(track, AliPID::kKaon));
    else
       fCutValueD = TMath::Abs(pid->NumberOfSigmasTPC(track, AliPID::kKaon));
    if (!OkRangeD()) return kFALSE;
-   
+
    // if TOF is not matched, end here
    // otherwise check TOF
-   if (!MatchTOF(track)) 
+   if (!MatchTOF(track))
       return kTRUE;
    else {
       SetRangeD(0.0, fNSigmaTOF);
index cf7712c65d3a236371de5d8dd49c57b348f03d03..c127f28f7e28a4b23236e3513717a9a9af6e4bc4 100644 (file)
@@ -3,7 +3,7 @@
 
 //
 // This cut implements all the checks done to accept a track as a Kaon
-// for the pp analysis using 2010 runs. 
+// for the pp analysis using 2010 runs.
 // It is based on standard cuts on track quality and nsigma cuts
 // with respect to the TPC and TOF signals for the PID.
 //
@@ -18,27 +18,27 @@ public:
 
    AliRsnCutKaonForPhi2010PP(const char *name = "");
    AliRsnCutKaonForPhi2010PP(const AliRsnCutKaonForPhi2010PP &copy);
-   AliRsnCutKaonForPhi2010PPoperator=(const AliRsnCutKaonForPhi2010PP &copy);
+   AliRsnCutKaonForPhi2010PP &operator=(const AliRsnCutKaonForPhi2010PP &copy);
    virtual ~AliRsnCutKaonForPhi2010PP() { }
-   
+
    void           SetTPCNSigmaLow (Double_t v) {fNSigmaTPCLow  = v;}
    void           SetTPCNSigmaHigh(Double_t v) {fNSigmaTPCHigh = v;}
    void           SetTPCLimit(Double_t v)      {fLimitTPC      = v;}
    void           SetTOFNSigma(Double_t v)     {fNSigmaTOF     = v;}
-   
+
    virtual Bool_t IsSelected(TObject *obj);
    void           InitMyPID(Bool_t isMC, Bool_t isESD);
-   
+
    AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
    AliPIDResponse        *MyPID()      {return fMyPID;}
 
 private:
 
    Bool_t MatchTOF(const AliVTrack *vtrack);
-   
+
    Double_t              fNSigmaTPCLow;   // TPC: nsigma cut below limit
    Double_t              fNSigmaTPCHigh;  // TPC: nsigma cut above limit
-   Double_t              fLimitTPC;       // TPC: momentum limit 
+   Double_t              fLimitTPC;       // TPC: momentum limit
    Double_t              fNSigmaTOF;      // TOF: nsigma cut (unique)
 
    AliPIDResponse       *fMyPID;          // PID response object to be configured manyally
index d7cf238221190c71711221ea460f99a84d8f6784..f311c03b34d30b202eff12cc4a39510927560c2b 100644 (file)
@@ -64,13 +64,13 @@ AliRsnCutManager::AliRsnCutManager(const AliRsnCutManager &cut) :
 }
 
 //_____________________________________________________________________________
-AliRsnCutManagerAliRsnCutManager::operator=(const AliRsnCutManager &cut)
+AliRsnCutManager &AliRsnCutManager::operator=(const AliRsnCutManager &cut)
 {
 //
 // Assign operator
 //
-  if (this == &cut)
-    return *this;
+   if (this == &cut)
+      return *this;
 
    SetName(cut.GetName());
    SetTitle(cut.GetTitle());
index 7bbf1de350bd6c5db037cc44ddea1e13d5dc64a8..3677f281a2311667c17f79ea49286bfcd6519c42 100644 (file)
@@ -32,15 +32,15 @@ class AliRsnCutManager : public TNamed {
 public:
 
    AliRsnCutManager();
-   AliRsnCutManager(const char *name, const chartitle = "");
+   AliRsnCutManager(const char *name, const char *title = "");
    AliRsnCutManager(const AliRsnCutManager &cut);
-   AliRsnCutManager& operator=(const AliRsnCutManager& cut);
+   AliRsnCutManager &operator=(const AliRsnCutManager &cut);
    ~AliRsnCutManager();
 
-   AliRsnCutSet*  GetCommonDaughterCuts() {return &fDaughterCutsCommon;}
-   AliRsnCutSet*  GetDaughter1Cuts()      {return &fDaughterCuts1;}
-   AliRsnCutSet*  GetDaughter2Cuts()      {return &fDaughterCuts2;}
-   AliRsnCutSet*  GetMotherCuts()         {return &fMotherCuts;}
+   AliRsnCutSet  *GetCommonDaughterCuts() {return &fDaughterCutsCommon;}
+   AliRsnCutSet  *GetDaughter1Cuts()      {return &fDaughterCuts1;}
+   AliRsnCutSet  *GetDaughter2Cuts()      {return &fDaughterCuts2;}
+   AliRsnCutSet  *GetMotherCuts()         {return &fMotherCuts;}
 
    Bool_t         IsSelected(TObject *object);
    Bool_t         PassCommonDaughterCuts(AliRsnDaughter *daughter) {return fDaughterCutsCommon.IsSelected(daughter);}
@@ -67,9 +67,9 @@ inline Bool_t AliRsnCutManager::IsSelected(TObject *object)
 //
 
    if (object->InheritsFrom(AliRsnDaughter::Class())) {
-      return PassCommonDaughterCuts((AliRsnDaughter*)object);
+      return PassCommonDaughterCuts((AliRsnDaughter *)object);
    } else if (object->InheritsFrom(AliRsnMother::Class())) {
-      AliRsnMother *mother = (AliRsnMother*)object;
+      AliRsnMother *mother = (AliRsnMother *)object;
       if (!PassCommonDaughterCuts(mother->GetDaughter(0))) return kFALSE;
       if (!PassCommonDaughterCuts(mother->GetDaughter(1))) return kFALSE;
       if (!PassDaughter1Cuts(mother->GetDaughter(0))) return kFALSE;
index e8f6225f114753401b194a907e8da48cd866917e..bdf06c328c1520c46ce0c27f892293bd7fedea48 100644 (file)
@@ -30,12 +30,12 @@ Bool_t AliRsnCutMiniPair::IsSelected(TObject *obj)
 // Global check
 //
 
-   AliRsnMiniPair *pair = dynamic_cast<AliRsnMiniPair*>(obj);
+   AliRsnMiniPair *pair = dynamic_cast<AliRsnMiniPair *>(obj);
    if (!pair) {
       AliError("This cut applies only to mini-pairs");
       return kFALSE;
    }
-   
+
    switch (fType) {
       case kRapidityRange:
          fCutValueD = pair->Y(0);
index f44a8c1243369774c797451d559f135ebb9ac8d7..2f27c413d91144ac8e48d61704a4eeffa21b373f 100644 (file)
@@ -24,7 +24,7 @@ public:
 
    AliRsnCutMiniPair(const char *name = "cut", EType type = kTypes);
    virtual ~AliRsnCutMiniPair() { }
-   
+
    virtual Bool_t IsSelected(TObject *obj);
 
 private:
index b56c477f90c83dfd8bd96b1a1dc0ab3036db6b8b..220141cd20b89caca8fe8856b53bd70907439e06 100644 (file)
@@ -34,7 +34,7 @@ AliRsnCutMomentumComparison::AliRsnCutMomentumComparison(const char *name, EMode
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutMomentumComparison::AliRsnCutMomentumComparison(const AliRsnCutMomentumComparisoncopy) :
+AliRsnCutMomentumComparison::AliRsnCutMomentumComparison(const AliRsnCutMomentumComparison &copy) :
    AliRsnCut(copy),
    fMode(copy.fMode)
 {
@@ -44,7 +44,7 @@ AliRsnCutMomentumComparison::AliRsnCutMomentumComparison(const AliRsnCutMomentum
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutMomentumComparison& AliRsnCutMomentumComparison::operator=(const AliRsnCutMomentumComparison& copy)
+AliRsnCutMomentumComparison &AliRsnCutMomentumComparison::operator=(const AliRsnCutMomentumComparison &copy)
 {
 //
 // Assignment operator
@@ -52,9 +52,9 @@ AliRsnCutMomentumComparison& AliRsnCutMomentumComparison::operator=(const AliRsn
 
    AliRsnCut::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fMode = copy.fMode;
-   
+
    return (*this);
 }
 
@@ -73,7 +73,7 @@ Bool_t AliRsnCutMomentumComparison::IsSelected(TObject *object)
    Double_t p2  = fMother->GetDaughter(1)->GetRef()->P();
    Double_t pt1 = fMother->GetDaughter(0)->GetRef()->Pt();
    Double_t pt2 = fMother->GetDaughter(1)->GetRef()->Pt();
-   
+
    switch (fMode)
    {
       case kFirstLargerP  : return (p1 > p2);
index a4a51a5ba13a5b6da9e659bda9f0bcd4e9d62ca2..b7f76738e364cb6b545d3e821cdfa6c3ffd873aa 100644 (file)
@@ -24,8 +24,8 @@ public:
    };
 
    AliRsnCutMomentumComparison(const char *name = "cutMomComparison", EMode mode = kFirstLargerPt);
-   AliRsnCutMomentumComparison(const AliRsnCutMomentumComparisoncopy);
-   AliRsnCutMomentumComparison& operator=(const AliRsnCutMomentumComparison& copy);
+   AliRsnCutMomentumComparison(const AliRsnCutMomentumComparison &copy);
+   AliRsnCutMomentumComparison &operator=(const AliRsnCutMomentumComparison &copy);
    virtual ~AliRsnCutMomentumComparison() {;};
 
    virtual Bool_t IsSelected(TObject *object);
index b13b0231903287c7cf33658df0fefac93a0b91df..ce6ca92a7874f87f8ffb9d4349fc4f80f7222682 100644 (file)
@@ -168,7 +168,7 @@ Bool_t AliRsnCutPID::ComputeWeights(AliRsnDaughter *daughter)
 }
 
 //_________________________________________________________________________________________________
-Int_t AliRsnCutPID::RealisticPID(AliRsnDaughter * const daughter, Double_t &prob)
+Int_t AliRsnCutPID::RealisticPID(AliRsnDaughter *const daughter, Double_t &prob)
 {
 //
 // Combines the weights collected from chosen detectors with the priors
@@ -214,7 +214,7 @@ Int_t AliRsnCutPID::RealisticPID(AliRsnDaughter * const daughter, Double_t &prob
 }
 
 //_________________________________________________________________________________________________
-Int_t AliRsnCutPID::PerfectPID(AliRsnDaughter * const daughter)
+Int_t AliRsnCutPID::PerfectPID(AliRsnDaughter *const daughter)
 {
 //
 // If MC is present, retrieve the particle corresponding to the used track
index 772bca97dceb696d076d338ff5c3bc7ab2ff1734..6a5040e0373925c245960a65543b64f0295f5d67 100644 (file)
@@ -41,8 +41,8 @@ public:
    void           ExcludeDetector(EDetector det) {if (CheckBounds(det)) fUseDetector[det] = kFALSE;}
 
    Bool_t         ComputeWeights(AliRsnDaughter *daughter);
-   Int_t          RealisticPID(AliRsnDaughter * const daughter, Double_t &prob);
-   Int_t          PerfectPID(AliRsnDaughter * const daughter);
+   Int_t          RealisticPID(AliRsnDaughter *const daughter, Double_t &prob);
+   Int_t          PerfectPID(AliRsnDaughter *const daughter);
    Double_t       GetWeight(Int_t i) const {if (i >= 0 && i < AliPID::kSPECIES) return fWeight[i]; return 0.0;}
 
    virtual Bool_t IsSelected(TObject *object);
index d27bd384a6ea165d436487f04f81c41b781629c6..f0a06757aff76fc78b29fe505e5b7754b6ad6973 100644 (file)
@@ -46,7 +46,7 @@ AliRsnCutPIDITS::AliRsnCutPIDITS
 
 //_________________________________________________________________________________________________
 AliRsnCutPIDITS::AliRsnCutPIDITS
-(const AliRsnCutPIDITScopy) :
+(const AliRsnCutPIDITS &copy) :
    AliRsnCut(copy),
    fIsMC(copy.fIsMC),
    fRejectOutside(copy.fRejectOutside),
@@ -62,15 +62,15 @@ AliRsnCutPIDITS::AliRsnCutPIDITS
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutPIDITS& AliRsnCutPIDITS::operator=(const AliRsnCutPIDITS& copy)
+AliRsnCutPIDITS &AliRsnCutPIDITS::operator=(const AliRsnCutPIDITS &copy)
 {
 //
 // Assignment operator
 //
 
    AliRsnCut::operator=(copy);
-  if (this == &copy)
-    return *this;
+   if (this == &copy)
+      return *this;
 
    fIsMC          = copy.fIsMC;
    fRejectOutside = copy.fRejectOutside;
index 689e0ec48ab8b84d90d5c72f87751252022ffb3b..fa4d6b045d2d992b07532ba51c9d6e86089e5555 100644 (file)
@@ -34,12 +34,12 @@ public:
                    Double_t    nSigmaMax     =  3.,
                    Bool_t      rejectOutside = kTRUE);
 
-   AliRsnCutPIDITS(const AliRsnCutPIDITScopy);
-   AliRsnCutPIDITS& operator=(const AliRsnCutPIDITS& copy);
+   AliRsnCutPIDITS(const AliRsnCutPIDITS &copy);
+   AliRsnCutPIDITS &operator=(const AliRsnCutPIDITS &copy);
    virtual ~AliRsnCutPIDITS() { }
 
-   AliESDpid*       ESDpid()  {return fESDpid;}
-   AliAODpidUtil*   AODpid()  {return fAODpid;}
+   AliESDpid       *ESDpid()  {return fESDpid;}
+   AliAODpidUtil   *AODpid()  {return fAODpid;}
 
    void             SetMC(Bool_t mc = kTRUE)                      {fIsMC = mc;}
    void             SetRejectOutside(Bool_t yn = kTRUE)           {fRejectOutside = yn;}
index 4eee1408434d238c98e037032a81d71ab7c79299..9eb63e2ec0afb1b3f263f4abfb5611a5dac87bca 100644 (file)
@@ -26,7 +26,7 @@ ClassImp(AliRsnCutPIDNSigma::AliRsnPIDRange)
 ClassImp(AliRsnCutPIDNSigma)
 
 //_________________________________________________________________________________________________
-AliRsnCutPIDNSigma::AliRsnCutPIDNSigma() : 
+AliRsnCutPIDNSigma::AliRsnCutPIDNSigma() :
    AliRsnCut("cut", AliRsnTarget::kDaughter),
    fSpecies(AliPID::kUnknown),
    fDetector(kDetectors),
@@ -60,7 +60,7 @@ AliRsnCutPIDNSigma::AliRsnCutPIDNSigma
 
 //_________________________________________________________________________________________________
 AliRsnCutPIDNSigma::AliRsnCutPIDNSigma
-(const AliRsnCutPIDNSigmacopy) :
+(const AliRsnCutPIDNSigma &copy) :
    AliRsnCut(copy),
    fSpecies(copy.fSpecies),
    fDetector(copy.fDetector),
@@ -76,7 +76,7 @@ AliRsnCutPIDNSigma::AliRsnCutPIDNSigma
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutPIDNSigma& AliRsnCutPIDNSigma::operator=(const AliRsnCutPIDNSigma& copy)
+AliRsnCutPIDNSigma &AliRsnCutPIDNSigma::operator=(const AliRsnCutPIDNSigma &copy)
 {
 //
 // Assignment operator
@@ -84,7 +84,7 @@ AliRsnCutPIDNSigma& AliRsnCutPIDNSigma::operator=(const AliRsnCutPIDNSigma& copy
 
    AliRsnCut::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fSpecies = copy.fSpecies;
    fDetector = copy.fDetector;
    fRejectUnmatched = copy.fRejectUnmatched;
@@ -101,7 +101,7 @@ void AliRsnCutPIDNSigma::InitMyPID(Bool_t isMC, Bool_t isESD)
 // Initialize manual PID object
 //
 
-   if (isESD) 
+   if (isESD)
       fMyPID = new AliESDpid(isMC);
    else
       fMyPID = new AliAODpidUtil(isMC);
@@ -118,13 +118,13 @@ Bool_t AliRsnCutPIDNSigma::IsSelected(TObject *object)
 
    // coherence check
    if (!TargetOK(object)) return kFALSE;
-   
+
    // check initialization of PID object
    // if manual PID is used, use that, otherwise get from source event
    AliPIDResponse *pid = 0x0;
-   if (fMyPID) 
-      pid = fMyPID; 
-   else 
+   if (fMyPID)
+      pid = fMyPID;
+   else
       pid = fEvent->GetPIDResponse();
    if (!pid) {
       AliFatal("NULL PID response");
@@ -138,7 +138,7 @@ Bool_t AliRsnCutPIDNSigma::IsSelected(TObject *object)
       AliDebugClass(2, "Referenced daughter is not a track");
       return kFALSE;
    }
-   
+
    // check matching, if required
    // a) if detector is not matched and matching is required, reject the track
    // b) if detector is not matched and matching is not required, accept blindly the track
@@ -147,10 +147,10 @@ Bool_t AliRsnCutPIDNSigma::IsSelected(TObject *object)
       AliDebugClass(2, Form("Detector not matched. fRejectUnmatched = %s --> track is %s", (fRejectUnmatched ? "true" : "false"), (fRejectUnmatched ? "rejected" : "accepted")));
       return (!fRejectUnmatched);
    }
-   
+
    // get reference momentum
    fTrackMom = (fDetector == kTPC) ? vtrack->GetTPCmomentum() : vtrack->P();
-   
+
    // get number of sigmas
    switch (fDetector) {
       case kITS:
@@ -166,13 +166,13 @@ Bool_t AliRsnCutPIDNSigma::IsSelected(TObject *object)
          AliError("Bad detector chosen. Rejecting track");
          return kFALSE;
    }
-   
+
    // loop on all ranges, and use the one which contains this momentum
    // if none is found, the cut is not passed
    Bool_t accept = kFALSE;
    Int_t  i, goodRange = -1, nRanges = fRanges.GetEntriesFast();
    for (i = 0; i < nRanges; i++) {
-      AliRsnPIDRange *range = (AliRsnPIDRange*)fRanges[i];
+      AliRsnPIDRange *range = (AliRsnPIDRange *)fRanges[i];
       if (!range) continue;
       if (!range->IsInRange(fTrackMom)) continue;
       else {
@@ -199,12 +199,12 @@ void AliRsnCutPIDNSigma::Print(const Option_t *) const
 //
 
    Char_t mom[200], det[100], match[200];
-      
+
    if (fRejectUnmatched)
       snprintf(match, 200, "Unmatched tracks are rejected");
    else
       snprintf(match, 200, "No check on track matching");
-      
+
    switch (fDetector) {
       case kITS: snprintf(det, 3, "ITS"); break;
       case kTPC: snprintf(det, 3, "TPC"); break;
@@ -215,5 +215,5 @@ void AliRsnCutPIDNSigma::Print(const Option_t *) const
    AliInfo(Form("Cut name          : %s", GetName()));
    AliInfo(Form("--> PID detector  : %s", det));
    AliInfo(Form("--> match criteria: %s", match));
-   AliInfo(Form("--> momentum range: %s", mom));   
+   AliInfo(Form("--> momentum range: %s", mom));
 }
index 6113286472413c111a75d04197aa5a92206b1bb5..682de29988c50f048d1ed06b4db8a190f9f5fa11 100644 (file)
@@ -31,53 +31,53 @@ public:
       kTOF,
       kDetectors
    };
-   
+
    //
    // This allows to define several intervals
    //
    class AliRsnPIDRange : public TObject {
    public:
-      
+
       AliRsnPIDRange(Double_t nsigma, Double_t pmin, Double_t pmax)
          : fPMin(pmin), fPMax(pmax), fNSigmaCut(nsigma) { }
-         
-      Double_tPMin()      {return fPMin;}
-      Double_tPMax()      {return fPMax;}
-      Double_tNSigmaCut() {return fNSigmaCut;}
-      
+
+      Double_t &PMin()      {return fPMin;}
+      Double_t &PMax()      {return fPMax;}
+      Double_t &NSigmaCut() {return fNSigmaCut;}
+
       Bool_t IsInRange(Double_t mom)  {return (mom >= fPMin && mom <= fPMax);}
       Bool_t CutPass(Double_t nsigma) {return (nsigma <= fNSigmaCut);}
-      
+
    private:
-   
+
       Double_t fPMin;      // lower bound of momentum range
       Double_t fPMax;      // upper bound of momentum range
       Double_t fNSigmaCut; // cut in number of sigmas
-      
+
       ClassDef(AliRsnCutPIDNSigma::AliRsnPIDRange,1)
    };
 
    AliRsnCutPIDNSigma();
    AliRsnCutPIDNSigma(const char *name, AliPID::EParticleType species, EDetector det);
-   AliRsnCutPIDNSigma(const AliRsnCutPIDNSigmacopy);
-   AliRsnCutPIDNSigma& operator=(const AliRsnCutPIDNSigma& copy);
+   AliRsnCutPIDNSigma(const AliRsnCutPIDNSigma &copy);
+   AliRsnCutPIDNSigma &operator=(const AliRsnCutPIDNSigma &copy);
    virtual ~AliRsnCutPIDNSigma() { }
 
    void             SetSpecies(AliPID::EParticleType type)        {fSpecies = type;}
    void             SetDetector(EDetector det)                    {fDetector = det;}
    void             SetRejectUnmatched(Bool_t yn = kTRUE)         {fRejectUnmatched = yn;}
-   
+
    AliPIDResponse  *MyPID()                                       {return fMyPID;}
    void             InitMyPID(Bool_t isMC, Bool_t isESD);
-   
+
    void             SinglePIDRange(Double_t nsigma);
    void             AddPIDRange(Double_t nsigma, Double_t pmin = 0.0, Double_t pmax = 1E20);
-   
+
    Bool_t           MatchITS(const AliVTrack *vtrack) const;
    Bool_t           MatchTPC(const AliVTrack *vtrack) const;
    Bool_t           MatchTOF(const AliVTrack *vtrack) const;
    Bool_t           MatchDetector(const AliVTrack *vtrack) const;
-   
+
    virtual Bool_t   IsSelected(TObject *object);
    virtual void     Print(const Option_t *option = "") const;
 
@@ -113,7 +113,7 @@ inline Bool_t AliRsnCutPIDNSigma::MatchTPC(const AliVTrack *vtrack) const
 //
 
    if ((vtrack->GetStatus() & AliESDtrack::kTPCin) == 0) return kFALSE;
-   
+
    return kTRUE;
 }
 
@@ -151,7 +151,7 @@ inline void AliRsnCutPIDNSigma::AddPIDRange(Double_t nsigma, Double_t pmin, Doub
 //
 
    Int_t n = fRanges.GetEntries();
-   
+
    new (fRanges[n]) AliRsnPIDRange(nsigma, pmin, pmax);
 }
 
@@ -162,7 +162,7 @@ inline void AliRsnCutPIDNSigma::SinglePIDRange(Double_t nsigma)
 //
 
    fRanges.Delete();
-   
+
    new (fRanges[0]) AliRsnPIDRange(nsigma, 0.0, 1E20);
 }
 
index d9f3c65e5b167b64bf0017eb0f6d012745800175..a91acd78c170d31213e97e1faed54433c1acdd6d 100644 (file)
@@ -42,7 +42,7 @@ AliRsnCutPIDTOF::AliRsnCutPIDTOF
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutPIDTOF::AliRsnCutPIDTOF(const AliRsnCutPIDTOFcopy) :
+AliRsnCutPIDTOF::AliRsnCutPIDTOF(const AliRsnCutPIDTOF &copy) :
    AliRsnCut(copy),
    fRejectUnmatched(copy.fRejectUnmatched),
    fRefType(AliPID::kUnknown),
@@ -60,15 +60,15 @@ AliRsnCutPIDTOF::AliRsnCutPIDTOF(const AliRsnCutPIDTOF& copy) :
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutPIDTOF& AliRsnCutPIDTOF::operator=(const AliRsnCutPIDTOF& copy)
+AliRsnCutPIDTOF &AliRsnCutPIDTOF::operator=(const AliRsnCutPIDTOF &copy)
 {
 //
 // Assignment operator.
 // To set the reference PID type, calls the SetRefType method,
 // which sets the mass accordingly and coherently.
 //
-  if (this == &copy)
-    return *this;
+   if (this == &copy)
+      return *this;
 
    fRejectUnmatched = copy.fRejectUnmatched;
    fESDpid          = copy.fESDpid;
index 2811183384ffdce3379bc89e18d8d362c43f385f..eaa0604ad2e7b12800a8b105a7b05968e8b49ca6 100644 (file)
@@ -26,12 +26,12 @@ public:
                    Double_t    nSigmaMax       =  3.,
                    Bool_t      rejectUnmatched = kFALSE);
 
-   AliRsnCutPIDTOF(const AliRsnCutPIDTOFcopy);
-   AliRsnCutPIDTOF& operator=(const AliRsnCutPIDTOF& copy);
+   AliRsnCutPIDTOF(const AliRsnCutPIDTOF &copy);
+   AliRsnCutPIDTOF &operator=(const AliRsnCutPIDTOF &copy);
    virtual ~AliRsnCutPIDTOF() { }
 
-   AliESDpid*      ESDpid()  {return fESDpid;}
-   AliAODpidUtil*  AODpid()  {return fAODpid;}
+   AliESDpid      *ESDpid()  {return fESDpid;}
+   AliAODpidUtil  *AODpid()  {return fAODpid;}
 
    void            SetRejectUnmatched(Bool_t yn = kTRUE)      {fRejectUnmatched = yn;}
    void            SetNSigmaRange(Double_t min, Double_t max) {fMinD = min; fMaxD = max;}
@@ -72,7 +72,7 @@ inline Bool_t AliRsnCutPIDTOF::IsMatched(AliVTrack *vtrack)
    if (!isTOFout || !isTIME) return kFALSE;
 
    // do an additional check on integrated length for ESD tracks
-   AliESDtrack *esdTrack = dynamic_cast<AliESDtrack*>(vtrack);
+   AliESDtrack *esdTrack = dynamic_cast<AliESDtrack *>(vtrack);
    if (esdTrack) if (esdTrack->GetIntegratedLength() < 350.) return kFALSE;
 
    // if we are here, flags are OK and length also
index 9235b01305ce7a04eeaa9faf482abb812c4d50af..88ac0eafb62a0a62d4c7a5f730e9797d6a4addf1 100644 (file)
@@ -46,7 +46,7 @@ AliRsnCutPIDTPC::AliRsnCutPIDTPC
 
 //_________________________________________________________________________________________________
 AliRsnCutPIDTPC::AliRsnCutPIDTPC
-(const AliRsnCutPIDTPCcopy) :
+(const AliRsnCutPIDTPC &copy) :
    AliRsnCut(copy),
    fRejectOutside(copy.fRejectOutside),
    fMomMin(copy.fMomMin),
@@ -64,7 +64,7 @@ AliRsnCutPIDTPC::AliRsnCutPIDTPC
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutPIDTPC& AliRsnCutPIDTPC::operator=(const AliRsnCutPIDTPC& copy)
+AliRsnCutPIDTPC &AliRsnCutPIDTPC::operator=(const AliRsnCutPIDTPC &copy)
 {
 //
 // Assignment operator
@@ -72,7 +72,7 @@ AliRsnCutPIDTPC& AliRsnCutPIDTPC::operator=(const AliRsnCutPIDTPC& copy)
 
    AliRsnCut::operator=(copy);
    if (this == &copy)
-    return *this;
+      return *this;
 
    fRejectOutside = copy.fRejectOutside;
    fMomMin        = copy.fMomMin;
@@ -80,7 +80,7 @@ AliRsnCutPIDTPC& AliRsnCutPIDTPC::operator=(const AliRsnCutPIDTPC& copy)
    fRefType       = copy.fRefType;
    fESDpid        = copy.fESDpid;
    fAODpid        = copy.fAODpid;
-   
+
    Int_t i;
    for (i = 0; i < 5; i++) fBB[i] = copy.fBB[i];
 
index cce4d7bd3d15f10cd9c19f35d71b58941573a5a2..100612d07b78c9dc3e45fc3db9fb5747555b47eb 100644 (file)
@@ -28,12 +28,12 @@ public:
                    Double_t nSigmaMax     =  3.,
                    Bool_t   rejectOutside = kTRUE);
 
-   AliRsnCutPIDTPC(const AliRsnCutPIDTPCcopy);
-   AliRsnCutPIDTPC& operator=(const AliRsnCutPIDTPC& copy);
+   AliRsnCutPIDTPC(const AliRsnCutPIDTPC &copy);
+   AliRsnCutPIDTPC &operator=(const AliRsnCutPIDTPC &copy);
    virtual ~AliRsnCutPIDTPC() { }
 
-   AliESDpid*       ESDpid()  {return fESDpid;}
-   AliAODpidUtil*   AODpid()  {return fAODpid;}
+   AliESDpid       *ESDpid()  {return fESDpid;}
+   AliAODpidUtil   *AODpid()  {return fAODpid;}
 
    void             SetRejectOutside(Bool_t yn = kTRUE)           {fRejectOutside = yn;}
    void             SetMomentumRange(Double_t min, Double_t max)  {fMomMin = min; fMomMax = max;}
@@ -54,7 +54,7 @@ private:
    AliESDpid      *fESDpid;         //! ESD PID object
    AliAODpidUtil  *fAODpid;         //! AOD PID object
    Double_t        fBB[5];          //  Bethe-Bloch parameters
-   
+
 
    ClassDef(AliRsnCutPIDTPC, 1)
 };
index e5fab0c3ae1096882df3b805f80af6c12a18e2fe..3d2e27ca2da8f6565733bf688d2722fe1db6fd4a 100644 (file)
 
 ClassImp(AliRsnCutPion)
 
-const char* AliRsnCutPion::fgkCutName[AliRsnCutPion::kNpionCuts]={
-  "kQuality_Std2010",
-  "kTOFMatch_Std2010",
-  "kFastTPCpid_Nsigma",
-  "kFastTPCpid_1point5sigma",
-  "kFastTPCpid_2sigma",
-  "kFastTPCpid_3sigma",
-  "kFastTOFpid_Nsigma",
-  "kFastTOFpid_1point5sigma",
-  "kFastTOFpid_2sigma",
-  "kFastTOFpid_3sigma",
-  "kTPCTOFpid_DefaultKstarPP2010" 
+const char *AliRsnCutPion::fgkCutName[AliRsnCutPion::kNpionCuts]= {
+   "kQuality_Std2010",
+   "kTOFMatch_Std2010",
+   "kFastTPCpid_Nsigma",
+   "kFastTPCpid_1point5sigma",
+   "kFastTPCpid_2sigma",
+   "kFastTPCpid_3sigma",
+   "kFastTOFpid_Nsigma",
+   "kFastTOFpid_1point5sigma",
+   "kFastTOFpid_2sigma",
+   "kFastTOFpid_3sigma",
+   "kTPCTOFpid_DefaultKstarPP2010"
 };
 
 //__________________________________________________________________________________________________
 AliRsnCutPion::AliRsnCutPion(const char *name, AliRsnCutPion::ERsnPionCut cutID, AliPID::EParticleType pid) :
-  AliRsnCut(name, AliRsnTarget::kDaughter),
-  fNoPID(kFALSE),
-  fPID(pid),
-  fCutQuality(Form("%sQuality", name)),
-  fAppliedCutID(cutID),
-  fNsigmaCutTPC(1E6),
-  fNsigmaCutTOF(1E6)
+   AliRsnCut(name, AliRsnTarget::kDaughter),
+   fNoPID(kFALSE),
+   fPID(pid),
+   fCutQuality(Form("%sQuality", name)),
+   fAppliedCutID(cutID),
+   fNsigmaCutTPC(1E6),
+   fNsigmaCutTOF(1E6)
 {
-  //
-  // Constructor
-  // Initialize track quality cuts to 2010 defaults
-  //
-  fCutQuality.SetPtRange(0.15, 1E+20);
-  fCutQuality.SetEtaRange(-0.8, 0.8);
-  fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01");
-  fCutQuality.SetDCAZmax(2.0);
-  fCutQuality.SetSPDminNClusters(1);
-  fCutQuality.SetITSminNClusters(0);
-  fCutQuality.SetITSmaxChi2(1E+20);
-  fCutQuality.SetTPCminNClusters(70);
-  fCutQuality.SetTPCmaxChi2(4.0);
-  fCutQuality.SetRejectKinkDaughters();
-  fCutQuality.SetAODTestFilterBit(5);
-  AliInfo(Form("Applied cut on pion candidate: %s", AliRsnCutPion::fgkCutName[fAppliedCutID]));
+   //
+   // Constructor
+   // Initialize track quality cuts to 2010 defaults
+   //
+   fCutQuality.SetPtRange(0.15, 1E+20);
+   fCutQuality.SetEtaRange(-0.8, 0.8);
+   fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01");
+   fCutQuality.SetDCAZmax(2.0);
+   fCutQuality.SetSPDminNClusters(1);
+   fCutQuality.SetITSminNClusters(0);
+   fCutQuality.SetITSmaxChi2(1E+20);
+   fCutQuality.SetTPCminNClusters(70);
+   fCutQuality.SetTPCmaxChi2(4.0);
+   fCutQuality.SetRejectKinkDaughters();
+   fCutQuality.SetAODTestFilterBit(5);
+   AliInfo(Form("Applied cut on pion candidate: %s", AliRsnCutPion::fgkCutName[fAppliedCutID]));
 }
 
 //__________________________________________________________________________________________________
@@ -80,109 +80,109 @@ Bool_t AliRsnCutPion::IsSelected(TObject *obj)
 //
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
-   AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
    if (!track) return kFALSE;
-  
+
    Bool_t isSelected=kFALSE;
    switch (fAppliedCutID)
-     {
-     case    AliRsnCutPion::kQualityStd2010:
-       isSelected=IsSelectedByQualityStd2010(obj, 1, 1, 1);
-       break;
-     
-     case    AliRsnCutPion::kTOFMatchStd2010:
-       isSelected=IsSelectedByTOFMatchStd2010(obj);
-       break;
-     
-     case    AliRsnCutPion::kFastTPCpidNsigma:
-       isSelected=IsSelectedByFastTPCpidNsigma(obj,fNsigmaCutTPC);
-       break;
-     
-     case    AliRsnCutPion::kFastTPCpid1point5sigma:
-       isSelected=IsSelectedByFastTPCpid1point5sigma(obj);
-        break;
-     
-     case    AliRsnCutPion::kFastTPCpid2sigma:
-       isSelected=IsSelectedByFastTPCpid2sigma(obj);
-       break;
-       
-     case    AliRsnCutPion::kFastTPCpid3sigma:
-       isSelected=IsSelectedByFastTPCpid3sigma(obj);
-       break;
-       
-     case    AliRsnCutPion::kFastTOFpidNsigma:
-       isSelected=IsSelectedByFastTOFpidNsigma(obj,fNsigmaCutTOF);
-       break;
-       
-     case    AliRsnCutPion::kFastTOFpid1point5sigma:
-       isSelected=IsSelectedByFastTOFpid1point5sigma(obj);
-       break;
-       
-     case    AliRsnCutPion::kFastTOFpid2sigma:
-       isSelected=IsSelectedByFastTOFpid2sigma(obj);
-       break;
-     
-     case    AliRsnCutPion::kFastTOFpid3sigma:
-       isSelected=IsSelectedByFastTOFpid3sigma(obj);
-       break;
-       
-     case    AliRsnCutPion::kTPCTOFpidDefaultKstarPP2010:
-       isSelected=IsSelectedByTPCTOFpidDefaultKstarPP2010(obj);
-       break;
-       
-     default :
-       break;
-     }
-   
+   {
+      case    AliRsnCutPion::kQualityStd2010:
+         isSelected=IsSelectedByQualityStd2010(obj, 1, 1, 1);
+         break;
+
+      case    AliRsnCutPion::kTOFMatchStd2010:
+         isSelected=IsSelectedByTOFMatchStd2010(obj);
+         break;
+
+      case    AliRsnCutPion::kFastTPCpidNsigma:
+         isSelected=IsSelectedByFastTPCpidNsigma(obj,fNsigmaCutTPC);
+         break;
+
+      case    AliRsnCutPion::kFastTPCpid1point5sigma:
+         isSelected=IsSelectedByFastTPCpid1point5sigma(obj);
+         break;
+
+      case    AliRsnCutPion::kFastTPCpid2sigma:
+         isSelected=IsSelectedByFastTPCpid2sigma(obj);
+         break;
+
+      case    AliRsnCutPion::kFastTPCpid3sigma:
+         isSelected=IsSelectedByFastTPCpid3sigma(obj);
+         break;
+
+      case    AliRsnCutPion::kFastTOFpidNsigma:
+         isSelected=IsSelectedByFastTOFpidNsigma(obj,fNsigmaCutTOF);
+         break;
+
+      case    AliRsnCutPion::kFastTOFpid1point5sigma:
+         isSelected=IsSelectedByFastTOFpid1point5sigma(obj);
+         break;
+
+      case    AliRsnCutPion::kFastTOFpid2sigma:
+         isSelected=IsSelectedByFastTOFpid2sigma(obj);
+         break;
+
+      case    AliRsnCutPion::kFastTOFpid3sigma:
+         isSelected=IsSelectedByFastTOFpid3sigma(obj);
+         break;
+
+      case    AliRsnCutPion::kTPCTOFpidDefaultKstarPP2010:
+         isSelected=IsSelectedByTPCTOFpidDefaultKstarPP2010(obj);
+         break;
+
+      default :
+         break;
+   }
+
    return isSelected;
 }
 
 //-----------------------------------------------------------
 Bool_t AliRsnCutPion::IsSelectedByQualityStd2010(TObject *obj, Bool_t requireTPCin=kTRUE, Bool_t requireTPCrefit=kTRUE,  Bool_t requireITSrefit=kTRUE)
 {
-  //Checks if track passes the standard quality cuts
-  //defined for analysis in 2010 pp and PbPb data
-  
-  if (!obj) {
-    AliError("Invalid track object passed to function. Please check!");
-    return kFALSE;
-  }
-  
-  fAppliedCutID=AliRsnCutPion::kQualityStd2010;
-  AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
-  if (!track) return kFALSE;
-  
-  //optionally check refit flags (to be used for Phi and kStar analysis)
-  if (requireTPCin && ((track->GetStatus() & AliESDtrack::kTPCin) == 0) ) return kFALSE;
-  if (requireTPCrefit && ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) ) return kFALSE;
-  if (requireITSrefit && ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) ) return kFALSE;
-  
-  // quality
-  if (!fCutQuality.IsSelected(obj)) return kFALSE;
-  return kTRUE;
+   //Checks if track passes the standard quality cuts
+   //defined for analysis in 2010 pp and PbPb data
+
+   if (!obj) {
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
+   }
+
+   fAppliedCutID=AliRsnCutPion::kQualityStd2010;
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
+   if (!track) return kFALSE;
+
+   //optionally check refit flags (to be used for Phi and kStar analysis)
+   if (requireTPCin && ((track->GetStatus() & AliESDtrack::kTPCin) == 0) ) return kFALSE;
+   if (requireTPCrefit && ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) ) return kFALSE;
+   if (requireITSrefit && ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) ) return kFALSE;
+
+   // quality
+   if (!fCutQuality.IsSelected(obj)) return kFALSE;
+   return kTRUE;
 }
 
 //-----------------------------------------------------------
 Bool_t AliRsnCutPion::IsSelectedByTOFMatchStd2010(TObject *obj)
 {
-  /*
-  fbellini@cern.ch, 05.dec.2011
-  definition of TOF match: quality cuts 2010 + kTOFout + kTIME 
-  (optionally) L > 350. cm cut can be added
-  */
+   /*
+   fbellini@cern.ch, 05.dec.2011
+   definition of TOF match: quality cuts 2010 + kTOFout + kTIME
+   (optionally) L > 350. cm cut can be added
+   */
    if (!obj) {
-     AliError("Invalid track object passed to function. Please check!");
-     return kFALSE;
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
    }
 
    fAppliedCutID=AliRsnCutPion::kTOFMatchStd2010;
-   
+
    if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
-     return kFALSE;
-   
-   AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
+      return kFALSE;
+
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
    if (!track) return kFALSE;
    return MatchTOF(track);
 }
@@ -190,119 +190,118 @@ Bool_t AliRsnCutPion::IsSelectedByTOFMatchStd2010(TObject *obj)
 //-----------------------------------------------------------
 Bool_t AliRsnCutPion::IsSelectedByFastTPCpidNsigma(TObject *obj,Float_t nSigmaCut=10.)
 {
-  /*
-  fbellini@cern.ch, 05.dec.2011   Double_t pTPC   = track->GetTPCmomentum();
-  definition of fast TPC pid N-sigma: quality cuts 2010 + sigma cut on dE/dx without p dependence
-  */   
-  if (!obj) {
-    AliError("Invalid track object passed to function. Please check!");
-    return kFALSE;
-  }
-  fAppliedCutID=AliRsnCutPion::kFastTPCpidNsigma;
-  
-  // check initialization of PID object
-  AliPIDResponse *pid = fEvent->GetPIDResponse();
-  if (!pid) {
-    AliFatal("NULL PID response");
-    return kFALSE;
-  }
-  
-  if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
-    return kFALSE;
-  
-  AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
-  if (!track) return kFALSE;
-  
-  Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track,fPID));
-  return (nsTPC <= nSigmaCut); 
+   /*
+   fbellini@cern.ch, 05.dec.2011   Double_t pTPC   = track->GetTPCmomentum();
+   definition of fast TPC pid N-sigma: quality cuts 2010 + sigma cut on dE/dx without p dependence
+   */
+   if (!obj) {
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
+   }
+   fAppliedCutID=AliRsnCutPion::kFastTPCpidNsigma;
+
+   // check initialization of PID object
+   AliPIDResponse *pid = fEvent->GetPIDResponse();
+   if (!pid) {
+      AliFatal("NULL PID response");
+      return kFALSE;
+   }
+
+   if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
+      return kFALSE;
+
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
+   if (!track) return kFALSE;
+
+   Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track,fPID));
+   return (nsTPC <= nSigmaCut);
 }
 //-----------------------------------------------------------
 Bool_t AliRsnCutPion::IsSelectedByFastTOFpidNsigma(TObject *obj,Float_t nSigmaCut=10.)
 {
-  /*
-  fbellini@cern.ch, 05.dec.2011
-  definition of fast TOF pid N-sigma: quality cuts 2010 + sigma cut on t-t_0-t_exp without p dependence
-  */  
-  if (!obj) {
-    AliError("Invalid track object passed to function. Please check!");
-    return kFALSE;
-  }
-  
-  fAppliedCutID=AliRsnCutPion::kFastTOFpidNsigma;
-  
-  // check initialization of PID object
-  AliPIDResponse *pid = fEvent->GetPIDResponse();
-  if (!pid) {
-    AliFatal("NULL PID response");
-    return kFALSE;
-  }
-  
-  if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
-    return kFALSE;
-  
-  AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
-  if (!track) return kFALSE;
-  Bool_t isTOF = MatchTOF(track);
-  Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
-  
-  return (nsTOF <= nSigmaCut); 
+   /*
+   fbellini@cern.ch, 05.dec.2011
+   definition of fast TOF pid N-sigma: quality cuts 2010 + sigma cut on t-t_0-t_exp without p dependence
+   */
+   if (!obj) {
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
+   }
+
+   fAppliedCutID=AliRsnCutPion::kFastTOFpidNsigma;
+
+   // check initialization of PID object
+   AliPIDResponse *pid = fEvent->GetPIDResponse();
+   if (!pid) {
+      AliFatal("NULL PID response");
+      return kFALSE;
+   }
+
+   if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE))
+      return kFALSE;
+
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
+   if (!track) return kFALSE;
+   Bool_t isTOF = MatchTOF(track);
+   Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
+
+   return (nsTOF <= nSigmaCut);
 }
 
 //-----------------------------------------------------------
 Bool_t AliRsnCutPion::IsSelectedByTPCTOFpidDefaultKstarPP2010(TObject *obj)
 {
-  /*
-  fbellini@cern.ch, 05.dec.2011
-  definition of TPC-TOF pid for pp phi and Kstar analysis on 2010 data: 
-  quality cuts 2010 + sigma cut on dE/dx with pTPC dependence + sigma cut on t-t_0-t_exp with p dependence
-  */  
-
-  if (!obj) {
-    AliError("Invalid track object passed to function. Please check!");
-    return kFALSE;
-  }
-    fAppliedCutID=AliRsnCutPion::kTPCTOFpidDefaultKstarPP2010;
-  
-  // check initialization of PID object
-  AliPIDResponse *pid = fEvent->GetPIDResponse();
-  if (!pid) {
-    AliFatal("NULL PID response");
-    return kFALSE;
-  }
-  
-  if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE)) //require ITS+TPCrefit and TPCin
-    return kFALSE;
-   
-  AliVTrack *track = dynamic_cast<AliVTrack*>(fDaughter->GetRef());
-  if (!track) return kFALSE;
-  
-  Bool_t   isTOF  = MatchTOF(track);
-  Double_t pTPC   = track->GetTPCmomentum();
-  Double_t p      = track->P();
-  Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
-  Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
-  Double_t maxTPC = 1E20;
-  Double_t maxTOF = 1E20;
-
-  if (isTOF) {
-    // TPC: 5sigma cut for all
-    if (nsTPC > 5.0) return kFALSE;
-    // TOF: 3sigma below 1.5 GeV, 2sigma above
-    if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
-    return (nsTOF <= maxTOF);
-  } else {
-    // TPC: 
-    // all   below   350         MeV: 5sigma
-    // all   between 350 and 500 MeV: 3sigma
-    // pions above   500         MeV: 2sigma
-    if (pTPC <= 0.35) 
-      maxTPC = 5.0;
-    else 
-      if (pTPC > 0.35 && pTPC <= 0.5)
-       maxTPC = 3.0;
+   /*
+   fbellini@cern.ch, 05.dec.2011
+   definition of TPC-TOF pid for pp phi and Kstar analysis on 2010 data:
+   quality cuts 2010 + sigma cut on dE/dx with pTPC dependence + sigma cut on t-t_0-t_exp with p dependence
+   */
+
+   if (!obj) {
+      AliError("Invalid track object passed to function. Please check!");
+      return kFALSE;
+   }
+   fAppliedCutID=AliRsnCutPion::kTPCTOFpidDefaultKstarPP2010;
+
+   // check initialization of PID object
+   AliPIDResponse *pid = fEvent->GetPIDResponse();
+   if (!pid) {
+      AliFatal("NULL PID response");
+      return kFALSE;
+   }
+
+   if (!IsSelectedByQualityStd2010(obj, kTRUE, kTRUE, kTRUE)) //require ITS+TPCrefit and TPCin
+      return kFALSE;
+
+   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
+   if (!track) return kFALSE;
+
+   Bool_t   isTOF  = MatchTOF(track);
+   Double_t pTPC   = track->GetTPCmomentum();
+   Double_t p      = track->P();
+   Double_t nsTPC  = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
+   Double_t nsTOF  = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
+   Double_t maxTPC = 1E20;
+   Double_t maxTOF = 1E20;
+
+   if (isTOF) {
+      // TPC: 5sigma cut for all
+      if (nsTPC > 5.0) return kFALSE;
+      // TOF: 3sigma below 1.5 GeV, 2sigma above
+      if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
+      return (nsTOF <= maxTOF);
+   } else {
+      // TPC:
+      // all   below   350         MeV: 5sigma
+      // all   between 350 and 500 MeV: 3sigma
+      // pions above   500         MeV: 2sigma
+      if (pTPC <= 0.35)
+         maxTPC = 5.0;
+      else if (pTPC > 0.35 && pTPC <= 0.5)
+         maxTPC = 3.0;
       else
-       maxTPC = 2.0;
-    
-    return (nsTPC <= maxTPC);
-  } 
+         maxTPC = 2.0;
+
+      return (nsTPC <= maxTPC);
+   }
 }
index 0966a512999d4bcf772df4bc4cf22e14c7719a99..d9d27e926ccb76bf6fafa526964ecc1416a6bb3b 100644 (file)
 class AliRsnCutPion : public AliRsnCut {
 
 public:
-  enum ERsnPionCut {
-    kQualityStd2010,
-    kTOFMatchStd2010,
-    kFastTPCpidNsigma,
-    kFastTPCpid1point5sigma,
-    kFastTPCpid2sigma,
-    kFastTPCpid3sigma,
-    kFastTOFpidNsigma,
-    kFastTOFpid1point5sigma,
-    kFastTOFpid2sigma,
-    kFastTOFpid3sigma,
-    kTPCTOFpidDefaultKstarPP2010,
-    kNpionCuts
-  };
-
-  AliRsnCutPion(const char *name = "",  AliRsnCutPion::ERsnPionCut cutID = AliRsnCutPion::kQualityStd2010, AliPID::EParticleType pid = AliPID::kPion);
-  virtual ~AliRsnCutPion() { }
-  
-  void                   SetNoPID(Bool_t yn = kTRUE)        {fNoPID = yn;}  
-  AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
-  Bool_t                 MatchTOF(const AliVTrack *vtrack);
-  
-  Bool_t         IsSelected(TObject *obj);
-  
-  Bool_t         IsSelectedByQualityStd2010(TObject *obj, Bool_t requireTPCin, Bool_t requireTPCrefit,  Bool_t requireITSrefit );
-  Bool_t         IsSelectedByTOFMatchStd2010(TObject *obj);
-
-  Bool_t         IsSelectedByFastTPCpidNsigma(TObject *obj,Float_t nSigmaCut);
-  Bool_t         IsSelectedByFastTPCpid1point5sigma(TObject *obj)   {return IsSelectedByFastTPCpidNsigma(obj, 1.5);}
-  Bool_t         IsSelectedByFastTPCpid2sigma(TObject *obj)         {return IsSelectedByFastTPCpidNsigma(obj, 2.0);}
-  Bool_t         IsSelectedByFastTPCpid3sigma(TObject *obj)         {return IsSelectedByFastTPCpidNsigma(obj, 3.0);}
-
-  Bool_t         IsSelectedByFastTOFpidNsigma(TObject *obj,Float_t nSigmaCut);
-  Bool_t         IsSelectedByFastTOFpid1point5sigma(TObject *obj)   {return IsSelectedByFastTOFpidNsigma(obj, 1.5);}
-  Bool_t         IsSelectedByFastTOFpid2sigma(TObject *obj)         {return IsSelectedByFastTOFpidNsigma(obj, 2.0);}
-  Bool_t         IsSelectedByFastTOFpid3sigma(TObject *obj)         {return IsSelectedByFastTOFpidNsigma(obj, 3.0);}
-
-  Bool_t         IsSelectedByTPCTOFpidDefaultKstarPP2010(TObject *obj);
-  
-  //setters
-  void     SetNsigmaCutTPC(Float_t nMaxSigmaCut=1E6){fNsigmaCutTPC=nMaxSigmaCut; return;}
-  void     SetNsigmaCutTOF(Float_t nMaxSigmaCut=1E6){fNsigmaCutTOF=nMaxSigmaCut; return;}
-
-  //getters
-  const char *  GetAppliedPionCutName() {if (fAppliedCutID>0){ return fgkCutName[fAppliedCutID];} else {return "none";}}
-  Int_t   GetAppliedPionCutId() { return fAppliedCutID;}
-  const char *  GetPionCutName(AliRsnCutPion::ERsnPionCut cutID) { return fgkCutName[cutID];}
-  
- private:
-  
-  Bool_t                fNoPID;            // flag to switch off PID check
-  AliPID::EParticleType fPID;              // PID for track
-  AliRsnCutTrackQuality fCutQuality;       // track quality cut
-  Int_t                 fAppliedCutID;     // ID of applied cut
-  static const char*    fgkCutName[kNpionCuts]; //array with cuts names
-  Float_t               fNsigmaCutTPC;     //  max sigma for TPC dE/dx fast cut
-  Float_t               fNsigmaCutTOF;     //  max sigma for TOF t-t0-t_exp fast cut
-
-  ClassDef(AliRsnCutPion,1) // cut definitions for K*
-     
+   enum ERsnPionCut {
+      kQualityStd2010,
+      kTOFMatchStd2010,
+      kFastTPCpidNsigma,
+      kFastTPCpid1point5sigma,
+      kFastTPCpid2sigma,
+      kFastTPCpid3sigma,
+      kFastTOFpidNsigma,
+      kFastTOFpid1point5sigma,
+      kFastTOFpid2sigma,
+      kFastTOFpid3sigma,
+      kTPCTOFpidDefaultKstarPP2010,
+      kNpionCuts
+   };
+
+   AliRsnCutPion(const char *name = "",  AliRsnCutPion::ERsnPionCut cutID = AliRsnCutPion::kQualityStd2010, AliPID::EParticleType pid = AliPID::kPion);
+   virtual ~AliRsnCutPion() { }
+
+   void                   SetNoPID(Bool_t yn = kTRUE)        {fNoPID = yn;}
+   AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
+   Bool_t                 MatchTOF(const AliVTrack *vtrack);
+
+   Bool_t         IsSelected(TObject *obj);
+
+   Bool_t         IsSelectedByQualityStd2010(TObject *obj, Bool_t requireTPCin, Bool_t requireTPCrefit,  Bool_t requireITSrefit );
+   Bool_t         IsSelectedByTOFMatchStd2010(TObject *obj);
+
+   Bool_t         IsSelectedByFastTPCpidNsigma(TObject *obj,Float_t nSigmaCut);
+   Bool_t         IsSelectedByFastTPCpid1point5sigma(TObject *obj)   {return IsSelectedByFastTPCpidNsigma(obj, 1.5);}
+   Bool_t         IsSelectedByFastTPCpid2sigma(TObject *obj)         {return IsSelectedByFastTPCpidNsigma(obj, 2.0);}
+   Bool_t         IsSelectedByFastTPCpid3sigma(TObject *obj)         {return IsSelectedByFastTPCpidNsigma(obj, 3.0);}
+
+   Bool_t         IsSelectedByFastTOFpidNsigma(TObject *obj,Float_t nSigmaCut);
+   Bool_t         IsSelectedByFastTOFpid1point5sigma(TObject *obj)   {return IsSelectedByFastTOFpidNsigma(obj, 1.5);}
+   Bool_t         IsSelectedByFastTOFpid2sigma(TObject *obj)         {return IsSelectedByFastTOFpidNsigma(obj, 2.0);}
+   Bool_t         IsSelectedByFastTOFpid3sigma(TObject *obj)         {return IsSelectedByFastTOFpidNsigma(obj, 3.0);}
+
+   Bool_t         IsSelectedByTPCTOFpidDefaultKstarPP2010(TObject *obj);
+
+   //setters
+   void     SetNsigmaCutTPC(Float_t nMaxSigmaCut=1E6) {fNsigmaCutTPC=nMaxSigmaCut; return;}
+   void     SetNsigmaCutTOF(Float_t nMaxSigmaCut=1E6) {fNsigmaCutTOF=nMaxSigmaCut; return;}
+
+   //getters
+   const char   *GetAppliedPionCutName() {if (fAppliedCutID>0) { return fgkCutName[fAppliedCutID];} else {return "none";}}
+   Int_t   GetAppliedPionCutId() { return fAppliedCutID;}
+   const char   *GetPionCutName(AliRsnCutPion::ERsnPionCut cutID) { return fgkCutName[cutID];}
+
+private:
+
+   Bool_t                fNoPID;            // flag to switch off PID check
+   AliPID::EParticleType fPID;              // PID for track
+   AliRsnCutTrackQuality fCutQuality;       // track quality cut
+   Int_t                 fAppliedCutID;     // ID of applied cut
+   static const char    *fgkCutName[kNpionCuts]; //array with cuts names
+   Float_t               fNsigmaCutTPC;     //  max sigma for TPC dE/dx fast cut
+   Float_t               fNsigmaCutTOF;     //  max sigma for TOF t-t0-t_exp fast cut
+
+   ClassDef(AliRsnCutPion,1) // cut definitions for K*
+
 };
 
 #endif
index 6296b2354f1433b61416d56bb53d9478fc50a7fd..c3cbb6d4b34014e609aea096c549daa28ed3294c 100644 (file)
@@ -50,45 +50,45 @@ Bool_t AliRsnCutPion2010PP::IsSelected(TObject *obj)
 
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
    AliVTrack *track = fDaughter->Ref2Vtrack();
    if (!track) {
       if (!fDaughter->GetRef()) AliWarning("NULL ref");
       return kFALSE;
    }
-   
+
    // check flags
    if ((track->GetStatus() & AliESDtrack::kTPCin   ) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
-   
+
    // quality
    if (!fCutQuality.IsSelected(obj)) return kFALSE;
-   
+
    // check initialization of PID object
    AliPIDResponse *pid = fEvent->GetPIDResponse();
    if (!pid) {
       AliFatal("NULL PID response");
       return kFALSE;
    }
-   
+
    // PID ITS :
    // depends on momentum
    //SetRangeD(0.0, 4.0);
    //fCutValueD = TMath::Abs(pid->NumberOfSigmasITS(track, AliPID::kPion));
    //if (!OkRangeD()) return kFALSE;
-   
+
    // PID TPC :
    // depends on momentum
    SetRangeD(0.0, 3.0);
    if (track->GetTPCmomentum() < 0.350) SetRangeD(0.0, 5.0);
    fCutValueD = TMath::Abs(pid->NumberOfSigmasTPC(track, AliPID::kPion));
    if (!OkRangeD()) return kFALSE;
-   
+
    // if TOF is not matched, end here
    // otherwise check TOF
-   if (!MatchTOF(track)) 
+   if (!MatchTOF(track))
       return kTRUE;
    else {
       //SetRangeD(0.0, 3.0);
index 3e014de50500b03cd979d9742645b00f7598fbfc..911a02a3701ad59d97673341a37f78221d8827a8 100644 (file)
@@ -17,9 +17,9 @@ public:
 
    AliRsnCutPion2010PP(const char *name = "");
    virtual ~AliRsnCutPion2010PP() { }
-   
+
    virtual Bool_t IsSelected(TObject *obj);
-   
+
    AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
 
 private:
index 7a5a8162528bc92742e7ee9fec5d9eb8654c9090..7dd93e63b51a06ce6ef2b3804914f4ed3aeebd26 100644 (file)
@@ -47,8 +47,8 @@ Bool_t AliRsnCutPrimaryVertex::IsSelected(TObject *object)
    if (!TargetOK(object)) return kFALSE;
 
    // retrieve ESD event
-   AliESDEvent *esd = dynamic_cast<AliESDEvent*>(fEvent->GetRef());
-   AliAODEvent *aod = dynamic_cast<AliAODEvent*>(fEvent->GetRef());
+   AliESDEvent *esd = dynamic_cast<AliESDEvent *>(fEvent->GetRef());
+   AliAODEvent *aod = dynamic_cast<AliAODEvent *>(fEvent->GetRef());
 
    if (esd) {
       // pile-up check
@@ -99,7 +99,7 @@ Bool_t AliRsnCutPrimaryVertex::IsSelected(TObject *object)
          return kFALSE;
       }
       // now check primary vertex
-      aodv = (AliAODVertex*)aod->GetPrimaryVertex();
+      aodv = (AliAODVertex *)aod->GetPrimaryVertex();
       if (CheckVertex(aodv)) {
          AliDebugClass(1, "Vertex TRK is OK");
          fCutValueD = aodv->GetZ();
index f3a2c426a0ebcb416e6efa42b6d4d9c0e891717a..88cf51a917f49fdebdfe5f3742c92a68f0830ddb 100644 (file)
@@ -44,7 +44,7 @@ inline Bool_t AliRsnCutPrimaryVertex::CheckVertex(AliVVertex *vertex)
 // least one contributor
 //
 
-   if (!vertex) return kFALSE; 
+   if (!vertex) return kFALSE;
    if (vertex->GetNContributors() < 1) return kFALSE;
    return kTRUE;
 }
index e8f22ecd195259b56d37e58bd123ba64f0704d20..6346846b458c11eba452e09d7356952a1f1dcb86 100644 (file)
@@ -50,45 +50,45 @@ Bool_t AliRsnCutProton2010PP::IsSelected(TObject *obj)
 
    // coherence check
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check track
    AliVTrack *track = fDaughter->Ref2Vtrack();
    if (!track) {
       if (!fDaughter->GetRef()) AliWarning("NULL ref");
       return kFALSE;
    }
-   
+
    // check flags
    if ((track->GetStatus() & AliESDtrack::kTPCin   ) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
    if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
-   
+
    // quality
    if (!fCutQuality.IsSelected(obj)) return kFALSE;
-   
+
    // check initialization of PID object
    AliPIDResponse *pid = fEvent->GetPIDResponse();
    if (!pid) {
       AliFatal("NULL PID response");
       return kFALSE;
    }
-   
+
    // PID ITS :
    // depends on momentum
    //SetRangeD(0.0, 4.0);
    //fCutValueD = TMath::Abs(pid->NumberOfSigmasITS(track, AliPID::kProton));
    //if (!OkRangeD()) return kFALSE;
-   
+
    // PID TPC :
    // depends on momentum
    SetRangeD(0.0, 3.0);
    if (track->GetTPCmomentum() < 0.350) SetRangeD(0.0, 5.0);
    fCutValueD = TMath::Abs(pid->NumberOfSigmasTPC(track, AliPID::kProton));
    if (!OkRangeD()) return kFALSE;
-   
+
    // if TOF is not matched, end here
    // otherwise check TOF
-   if (!MatchTOF(track)) 
+   if (!MatchTOF(track))
       return kTRUE;
    else {
       //SetRangeD(0.0, 3.0);
index fefc8789eab9a62bef272867164bd9ad0a470013..9e2c4215c812d47adb4f835ae52569c1df8bf74c 100644 (file)
@@ -19,9 +19,9 @@ public:
 
    AliRsnCutProton2010PP(const char *name = "");
    virtual ~AliRsnCutProton2010PP() { }
-   
+
    virtual Bool_t IsSelected(TObject *obj);
-   
+
    AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
 
 private:
index 0cdec722fdc90a05a49796fc8213fd74f3a6e72b..fb681d70cfe85f652571a9bfc07615056f3c0db9 100644 (file)
@@ -25,7 +25,8 @@ AliRsnCutSet::AliRsnCutSet() :
    fCutSchemeIndexed(""),
    fBoolValues(0),
    fIsScheme(kFALSE),
-   fExpression(0)
+   fExpression(0),
+   fMonitors(0)
 {
 //
 // Constructor without name (not recommended)
@@ -44,7 +45,8 @@ AliRsnCutSet::AliRsnCutSet(const char *name, RSNTARGET target) :
    fCutSchemeIndexed(""),
    fBoolValues(0),
    fIsScheme(kFALSE),
-   fExpression(0)
+   fExpression(0),
+   fMonitors(0)
 {
 //
 // Constructor with argument name (recommended)
@@ -56,7 +58,7 @@ AliRsnCutSet::AliRsnCutSet(const char *name, RSNTARGET target) :
 }
 
 //_____________________________________________________________________________
-AliRsnCutSet::AliRsnCutSet(const AliRsnCutSet & copy) :
+AliRsnCutSet::AliRsnCutSet(const AliRsnCutSet &copy) :
    AliRsnTarget(copy),
    fCuts(copy.fCuts),
    fNumOfCuts(copy.fNumOfCuts),
@@ -64,7 +66,8 @@ AliRsnCutSet::AliRsnCutSet(const AliRsnCutSet & copy) :
    fCutSchemeIndexed(copy.fCutSchemeIndexed),
    fBoolValues(0),
    fIsScheme(copy.fIsScheme),
-   fExpression(copy.fExpression)
+   fExpression(copy.fExpression),
+   fMonitors(copy.fMonitors)
 {
 //
 // Copy constructor
@@ -80,7 +83,7 @@ AliRsnCutSet::AliRsnCutSet(const AliRsnCutSet & copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnCutSet& AliRsnCutSet::operator=(const AliRsnCutSet & copy)
+AliRsnCutSet &AliRsnCutSet::operator=(const AliRsnCutSet &copy)
 {
 //
 // Assignment operator.
@@ -88,14 +91,15 @@ AliRsnCutSet& AliRsnCutSet::operator=(const AliRsnCutSet & copy)
 
    AliRsnTarget::operator=(copy);
    if (this == &copy)
-     return *this;
-   
+      return *this;
+
    fCuts = copy.fCuts;
    fNumOfCuts = copy.fNumOfCuts;
    fCutScheme = copy.fCutScheme;
    fCutSchemeIndexed = copy.fCutSchemeIndexed;
    fIsScheme = copy.fIsScheme;
    fExpression = copy.fExpression;
+   fMonitors = copy.fMonitors;
 
    if (fBoolValues) delete [] fBoolValues;
 
@@ -119,6 +123,7 @@ AliRsnCutSet::~AliRsnCutSet()
 
    delete fExpression;
    delete [] fBoolValues;
+   delete fMonitors;
 }
 
 //_____________________________________________________________________________
@@ -164,7 +169,7 @@ void AliRsnCutSet::ShowCuts() const
    AliRsnCut *cut;
 
    for (Int_t i = 0; i < fCuts.GetEntriesFast() ; i++) {
-      cut = (AliRsnCut*)fCuts.At(i);
+      cut = (AliRsnCut *)fCuts.At(i);
       cut->Print();
    }
 }
@@ -183,11 +188,23 @@ Bool_t AliRsnCutSet::IsSelected(TObject *object)
    Bool_t boolReturn = kTRUE;
    AliRsnCut *cut;
    for (i = 0; i < fNumOfCuts; i++) {
-      cut = (AliRsnCut*)fCuts.At(i);
+      cut = (AliRsnCut *)fCuts.At(i);
       fBoolValues[i] = cut->IsSelected(object);
    }
 
    if (fIsScheme) boolReturn = Passed();
+
+   // fill monitoring info
+   if (boolReturn && fMonitors) {
+      if (TargetOK(object)) {
+         TIter next(fMonitors);
+         AliRsnListOutput *mo;
+         while ((mo = (AliRsnListOutput *) next())) {
+            mo->Fill(fEvent,fDaughter);
+         }
+      }
+   }
+
    return boolReturn;
 }
 
@@ -232,7 +249,7 @@ Int_t AliRsnCutSet::GetIndexByCutName(TString s)
    AliRsnCut *cut;
 
    for (i = 0; i < fCuts.GetEntriesFast(); i++) {
-      cut = (AliRsnCut*) fCuts.At(i);
+      cut = (AliRsnCut *) fCuts.At(i);
       if (!s.CompareTo(cut->GetName())) return i;
    }
 
@@ -268,7 +285,7 @@ Bool_t AliRsnCutSet::IsValidScheme()
    TString str(fCutScheme);
    AliRsnCut *cut;
    for (Int_t i = 0; i < fNumOfCuts; i++) {
-      cut = (AliRsnCut*)fCuts.At(i);
+      cut = (AliRsnCut *)fCuts.At(i);
       str.ReplaceAll(cut->GetName(), "");
    }
    str.ReplaceAll("&", "");
@@ -337,7 +354,7 @@ void AliRsnCutSet::PrintSetInfo()
    AliInfo("====== Cuts ======");
    AliRsnCut *cut;
    for (i = 0; i < fCuts.GetEntriesFast(); i++) {
-      cut = (AliRsnCut*) fCuts.At(i);
+      cut = (AliRsnCut *) fCuts.At(i);
       if (cut) AliInfo(Form("%d %d", i, fBoolValues[i]));
    }
    AliInfo("========== END Rsn Cut Mgr info ==============");
@@ -357,9 +374,30 @@ TString AliRsnCutSet::GetCutSchemeIndexed()
    AliDebug(AliLog::kDebug, Form("Num of cuts %d", fCuts.GetEntriesFast()));
    AliRsnCut *cut;
    for (i = 0; i < fCuts.GetEntriesFast(); i++) {
-      cut = (AliRsnCut*) fCuts.At(i);
+      cut = (AliRsnCut *) fCuts.At(i);
       str.ReplaceAll(cut->GetName(), Form("%d", i));
    }
    AliDebug(AliLog::kDebug, "->");
    return str;
 }
+
+Bool_t AliRsnCutSet::Init(TList *list)
+{
+   if (!fMonitors) return kTRUE;
+
+   TIter next(fMonitors);
+   AliRsnListOutput *mo;
+   while ((mo = (AliRsnListOutput *) next())) {
+      mo->Init(GetName(),list);
+   }
+
+
+   return kTRUE;
+}
+
+void AliRsnCutSet::AddMonitor(AliRsnListOutput *mon)
+{
+   if (!fMonitors) fMonitors = new TObjArray();
+   fMonitors->Add(mon);
+}
+
index 6ca9c7071e75b046eac8a8d3440d4e8a49182461..6173f4ba0606f8ec0da29c36bd68de40e1da173f 100644 (file)
@@ -16,6 +16,7 @@
 #include <TObjArray.h>
 
 #include "AliRsnTarget.h"
+#include "AliRsnListOutput.h"
 
 class AliRsnCut;
 class AliRsnDaughter;
@@ -29,10 +30,11 @@ public:
    AliRsnCutSet();
    AliRsnCutSet(const char *name, RSNTARGET target);
    AliRsnCutSet(const AliRsnCutSet &copy);
-   AliRsnCutSet& operator=(const AliRsnCutSet& copy);
+   AliRsnCutSet &operator=(const AliRsnCutSet &copy);
    ~AliRsnCutSet();
 
-   void      AddCut(AliRsnCut* cut);
+   void      AddCut(AliRsnCut *cut);
+   Bool_t    Init(TList *list);
 
    void      ShowCuts() const;
    Int_t     GetIndexByCutName(TString s);
@@ -55,19 +57,23 @@ public:
 
    TObjArray *GetCuts() { return &fCuts; }
 
-private:
+   void AddMonitor(AliRsnListOutput *mon);
+   TObjArray *GetMonitorOutput() { return fMonitors; }
+   void SetMonitorOutput(TObjArray *monitors) { fMonitors = monitors; }
 
-   TObjArray     fCuts;                  // array of cuts
-   Int_t         fNumOfCuts;             // number of cuts
-   TString       fCutScheme;             // cut scheme
-   TString       fCutSchemeIndexed;      // cut scheme indexed
+private:
 
-   Bool_t       *fBoolValues;            //[fNumOfCuts]
-   Bool_t        fIsScheme;              // is scheme
+   TObjArray         fCuts;                  // array of cuts
+   Int_t             fNumOfCuts;             // number of cuts
+   TString           fCutScheme;             // cut scheme
+   TString           fCutSchemeIndexed;      // cut scheme indexed
 
-   AliRsnExpression  *fExpression;       // pointer to AliRsnExpression
+   Bool_t           *fBoolValues;            //[fNumOfCuts]
+   Bool_t            fIsScheme;              // is scheme
 
-   ClassDef(AliRsnCutSet, 1)   // ROOT dictionary
+   AliRsnExpression *fExpression;            // pointer to AliRsnExpression
+   TObjArray        *fMonitors;              // array of monitor object
+   ClassDef(AliRsnCutSet, 2)   // ROOT dictionary
 };
 
 #endif
index 7736287683af4f68261598ccbbbfdc96514dd947..927ae56292dbc2eea1bfdf9668c4660eb5733281 100644 (file)
@@ -86,16 +86,16 @@ AliRsnCutTrackQuality::AliRsnCutTrackQuality(const AliRsnCutTrackQuality &copy)
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutTrackQualityAliRsnCutTrackQuality::operator=(const AliRsnCutTrackQuality &copy)
+AliRsnCutTrackQuality &AliRsnCutTrackQuality::operator=(const AliRsnCutTrackQuality &copy)
 {
 //
 // Assignment operator.
 // Just copy all data member values.
 //
 
-  if (this == &copy)
-    return *this;
-  
+   if (this == &copy)
+      return *this;
+
    fFlagsOn = copy.fFlagsOn;
    fFlagsOff = copy.fFlagsOff;
    fRejectKinkDaughters = copy.fRejectKinkDaughters;
@@ -255,7 +255,7 @@ Bool_t AliRsnCutTrackQuality::CheckAOD(AliAODTrack *track)
    if (fAODTestFilterBit >= 0) {
       UInt_t bit = 1 << fAODTestFilterBit;
       AliDebugClass(2, Form("Required a test filter bit for AOD check: %u (result: %s)", bit, (track->TestFilterBit(bit) ? "accept" : "reject")));
-      if (!track->TestFilterBit(bit)) 
+      if (!track->TestFilterBit(bit))
          return kFALSE;
       else {
          if (track->Pt() < fPt[0] || track->Pt() > fPt[1]) return kFALSE;
@@ -263,7 +263,7 @@ Bool_t AliRsnCutTrackQuality::CheckAOD(AliAODTrack *track)
          return kTRUE;
       }
    }
-   
+
    // try to retrieve the reference AOD event
    AliAODEvent *aodEvent = 0x0;
    if (fEvent) aodEvent = fEvent->GetRefAOD();
index 88ba13ff1f9ad47b56deeab21ea3de24fe1ee910..0157122b3df640a09ba9f6bc82da2cd317a5a0f3 100644 (file)
@@ -24,8 +24,8 @@ class AliRsnCutTrackQuality : public AliRsnCut {
 public:
 
    AliRsnCutTrackQuality(const char *name = "AliRsncutTrackQuality");
-   AliRsnCutTrackQuality(const AliRsnCutTrackQualitycopy);
-   AliRsnCutTrackQuality& operator=(const AliRsnCutTrackQuality& copy);
+   AliRsnCutTrackQuality(const AliRsnCutTrackQuality &copy);
+   AliRsnCutTrackQuality &operator=(const AliRsnCutTrackQuality &copy);
    virtual ~AliRsnCutTrackQuality() { }
 
    void      DisableAll();
@@ -48,9 +48,9 @@ public:
    void      SetTPCmaxChi2(Double_t value)             {fTPCmaxChi2 = value;}
 
    void      SetRejectKinkDaughters(Bool_t yn = kTRUE) {fRejectKinkDaughters = yn;}
-   
+
    void      SetAODTestFilterBit(Int_t value)          {fAODTestFilterBit = value;}
-   
+
    void      SetDefaults2010();
 
    virtual Bool_t IsSelected(TObject *obj);
@@ -60,7 +60,7 @@ protected:
 
    Bool_t      CheckESD(AliESDtrack *track);
    Bool_t      CheckAOD(AliAODTrack *track);
-   const charBinary(UInt_t number);
+   const char *Binary(UInt_t number);
 
    ULong_t    fFlagsOn;                // status flags which must be ON (used AliESDtrack ones, connected with '|')
    ULong_t    fFlagsOff;               // status flags which must be OFF (used AliESDtrack ones, connected with '|')
@@ -88,20 +88,20 @@ protected:
 };
 
 //__________________________________________________________________________________________________
-inline const char * AliRsnCutTrackQuality::Binary(UInt_t number)
+inline const char *AliRsnCutTrackQuality::Binary(UInt_t number)
 {
 //
 // Convert an integer in binary
 //
 
-    static char b[50];
-    b[0] = '\0';
+   static char b[50];
+   b[0] = '\0';
 
-    UInt_t z;
-    for (z = 512; z > 0; z >>= 1)
-        strncat(b, ((number & z) == z) ? "1" : "0", 1);
+   UInt_t z;
+   for (z = 512; z > 0; z >>= 1)
+      strncat(b, ((number & z) == z) ? "1" : "0", 1);
 
-    return b;
+   return b;
 }
 
 //__________________________________________________________________________________________________
index ba5fb5d0c005a7833f51dd925b7a3173e930d2f3..0ed07a583d4eb852e5c2ab392ab3e46a6e0ff25c 100644 (file)
@@ -41,7 +41,7 @@ AliRsnCutTrue::AliRsnCutTrue(const AliRsnCutTrue &copy) :
 }
 
 //__________________________________________________________________________________________________
-AliRsnCutTrueAliRsnCutTrue::operator=(const AliRsnCutTrue &copy)
+AliRsnCutTrue &AliRsnCutTrue::operator=(const AliRsnCutTrue &copy)
 {
 //
 // Assignment operator
@@ -62,17 +62,17 @@ Bool_t AliRsnCutTrue::IsSelected(TObject *obj)
 
    // convert target
    if (!TargetOK(obj)) return kFALSE;
-   
+
    // check if MC is present
    if (!fDaughter->GetRefMC()) {
       AliError("Cannot check cut 'AliRsnCutTrue' without MC information");
       return kFALSE;
    }
-   
+
    // compare PDG
    fCutValueI = fDaughter->GetPDGAbs();
    return OkValueI();
 }
 
-   
-   
+
+
index 8577e5f68fbbae30fd600d16000769b41eb10bb6..c03f91ab20362cd6871f618776a42b561e84d646 100644 (file)
 #include "AliRsnCut.h"
 
 class AliRsnCutTrue : public AliRsnCut {
-   
+
 public:
 
    AliRsnCutTrue(const char *name, Int_t pdg);
    AliRsnCutTrue(const char *name, AliRsnDaughter::ESpecies species);
-   AliRsnCutTrue(const AliRsnCutTruecopy);
-   AliRsnCutTrueoperator=(const AliRsnCutTrue &copy);
+   AliRsnCutTrue(const AliRsnCutTrue &copy);
+   AliRsnCutTrue &operator=(const AliRsnCutTrue &copy);
    virtual ~AliRsnCutTrue() { }
-   
+
    virtual Bool_t IsSelected(TObject *obj);
-   
+
 private:
 
    ClassDef(AliRsnCutTrue,1)    // AliRsnCutTrue class
index b1bc320c51a57be8377cf33e7b171f2e11030344..a93f3e2fc41d8f50e973620e9c024c391ded253b 100644 (file)
@@ -66,24 +66,24 @@ AliRsnCutV0::AliRsnCutV0(const AliRsnCutV0 &copy) :
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutV0AliRsnCutV0::operator=(const AliRsnCutV0 &copy)
+AliRsnCutV0 &AliRsnCutV0::operator=(const AliRsnCutV0 &copy)
 {
 //
 // Assignment operator.
 // Just copy all data member values.
 //
 
-  if (this == &copy)
-    return *this;
-  
-  fHypothesis = copy.fHypothesis;
-  fMass = copy.fMass;
-  fTolerance = copy.fTolerance;
-  fMaxDCAVertex = copy.fMaxDCAVertex;
-  fMinCosPointAngle = copy.fMinCosPointAngle;
-  fMaxDaughtersDCA = copy.fMaxDaughtersDCA;
-  fESDtrackCuts = copy.fESDtrackCuts;
-  
+   if (this == &copy)
+      return *this;
+
+   fHypothesis = copy.fHypothesis;
+   fMass = copy.fMass;
+   fTolerance = copy.fTolerance;
+   fMaxDCAVertex = copy.fMaxDCAVertex;
+   fMinCosPointAngle = copy.fMinCosPointAngle;
+   fMaxDaughtersDCA = copy.fMaxDaughtersDCA;
+   fESDtrackCuts = copy.fESDtrackCuts;
+
    return (*this);
 }
 
@@ -98,12 +98,12 @@ Bool_t AliRsnCutV0::IsSelected(TObject *object)
 
    // coherence check
    if (!TargetOK(object)) return kFALSE;
-   
+
    // check cast
    AliESDv0 *v0esd = fDaughter->Ref2ESDv0();
    AliAODv0 *v0aod = fDaughter->Ref2AODv0();
    //cout << fDaughter->GetRef()->ClassName() << ' ' << v0esd << ' ' << v0aod << endl;
-   
+
    // operate depending on cast
    if (v0esd) {
       return CheckESD(v0esd);
@@ -129,20 +129,20 @@ Bool_t AliRsnCutV0::CheckESD(AliESDv0 *v0)
       AliDebugClass(1, "Rejecting V0 in 'on fly' status");
       return kFALSE; // if kTRUE, then this V0 is recontructed
    }
-   
+
    // retrieve pointer to owner event
    AliESDEvent *lESDEvent = fEvent->GetRefESD();
    Double_t xPrimaryVertex = lESDEvent->GetPrimaryVertex()->GetX();
    Double_t yPrimaryVertex = lESDEvent->GetPrimaryVertex()->GetY();
    Double_t zPrimaryVertex = lESDEvent->GetPrimaryVertex()->GetZ();
    AliDebugClass(2, Form("Primary vertex: %f %f %f", xPrimaryVertex, yPrimaryVertex, zPrimaryVertex));
-   
+
    // retrieve the V0 daughters
    UInt_t lIdxPos      = (UInt_t) TMath::Abs(v0->GetPindex());
    UInt_t lIdxNeg      = (UInt_t) TMath::Abs(v0->GetNindex());
    AliESDtrack *pTrack = lESDEvent->GetTrack(lIdxPos);
    AliESDtrack *nTrack = lESDEvent->GetTrack(lIdxNeg);
-   
+
    // check quality cuts
    if (fESDtrackCuts) {
       AliDebugClass(2, "Checking quality cuts");
@@ -155,20 +155,20 @@ Bool_t AliRsnCutV0::CheckESD(AliESDv0 *v0)
          return kFALSE;
       }
    }
-   
+
    // filter like-sign V0
    //if ((TMath::Abs(pTrack->GetSign()) - TMath::Abs(nTrack->GetSign()) ) < 0.1) {
    //   AliDebugClass(2, "Failed like-sign V0 check");
    //   return kFALSE;
    //}
-   
+
    // check compatibility with expected species hypothesis
    v0->ChangeMassHypothesis(fHypothesis);
    if ((TMath::Abs(v0->GetEffMass() - fMass)) > fTolerance) {
       AliDebugClass(2, "V0 is not in the expected inv mass range");
       return kFALSE;
    }
-   
+
    // topological checks
    if (TMath::Abs(v0->GetD(xPrimaryVertex, yPrimaryVertex, zPrimaryVertex)) > fMaxDCAVertex) {
       AliDebugClass(2, "Failed check on DCA to primary vertes");
@@ -182,10 +182,10 @@ Bool_t AliRsnCutV0::CheckESD(AliESDv0 *v0)
       AliDebugClass(2, "Failed check on DCA between daughters");
       return kFALSE;
    }
-   
+
    // if we reach this point, all checks were successful
    AliDebugClass(2, "Good V0 (hallelujah)");
-   return kTRUE;   
+   return kTRUE;
 }
 
 //_________________________________________________________________________________________________
@@ -198,7 +198,7 @@ Bool_t AliRsnCutV0::CheckAOD(AliAODv0 *)
 //
 
    AliWarning("Cuts is not yet implemented for AOD");
-   
+
    return kTRUE;
 }
 
index 8441cbf808a22315a58ae4ac95d1c1c390b19ffe..05a7dfec8eddc92ccf962d1046ed03a34421244b 100644 (file)
@@ -14,10 +14,10 @@ class AliRsnCutV0 : public AliRsnCut {
 public:
 
    AliRsnCutV0(const char *name = "AliRsnCutV0", Int_t hypothesis = kLambda0);
-   AliRsnCutV0(const AliRsnCutV0copy);
-   AliRsnCutV0& operator=(const AliRsnCutV0& copy);
+   AliRsnCutV0(const AliRsnCutV0 &copy);
+   AliRsnCutV0 &operator=(const AliRsnCutV0 &copy);
    virtual ~AliRsnCutV0() { }
-   
+
    void           SetESDtrackCuts(AliESDtrackCuts *cuts)   {fESDtrackCuts = cuts;}
    void           SetHypothesis(Int_t code);
    void           SetTolerance(Double_t value)             {fTolerance = value;}
@@ -32,7 +32,7 @@ protected:
 
    Bool_t      CheckESD(AliESDv0 *track);
    Bool_t      CheckAOD(AliAODv0 *track);
-   
+
    Int_t            fHypothesis;       // PDG code corresponding to expected V0 hypothesis
    Double_t         fMass;             // mass corresponding to hypothesis
    Double_t         fTolerance;        // tolerance in the difference between computed and expected mass
@@ -56,7 +56,7 @@ inline void AliRsnCutV0::SetHypothesis(Int_t code)
 //
 
    fHypothesis = code;
-   
+
    switch (fHypothesis) {
       case kLambda0:
       case kLambda0Bar:
index b6cba21a1d3baa803eba688664a5df6a06b2caa9..770211588ca93f6eb863e67a67ec7fec2c0b051d 100644 (file)
@@ -50,7 +50,7 @@ AliRsnCutValue::AliRsnCutValue
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutValue::AliRsnCutValue(const AliRsnCutValuecopy) :
+AliRsnCutValue::AliRsnCutValue(const AliRsnCutValue &copy) :
    AliRsnCut(copy),
    fValue(copy.fValue)
 {
@@ -61,20 +61,20 @@ AliRsnCutValue::AliRsnCutValue(const AliRsnCutValue& copy) :
 }
 
 //_________________________________________________________________________________________________
-AliRsnCutValue& AliRsnCutValue::operator=(const AliRsnCutValue& copy)
+AliRsnCutValue &AliRsnCutValue::operator=(const AliRsnCutValue &copy)
 {
 //
 // Assignment operator.
 // Does not duplicate memory allocation.
 //
 
-  AliRsnCut::operator=(copy);
-  if (this == &copy)
-    return *this;
-  
-  fValue = copy.fValue;
-  
-  return (*this);
+   AliRsnCut::operator=(copy);
+   if (this == &copy)
+      return *this;
+
+   fValue = copy.fValue;
+
+   return (*this);
 }
 
 //_________________________________________________________________________________________________
@@ -87,7 +87,7 @@ Bool_t AliRsnCutValue::IsSelected(TObject *object)
 
    // skip cut if value is not initialized
    if (!fValue) return kTRUE;
-   
+
    // match target types
    SetTargetType(fValue->GetTargetType());
 
index dae77129ae98d9d13b930c8dbddfde5c8bb00fb4..94438799c801c64ca2085e45c068bb31d2e9002c 100644 (file)
@@ -27,12 +27,12 @@ public:
 
    AliRsnCutValue();
    AliRsnCutValue(const char *name, Double_t min, Double_t max);
-   AliRsnCutValue(const AliRsnCutValuecopy);
-   AliRsnCutValue& operator=(const AliRsnCutValue& copy);
+   AliRsnCutValue(const AliRsnCutValue &copy);
+   AliRsnCutValue &operator=(const AliRsnCutValue &copy);
    virtual ~AliRsnCutValue() { }
 
    Double_t       GetComputedValue()              {if (fValue) return fValue->GetComputedValue(); return -1E20;}
-   AliRsnValue*   GetValueObj()                   {return fValue;}
+   AliRsnValue   *GetValueObj()                   {return fValue;}
    void           SetValueObj(AliRsnValue *value) {fValue = value; SetTargetType(value->GetTargetType());}
 
    virtual Bool_t IsSelected(TObject *object);
index 4dca2487f084a93181cc61eb98e1fb1bd4454f68..91e7d137bc9f1e387abb3a67bf7edbcff7e005b0 100644 (file)
@@ -6,9 +6,9 @@
 //  need to be accessed from ESD or AOD objects, usually in different ways.
 //  When MC is available, AliRsnDaughter matches each reconstructed object with
 //  its corresponding MC particle.
-//  
+//
 //  Currently, this interface can point to all kinds of single-particle object
-//  which one can have in the reconstructed event: charged tracks, V0s and 
+//  which one can have in the reconstructed event: charged tracks, V0s and
 //  cascades. It is care of the user to treat each of them in the correct way,
 //  regarding cuts, functions to be computed, etc.
 //
@@ -44,15 +44,15 @@ AliRsnDaughter::AliRsnDaughter(const AliRsnDaughter &copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnDaughterAliRsnDaughter::operator=(const AliRsnDaughter &copy)
+AliRsnDaughter &AliRsnDaughter::operator=(const AliRsnDaughter &copy)
 {
 //
 // Assignment operator.
 // Pointers are NOT duplicated, since they don't come from a 'new'
 // statement, but from just referencing something in the data source.
 //
-  if (this == &copy)
-    return *this;
+   if (this == &copy)
+      return *this;
 
    fOK         = copy.fOK;
    fLabel      = copy.fLabel;
@@ -80,7 +80,7 @@ void AliRsnDaughter::Reset()
    fLabel     = -1;
    fMotherPDG =  0;
    fRsnID     = -1;
-   
+
    fPsim.SetXYZT(0.0, 0.0, 0.0, 0.0);
    fPrec.SetXYZT(0.0, 0.0, 0.0, 0.0);
 
@@ -97,9 +97,9 @@ Int_t AliRsnDaughter::GetPDG()
 //
 
    if (Match(fRefMC, AliMCParticle::Class()))
-      return ((AliMCParticle*)fRefMC)->Particle()->GetPdgCode();
+      return ((AliMCParticle *)fRefMC)->Particle()->GetPdgCode();
    else if (Match(fRefMC, AliAODMCParticle::Class()))
-      return ((AliAODMCParticle*)fRefMC)->GetPdgCode();
+      return ((AliAODMCParticle *)fRefMC)->GetPdgCode();
    else {
       AliWarning("Cannot retrieve PDG");
       return 0;
@@ -138,17 +138,17 @@ Int_t AliRsnDaughter::GetMother()
    if (!fRefMC) return -1;
 
    if (fRefMC->InheritsFrom(AliMCParticle::Class())) {
-      AliMCParticle *mc = (AliMCParticle*)fRefMC;
+      AliMCParticle *mc = (AliMCParticle *)fRefMC;
       return mc->Particle()->GetFirstMother();
    } else if (fRefMC->InheritsFrom(AliAODMCParticle::Class())) {
-      AliAODMCParticle *mc = (AliAODMCParticle*)fRefMC;
+      AliAODMCParticle *mc = (AliAODMCParticle *)fRefMC;
       return mc->GetMother();
    }
    else
       return -1;
 }
-   
-   
+
+
 
 //______________________________________________________________________________
 void AliRsnDaughter::Print(Option_t *) const
@@ -165,7 +165,7 @@ void AliRsnDaughter::Print(Option_t *) const
 }
 
 //______________________________________________________________________________
-const charAliRsnDaughter::SpeciesName(ESpecies species)
+const char *AliRsnDaughter::SpeciesName(ESpecies species)
 {
 //
 // Return a string with the short name of the particle
@@ -215,7 +215,7 @@ Double_t AliRsnDaughter::SpeciesMass(ESpecies species)
 
    TDatabasePDG *db = TDatabasePDG::Instance();
    TParticlePDG *part = 0x0;
-   
+
    Int_t pdg = SpeciesPDG(species);
    if (pdg) {
       part = db->GetParticle(pdg);
index c68e377547ccf6f785ec33c94b7522fc47554153..456c4f58e4b365239e5778ce8c6ad2006577f7f7 100644 (file)
@@ -34,7 +34,7 @@ public:
       kCascade,
       kNoType
    };
-   
+
    enum ESpecies {
       kElectron,
       kMuon,
@@ -49,9 +49,9 @@ public:
    };
 
    AliRsnDaughter() : fOK(kFALSE), fLabel(-1), fMotherPDG(0), fRsnID(-1),
-                      fPrec(), fPsim(), fRef(0x0), fRefMC(0x0), fOwnerEvent(0x0) { }
+      fPrec(), fPsim(), fRef(0x0), fRefMC(0x0), fOwnerEvent(0x0) { }
    AliRsnDaughter(const AliRsnDaughter &copy);
-   AliRsnDaughter& operator= (const AliRsnDaughter& copy);
+   AliRsnDaughter &operator= (const AliRsnDaughter &copy);
    virtual ~AliRsnDaughter() { /*empty, since pointers must not be deleted*/ }
 
    // basic getters
@@ -59,12 +59,12 @@ public:
    Int_t           GetLabel()      const {return fLabel;}
    Int_t           GetMotherPDG()  const {return fMotherPDG;}
    Int_t           GetRsnID()      const {return fRsnID;}
-   AliVParticle*   GetRef()              {return fRef;}
-   AliVParticle*   GetRefMC()            {return fRefMC;}
-   AliRsnEvent*    GetOwnerEvent()       {return fOwnerEvent;}
-   TLorentzVectorP(Bool_t mc)          {return (mc ? fPsim : fPrec);}
-   TLorentzVectorPrec()                {return fPrec;}
-   TLorentzVectorPsim()                {return fPsim;}
+   AliVParticle   *GetRef()              {return fRef;}
+   AliVParticle   *GetRefMC()            {return fRefMC;}
+   AliRsnEvent    *GetOwnerEvent()       {return fOwnerEvent;}
+   TLorentzVector &P(Bool_t mc)          {return (mc ? fPsim : fPrec);}
+   TLorentzVector &Prec()                {return fPrec;}
+   TLorentzVector &Psim()                {return fPsim;}
    Int_t           GetPDG();
    Int_t           GetPDGAbs()           {return TMath::Abs(GetPDG());}
    Int_t           GetID();
@@ -81,11 +81,11 @@ public:
    void  SetRef(AliVParticle *p)       {fRef = p;}
    void  SetRefMC(AliVParticle *p)     {fRefMC = p;}
    void  SetOwnerEvent(AliRsnEvent *e) {fOwnerEvent = e;}
-   
+
    // additional functions
    void  FillP(Double_t mass);
    void  Print(Option_t *o = "") const;
-   
+
    // getters related to charge
    Bool_t   IsPos()      const {if (fRef) return (fRef->Charge() > 0); return kFALSE;}
    Bool_t   IsNeg()      const {if (fRef) return (fRef->Charge() < 0); return kFALSE;}
@@ -93,8 +93,8 @@ public:
    Bool_t   IsNeutral()  const {if (fRef) return (!IsCharged());       return kFALSE;}
    Short_t  ChargeS()    const {if (IsPos()) return  1 ; else if (IsNeg()) return -1 ; else return  0 ;}
    Char_t   ChargeC()    const {if (IsPos()) return '+'; else if (IsNeg()) return '-'; else return '0';}
-   
-    // getters which automatically convert refs into allowed types
+
+   // getters which automatically convert refs into allowed types
    static Bool_t     Match(AliVParticle *p, TClass *ref) {if (p) return (p->InheritsFrom(ref)); return kFALSE;}
    Bool_t            MatchRef(TClass *ref)               {return Match(fRef, ref);}
    Bool_t            MatchRefMC(TClass *ref)             {return Match(fRefMC, ref);}
@@ -102,25 +102,25 @@ public:
    Bool_t            IsESD();
    Bool_t            IsAOD();
 
-   AliVTrack*        Ref2Vtrack()        {if (Match(fRef, AliVTrack    ::Class())) return static_cast<AliVTrack*>       (fRef); return 0x0;}
-   AliESDtrack*      Ref2ESDtrack()      {if (Match(fRef, AliESDtrack  ::Class())) return static_cast<AliESDtrack*>     (fRef); return 0x0;}
-   AliAODTrack*      Ref2AODtrack()      {if (Match(fRef, AliAODTrack  ::Class())) return static_cast<AliAODTrack*>     (fRef); return 0x0;}
-   AliMCParticle*    Ref2MCparticle()    {if (Match(fRef, AliMCParticle::Class())) return static_cast<AliMCParticle*>   (fRef); return 0x0;}
-   AliAODMCParticle* Ref2AODMCparticle() {if (Match(fRef, AliMCParticle::Class())) return static_cast<AliAODMCParticle*>(fRef); return 0x0;}
-      
-   AliESDv0*         Ref2ESDv0()         {if (Match(fRef, AliESDv0     ::Class())) return static_cast<AliESDv0*>(fRef); return 0x0;}
-   AliAODv0*         Ref2AODv0()         {if (Match(fRef, AliAODv0     ::Class())) return static_cast<AliAODv0*>(fRef); return 0x0;}
-   
-   AliESDcascade*    Ref2ESDcascade()    {if (Match(fRef, AliESDcascade::Class())) return static_cast<AliESDcascade*>(fRef); return 0x0;}
-   AliAODcascade*    Ref2AODcascade()    {if (Match(fRef, AliAODcascade::Class())) return static_cast<AliAODcascade*>(fRef); return 0x0;}
-   
-   AliMCParticle*    RefMC2ESD()         {if (Match(fRefMC, AliMCParticle   ::Class())) return static_cast<AliMCParticle*>   (fRef)  ; return 0x0;}
-   AliAODMCParticle* RefMC2AOD()         {if (Match(fRefMC, AliAODMCParticle::Class())) return static_cast<AliAODMCParticle*>(fRefMC); return 0x0;}
-   
+   AliVTrack        *Ref2Vtrack()        {if (Match(fRef, AliVTrack    ::Class())) return static_cast<AliVTrack *>       (fRef); return 0x0;}
+   AliESDtrack      *Ref2ESDtrack()      {if (Match(fRef, AliESDtrack  ::Class())) return static_cast<AliESDtrack *>     (fRef); return 0x0;}
+   AliAODTrack      *Ref2AODtrack()      {if (Match(fRef, AliAODTrack  ::Class())) return static_cast<AliAODTrack *>     (fRef); return 0x0;}
+   AliMCParticle    *Ref2MCparticle()    {if (Match(fRef, AliMCParticle::Class())) return static_cast<AliMCParticle *>   (fRef); return 0x0;}
+   AliAODMCParticle *Ref2AODMCparticle() {if (Match(fRef, AliMCParticle::Class())) return static_cast<AliAODMCParticle *>(fRef); return 0x0;}
+
+   AliESDv0         *Ref2ESDv0()         {if (Match(fRef, AliESDv0     ::Class())) return static_cast<AliESDv0 *>(fRef); return 0x0;}
+   AliAODv0         *Ref2AODv0()         {if (Match(fRef, AliAODv0     ::Class())) return static_cast<AliAODv0 *>(fRef); return 0x0;}
+
+   AliESDcascade    *Ref2ESDcascade()    {if (Match(fRef, AliESDcascade::Class())) return static_cast<AliESDcascade *>(fRef); return 0x0;}
+   AliAODcascade    *Ref2AODcascade()    {if (Match(fRef, AliAODcascade::Class())) return static_cast<AliAODcascade *>(fRef); return 0x0;}
+
+   AliMCParticle    *RefMC2ESD()         {if (Match(fRefMC, AliMCParticle   ::Class())) return static_cast<AliMCParticle *>   (fRef)  ; return 0x0;}
+   AliAODMCParticle *RefMC2AOD()         {if (Match(fRefMC, AliAODMCParticle::Class())) return static_cast<AliAODMCParticle *>(fRefMC); return 0x0;}
+
    // static functions related to internal ESpecies enum
    static ERefType    RefType(ESpecies species);
    static Bool_t      IsCharged(ESpecies species) {return (species <= kProton);}
-   static const charSpeciesName(ESpecies species);
+   static const char *SpeciesName(ESpecies species);
    static Int_t       SpeciesPDG(ESpecies species);
    static Double_t    SpeciesMass(ESpecies species);
    static EPARTYPE    ToAliPID(ESpecies species);
@@ -132,7 +132,7 @@ private:
    Int_t          fLabel;       // index of MC particle
    Int_t          fMotherPDG;   // PDG code of mother (makes sense only if fRefMC is defined)
    Int_t          fRsnID;       // internal ID for monitoring purposes
-   
+
    TLorentzVector fPrec;        // 4-momentum for rec
    TLorentzVector fPsim;        // 4-momentum for MC
 
@@ -158,7 +158,7 @@ inline AliRsnDaughter::ERefType AliRsnDaughter::RefType()
    if (Match(fRef, AliAODv0     ::Class())) return kV0;
    if (Match(fRef, AliAODcascade::Class())) return kCascade;
    if (Match(fRef, AliMCParticle::Class())) return kTrack;
-   
+
    return kNoType;
 }
 
@@ -167,7 +167,7 @@ inline Bool_t AliRsnDaughter::IsESD()
 {
 //
 // Tells if the object pointed by fRef data member is ESD
-// NOTE: it is true even when fRef is the MC corresponding 
+// NOTE: it is true even when fRef is the MC corresponding
 //       object (= AliMCParticle)
 //
 
@@ -175,7 +175,7 @@ inline Bool_t AliRsnDaughter::IsESD()
    if (Match(fRef, AliESDv0     ::Class())) return kTRUE;
    if (Match(fRef, AliESDcascade::Class())) return kTRUE;
    if (Match(fRef, AliMCParticle::Class())) return kTRUE;
-   
+
    return kFALSE;
 }
 
@@ -184,7 +184,7 @@ inline Bool_t AliRsnDaughter::IsAOD()
 {
 //
 // Tells if the object pointed by fRef data member is AOD
-// NOTE: it is true even when fRef is the MC corresponding 
+// NOTE: it is true even when fRef is the MC corresponding
 //       object (= AliAODMCParticle)
 //
 
@@ -192,7 +192,7 @@ inline Bool_t AliRsnDaughter::IsAOD()
    if (Match(fRef, AliAODv0        ::Class())) return kTRUE;
    if (Match(fRef, AliAODcascade   ::Class())) return kTRUE;
    if (Match(fRef, AliAODMCParticle::Class())) return kTRUE;
-   
+
    return kFALSE;
 }
 
index a189fc61c3667d096f5add34660b794b269e7395..6a55cab29140c8501d80c0d316c765c6e6773a9f 100644 (file)
@@ -9,11 +9,11 @@
 //     -- defines the mass to be assigned to this object, for any purpose
 //        (e.g.: to compute its 4-momentum to be used for a resonance mass)
 //
-//  -- track charge, which can be '+', '-', '0', 
+//  -- track charge, which can be '+', '-', '0',
 //     -- any other char leaves this undefined (use only in daughter monitor loops)
 //     -- when doing resonance analysis, or when RSN Input handler needs to be used,
 //        this must always be defined
-//     
+//
 //  -- object type (track/V0/cascade)
 //     -- could be needed to select tracks when particle species is not specified
 //     -- works only in single daughter loops
@@ -99,14 +99,14 @@ AliRsnDaughterDef::AliRsnDaughterDef(const AliRsnDaughterDef &copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnDaughterDefAliRsnDaughterDef::operator=(const AliRsnDaughterDef &copy)
+AliRsnDaughterDef &AliRsnDaughterDef::operator=(const AliRsnDaughterDef &copy)
 {
 //
 // Assignment operator has standard behavior.
 //
-  if (this == &copy)
-    return *this;
-  
+   if (this == &copy)
+      return *this;
+
    fMass = copy.fMass;
    fCharge = copy.fCharge;
    fPID = copy.fPID;
index b21e5357721ce0208e2d94ba09dd515c28171a98..d18d2f55d1ded04eb8625e9b3cae06ff6285764a 100644 (file)
 //     -- defines the mass to be assigned to this object, for any purpose
 //        (e.g.: to compute its 4-momentum to be used for a resonance mass)
 //
-//  -- track charge, which can be '+', '-', '0', 
+//  -- track charge, which can be '+', '-', '0',
 //     -- any other char leaves this undefined (use only in daughter monitor loops)
 //     -- when doing resonance analysis, or when RSN Input handler needs to be used,
 //        this must always be defined
-//     
+//
 //  -- object type (track/V0/cascade)
 //     -- could be needed to select tracks when particle species is not specified
 //     -- works only in single daughter loops
-//     
+//
 
 #include "AliRsnDaughter.h"
 
@@ -32,7 +32,7 @@ public:
    AliRsnDaughterDef(AliRsnDaughter::ESpecies type, Char_t charge = 0);
    AliRsnDaughterDef(AliRsnDaughter::ERefType refType, Char_t charge = 0);
    AliRsnDaughterDef(const AliRsnDaughterDef &copy);
-   AliRsnDaughterDefoperator= (const AliRsnDaughterDef &copy);
+   AliRsnDaughterDef &operator= (const AliRsnDaughterDef &copy);
    virtual ~AliRsnDaughterDef() { }
 
    AliRsnDaughter::ESpecies GetPID()          const {return fPID;}
@@ -40,13 +40,13 @@ public:
    Char_t                   GetChargeC()      const {return fCharge;}
    Short_t                  GetChargeS()      const {if (fCharge == '+') return 1; else if (fCharge == '-') return -1; else return 0;}
    AliRsnDaughter::ERefType GetRefType()      const {return fRefType;}
-   virtual const char*      GetName()         const {return Form("%s%c", AliRsnDaughter::SpeciesName(fPID), fCharge);}
+   virtual const char      *GetName()         const {return Form("%s%c", AliRsnDaughter::SpeciesName(fPID), fCharge);}
    Bool_t                   IsChargeDefined() const {return (fCharge == '+' || fCharge == '-' || fCharge == '0');}
-   
+
    void SetPID(AliRsnDaughter::ESpecies pid)      {fPID = pid; fRefType = AliRsnDaughter::RefType(pid); fMass = AliRsnDaughter::SpeciesMass(pid);}
    void SetCharge(Char_t charge)                  {fCharge = charge;}
    void SetRefType(AliRsnDaughter::ERefType type) {fRefType = type;}
-   
+
    Bool_t MatchesPID(AliRsnDaughter *daughter);
    Bool_t MatchesCharge(AliRsnDaughter *daughter)  const;
    Bool_t MatchesRefType(AliRsnDaughter *daughter) const;
@@ -69,7 +69,7 @@ private:
 inline Bool_t AliRsnDaughterDef::MatchesPID(AliRsnDaughter *daughter)
 {
 //
-// Checks if the passed daughter true particle type 
+// Checks if the passed daughter true particle type
 // matches the species defined in fPID data member,
 // by comparing the corresponding PDG codes of both in absolute value.
 // Returns kTRUE when the two codes match, and kFALSE when:
@@ -84,10 +84,10 @@ inline Bool_t AliRsnDaughterDef::MatchesPID(AliRsnDaughter *daughter)
       AliError("The passed argument has NULL MC pointer: cannot check PDG matching with this DaughterDef");
       return kFALSE;
    }
-   
+
    return MatchesPDG(daughter->GetPDGAbs());
 }
+
 //__________________________________________________________________________________________________
 inline Bool_t AliRsnDaughterDef::MatchesCharge(AliRsnDaughter *daughter) const
 {
@@ -115,8 +115,8 @@ inline Bool_t AliRsnDaughterDef::MatchesRefType(AliRsnDaughter *daughter) const
 //
 
    AliRsnDaughter::ERefType type = daughter->RefType();
-   
-   if (fRefType != AliRsnDaughter::kNoType) 
+
+   if (fRefType != AliRsnDaughter::kNoType)
       return (type == fRefType);
    else
       return kTRUE;
index 2eba8f9ac53e06454f162b7e245114ab37fb7d3a..d89644d47a85d7023ea58703189f2fb2d995e13f 100644 (file)
@@ -11,7 +11,7 @@
 ClassImp(AliRsnDaughterSelector)
 
 //__________________________________________________________________________________________________
-AliRsnDaughterSelector::AliRsnDaughterSelector(const char *name, const char *title) : 
+AliRsnDaughterSelector::AliRsnDaughterSelector(const char *name, const char *title) :
    TNamed(name, title),
    fCutSetsN("AliRsnCutSet", 0),
    fCutSetsC("AliRsnCutSet", 0),
@@ -28,7 +28,7 @@ AliRsnDaughterSelector::AliRsnDaughterSelector(const char *name, const char *tit
 }
 
 //__________________________________________________________________________________________________
-AliRsnDaughterSelector::AliRsnDaughterSelector(const AliRsnDaughterSelector& copy) : 
+AliRsnDaughterSelector::AliRsnDaughterSelector(const AliRsnDaughterSelector &copy) :
    TNamed(copy),
    fCutSetsN(copy.fCutSetsN),
    fCutSetsC(copy.fCutSetsC),
@@ -45,7 +45,7 @@ AliRsnDaughterSelector::AliRsnDaughterSelector(const AliRsnDaughterSelector& cop
 }
 
 //__________________________________________________________________________________________________
-AliRsnDaughterSelector& AliRsnDaughterSelector::operator=(const AliRsnDaughterSelector& copy)
+AliRsnDaughterSelector &AliRsnDaughterSelector::operator=(const AliRsnDaughterSelector &copy)
 {
 //
 // Copy constructor.
@@ -55,7 +55,7 @@ AliRsnDaughterSelector& AliRsnDaughterSelector::operator=(const AliRsnDaughterSe
 
    TNamed::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fCutSetsN = copy.fCutSetsN;
    fCutSetsC = copy.fCutSetsC;
    fEntryListsN = copy.fEntryListsN;
@@ -63,7 +63,7 @@ AliRsnDaughterSelector& AliRsnDaughterSelector::operator=(const AliRsnDaughterSe
    fEntryListsM = copy.fEntryListsM;
 
    AliDebug(AliLog::kDebug + 10, "->");
-   
+
    return (*this);
 }
 
@@ -75,44 +75,44 @@ AliRsnDaughterSelector::~AliRsnDaughterSelector()
 //
 
    AliDebug(AliLog::kDebug + 10, "<-");
-   
+
    fCutSetsN.Delete();
    fCutSetsC.Delete();
    fEntryListsN.Delete();
    fEntryListsP.Delete();
    fEntryListsM.Delete();
-   
+
    AliDebug(AliLog::kDebug + 10, "->");
 }
 
 //__________________________________________________________________________________________________
-void AliRsnDaughterSelector::Print(Option_toption) const
+void AliRsnDaughterSelector::Print(Option_t *option) const
 {
 //
 // Override TObject::Print()
 //
 
    TNamed::Print(option);
-   
+
    Int_t i, nSets;
    AliRsnCutSet *set = 0x0;
    TEntryList *list = 0x0;
-   
+
    // neutral
    nSets = fCutSetsN.GetEntries();
    for (i = 0; i < nSets; i++) {
-      set = (AliRsnCutSet*)fCutSetsN[i];
-      list = (TEntryList*)fEntryListsN[i];
+      set = (AliRsnCutSet *)fCutSetsN[i];
+      list = (TEntryList *)fEntryListsN[i];
       AliInfo(Form("Neutral entry list for cut set '%s' has %d entries", set->GetName(), (Int_t)list->GetN()));
    }
-   
+
    // charged
    nSets = fCutSetsC.GetEntries();
    for (i = 0; i < nSets; i++) {
-      set = (AliRsnCutSet*)fCutSetsC[i];
-      list = (TEntryList*)fEntryListsP[i];
+      set = (AliRsnCutSet *)fCutSetsC[i];
+      list = (TEntryList *)fEntryListsP[i];
       AliInfo(Form("Positive entry list for cut set '%s' has %d entries", set->GetName(), (Int_t)list->GetN()));
-      list = (TEntryList*)fEntryListsM[i];
+      list = (TEntryList *)fEntryListsM[i];
       AliInfo(Form("Negative entry list for cut set '%s' has %d entries", set->GetName(), (Int_t)list->GetN()));
    }
 }
@@ -125,24 +125,24 @@ void AliRsnDaughterSelector::Init()
 // of the corresponding arrays of cut sets.
 // If they are not empty, they are cleared.
 //
-   
+
    Int_t i, nSets;
-   
+
    // neutral
    nSets = fCutSetsN.GetEntries();
    if (!fEntryListsN.IsEmpty()) fEntryListsN.Delete();
    for (i = 0; i < nSets; i++) {
-      AliRsnCutSet *set = (AliRsnCutSet*)fCutSetsN[i];
+      AliRsnCutSet *set = (AliRsnCutSet *)fCutSetsN[i];
       new (fEntryListsN[i]) TEntryList;
       AliInfo(Form("Adding 1 entry list for neutrals --> cut set '%s' [scheme = '%s']", set->GetName(), set->GetCutScheme().Data()));
    }
-   
+
    // charged
    nSets = fCutSetsC.GetEntries();
    if (!fEntryListsP.IsEmpty()) fEntryListsP.Delete();
    if (!fEntryListsM.IsEmpty()) fEntryListsM.Delete();
    for (i = 0; i < nSets; i++) {
-      AliRsnCutSet *set = (AliRsnCutSet*)fCutSetsC[i];
+      AliRsnCutSet *set = (AliRsnCutSet *)fCutSetsC[i];
       new (fEntryListsP[i]) TEntryList;
       new (fEntryListsM[i]) TEntryList;
       AliInfo(Form("Adding 2 entry lists for charged --> cut set '%s' [scheme = '%s']", set->GetName(), set->GetCutScheme().Data()));
@@ -154,20 +154,20 @@ void AliRsnDaughterSelector::Reset()
 {
    TEntryList *el;
    Int_t i, nSets;
-   
+
    // N
    nSets = fCutSetsN.GetEntries();
    for (i = 0; i < nSets; i++) {
-      el = (TEntryList*)fEntryListsN.At(i);
+      el = (TEntryList *)fEntryListsN.At(i);
       el->Reset();
    }
-   
+
    // charged
    nSets = fCutSetsC.GetEntries();
    for (i = 0; i < nSets; i++) {
-      el = (TEntryList*)fEntryListsP.At(i);
+      el = (TEntryList *)fEntryListsP.At(i);
       el->Reset();
-      el = (TEntryList*)fEntryListsM.At(i);
+      el = (TEntryList *)fEntryListsM.At(i);
       el->Reset();
    }
 }
@@ -180,7 +180,7 @@ Int_t AliRsnDaughterSelector::Add(AliRsnCutSet *cuts, Bool_t charged)
 //
 
    Int_t n = 0;
-   
+
    if (!charged) {
       n = fCutSetsN.GetEntries();
       new (fCutSetsN[n]) AliRsnCutSet(*cuts);
@@ -188,7 +188,7 @@ Int_t AliRsnDaughterSelector::Add(AliRsnCutSet *cuts, Bool_t charged)
       n = fCutSetsC.GetEntries();
       new (fCutSetsC[n]) AliRsnCutSet(*cuts);
    }
-   
+
    return n;
 }
 
@@ -200,50 +200,50 @@ Int_t AliRsnDaughterSelector::GetID(const char *name, Bool_t charged)
 //
 
    AliRsnCutSet *cuts;
-   
+
    if (!charged) {
-      cuts = (AliRsnCutSet*)fCutSetsN.FindObject(name);
+      cuts = (AliRsnCutSet *)fCutSetsN.FindObject(name);
       if (cuts) return fCutSetsN.IndexOf(cuts);
    } else {
-      cuts = (AliRsnCutSet*)fCutSetsC.FindObject(name);
+      cuts = (AliRsnCutSet *)fCutSetsC.FindObject(name);
       if (cuts) return fCutSetsC.IndexOf(cuts);
    }
-   
+
    return -1;
 }
 
 //__________________________________________________________________________________________________
-TEntryListAliRsnDaughterSelector::GetSelected(Int_t i, Char_t charge)
+TEntryList *AliRsnDaughterSelector::GetSelected(Int_t i, Char_t charge)
 {
 //
 // Retrieve a given entry list (needs charge specified as a char)
 //
 
    if (charge == '+')
-      return (TEntryList*)fEntryListsP.At(i);
+      return (TEntryList *)fEntryListsP.At(i);
    else if (charge == '-')
-      return (TEntryList*)fEntryListsM.At(i);
+      return (TEntryList *)fEntryListsM.At(i);
    else
-      return (TEntryList*)fEntryListsN.At(i);
+      return (TEntryList *)fEntryListsN.At(i);
 }
 
 //__________________________________________________________________________________________________
-TEntryListAliRsnDaughterSelector::GetSelected(Int_t i, Short_t charge)
+TEntryList *AliRsnDaughterSelector::GetSelected(Int_t i, Short_t charge)
 {
 //
 // Retrieve a given entry list passing charge as short
 //
 
    if (charge > 0)
-      return (TEntryList*)fEntryListsP.At(i);
+      return (TEntryList *)fEntryListsP.At(i);
    else if (charge < 0)
-      return (TEntryList*)fEntryListsM.At(i);
+      return (TEntryList *)fEntryListsM.At(i);
    else
-      return (TEntryList*)fEntryListsN.At(i);
+      return (TEntryList *)fEntryListsN.At(i);
 }
 
 //__________________________________________________________________________________________________
-void AliRsnDaughterSelector::ScanEvent(AliRsnEventev)
+void AliRsnDaughterSelector::ScanEvent(AliRsnEvent *ev)
 {
 //
 // Loop over event and fill all entry lists
@@ -253,7 +253,7 @@ void AliRsnDaughterSelector::ScanEvent(AliRsnEvent* ev)
    Int_t nSel, nTot = ev->GetAbsoluteSum();
    AliRsnDaughter check;
    TClonesArray *cutsArray = 0x0, *entryArray = 0x0;
-   
+
    for (id = 0; id < nTot; id++) {
       ev->SetDaughter(check, id);
       // some checks
@@ -279,13 +279,13 @@ void AliRsnDaughterSelector::ScanEvent(AliRsnEvent* ev)
       // check with all cuts in that charge
       nSel = cutsArray->GetEntries();
       for (is = 0; is < nSel; is++) {
-         AliRsnCutSet *cuts = (AliRsnCutSet*)cutsArray->At(is);
+         AliRsnCutSet *cuts = (AliRsnCutSet *)cutsArray->At(is);
          if (cuts->IsSelected(&check)) {
-            TEntryList *el = (TEntryList*)entryArray->At(is);
+            TEntryList *el = (TEntryList *)entryArray->At(is);
             el->Enter(id);
          }
       }
    }
-   
+
    //Print();
 }
index e8cc8ad1a2eb032bc59377015c73461ea9318b7b..3acc497ceabd588944b8d2f837a7ae82f623683f 100644 (file)
@@ -14,7 +14,7 @@ class AliRsnDaughterSelector : public TNamed {
 public:
 
    AliRsnDaughterSelector(const char *name = "name", const char *title = "title");
-   AliRsnDaughterSelector(const AliRsnDaughterSelectorcopy);
+   AliRsnDaughterSelector(const AliRsnDaughterSelector &copy);
    AliRsnDaughterSelector &operator=(const AliRsnDaughterSelector &copy);
    virtual ~AliRsnDaughterSelector();
 
@@ -22,17 +22,20 @@ public:
    void          Reset();
    Int_t         Add(AliRsnCutSet *cuts, Bool_t charged);
    Int_t         GetID(const char *cutSetName, Bool_t charged);
-   TEntryList*   GetSelected(Int_t i, Char_t charge);
-   TEntryList*   GetSelected(Int_t i, Short_t charge);
+   TEntryList   *GetSelected(Int_t i, Char_t charge);
+   TEntryList   *GetSelected(Int_t i, Short_t charge);
    void          ScanEvent(AliRsnEvent *ev);
-   
-   virtual void  Print(Option_t* option = "") const;
+
+   virtual void  Print(Option_t *option = "") const;
+
+   TClonesArray *GetCutSetC() {return &fCutSetsC;}
+   TClonesArray *GetCutSetN() {return &fCutSetsN;}
 
 private:
 
    TClonesArray fCutSetsN;        // cuts for neutral daughters
    TClonesArray fCutSetsC;        // cuts for charged daughters (usually, the same)
-   
+
    TClonesArray fEntryListsN;     // entry lists for neutrals
    TClonesArray fEntryListsP;     // entry lists for charged (one per sign)
    TClonesArray fEntryListsM;     // entry lists for charged (one per sign)
index 50c509da4c4f2855921adc5503ab9cdba9900217..c5eeb0715a2771b6d530ce9a2cc3f12fd143de43 100644 (file)
@@ -21,7 +21,7 @@
 //  which could be needed during analysis, which are not in AliVEvent but
 //  need to be accessed from ESD or AOD objects, usually in different ways.
 //  When MC is available, it is properly taken into account.
-//  
+//
 //  authors: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
 //           M. Vala (martin.vala@cern.ch)
 //
@@ -65,14 +65,14 @@ AliRsnEvent::AliRsnEvent(const AliRsnEvent &event) :
 }
 
 //_____________________________________________________________________________
-AliRsnEvent& AliRsnEvent::operator= (const AliRsnEvent & event)
+AliRsnEvent &AliRsnEvent::operator= (const AliRsnEvent &event)
 {
 //
 // Works in the same way as the copy constructor.
 //
    TObject::operator=(event);
-  if (this == &event)
-    return *this;
+   if (this == &event)
+      return *this;
    fRef             = event.fRef;
    fRefMC           = event.fRefMC;
    fLeading         = event.fLeading;
@@ -105,37 +105,37 @@ void AliRsnEvent::SetDaughter(AliRsnDaughter &out, Int_t index, Bool_t fromMC)
    out.Reset();
    out.SetRsnID(index);
    out.SetOwnerEvent(this);
-   
+
    // check input type
    if (!InputOK()) return;
    Bool_t inputESD = IsESD();
-   
 
-      Int_t trueIndex;
-      AliRsnDaughter::ERefType type;
-      if (!ConvertAbsoluteIndex(index, trueIndex, type)) {
-         AliError(Form("Failed to convert absolute index %d", index));
+
+   Int_t trueIndex;
+   AliRsnDaughter::ERefType type;
+   if (!ConvertAbsoluteIndex(index, trueIndex, type)) {
+      AliError(Form("Failed to convert absolute index %d", index));
+      return;
+   }
+   switch (type) {
+      case AliRsnDaughter::kTrack:
+         if (inputESD) {
+            SetDaughterESDtrack(out, trueIndex);
+
+         } else {
+            SetDaughterAODtrack(out, trueIndex);
+         }
+         break;
+      case AliRsnDaughter::kV0:
+         if (inputESD) SetDaughterESDv0(out, trueIndex); else SetDaughterAODv0(out, trueIndex);
+         break;
+      case AliRsnDaughter::kCascade:
+         if (inputESD) SetDaughterESDcascade(out, trueIndex); else SetDaughterAODcascade(out, trueIndex);
+         break;
+      default:
+         AliError("Unrecognized daughter type");
          return;
-      }
-      switch (type) {
-         case AliRsnDaughter::kTrack:
-            if (inputESD) {
-               SetDaughterESDtrack(out, trueIndex); 
-               
-           } else {
-               SetDaughterAODtrack(out, trueIndex);
-           }
-            break;
-         case AliRsnDaughter::kV0:
-            if (inputESD) SetDaughterESDv0(out, trueIndex); else SetDaughterAODv0(out, trueIndex);
-            break;
-         case AliRsnDaughter::kCascade:
-            if (inputESD) SetDaughterESDcascade(out, trueIndex); else SetDaughterAODcascade(out, trueIndex);
-            break;
-         default:
-            AliError("Unrecognized daughter type");
-            return;
-      }
+   }
 
    // if it is pure MC, the index tells what particle
    // to be read in the stack of MC particles, otherwise
@@ -165,8 +165,8 @@ void AliRsnEvent::SetDaughterESDtrack(AliRsnDaughter &out, Int_t i)
 // Version #1: ESD tracks
 //
 
-   AliESDEvent *esd = (AliESDEvent*)fRef;
-   
+   AliESDEvent *esd = (AliESDEvent *)fRef;
+
    if (i >= 0 && i < esd->GetNumberOfTracks()) {
       AliESDtrack *track = esd->GetTrack(i);
       if (track) {
@@ -197,7 +197,7 @@ void AliRsnEvent::SetDaughterAODtrack(AliRsnDaughter &out, Int_t i)
 // Version #2: AOD tracks
 //
 
-   AliAODEvent *aod = (AliAODEvent*)fRef;
+   AliAODEvent *aod = (AliAODEvent *)fRef;
 
    if (i >= 0 && i < aod->GetNumberOfTracks()) {
       AliAODTrack *track = aod->GetTrack(i);
@@ -237,7 +237,7 @@ void AliRsnEvent::SetDaughterESDv0(AliRsnDaughter &out, Int_t i)
          out.SetGood();
          // if MC is present, retrieve the label of V0 from those of daughters
          if (fRefMC) {
-            AliMCEvent  *mc = (AliMCEvent*)fRefMC;
+            AliMCEvent  *mc = (AliMCEvent *)fRefMC;
             AliESDtrack *tp = ev->GetTrack(v0->GetPindex());
             AliESDtrack *tn = ev->GetTrack(v0->GetNindex());
             if (mc && tp && tn) {
@@ -270,21 +270,21 @@ void AliRsnEvent::SetDaughterAODv0(AliRsnDaughter &out, Int_t i)
 //
 
    if (i >= 0 && i < fRef->GetNumberOfV0s()) {
-      AliAODEvent *ev = (AliAODEvent*)fRef;
+      AliAODEvent *ev = (AliAODEvent *)fRef;
       AliAODv0    *v0 = ev->GetV0(i);
       if (v0) {
          out.SetRef(v0);
          out.SetGood();
          if (fRefMC) {
-            AliAODEvent  *mc = (AliAODEvent*)fRefMC;
-            TClonesArray *mcArray = (TClonesArray*)mc->GetList()->FindObject(AliAODMCParticle::StdBranchName());
-            AliAODTrack  *tp  = (AliAODTrack*)v0->GetDaughter(0);
-            AliAODTrack  *tn  = (AliAODTrack*)v0->GetDaughter(1);
+            AliAODEvent  *mc = (AliAODEvent *)fRefMC;
+            TClonesArray *mcArray = (TClonesArray *)mc->GetList()->FindObject(AliAODMCParticle::StdBranchName());
+            AliAODTrack  *tp  = (AliAODTrack *)v0->GetDaughter(0);
+            AliAODTrack  *tn  = (AliAODTrack *)v0->GetDaughter(1);
             if (mcArray && tp && tn) {
                Int_t lp = TMath::Abs(tp->GetLabel());
                Int_t ln = TMath::Abs(tn->GetLabel());
-               AliAODMCParticle *pp = (AliAODMCParticle*)mcArray->At(lp);
-               AliAODMCParticle *pn = (AliAODMCParticle*)mcArray->At(ln);
+               AliAODMCParticle *pp = (AliAODMCParticle *)mcArray->At(lp);
+               AliAODMCParticle *pn = (AliAODMCParticle *)mcArray->At(ln);
                if (pp && pn) {
                   // if their first mothers are the same, the V0 is true
                   // otherwise label remains '-1' --> fake V0
@@ -316,7 +316,7 @@ void AliRsnEvent::SetDaughterESDcascade(AliRsnDaughter &out, Int_t i)
          out.SetRef(casc);
          out.SetGood();
          if (fRefMC) {
-         
+
          }
       }
    }
@@ -339,7 +339,7 @@ void AliRsnEvent::SetDaughterAODcascade(AliRsnDaughter &out, Int_t i)
          out.SetRef(casc);
          out.SetGood();
          if (fRefMC) {
-            
+
          }
       }
    }
@@ -357,10 +357,10 @@ Bool_t AliRsnEvent::SetMCInfoESD(AliRsnDaughter &out)
    // if label makes no sense --> failed
    Int_t label = out.GetLabel();
    if (label < 0 || !fRefMC) return kFALSE;
-   
+
    // get number of particles
    Int_t nMC = fRefMC->GetNumberOfTracks();
-   
+
    // if label too large --> failed
    if (label >= nMC) {
       AliWarning(Form("Stack overflow: track label = %d -- stack maximum = %d", label, nMC));
@@ -368,9 +368,9 @@ Bool_t AliRsnEvent::SetMCInfoESD(AliRsnDaughter &out)
    }
 
    // retrieve particle
-   AliMCEvent    *mc = (AliMCEvent*)fRefMC;
-   AliMCParticle *mcPart = (AliMCParticle*)mc->GetTrack(label);
-   
+   AliMCEvent    *mc = (AliMCEvent *)fRefMC;
+   AliMCParticle *mcPart = (AliMCParticle *)mc->GetTrack(label);
+
    // if particle = NULL --> failed
    if (!mcPart) {
       AliWarning(Form("Stack discontinuity: label %d refers to a NULL object", label));
@@ -382,7 +382,7 @@ Bool_t AliRsnEvent::SetMCInfoESD(AliRsnDaughter &out)
    // if the particle is not primary, find the mother and get its PDG
    Int_t imum = mcPart->Particle()->GetFirstMother();
    if (imum >= 0 && imum < nMC) {
-      AliMCParticle *mcMother = (AliMCParticle*)mc->GetTrack(imum);
+      AliMCParticle *mcMother = (AliMCParticle *)mc->GetTrack(imum);
       if (mcMother) {
          out.SetMotherPDG(TMath::Abs(mcMother->Particle()->GetPdgCode()));
       } else {
@@ -407,22 +407,22 @@ Bool_t AliRsnEvent::SetMCInfoAOD(AliRsnDaughter &out)
    // if label makes no sense --> failed
    Int_t label = out.GetLabel();
    if (label < 0 || !fRefMC) return kFALSE;
-   
+
    // retrieve particle
-   AliAODEvent  *mc = (AliAODEvent*)fRefMC;
-   TClonesArray *mcArray = (TClonesArray*)mc->GetList()->FindObject(AliAODMCParticle::StdBranchName());
-   
+   AliAODEvent  *mc = (AliAODEvent *)fRefMC;
+   TClonesArray *mcArray = (TClonesArray *)mc->GetList()->FindObject(AliAODMCParticle::StdBranchName());
+
    // get number of particles
    Int_t nMC = mcArray->GetEntriesFast();
-   
+
    // if label too large --> failed
    if (label >= nMC) {
       AliWarning(Form("Stack overflow: track label = %d -- stack maximum = %d", label, nMC));
       return kFALSE;
    }
-   
+
    // if particle = NULL --> failed
-   AliAODMCParticle *mcPart = (AliAODMCParticle*)mcArray->At(label);
+   AliAODMCParticle *mcPart = (AliAODMCParticle *)mcArray->At(label);
    if (!mcPart) {
       AliWarning(Form("Stack discontinuity: label %d refers to a NULL object", label));
       return kFALSE;
@@ -433,7 +433,7 @@ Bool_t AliRsnEvent::SetMCInfoAOD(AliRsnDaughter &out)
    // if the particle is not primary, find the mother and get its PDG
    Int_t imum = mcPart->GetMother();
    if (imum >= 0 && imum < nMC) {
-      AliAODMCParticle *mcMother = (AliAODMCParticle*)mcArray->At(imum);
+      AliAODMCParticle *mcMother = (AliAODMCParticle *)mcArray->At(imum);
       if (mcMother) {
          out.SetMotherPDG(TMath::Abs(mcMother->GetPdgCode()));
       } else {
@@ -543,7 +543,7 @@ Int_t AliRsnEvent::SelectLeadingParticle(AliRsnCutSet *cuts)
 
    Double_t ptMax = 0.0;
    Int_t i, nTracks = fRef->GetNumberOfTracks();
-   
+
    fLeading = -1;
    AliRsnDaughter leading;
 
@@ -566,6 +566,6 @@ Int_t AliRsnEvent::SelectLeadingParticle(AliRsnCutSet *cuts)
          fLeading = i;
       }
    }
-   
+
    return fLeading;
 }
index 23750c91f4e151931f97b09092fea15a2eebf616..fd1ae51e631714fffd78e206a48ca461a3e36a86 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Interface to full event.
@@ -30,29 +30,29 @@ class AliRsnEvent : public TObject {
 public:
 
    AliRsnEvent(AliVEvent *ref = 0, AliVEvent *refMC = 0);
-   AliRsnEvent(const AliRsnEventcopy);
-   AliRsnEvent& operator= (const AliRsnEvent& copy);
+   AliRsnEvent(const AliRsnEvent &copy);
+   AliRsnEvent &operator= (const AliRsnEvent &copy);
    virtual ~AliRsnEvent();
 
    // basic setters/getters
    void             SetRef(AliVEvent *ref)              {fRef = ref;}
    void             SetRefMC(AliVEvent *refmc);
    void             SetPIDResponse(AliPIDResponse *pid) {fPID = pid;}
-   AliVEvent*       GetRef()                            {return fRef;}
-   AliVEvent*       GetRefMC()                          {return fRefMC;}
+   AliVEvent       *GetRef()                            {return fRef;}
+   AliVEvent       *GetRefMC()                          {return fRefMC;}
    Int_t            GetLeadingIndex() const             {return fLeading;}
-   AliPIDResponse*  GetPIDResponse()                    {return fPID;}
+   AliPIDResponse  *GetPIDResponse()                    {return fPID;}
 
    // getters which convert into allowed input types
    Bool_t           Match(AliVEvent *ev, TClass *ref) {if (ev) return (ev->InheritsFrom(ref)); return kFALSE;}
    Bool_t           IsESD()                           {return (Match(fRef, AliESDEvent::Class()));}
    Bool_t           IsAOD()                           {return (Match(fRef, AliAODEvent::Class()));}
-   Bool_t           InputOK();                        
-   AliESDEvent*     GetRefESD()                       {if (IsESD()) return (AliESDEvent*)fRef;   return 0x0;}
-   AliMCEvent*      GetRefMCESD()                     {if (IsESD()) return (AliMCEvent *)fRefMC; return 0x0;}
-   AliAODEvent*     GetRefAOD()                       {if (IsAOD()) return (AliAODEvent*)fRef;   return 0x0;}
-   AliAODEvent*     GetRefMCAOD()                     {if (IsAOD()) return (AliAODEvent*)fRefMC; return 0x0;}
-   TClonesArray*    GetAODList()                      {return fAODList;}
+   Bool_t           InputOK();
+   AliESDEvent     *GetRefESD()                       {if (IsESD()) return (AliESDEvent *)fRef;   return 0x0;}
+   AliMCEvent      *GetRefMCESD()                     {if (IsESD()) return (AliMCEvent *)fRefMC; return 0x0;}
+   AliAODEvent     *GetRefAOD()                       {if (IsAOD()) return (AliAODEvent *)fRef;   return 0x0;}
+   AliAODEvent     *GetRefMCAOD()                     {if (IsAOD()) return (AliAODEvent *)fRefMC; return 0x0;}
+   TClonesArray    *GetAODList()                      {return fAODList;}
    Bool_t           HasMC()                           {if (IsESD()) return (fRefMC != 0x0); else if (IsAOD()) return (fRefMC != 0x0 && fAODList != 0x0); return kFALSE;}
 
    // setters for a daughter
@@ -68,7 +68,7 @@ public:
    void             SetDaughterAODMCtrack(AliRsnDaughter &target, Int_t index);
    Bool_t           SetMCInfoESD         (AliRsnDaughter &target);
    Bool_t           SetMCInfoAOD         (AliRsnDaughter &target);
-   
+
    // counters/converters of candidates
    Int_t            GetAbsoluteSum() {if (fRef) return (fRef->GetNumberOfTracks() + fRef->GetNumberOfV0s() + fRef->GetNumberOfCascades()); return 0;}
    Bool_t           ConvertAbsoluteIndex(Int_t index, Int_t &realIndex, AliRsnDaughter::ERefType &type);
@@ -77,7 +77,7 @@ public:
    // leading particle stuff
    void             SetLeadingParticle(AliRsnDaughter &leading) {if (fLeading >= 0) SetDaughter(leading, fLeading, kFALSE);}
    Int_t            SelectLeadingParticle(AliRsnCutSet *cuts = 0x0);
-   
+
 private:
 
    AliVEvent      *fRef;            //  pointer to input event
@@ -107,7 +107,7 @@ inline Bool_t AliRsnEvent::InputOK()
    }
 }
 
-inline void AliRsnEvent::SetRefMC(AliVEvent *mc) 
+inline void AliRsnEvent::SetRefMC(AliVEvent *mc)
 {
 //
 // Assign pointer to MC event.
@@ -123,8 +123,8 @@ inline void AliRsnEvent::SetRefMC(AliVEvent *mc)
    fRefMC = mc;
    fAODList = 0x0;
    if (fRefMC->InheritsFrom(AliAODEvent::Class())) {
-      AliAODEvent *aod = (AliAODEvent*)mc;
-      fAODList = (TClonesArray*)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
+      AliAODEvent *aod = (AliAODEvent *)mc;
+      fAODList = (TClonesArray *)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
       if (!fAODList) fRefMC = 0x0;
    }
 }
index feefa15e21459366383dfe110a1619fe03023657..d7dba97171bab2e072f53695863eaef522561388 100644 (file)
@@ -29,10 +29,10 @@ AliRsnExpression::AliRsnExpression(TString exp) :
    fOperator(0)
 {
    // Default constructor
-   TObjArraytokens = Tokenize(exp);
+   TObjArray *tokens = Tokenize(exp);
 
    Int_t i = -1;
-   AliRsnExpressione = Expression(*tokens, i);
+   AliRsnExpression *e = Expression(*tokens, i);
    // Copy !!!
    fArg1 = e->fArg1; e->fArg1 = 0;
    fArg2 = e->fArg2; e->fArg2 = 0;
@@ -49,7 +49,7 @@ AliRsnExpression::~AliRsnExpression()
    if (fArg2) delete fArg2;
 }
 
-AliRsnExpression::AliRsnExpression(const AliRsnExpression & exp) : TObject(exp),
+AliRsnExpression::AliRsnExpression(const AliRsnExpression &exp) : TObject(exp),
    fVname(exp.fVname),
    fArg1(exp.fArg1),
    fArg2(exp.fArg2),
@@ -57,7 +57,7 @@ AliRsnExpression::AliRsnExpression(const AliRsnExpression & exp) : TObject(exp),
 {}
 
 //______________________________________________________________________________
-AliRsnExpression& AliRsnExpression::operator= (const AliRsnExpression& e)
+AliRsnExpression &AliRsnExpression::operator= (const AliRsnExpression &e)
 {
    // AliRsnExpression assignment operator.
 
@@ -72,7 +72,7 @@ AliRsnExpression& AliRsnExpression::operator= (const AliRsnExpression& e)
 }
 
 //______________________________________________________________________________
-AliRsnExpression::AliRsnExpression(int op, AliRsnExpression* a, AliRsnExpression* b) :
+AliRsnExpression::AliRsnExpression(int op, AliRsnExpression *a, AliRsnExpression *b) :
    TObject(),
    fVname(""),
    fArg1(a),
@@ -83,7 +83,7 @@ AliRsnExpression::AliRsnExpression(int op, AliRsnExpression* a, AliRsnExpression
 }
 
 //______________________________________________________________________________
-AliRsnExpression::AliRsnExpression(int op, AliRsnExpressiona) :
+AliRsnExpression::AliRsnExpression(int op, AliRsnExpression *a) :
    TObject(),
    fVname(""),
    fArg1(0),
@@ -154,7 +154,7 @@ TString AliRsnExpression::Unparse() const
 }
 
 //______________________________________________________________________________
-TObjArrayAliRsnExpression::Tokenize(TString str) const
+TObjArray *AliRsnExpression::Tokenize(TString str) const
 {
    // tokenize the expression
 
@@ -165,35 +165,35 @@ TObjArray* AliRsnExpression::Tokenize(TString str) const
       str1.Append(str[i]);
    }
    // get variable tokens
-   TObjArrayvaltok = str1.Tokenize("!&|()");
+   TObjArray *valtok = str1.Tokenize("!&|()");
    // put all variables together
    Int_t nvt = valtok->GetEntriesFast();
    TString sumval;
    for (Int_t i = 0; i < nvt; i++) {
-      TObjString* val = (TObjString*) valtok->At(i);
+      TObjString *val = (TObjString *) valtok->At(i);
       sumval.Append(val->String());
    }
    // get the operator tokens
-   TObjArrayoptok = str1.Tokenize(sumval.Data());
+   TObjArray *optok = str1.Tokenize(sumval.Data());
    // put all operator in one string
    TString operators;
    Int_t nopt = optok->GetEntriesFast();
    for (Int_t i = 0; i < nopt; i++) {
-      TObjString* val1 = (TObjString*) optok->At(i);
+      TObjString *val1 = (TObjString *) optok->At(i);
       operators.Append(val1->String());
    }
    // add more room to be safe
-   TObjStringblank = new TObjString(" ");
+   TObjString *blank = new TObjString(" ");
    operators.Append(" ");
    valtok->AddLast(blank);
    // Now put var. and oper. together
-   TObjArraytokens = new TObjArray(valtok->GetEntriesFast() + operators.Length());
+   TObjArray *tokens = new TObjArray(valtok->GetEntriesFast() + operators.Length());
    int io = 0, iv = 0;
    int index = 0;
    while (1) {
       TString so = operators[io];
       int indexO = str1.Index(so, index);
-      TString val2 = ((TObjString*) valtok->At(iv))->String();
+      TString val2 = ((TObjString *) valtok->At(iv))->String();
       int indexV = str1.Index(val2, index);
       if ((indexO < indexV || indexV < 0) && indexO >= 0) {
          tokens->AddLast(new TObjString(so));
@@ -225,19 +225,19 @@ TObjArray* AliRsnExpression::Tokenize(TString str) const
 
 
 //______________________________________________________________________________
-AliRsnExpressionAliRsnExpression::Element(TObjArray &st, Int_t &i)
+AliRsnExpression *AliRsnExpression::Element(TObjArray &st, Int_t &i)
 {
    // create an element
 
-   AliRsnExpressionresult = 0;
+   AliRsnExpression *result = 0;
 
    Int_t nt = st.GetEntriesFast();
    TString token = "@";
-   TObjStringvalt;
+   TObjString *valt;
    // next token
    if (i < nt - 1) {
       i++;
-      valt = (TObjString*) st.At(i);
+      valt = (TObjString *) st.At(i);
       token = valt->String();
    }
    // token type
@@ -253,7 +253,7 @@ AliRsnExpression* AliRsnExpression::Element(TObjArray &st, Int_t &i)
          // next token
          if (i < nt - 1) {
             i++;
-            valt = (TObjString*) st.At(i);
+            valt = (TObjString *) st.At(i);
             token = valt->String();
          }
          if (token[0] != ')') {
@@ -273,17 +273,17 @@ AliRsnExpression* AliRsnExpression::Element(TObjArray &st, Int_t &i)
 }
 
 //______________________________________________________________________________
-AliRsnExpressionAliRsnExpression::Primary(TObjArray &st, Int_t &i)
+AliRsnExpression *AliRsnExpression::Primary(TObjArray &st, Int_t &i)
 {
    // create a primary
 
    Int_t nt = st.GetEntriesFast();
    TString token = "@";
-   TObjStringvalt;
+   TObjString *valt;
    // next token
    if (i < nt - 1) {
       i++;
-      valt = (TObjString*) st.At(i);
+      valt = (TObjString *) st.At(i);
       token = valt->String();
    }
 
@@ -297,14 +297,14 @@ AliRsnExpression* AliRsnExpression::Primary(TObjArray &st, Int_t &i)
 }
 
 //______________________________________________________________________________
-AliRsnExpressionAliRsnExpression::Expression(TObjArray &st, Int_t &i)
+AliRsnExpression *AliRsnExpression::Expression(TObjArray &st, Int_t &i)
 {
    // create an expression
 
-   AliRsnExpressionresult = 0;
+   AliRsnExpression *result = 0;
    Bool_t done = kFALSE;
    TString token;
-   TObjStringvalt;
+   TObjString *valt;
 
    static int stack = 0;
    stack++;
@@ -316,7 +316,7 @@ AliRsnExpression* AliRsnExpression::Expression(TObjArray &st, Int_t &i)
       // next token
       if (i < nt - 1) i++;
       else break;
-      valt = (TObjString*) st.At(i);
+      valt = (TObjString *) st.At(i);
       token = valt->String();
       switch (token[0]) {
          case '&' :
index 27dfb1521ba777e6bfff6aa964897efd1b2aef3d..9295b9672b7d755884fa0ebcc3d2b2102d9be6b3 100644 (file)
@@ -30,31 +30,31 @@ public:
    AliRsnExpression() : fVname(0), fArg1(0), fArg2(0), fOperator(0)  {}
    AliRsnExpression(TString exp);
    virtual    ~AliRsnExpression();
-   AliRsnExpression(const AliRsnExpressionexp);
-   AliRsnExpression&    operator= (const AliRsnExpression& exp);
+   AliRsnExpression(const AliRsnExpression &exp);
+   AliRsnExpression    &operator= (const AliRsnExpression &exp);
 
-   virtual Bool_t     Value(TObjArray & vars);
+   virtual Bool_t     Value(TObjArray &vars);
    virtual TString     Unparse() const;
 
-   void SetCutSet(AliRsnCutSetconst theValue) { fgCutSet = theValue; }
-   AliRsnCutSetGetCutSet() const { return fgCutSet; }
+   void SetCutSet(AliRsnCutSet *const theValue) { fgCutSet = theValue; }
+   AliRsnCutSet *GetCutSet() const { return fgCutSet; }
 
 
    TString                     fVname;   // Variable name
    static AliRsnCutSet        *fgCutSet; // global cutset
 
 private:
-   AliRsnExpression*           fArg1;         // left argument
-   AliRsnExpression*           fArg2;         // right argument
+   AliRsnExpression           *fArg1;         // left argument
+   AliRsnExpression           *fArg2;         // right argument
    Int_t                       fOperator;     // operator
 
-   AliRsnExpression(int op, AliRsnExpressiona);
-   AliRsnExpression(int op, AliRsnExpression* a, AliRsnExpression* b);
+   AliRsnExpression(int op, AliRsnExpression *a);
+   AliRsnExpression(int op, AliRsnExpression *a, AliRsnExpression *b);
 
-   TObjArray*    Tokenize(TString str) const;
-   static AliRsnExpression*    Element(TObjArray &st, Int_t &i);
-   static AliRsnExpression*    Primary(TObjArray &st, Int_t &i);
-   static AliRsnExpression*    Expression(TObjArray &st, Int_t &i);
+   TObjArray    *Tokenize(TString str) const;
+   static AliRsnExpression    *Element(TObjArray &st, Int_t &i);
+   static AliRsnExpression    *Primary(TObjArray &st, Int_t &i);
+   static AliRsnExpression    *Expression(TObjArray &st, Int_t &i);
 
    ClassDef(AliRsnExpression, 1);    // Class to evaluate an expression
 };
index 73855a7a087cc3064f7b018f15c23a2210b47f87..bc92dee2dc17a34e4941ef93737f3cd50615c0ce 100644 (file)
@@ -48,13 +48,13 @@ AliRsnInputHandler::AliRsnInputHandler(const AliRsnInputHandler &copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnInputHandlerAliRsnInputHandler::operator=(const AliRsnInputHandler &copy)
+AliRsnInputHandler &AliRsnInputHandler::operator=(const AliRsnInputHandler &copy)
 {
 //
 // Default constructor.
 //
-  if (this == &copy)
-    return *this;
+   if (this == &copy)
+      return *this;
    fRsnEventCuts = copy.fRsnEventCuts;
    return *this;
 }
@@ -125,7 +125,7 @@ Bool_t AliRsnInputHandler::BeginEvent(Long64_t entry)
    if (fParentHandler) {
       TString tmp = "";
       AliInputEventHandler *ih = 0;
-      AliMultiInputEventHandler *multiIH = dynamic_cast<AliMultiInputEventHandler*>(fParentHandler);
+      AliMultiInputEventHandler *multiIH = dynamic_cast<AliMultiInputEventHandler *>(fParentHandler);
       if (multiIH) {
          ih = multiIH->GetFirstInputEventHandler();
          if (ih) {
@@ -137,7 +137,7 @@ Bool_t AliRsnInputHandler::BeginEvent(Long64_t entry)
                if (mcH) fRsnEvent->SetRefMC(mcH->MCEvent());
             } else if (fRsnEvent->GetRefAOD()) {
                AliAODEvent *aod = fRsnEvent->GetRefAOD();
-               TClonesArray *listAOD = (TClonesArray*)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
+               TClonesArray *listAOD = (TClonesArray *)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
                if (listAOD) fRsnEvent->SetRefMC(fRsnEvent->GetRefAOD());
             }
             if (fParentHandler->ParentHandler()) tmp = "MIX";
@@ -146,7 +146,7 @@ Bool_t AliRsnInputHandler::BeginEvent(Long64_t entry)
 
             //fRsnPIDManager.ApplyCuts(fRsnEvent);
             fRsnSelector.Reset();
-            
+
             // reject event if needed
             if (fRsnEventCuts) if (!fRsnEventCuts->IsSelected(fRsnEvent)) return kTRUE;
             fRsnSelector.ScanEvent(fRsnEvent);
index 6a848d691cf3b13f2bb34da859402b1336cff762..bae23f74dc2426d8ca0028150753efeae147864b 100644 (file)
@@ -20,7 +20,7 @@ class AliRsnInputHandler : public AliInputEventHandler {
 
 public:
    AliRsnInputHandler(const char *name = "rsnInputHandler");
-   AliRsnInputHandler(const AliRsnInputHandlerhandler);
+   AliRsnInputHandler(const AliRsnInputHandler &handler);
    AliRsnInputHandler &operator=(const AliRsnInputHandler &handler);
    virtual ~AliRsnInputHandler();
 
index 5ff4b67cb1c1529308a3d81c74e5b733c024eb4a..516914b7650d6f4dbad5e30c721d105b82ea6923 100644 (file)
 //
 
 #include <Riostream.h>
+#include <TList.h>
+#include <TCollection.h>
 
 #include "AliLog.h"
 #include "AliCFContainer.h"
 
 #include "AliRsnValue.h"
+#include "AliRsnValueDaughter.h"
+#include "AliRsnValueEvent.h"
 #include "AliRsnLoop.h"
 
 #include "AliRsnListOutput.h"
 
+
 ClassImp(AliRsnListOutput)
 
 //________________________________________________________________________________________
@@ -70,7 +75,7 @@ AliRsnListOutput::AliRsnListOutput(const AliRsnListOutput &copy) :
 }
 
 //________________________________________________________________________________________
-AliRsnListOutput& AliRsnListOutput::operator=(const AliRsnListOutput& copy)
+AliRsnListOutput &AliRsnListOutput::operator=(const AliRsnListOutput &copy)
 {
 //
 // Assignment operator.
@@ -79,18 +84,18 @@ AliRsnListOutput& AliRsnListOutput::operator=(const AliRsnListOutput& copy)
 // they are anyway reset.
 //
 
-  TNamed::operator=(copy);
-  if (this == &copy)
-    return *this;
-  fSkipFailed = copy.fSkipFailed;
-  fType = copy.fType;
-  fSteps = copy.fSteps;
-  fValues = copy.fValues;
-  fNValues = copy.fNValues;
-  fList = copy.fList;
-  fIndex = copy.fIndex;
-  fArray = copy.fArray;
-  
+   TNamed::operator=(copy);
+   if (this == &copy)
+      return *this;
+   fSkipFailed = copy.fSkipFailed;
+   fType = copy.fType;
+   fSteps = copy.fSteps;
+   fValues = copy.fValues;
+   fNValues = copy.fNValues;
+   fList = copy.fList;
+   fIndex = copy.fIndex;
+   fArray = copy.fArray;
+
    Reset();
 
    return (*this);
@@ -155,7 +160,7 @@ Bool_t AliRsnListOutput::Init(const char *prefix, TList *list)
       AliInfo(Form("NValues = %d > 3 --> cannot use a normal histogram, need to use a sparse", fNValues));
       fType = kHistoSparse;
    }
-   
+
    // resize the output array
    fArray.Set(fNValues);
 
@@ -171,7 +176,7 @@ Bool_t AliRsnListOutput::Init(const char *prefix, TList *list)
       name += '_';
       name += val->GetName();
    }
-   
+
    // allowed objects
    TObject *object = 0x0;
 
@@ -193,7 +198,7 @@ Bool_t AliRsnListOutput::Init(const char *prefix, TList *list)
       default:
          AliWarning("Wrong type output or initialization failure");
    }
-   
+
    if (object) {
       //AliInfo(Form("[%s]: initializing output '%s' (obj name = '%s') with %d values and format %d [%s]", GetName(), name.Data(), object->GetName(), fNValues, fType, object->ClassName()));
       fList = list;
@@ -206,7 +211,7 @@ Bool_t AliRsnListOutput::Init(const char *prefix, TList *list)
 }
 
 //________________________________________________________________________________________
-TH1AliRsnListOutput::CreateHistogram(const char *name)
+TH1 *AliRsnListOutput::CreateHistogram(const char *name)
 {
 //
 // Initialize the 'default' TH1 output object.
@@ -225,7 +230,7 @@ TH1* AliRsnListOutput::CreateHistogram(const char *name)
       nbins[i] = GetValue(i)->GetArray().GetSize() - 1;
       array[i] = GetValue(i)->GetArray();
    }
-   
+
    TH1 *hist = 0x0;
 
    // create histogram depending on the number of axes
@@ -249,7 +254,7 @@ TH1* AliRsnListOutput::CreateHistogram(const char *name)
 }
 
 //________________________________________________________________________________________
-THnSparseFAliRsnListOutput::CreateHistogramSparse(const char *name)
+THnSparseF *AliRsnListOutput::CreateHistogramSparse(const char *name)
 {
 //
 // Initialize the THnSparse output object.
@@ -283,7 +288,7 @@ THnSparseF* AliRsnListOutput::CreateHistogramSparse(const char *name)
 }
 
 //________________________________________________________________________________________
-AliCFContainerAliRsnListOutput::CreateCFContainer(const char *name)
+AliCFContainer *AliRsnListOutput::CreateCFContainer(const char *name)
 {
 //
 // Initialize the AliCFContainer output object.
@@ -340,7 +345,7 @@ Bool_t AliRsnListOutput::Fill(TObject *target, Int_t step)
       fArray[i] = (Double_t)val->GetComputedValue();
    }
    if (!globalOK && fSkipFailed) return kFALSE;
-   
+
    // retrieve object
    if (!fList || fIndex < 0) {
       AliError("List not initialized");
@@ -351,29 +356,29 @@ Bool_t AliRsnListOutput::Fill(TObject *target, Int_t step)
       AliError("Null pointer");
       return kFALSE;
    }
-   
+
    // check
    //AliInfo(Form("[%s] Object index, name, type = %d, %s (%s)", GetName(), fIndex, obj->GetName(), obj->ClassName()));
 
    // fill output
    if (obj->IsA() == TH1F::Class()) {
-      TH1F *h = (TH1F*)obj;
+      TH1F *h = (TH1F *)obj;
       h->Fill(fArray[0]);
       return kTRUE;
    } else if (obj->IsA() == TH2F::Class()) {
-      TH2F *h = (TH2F*)obj;
+      TH2F *h = (TH2F *)obj;
       h->Fill(fArray[0], fArray[1]);
       return kTRUE;
    } else if (obj->IsA() == TH3F::Class()) {
-      TH3F *h = (TH3F*)obj;
+      TH3F *h = (TH3F *)obj;
       h->Fill(fArray[0], fArray[1], fArray[2]);
       return kTRUE;
    } else if (obj->InheritsFrom(THnSparse::Class())) {
-      THnSparseF *h = (THnSparseF*)obj;
+      THnSparseF *h = (THnSparseF *)obj;
       h->Fill(fArray.GetArray());
       return kTRUE;
    } else if (obj->InheritsFrom(AliCFContainer::Class())) {
-      AliCFContainer *c = (AliCFContainer*)obj;
+      AliCFContainer *c = (AliCFContainer *)obj;
       c->Fill(fArray.GetArray(), step);
       return kTRUE;
    } else {
@@ -381,3 +386,65 @@ Bool_t AliRsnListOutput::Fill(TObject *target, Int_t step)
       return kFALSE;
    }
 }
+
+//________________________________________________________________________________________
+Bool_t AliRsnListOutput::Fill(AliRsnEvent *ev, AliRsnDaughter *d)
+{
+//
+// Uses the passed argument to compute all values.
+// If all computations were successful, fill the output
+// Return value is the AND of all computation successes.
+//
+
+   // retrieve object
+   if (!fList || fIndex < 0) {
+      AliError("List not initialized");
+      return kFALSE;
+   }
+   TObject *obj = fList->At(fIndex);
+   if (!obj) {
+      AliError("Null pointer");
+      return kFALSE;
+   }
+
+
+   TIter next(&fValues);
+   AliRsnValue *val;
+   Int_t i=0;
+   Bool_t globalOK = kTRUE;
+   Double_t values[fValues.GetEntries()];
+   while ((val = (AliRsnValue *)next())) {
+      if (val->InheritsFrom(AliRsnValueDaughter::Class())) {
+         if (!d && fSkipFailed) return kFALSE;
+         globalOK = globalOK && val->Eval(d);
+      } else if (val->InheritsFrom(AliRsnValueEvent::Class())) {
+         if (!ev && fSkipFailed) return kFALSE;
+         globalOK = globalOK && val->Eval(ev);
+      }
+      values[i] = (Double_t)val->GetComputedValue();
+      if (!globalOK && fSkipFailed) return kFALSE;
+      i++;
+   }
+
+   // fill output
+   if (obj->IsA() == TH1F::Class()) {
+      TH1F *h = (TH1F *)obj;
+      h->Fill(values[0]);
+      return kTRUE;
+   } else if (obj->IsA() == TH2F::Class()) {
+      TH2F *h = (TH2F *)obj;
+      h->Fill(values[0], values[1]);
+      return kTRUE;
+   } else if (obj->IsA() == TH3F::Class()) {
+      TH3F *h = (TH3F *)obj;
+      h->Fill(values[0], values[1], values[2]);
+      return kTRUE;
+   } else if (obj->InheritsFrom(THnSparse::Class())) {
+      THnSparseF *h = (THnSparseF *)obj;
+      h->Fill(values);
+      return kTRUE;
+   } else {
+      AliError(Form("Not handled class '%s'", obj->ClassName()));
+      return kFALSE;
+   }
+}
index 5e7a36a3712f5a522682b4a9b64c0168f1909f70..34ec928f57451c5dd6a77ea360ca8c0ba8cc8fae 100644 (file)
@@ -35,7 +35,8 @@
 
 class AliCFContainer;
 class AliRsnValue;
-
+class AliRsnDaughter;
+class AliRsnEvent;
 class AliRsnListOutput : public TNamed {
 
 public:
@@ -48,14 +49,14 @@ public:
 
    AliRsnListOutput(const char *name = "", EOut type = kHistoDefault);
    AliRsnListOutput(const AliRsnListOutput &copy);
-   AliRsnListOutputoperator=(const AliRsnListOutput &copy);
+   AliRsnListOutput &operator=(const AliRsnListOutput &copy);
    virtual ~AliRsnListOutput();
 
    EOut            GetType() const         {return  fType;}
    Int_t           GetSteps() const        {return  fSteps;}
-   TObjArray*      GetValues()             {return &fValues;}
+   TObjArray      *GetValues()             {return &fValues;}
    Int_t           GetNValues()            {return (fNValues = fValues.GetEntries());}
-   AliRsnValue*    GetValue(Int_t i) const {return (AliRsnValue*)fValues[i];}
+   AliRsnValue    *GetValue(Int_t i) const {return (AliRsnValue *)fValues[i];}
    Int_t           GetIndex() const        {return  fIndex;}
    void            SetType(EOut type)      {fType = type;}
    void            SetSteps(Int_t n)       {fSteps = n;}
@@ -66,12 +67,13 @@ public:
    virtual void    Reset();
    virtual Bool_t  Init(const char *prefix, TList *list);
    virtual Bool_t  Fill(TObject *target, Int_t step = 0);
+   virtual Bool_t  Fill(AliRsnEvent *ev,AliRsnDaughter *d);
 
 private:
 
-   TH1*            CreateHistogram(const char *name);
-   THnSparseF*     CreateHistogramSparse(const char *name);
-   AliCFContainerCreateCFContainer(const char *name);
+   TH1            *CreateHistogram(const char *name);
+   THnSparseF     *CreateHistogramSparse(const char *name);
+   AliCFContainer *CreateCFContainer(const char *name);
 
    Bool_t           fSkipFailed;    //  tell to skip fills when one computation fails
    EOut             fType;          //  output format among allowed ones
@@ -80,7 +82,7 @@ private:
    Int_t            fNValues;       //! number of values (internal use)
    TList           *fList;          //! list containing the output
    Int_t            fIndex;         //  index of object in the list
-   
+
    TArrayD          fArray;         //! temp array of computed values
 
    ClassDef(AliRsnListOutput, 1)    //  AliRsnListOutput class
index b59d57a8793b7d89711b97028ce640b98f9e3e71..1ca8eebaab416e3da39cc549fe0635deaae12b74 100644 (file)
@@ -1,8 +1,8 @@
 //
 // Base class to implement any computation within the RSN package.
-// It contains only an array of output objects which must derive 
+// It contains only an array of output objects which must derive
 // from AliRsnOutput.
-// Its core functions ar Init() and DoLoop() which must be 
+// Its core functions ar Init() and DoLoop() which must be
 // overloaded by any class which inherits from this.
 //
 
@@ -30,7 +30,7 @@ AliRsnLoop::AliRsnLoop(const char *name, Bool_t isMixed) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoop::AliRsnLoop(const AliRsnLoopcopy) :
+AliRsnLoop::AliRsnLoop(const AliRsnLoop &copy) :
    TNamed(copy),
    fIsMixed(copy.fIsMixed),
    fEventCuts(copy.fEventCuts),
@@ -42,17 +42,17 @@ AliRsnLoop::AliRsnLoop(const AliRsnLoop& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoop& AliRsnLoop::operator=(const AliRsnLoop& copy)
+AliRsnLoop &AliRsnLoop::operator=(const AliRsnLoop &copy)
 {
 //
 // Assignment operator
 //
-  if (this == &copy)
-    return *this;
-  fIsMixed = copy.fIsMixed;
-  fEventCuts = copy.fEventCuts;
-  fOutputs = copy.fOutputs;
-  return (*this);
+   if (this == &copy)
+      return *this;
+   fIsMixed = copy.fIsMixed;
+   fEventCuts = copy.fEventCuts;
+   fOutputs = copy.fOutputs;
+   return (*this);
 }
 
 //_____________________________________________________________________________
@@ -73,22 +73,22 @@ void AliRsnLoop::AddOutput(TObject *object)
 //
 
    //fOutputs.AddLast(out);
-   AliRsnListOutput *out = (AliRsnListOutput*)object;
+   AliRsnListOutput *out = (AliRsnListOutput *)object;
    Int_t n = fOutputs.GetEntries();
    new (fOutputs[n]) AliRsnListOutput(*out);
 }
 
 //_____________________________________________________________________________
-void AliRsnLoop::Print(Option_t*) const
+void AliRsnLoop::Print(Option_t *) const
 {
 //
 // Prints info about pair
 //
-   
+
    TObjArrayIter next(&fOutputs);
    AliRsnListOutput *out = 0x0;
-   
-   while ( (out = (AliRsnListOutput*)next()) ) {
+
+   while ( (out = (AliRsnListOutput *)next()) ) {
       out->Print();
    }
 }
@@ -100,7 +100,7 @@ Bool_t AliRsnLoop::OkEvent(AliRsnEvent *rsn)
 // If event cuts are defined, check event against them
 //
 
-   if (fEventCuts) 
+   if (fEventCuts)
       return fEventCuts->IsSelected(rsn);
    else
       return kTRUE;
@@ -118,11 +118,11 @@ Bool_t AliRsnLoop::Init(const char *prefix, TList *list)
    TObjArrayIter next(&fOutputs);
    AliRsnListOutput *out;
    Bool_t globalOK = kTRUE;
-   
-   while ( (out = (AliRsnListOutput*)next()) ) {
+
+   while ( (out = (AliRsnListOutput *)next()) ) {
       globalOK = globalOK && out->Init(prefix, list);
    }
-   
+
    AliInfo(Form("[%s] Object initialization: %s", GetName(), (globalOK ? "successful" : "failed")));
    return globalOK;
 }
index 704d4888fda2f6ab421acd5951dd7e264b5604f6..1ca2563d98e19433a9d3ff7276dcbda3563f3778 100644 (file)
@@ -3,9 +3,9 @@
 
 //
 // Base class to implement any computation within the RSN package.
-// It contains only an array of output objects which must derive 
+// It contains only an array of output objects which must derive
 // from AliRsnOutput.
-// Its core functions ar Init() and DoLoop() which must be 
+// Its core functions ar Init() and DoLoop() which must be
 // overloaded by any class which inherits from this.
 //
 
@@ -32,15 +32,15 @@ public:
 
    AliRsnLoop(const char *name = "default", Bool_t isMixed = kFALSE);
    AliRsnLoop(const AliRsnLoop &copy);
-   AliRsnLoopoperator=(const AliRsnLoop &copy);
+   AliRsnLoop &operator=(const AliRsnLoop &copy);
    ~AliRsnLoop();
-   
+
    void           SetMixed(Bool_t yn = kTRUE)     {fIsMixed = yn;}
    void           SetEventCuts(AliRsnCutSet *set) {fEventCuts = set;}
    Bool_t         IsMixed() const                 {return fIsMixed;}
-   AliRsnCutSet*  GetEventCuts()                  {return fEventCuts;}
+   AliRsnCutSet  *GetEventCuts()                  {return fEventCuts;}
    Bool_t         OkEvent(AliRsnEvent *rsn);
-   
+
    virtual void   AddOutput(TObject *output);
    virtual void   Print(Option_t *option = "") const;
    virtual Bool_t Init(const char *prefix, TList *list);
index 07b39eb8dd9690690fe95865a1769d9aa2cbc656..3bec78c5cd37481c58d70cf63b1957ea83c9d021 100644 (file)
@@ -35,7 +35,7 @@ AliRsnLoopDaughter::AliRsnLoopDaughter(const char *name, Int_t listID, AliRsnDau
 }
 
 //_____________________________________________________________________________
-AliRsnLoopDaughter::AliRsnLoopDaughter(const AliRsnLoopDaughtercopy) :
+AliRsnLoopDaughter::AliRsnLoopDaughter(const AliRsnLoopDaughter &copy) :
    AliRsnLoop(copy),
    fTrueMC(copy.fTrueMC),
    fOnlyTrue(copy.fOnlyTrue),
@@ -50,7 +50,7 @@ AliRsnLoopDaughter::AliRsnLoopDaughter(const AliRsnLoopDaughter& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoopDaughter& AliRsnLoopDaughter::operator=(const AliRsnLoopDaughter& copy)
+AliRsnLoopDaughter &AliRsnLoopDaughter::operator=(const AliRsnLoopDaughter &copy)
 {
 //
 // Assignment operator
@@ -58,7 +58,7 @@ AliRsnLoopDaughter& AliRsnLoopDaughter::operator=(const AliRsnLoopDaughter& copy
 
    AliRsnLoop::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fTrueMC = copy.fTrueMC;
    fOnlyTrue = copy.fOnlyTrue;
    fUseMCRef = copy.fUseMCRef;
@@ -110,7 +110,7 @@ Int_t AliRsnLoopDaughter::DoLoop
 
    Int_t i, il, nadd = 0, nlist = 0;
    TEntryList *list[2] = {0, 0};
-   
+
    if (fDef->IsChargeDefined()) {
       list[0] = selMain->GetSelected(fListID, fDef->GetChargeC());
       list[1] = 0x0;
@@ -126,13 +126,13 @@ Int_t AliRsnLoopDaughter::DoLoop
          nlist = 1;
       }
    }
-   
+
    // if it is required to loop over True MC, do this here and skip the rest of the method
    if (fTrueMC) return LoopTrueMC(evMain);
-   
+
    TObjArrayIter next(&fOutputs);
    AliRsnListOutput *out = 0x0;
-   
+
    for (il = 0; il < nlist; il++) {
       if (!list[il]) {
          AliError(Form("List #%d is null", il));
@@ -148,12 +148,12 @@ Int_t AliRsnLoopDaughter::DoLoop
          // fill outputs
          nadd++;
          next.Reset();
-         while ( (out = (AliRsnListOutput*)next()) ) {
+         while ( (out = (AliRsnListOutput *)next()) ) {
             out->Fill(&fDaughter);
          }
       }
    }
-   
+
    return nadd;
 }
 
@@ -169,14 +169,14 @@ Int_t AliRsnLoopDaughter::LoopTrueMC(AliRsnEvent *rsn)
       AliError("Need a MC to compute efficiency");
       return 0;
    }
-   
+
    // check event type:
    // must be ESD or AOD, and then use a bool to know in the rest
    if (!rsn->IsESD() && !rsn->IsAOD()) {
       AliError("Need to process ESD or AOD input");
       return 0;
    }
-   
+
    // retrieve the MC primary vertex position
    // and do some additional coherence checks
    Int_t npart = 0;
@@ -185,48 +185,48 @@ Int_t AliRsnLoopDaughter::LoopTrueMC(AliRsnEvent *rsn)
       npart = rsn->GetRefMCESD()->GetNumberOfTracks();
    } else {
       AliAODEvent *aod = rsn->GetRefMCAOD();
-      listAOD = (TClonesArray*)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
+      listAOD = (TClonesArray *)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
       if (listAOD) npart = listAOD->GetEntries();
    }
-   
+
    // check number of particles
    if (!npart) {
       AliInfo("Empty event");
       return 0;
    }
-   
+
    // utility variables
    Int_t ipart, count = 0;
    TObjArrayIter next(&fOutputs);
    AliRsnListOutput *out = 0x0;
    Int_t pdg = AliRsnDaughter::SpeciesPDG(fDef->GetPID());
-   
-   
+
+
    // loop over particles
    for (ipart = 0; ipart < npart; ipart++) {
       // check i-th particle
       if (rsn->IsESD()) {
          if (!rsn->GetRefMCESD()->Stack()->IsPhysicalPrimary(ipart)) continue;
-         AliMCParticle *part = (AliMCParticle*)rsn->GetRefMCESD()->GetTrack(ipart);
+         AliMCParticle *part = (AliMCParticle *)rsn->GetRefMCESD()->GetTrack(ipart);
          if (TMath::Abs(part->Particle()->GetPdgCode()) != pdg) continue;
          fDaughter.SetRef  (rsn->GetRefMCESD()->GetTrack(ipart));
          fDaughter.SetRefMC(rsn->GetRefMCESD()->GetTrack(ipart));
       } else {
-         AliAODMCParticle *part = (AliAODMCParticle*)listAOD->At(ipart);
+         AliAODMCParticle *part = (AliAODMCParticle *)listAOD->At(ipart);
          if (!part->IsPhysicalPrimary()) continue;
          if (TMath::Abs(part->GetPdgCode()) != pdg) continue;
-         fDaughter.SetRef  ((AliAODMCParticle*)listAOD->At(ipart));
-         fDaughter.SetRefMC((AliAODMCParticle*)listAOD->At(ipart));
+         fDaughter.SetRef  ((AliAODMCParticle *)listAOD->At(ipart));
+         fDaughter.SetRefMC((AliAODMCParticle *)listAOD->At(ipart));
       }
       //if (fDaughter.GetPDG() != AliRsnDaughter::SpeciesPDG(fDef->GetPID())) continue;
       fDaughter.FillP(fDef->GetMass());
       // fill outputs
       count++;
       next.Reset();
-      while ( (out = (AliRsnListOutput*)next()) ) {
+      while ( (out = (AliRsnListOutput *)next()) ) {
          out->Fill(&fDaughter);
       }
    }
-   
+
    return count;
 }
index af64a2e9ea9f087543f4545f43e6d0ed0b5ea9a4..2a71362aa59755d4abdd8409b919785e8cd0bc3d 100644 (file)
@@ -18,19 +18,19 @@ public:
 
    AliRsnLoopDaughter(const char *name = "default", Int_t listID = 0, AliRsnDaughterDef *def = 0);
    AliRsnLoopDaughter(const AliRsnLoopDaughter &copy);
-   AliRsnLoopDaughteroperator=(const AliRsnLoopDaughter &copy);
+   AliRsnLoopDaughter &operator=(const AliRsnLoopDaughter &copy);
    ~AliRsnLoopDaughter();
-   
+
    Int_t              GetListID() const              {return  fListID;}
-   AliRsnDaughterDefGetDef()                       {return  fDef;}
-   AliRsnDaughter*    GetDaughter()                  {return &fDaughter;}
+   AliRsnDaughterDef *GetDef()                       {return  fDef;}
+   AliRsnDaughter    *GetDaughter()                  {return &fDaughter;}
 
    void               SetTrueMC(Bool_t yn = kTRUE)   {fTrueMC = yn;}
    void               SetOnlyTrue(Bool_t yn = kTRUE) {fOnlyTrue = yn;}
-   void               SetMCRefInfo(Bool_t b = kTRUE) {fUseMCRef = b;}  
+   void               SetMCRefInfo(Bool_t b = kTRUE) {fUseMCRef = b;}
    void               SetListID(Int_t i)             {fListID = i;}
    void               SetDef(AliRsnDaughterDef *def) {fDef = def;}
-   
+
    virtual void       Print(Option_t *opt = "") const;
    virtual Bool_t     Init(const char *prefix, TList *list);
    virtual Int_t      DoLoop(AliRsnEvent *main, AliRsnDaughterSelector *smain, AliRsnEvent *mix = 0, AliRsnDaughterSelector *smix = 0);
index 7735557361f0725bcd7762fe17abe7cc7efe32c4..2d9f862baaf91efbc616515563dc58db80667177 100644 (file)
@@ -34,7 +34,7 @@ AliRsnLoopEff::AliRsnLoopEff(const char *name, Int_t nSteps, Double_t maxDist) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoopEff::AliRsnLoopEff(const AliRsnLoopEffcopy) :
+AliRsnLoopEff::AliRsnLoopEff(const AliRsnLoopEff &copy) :
    AliRsnLoop(copy),
    fAddSteps(copy.fAddSteps),
    fSteps(copy.fSteps),
@@ -49,7 +49,7 @@ AliRsnLoopEff::AliRsnLoopEff(const AliRsnLoopEff& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoopEff& AliRsnLoopEff::operator=(const AliRsnLoopEff& copy)
+AliRsnLoopEff &AliRsnLoopEff::operator=(const AliRsnLoopEff &copy)
 {
 //
 // Assignment operator
@@ -57,7 +57,7 @@ AliRsnLoopEff& AliRsnLoopEff::operator=(const AliRsnLoopEff& copy)
 
    AliRsnLoop::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fAddSteps = copy.fAddSteps;
    fSteps = copy.fSteps;
    fOutput = copy.fOutput;
@@ -108,16 +108,16 @@ Bool_t AliRsnLoopEff::Init(const char *prefix, TList *list)
       AliInfo("Clearing container of this efficiency loop.");
       fOutputs.Delete();
    }
-   
+
    Int_t nSteps = (Int_t)fSteps.GetEntries();
    nSteps += fAddSteps;
 
    fOutput->SetSteps(nSteps);
    fOutput->SetSkipFailed(kFALSE);
    AliRsnLoop::AddOutput(fOutput);
-   
+
    if (AliRsnLoop::Init(Form("%s_%s", prefix, GetName()), list)) {
-      fOutput = (AliRsnListOutput*)fOutputs[0];
+      fOutput = (AliRsnListOutput *)fOutputs[0];
       return kTRUE;
    } else {
       fOutput = 0x0;
@@ -142,7 +142,7 @@ Int_t AliRsnLoopEff::FindTrack(Int_t label, const AliVEvent *event)
       if (TMath::Abs(track->GetLabel()) != label) continue;
       return i;
    }
-   
+
    return -1;
 }
 
@@ -155,15 +155,15 @@ Int_t AliRsnLoopEff::GetMatchedDaughter(Int_t label, AliRsnEvent *event)
 //
 
    if (!event) return -1;
-   
+
    AliRsnDaughter out;
-   
+
    Int_t i, imax = event->GetAbsoluteSum();
    for (i = 0; i < imax; i++) {
       event->SetDaughter(out, i);
       if (out.IsOK() && out.GetLabel() == label) return i;
    }
-   
+
    return -1;
 }
 
@@ -179,8 +179,8 @@ Double_t AliRsnLoopEff::DistanceFromPV(Double_t x, Double_t y, Double_t z)
    x -= fVertex[0];
    y -= fVertex[1];
    z -= fVertex[2];
-   
+
    return TMath::Sqrt(x*x + y*y + z*z);
 }
 
-   
+
index 61dcefe41f436e50039a22fef9d7e2776436d2a2..415e85ddc61550e56fdfbaa56fcc71a5326c2f12 100644 (file)
@@ -17,12 +17,12 @@ public:
 
    AliRsnLoopEff(const char *name = "default", Int_t nSteps = 0, Double_t maxDistPV = 1E-2);
    AliRsnLoopEff(const AliRsnLoopEff &copy);
-   AliRsnLoopEffoperator=(const AliRsnLoopEff &copy);
+   AliRsnLoopEff &operator=(const AliRsnLoopEff &copy);
    ~AliRsnLoopEff();
 
-   AliRsnListOutputGetOutput()          {return fOutput;}
+   AliRsnListOutput *GetOutput()          {return fOutput;}
    void              CreateOutput();
-   void              AddStep(TObject *set);                     
+   void              AddStep(TObject *set);
    void              SetMaxDistanceFromPV(Double_t value) {fMaxDistPV = value;}
    virtual void      AddOutput(TObject *) {AliWarning("In loops for efficiency it is not allowed to add outputs externally");}
    virtual Bool_t    Init(const char *prefix, TList *list);
index fb233fdf91c6306c3b506d0de736dbdc257098d5..db06eb7c347599a7bdb161facbc89174acf5b505 100644 (file)
@@ -34,7 +34,7 @@ AliRsnLoopEffPair::AliRsnLoopEffPair(const char *name, AliRsnPairDef *def) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoopEffPair::AliRsnLoopEffPair(const AliRsnLoopEffPaircopy) :
+AliRsnLoopEffPair::AliRsnLoopEffPair(const AliRsnLoopEffPair &copy) :
    AliRsnLoopEff(copy),
    fDef(copy.fDef),
    fMother(copy.fMother)
@@ -45,7 +45,7 @@ AliRsnLoopEffPair::AliRsnLoopEffPair(const AliRsnLoopEffPair& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoopEffPair& AliRsnLoopEffPair::operator=(const AliRsnLoopEffPair& copy)
+AliRsnLoopEffPair &AliRsnLoopEffPair::operator=(const AliRsnLoopEffPair &copy)
 {
 //
 // Assignment operator.
@@ -54,7 +54,7 @@ AliRsnLoopEffPair& AliRsnLoopEffPair::operator=(const AliRsnLoopEffPair& copy)
 
    AliRsnLoopEff::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fDef = copy.fDef;
 
    return (*this);
@@ -98,16 +98,16 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersESD(AliRsnEvent *rsnEvent, Int
 
    AliMCEvent    *mc      = rsnEvent->GetRefMCESD();
    AliStack      *stack   = mc->Stack();
-   AliMCParticle *mother  = (AliMCParticle*)mc->GetTrack(ipart);
+   AliMCParticle *mother  = (AliMCParticle *)mc->GetTrack(ipart);
    TParticle     *motherP = mother->Particle();
    Int_t          ntracks = stack->GetNtrack();
-   
+
    // check PDG code and exit if it is wrong
    if (TMath::Abs(motherP->GetPdgCode()) != fDef->GetMotherPDG()) return kFALSE;
-   
+
    // check number of daughters and exit if it is not 2
    if (motherP->GetNDaughters() < 2) return kFALSE;
-   
+
    // check distance from primary vertex
    TLorentzVector vprod;
    motherP->ProductionVertex(vprod);
@@ -115,9 +115,9 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersESD(AliRsnEvent *rsnEvent, Int
       AliDebugClass(1, "Distant production vertex");
       return kFALSE;
    }
-   
+
    // get the daughters and check their PDG code and charge:
-   // if they match one of the pair daughter definitions, 
+   // if they match one of the pair daughter definitions,
    // assign them as MC reference of the 'fDaughter' objects
    fDaughter[0].Reset();
    fDaughter[1].Reset();
@@ -132,7 +132,7 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersESD(AliRsnEvent *rsnEvent, Int
          return kFALSE;
       }
       // get daughter and its PDG and charge
-      daughter = (AliMCParticle*)mc->GetTrack(index[i]);
+      daughter = (AliMCParticle *)mc->GetTrack(index[i]);
       pdg      = TMath::Abs(daughter->Particle()->GetPdgCode());
       charge   = (Short_t)(daughter->Particle()->GetPDG()->Charge() / 3);
       // check if it matches one definition
@@ -146,7 +146,7 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersESD(AliRsnEvent *rsnEvent, Int
          fDaughter[1].SetLabel(index[i]);
       }
    }
-   
+
    // return success if both daughters were assigned
    if (fDaughter[0].IsOK() && fDaughter[1].IsOK()) {
       return kTRUE;
@@ -170,16 +170,16 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersAOD(AliRsnEvent *rsnEvent, Int
 //
 
    AliAODEvent      *aod     = rsnEvent->GetRefAOD();
-   TClonesArray     *listAOD = (TClonesArray*)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
-   AliAODMCParticle *mother  = (AliAODMCParticle*)listAOD->At(ipart);
+   TClonesArray     *listAOD = (TClonesArray *)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
+   AliAODMCParticle *mother  = (AliAODMCParticle *)listAOD->At(ipart);
    Int_t             ntracks = listAOD->GetEntries();
-   
+
    // check PDG code and exit if it is wrong
    if (TMath::Abs(mother->GetPdgCode()) != fDef->GetMotherPDG()) return kFALSE;
-   
+
    // check number of daughters and exit if it is not 2
    if (mother->GetNDaughters() < 2) return kFALSE;
-   
+
    // check distance from primary vertex
    Double_t vprod[3] = {(Double_t)mother->Xv(), (Double_t)mother->Yv(), (Double_t)mother->Zv()};
    Double_t dv = DistanceFromPV(vprod[0], vprod[1], vprod[2]);
@@ -187,9 +187,9 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersAOD(AliRsnEvent *rsnEvent, Int
       AliDebugClass(1, "Distant production vertex");
       return kFALSE;
    }
-   
+
    // get the daughters and check their PDG code and charge:
-   // if they match one of the pair daughter definitions, 
+   // if they match one of the pair daughter definitions,
    // assign them as MC reference of the 'fDaughter' objects
    fDaughter[0].Reset();
    fDaughter[1].Reset();
@@ -204,7 +204,7 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersAOD(AliRsnEvent *rsnEvent, Int
          return kFALSE;
       }
       // get daughter and its PDG and charge
-      daughter = (AliAODMCParticle*)listAOD->At(index[i]);
+      daughter = (AliAODMCParticle *)listAOD->At(index[i]);
       pdg      = TMath::Abs(daughter->GetPdgCode());
       charge   = (Short_t)(daughter->Charge() / 3);
       // check if it matches one definition
@@ -218,7 +218,7 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersAOD(AliRsnEvent *rsnEvent, Int
          fDaughter[1].SetLabel(index[i]);
       }
    }
-   
+
    // return success if both daughters were assigned
    if (fDaughter[0].IsOK() && fDaughter[1].IsOK()) {
       return kTRUE;
@@ -230,7 +230,7 @@ Bool_t AliRsnLoopEffPair::AssignMotherAndDaughtersAOD(AliRsnEvent *rsnEvent, Int
 }
 
 //_____________________________________________________________________________
-Int_t AliRsnLoopEffPair::DoLoop(AliRsnEvent *rsn, AliRsnDaughterSelector*, AliRsnEvent*, AliRsnDaughterSelector*)
+Int_t AliRsnLoopEffPair::DoLoop(AliRsnEvent *rsn, AliRsnDaughterSelector *, AliRsnEvent *, AliRsnDaughterSelector *)
 {
 //
 // Loop on event and fill containers
@@ -238,29 +238,29 @@ Int_t AliRsnLoopEffPair::DoLoop(AliRsnEvent *rsn, AliRsnDaughterSelector*, AliRs
 
    // check event cuts
    if (!OkEvent(rsn)) return 0;
-   
+
    // retrieve output
-   fOutput = (AliRsnListOutput*)fOutputs[0];
-   
+   fOutput = (AliRsnListOutput *)fOutputs[0];
+
    // check presence of MC reference
    if (!rsn->GetRefMC()) {
       AliError("Need a MC to compute efficiency");
       return 0;
    }
-   
+
    // check presence of event
    if (!rsn->GetRef()) {
       AliError("Need an event to compute efficiency");
       return 0;
    }
-   
+
    // check event type:
    // must be ESD or AOD, and then use a bool to know in the rest
    if (!rsn->IsESD() && !rsn->IsAOD()) {
       AliError("Need to process ESD or AOD input");
       return 0;
    }
-   
+
    // retrieve the MC primary vertex position
    // and do some additional coherence checks
    Int_t i, npart = 0;
@@ -273,23 +273,23 @@ Int_t AliRsnLoopEffPair::DoLoop(AliRsnEvent *rsn, AliRsnDaughterSelector*, AliRs
    } else {
       for (i = 0; i < 3; i++) fVertex[i] = 0.0;
       AliAODEvent *aod = rsn->GetRefMCAOD();
-      TClonesArray *listAOD = (TClonesArray*)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
+      TClonesArray *listAOD = (TClonesArray *)(aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()));
       if (listAOD) npart = listAOD->GetEntries();
-      AliAODMCHeader *mcH = static_cast<AliAODMCHeader*>(aod->FindListObject(AliAODMCHeader::StdBranchName()));
+      AliAODMCHeader *mcH = static_cast<AliAODMCHeader *>(aod->FindListObject(AliAODMCHeader::StdBranchName()));
       if (mcH) mcH->GetVertex(fVertex);
    }
-   
+
    // check number of particles
    if (!npart) {
       AliInfo("Empty event");
       return 0;
    }
-   
+
    // utility variables
    Int_t ipart, istep, count = 0, nsteps = fSteps.GetEntries();
    Int_t ntracks = rsn->GetAbsoluteSum();
    AliRsnDaughter check;
-   
+
    // loop over particles
    for (ipart = 0; ipart < npart; ipart++) {
       // check i-th particle
@@ -303,7 +303,7 @@ Int_t AliRsnLoopEffPair::DoLoop(AliRsnEvent *rsn, AliRsnDaughterSelector*, AliRs
       count++;
       // for each further step, try to find two tracks which pass the related cuts
       for (istep = 0; istep < nsteps; istep++) {
-         AliRsnCutManager *cuts = (AliRsnCutManager*)fSteps[istep];
+         AliRsnCutManager *cuts = (AliRsnCutManager *)fSteps[istep];
          fDaughter[0].SetBad();
          fDaughter[1].SetBad();
          for (i = 0; i < ntracks; i++) {
@@ -328,6 +328,6 @@ Int_t AliRsnLoopEffPair::DoLoop(AliRsnEvent *rsn, AliRsnDaughterSelector*, AliRs
          }
       }
    }
-   
+
    return count;
 }
index e49bbe3dc8fbbe6f692087ce5e150d045dacd6bb..a52ab33b3a1e2fcee6ea7035f3544f98e4f869a9 100644 (file)
@@ -24,14 +24,14 @@ class AliRsnLoopEffPair : public AliRsnLoopEff {
 public:
 
    AliRsnLoopEffPair(const char *name = "default", AliRsnPairDef *def = 0x0);
-   AliRsnLoopEffPair(const AliRsnLoopEffPaircopy);
-   AliRsnLoopEffPair& operator=(const AliRsnLoopEffPair& copy);
+   AliRsnLoopEffPair(const AliRsnLoopEffPair &copy);
+   AliRsnLoopEffPair &operator=(const AliRsnLoopEffPair &copy);
    virtual ~AliRsnLoopEffPair() {;}
 
-   AliRsnPairDefGetDef()                   {return fDef;}
+   AliRsnPairDef *GetDef()                   {return fDef;}
    void           SetDef(AliRsnPairDef *def) {fDef = def;}
    virtual Int_t  DoLoop(AliRsnEvent *main, AliRsnDaughterSelector *smain = 0, AliRsnEvent *mix = 0, AliRsnDaughterSelector *smix = 0);
-   
+
    Bool_t         AssignMotherAndDaughters   (AliRsnEvent *event, Int_t ipart);
    Bool_t         AssignMotherAndDaughtersESD(AliRsnEvent *event, Int_t ipart);
    Bool_t         AssignMotherAndDaughtersAOD(AliRsnEvent *event, Int_t ipart);
index 8679d7810eb97cf8ded5158fba72123d40cc3d7c..481b0cdbf4fbc3aeb7687fe32331601a8c357928 100644 (file)
@@ -24,7 +24,7 @@ AliRsnLoopEvent::AliRsnLoopEvent(const char *name) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoopEvent::AliRsnLoopEvent(const AliRsnLoopEventcopy) :
+AliRsnLoopEvent::AliRsnLoopEvent(const AliRsnLoopEvent &copy) :
    AliRsnLoop(copy)
 {
 //
@@ -33,14 +33,14 @@ AliRsnLoopEvent::AliRsnLoopEvent(const AliRsnLoopEvent& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnLoopEvent& AliRsnLoopEvent::operator=(const AliRsnLoopEvent& copy)
+AliRsnLoopEvent &AliRsnLoopEvent::operator=(const AliRsnLoopEvent &copy)
 {
 //
 // Assignment operator
 //
 
-  AliRsnLoop::operator=(copy);
-  return (*this);
+   AliRsnLoop::operator=(copy);
+   return (*this);
 }
 
 //_____________________________________________________________________________
@@ -84,13 +84,13 @@ Int_t AliRsnLoopEvent::DoLoop
 
    TObjArrayIter next(&fOutputs);
    AliRsnListOutput *out = 0x0;
-   
+
    // check cuts
    if (!OkEvent(evMain)) return 0;
-   
-   while ( (out = (AliRsnListOutput*)next()) ) {
+
+   while ( (out = (AliRsnListOutput *)next()) ) {
       out->Fill(evMain);
    }
-   
+
    return 1;
 }
index e516f4516cdf48db27d5d5a9cab33ad154c373bf..cfa094d847e7cb0ef0c2c3314929fe6229b3c4ce 100644 (file)
@@ -3,7 +3,7 @@
 
 //
 // Computator for events.
-// The simplest loop, 
+// The simplest loop,
 // which is filled once per event.
 //
 
@@ -14,9 +14,9 @@ public:
 
    AliRsnLoopEvent(const char *name = "default");
    AliRsnLoopEvent(const AliRsnLoopEvent &copy);
-   AliRsnLoopEventoperator=(const AliRsnLoopEvent &copy);
+   AliRsnLoopEvent &operator=(const AliRsnLoopEvent &copy);
    ~AliRsnLoopEvent();
-   
+
    virtual void       Print(Option_t *opt = "") const;
    virtual Bool_t     Init(const char *prefix, TList *list);
    virtual Int_t      DoLoop(AliRsnEvent *main, AliRsnDaughterSelector *smain = 0, AliRsnEvent *mix = 0, AliRsnDaughterSelector *smix = 0);
index 0666676f980e18935bab86fb741ac4ccd0132d21..fd64c2b0050be0ab279dba6c3372f780ced373c5 100644 (file)
@@ -77,7 +77,7 @@ AliRsnLoopPair &AliRsnLoopPair::operator=(const AliRsnLoopPair &copy)
 
    AliRsnLoop::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fTrueMC = copy.fTrueMC;
    fOnlyTrue = copy.fOnlyTrue;
    fUseMCRef = copy.fUseMCRef;
@@ -193,7 +193,7 @@ Int_t AliRsnLoopPair::DoLoop
       if (!fIsMixed && list0 == list1) start = i0 + 1;
       for (i1 = start; i1 < list1->GetN(); i1++) {
          iEntry2 = list1->GetEntry(i1);
-        if (iEntry1 == iEntry2) continue;
+         if (iEntry1 == iEntry2) continue;
          AliDebugClass(4, Form("Checking entries pair: %d (%lld) with %d (%lld)", i0, iEntry1, i1, iEntry2));
          evMix->SetDaughter(fDaughter[1], iEntry2,fUseMCRef);
          fDaughter[1].FillP(fPairDef->GetDef2().GetMass());
index 3574fef33520c91f189944e7196c7ce9101b390b..b8c1843f7a49497bfcd6e8ddbe11227be46df829 100644 (file)
@@ -18,22 +18,22 @@ public:
 
    AliRsnLoopPair(const char *name = "default", AliRsnPairDef *def = 0, Bool_t isMixed = kFALSE);
    AliRsnLoopPair(const AliRsnLoopPair &copy);
-   AliRsnLoopPairoperator=(const AliRsnLoopPair &copy);
+   AliRsnLoopPair &operator=(const AliRsnLoopPair &copy);
    ~AliRsnLoopPair();
 
    // getters
    Bool_t         IsTrueMC()     const {return fTrueMC;}
    Bool_t         IsOnlyTrue()   const {return fOnlyTrue;}
    Bool_t         IsCheckDecay() const {return fCheckDecay;}
-   AliRsnPairDefGetPairDef()         {return fPairDef;}
-   AliRsnCutSet*  GetPairCuts()        {return fPairCuts;}
-   AliRsnMother*  GetMother()          {return &fMother;}
+   AliRsnPairDef *GetPairDef()         {return fPairDef;}
+   AliRsnCutSet  *GetPairCuts()        {return fPairCuts;}
+   AliRsnMother  *GetMother()          {return &fMother;}
 
    // setters (not for all members)
    void           SetPairCuts(AliRsnCutSet *cuts)      {fPairCuts = cuts;}
    void           SetTrueMC(Bool_t yn = kTRUE)         {fTrueMC = yn;}
    void           SetOnlyTrue(Bool_t onlyTrue = kTRUE) {fOnlyTrue = onlyTrue;}
-   void           SetMCRefInfo(Bool_t b = kTRUE)       {fUseMCRef = b;}   
+   void           SetMCRefInfo(Bool_t b = kTRUE)       {fUseMCRef = b;}
    void           SetCheckDecay(Bool_t check = kTRUE)  {fCheckDecay = check;}
    void           SetListID(Int_t i, Int_t val)        {if (i==0||i==1) fListID[i] = val;}
    void           SetRangeY(Double_t range)            {fRangeY = range;}
index 8a66aa54133aa35f5cf340981590270e79abedf5..d57e40cfe9bfa8320cc1e9745f392588f472c1e7 100644 (file)
@@ -63,7 +63,8 @@ AliRsnMiniAnalysisTask::AliRsnMiniAnalysisTask() :
    fTriggerAna(0x0),
    fESDtrackCuts(0x0),
    fMiniEvent(0x0),
-   fBigOutput(kFALSE)
+   fBigOutput(kFALSE),
+   fMixPrintRefresh(-1)
 {
 //
 // Dummy constructor ALWAYS needed for I/O.
@@ -93,7 +94,8 @@ AliRsnMiniAnalysisTask::AliRsnMiniAnalysisTask(const char *name, Bool_t useMC) :
    fTriggerAna(0x0),
    fESDtrackCuts(0x0),
    fMiniEvent(0x0),
-   fBigOutput(kFALSE)
+   fBigOutput(kFALSE),
+   fMixPrintRefresh(-1)
 {
 //
 // Default constructor.
@@ -128,7 +130,8 @@ AliRsnMiniAnalysisTask::AliRsnMiniAnalysisTask(const AliRsnMiniAnalysisTask &cop
    fTriggerAna(copy.fTriggerAna),
    fESDtrackCuts(copy.fESDtrackCuts),
    fMiniEvent(0x0),
-   fBigOutput(copy.fBigOutput)
+   fBigOutput(copy.fBigOutput),
+   fMixPrintRefresh(copy.fMixPrintRefresh)
 {
 //
 // Copy constructor.
@@ -148,7 +151,7 @@ AliRsnMiniAnalysisTask &AliRsnMiniAnalysisTask::operator=(const AliRsnMiniAnalys
 
    AliAnalysisTaskSE::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fUseMC = copy.fUseMC;
    fUseCentrality = copy.fUseCentrality;
    fCentralityType = copy.fCentralityType;
@@ -164,7 +167,7 @@ AliRsnMiniAnalysisTask &AliRsnMiniAnalysisTask::operator=(const AliRsnMiniAnalys
    fTriggerAna = copy.fTriggerAna;
    fESDtrackCuts = copy.fESDtrackCuts;
    fBigOutput = copy.fBigOutput;
-
+   fMixPrintRefresh = copy.fMixPrintRefresh;
    return (*this);
 }
 
@@ -242,6 +245,12 @@ void AliRsnMiniAnalysisTask::UserCreateOutputObjects()
    fHEventStat->GetXaxis()->SetBinLabel(4, "Accepted");
    fOutput->Add(fHEventStat);
 
+   TIter next(&fTrackCuts);
+   AliRsnCutSet *cs;
+   while ((cs = (AliRsnCutSet *) next())) {
+      cs->Init(fOutput);
+   }
+
    // create temporary tree for filtered events
    if (fMiniEvent) delete fMiniEvent;
    fEvBuffer = new TTree("EventBuffer", "Temporary buffer for mini events");
@@ -332,10 +341,13 @@ void AliRsnMiniAnalysisTask::FinishTaskOutput()
    AliRsnMiniOutput *def = 0x0;
    AliRsnMiniOutput::EComputation compType;
 
-   Int_t printNum = 0;
-   if (nEvents>1e5) printNum=nEvents/100;
-   if (nEvents>1e4) printNum=nEvents/10;
-   
+   Int_t printNum = fMixPrintRefresh;
+   if (printNum < 0) {
+      if (nEvents>1e5) printNum=nEvents/100;
+      else if (nEvents>1e4) printNum=nEvents/10;
+      else printNum = 0;
+   }
+
    // loop on events, and for each one fill all outputs
    // using the appropriate procedure depending on its type
    // only mother-related histograms are filled in UserExec,
@@ -346,7 +358,7 @@ void AliRsnMiniAnalysisTask::FinishTaskOutput()
       fEvBuffer->GetEntry(ievt);
       if (printNum&&(ievt%printNum==0)) {
          AliInfo(Form("[%s] Std.Event %d/%d",GetName(), ievt,nEvents));
-         timer.Stop(); timer.Print();fflush(stdout); timer.Start(kFALSE);
+         timer.Stop(); timer.Print(); fflush(stdout); timer.Start(kFALSE);
       }
       // fill
       for (idef = 0; idef < nDefs; idef++) {
@@ -400,10 +412,10 @@ void AliRsnMiniAnalysisTask::FinishTaskOutput()
       smatched[ievt] = "|";
       nmatched[ievt] = 0;
    }
-   
-   
+
+
    AliInfo(Form("[%s] Std.Event %d/%d",GetName(), nEvents,nEvents));
-   timer.Stop(); timer.Print(); timer.Start();fflush(stdout);
+   timer.Stop(); timer.Print(); timer.Start(); fflush(stdout);
 
    // search for good matchings
    for (ievt = 0; ievt < nEvents; ievt++) {
@@ -434,9 +446,9 @@ void AliRsnMiniAnalysisTask::FinishTaskOutput()
       }
       AliDebugClass(1, Form("Matches for event %5d = %d [%s] (missing are declared above)", evMain.ID(), nmatched[ievt], smatched[ievt].Data()));
    }
-   
+
    AliInfo(Form("[%s] EventMixing searching %d/%d",GetName(),nEvents,nEvents));
-   timer.Stop(); timer.Print();fflush(stdout); timer.Start();
+   timer.Stop(); timer.Print(); fflush(stdout); timer.Start();
 
    // perform mixing
    TObjArray *list = 0x0;
@@ -471,7 +483,7 @@ void AliRsnMiniAnalysisTask::FinishTaskOutput()
    delete [] smatched;
 
    AliInfo(Form("[%s] EventMixing %d/%d",GetName(),nEvents,nEvents));
-   timer.Stop();timer.Print();fflush(stdout);
+   timer.Stop(); timer.Print(); fflush(stdout);
 
    /*
    OLD
index 69bb436361de0570bd9944ed615b2db01112e26d..489b1d5118cce3296149b808b15b052daa5c603d 100644 (file)
@@ -32,10 +32,10 @@ public:
    AliRsnMiniAnalysisTask();
    AliRsnMiniAnalysisTask(const char *name, Bool_t isMC = kFALSE);
    AliRsnMiniAnalysisTask(const AliRsnMiniAnalysisTask &copy);
-   AliRsnMiniAnalysisTaskoperator=(const AliRsnMiniAnalysisTask &copy);
+   AliRsnMiniAnalysisTask &operator=(const AliRsnMiniAnalysisTask &copy);
    virtual ~AliRsnMiniAnalysisTask();
 
-   void                UseMC(Bool_t yn = kTRUE)           {fUseMC = yn;}                     
+   void                UseMC(Bool_t yn = kTRUE)           {fUseMC = yn;}
    void                UseCentrality(const char *type)    {fUseCentrality = kTRUE; fCentralityType = type; fCentralityType.ToUpper();}
    void                UseMultiplicity(const char *type)  {fUseCentrality = kFALSE; fCentralityType = type; fCentralityType.ToUpper();}
    void                UseContinuousMix()                 {fContinuousMix = kTRUE;}
@@ -45,20 +45,21 @@ public:
    void                SetMaxDiffVz   (Double_t val)      {fMaxDiffVz    = val;}
    void                SetMaxDiffAngle(Double_t val)      {fMaxDiffAngle = val;}
    void                SetEventCuts(AliRsnCutSet *cuts)   {fEventCuts    = cuts;}
+   void                SetMixPrintRefresh(Int_t n)        {fMixPrintRefresh = n;}
    Int_t               AddTrackCuts(AliRsnCutSet *cuts);
    TClonesArray       *Outputs()                          {return &fHistograms;}
    TClonesArray       *Values()                           {return &fValues;}
-   
+
    virtual void        UserCreateOutputObjects();
-   virtual void        UserExec(Option_t*);
-   virtual void        Terminate(Option_t*);
+   virtual void        UserExec(Option_t *);
+   virtual void        Terminate(Option_t *);
    virtual void        FinishTaskOutput();
-   
+
    Int_t               ValueID(AliRsnMiniValue::EType type, Bool_t useMC = kFALSE);
-   Int_t               CreateValue(AliRsnMiniValue::EType type, Bool_t useMC = kFALSE); 
+   Int_t               CreateValue(AliRsnMiniValue::EType type, Bool_t useMC = kFALSE);
    AliRsnMiniOutput   *CreateOutput(const char *name, AliRsnMiniOutput::EOutputType type, AliRsnMiniOutput::EComputation src);
    AliRsnMiniOutput   *CreateOutput(const char *name, const char *outType, const char *compType);
-  
+
 private:
 
    Char_t   CheckCurrentEvent();
@@ -74,18 +75,18 @@ private:
    Int_t                fEvNum;           //! absolute event counter
    Bool_t               fUseCentrality;   //  if true, use centrality for event, otherwise use multiplicity
    TString              fCentralityType;  //  definition used to choose what centrality or multiplicity to use
-                       
+
    Bool_t               fContinuousMix;   //  mixing --> technique chosen (continuous or binned)
    Int_t                fNMix;            //  mixing --> required number of mixes
    Double_t             fMaxDiffMult;     //  mixing --> max difference in multiplicity
    Double_t             fMaxDiffVz;       //  mixing --> max difference in Vz of prim vert
    Double_t             fMaxDiffAngle;    //  mixing --> max difference in reaction plane angle
-                       
+
    TList               *fOutput;          //  output list
    TClonesArray         fHistograms;      //  list of histogram definitions
    TClonesArray         fValues;          //  list of values to be computed
    TH1F                *fHEventStat;      //  histogram of event statistics
-                       
+
    AliRsnCutSet        *fEventCuts;       //  cuts on events
    TObjArray            fTrackCuts;       //  list of single track cuts
    AliRsnEvent          fRsnEvent;        //! interface object to the event
@@ -94,8 +95,9 @@ private:
    AliESDtrackCuts     *fESDtrackCuts;    //! quality cut for ESD tracks
    AliRsnMiniEvent     *fMiniEvent;       //! mini-event cursor
    Bool_t               fBigOutput;       // flag if open file for output list
+   Int_t                fMixPrintRefresh; // how often info in mixing part is printed
 
-   ClassDef(AliRsnMiniAnalysisTask, 2);   // AliRsnMiniAnalysisTask
+   ClassDef(AliRsnMiniAnalysisTask, 3);   // AliRsnMiniAnalysisTask
 };
 
 inline Int_t AliRsnMiniAnalysisTask::CreateValue(AliRsnMiniValue::EType type, Bool_t useMC)
@@ -114,7 +116,7 @@ inline Int_t AliRsnMiniAnalysisTask::CreateValue(AliRsnMiniValue::EType type, Bo
       AliInfo(Form("Creating value '%s' in slot #%d", AliRsnMiniValue::ValueName(type, useMC), valID));
       new (fValues[valID]) AliRsnMiniValue(type, useMC);
    }
-   
+
    return valID;
 }
 
@@ -126,13 +128,13 @@ inline Int_t AliRsnMiniAnalysisTask::ValueID(AliRsnMiniValue::EType type, Bool_t
 
    const char *name = AliRsnMiniValue::ValueName(type, useMC);
    TObject *obj = fValues.FindObject(name);
-   if (obj) 
-      return fValues.IndexOf(obj); 
+   if (obj)
+      return fValues.IndexOf(obj);
    else
       return -1;
 }
 
-inline AliRsnMiniOutputAliRsnMiniAnalysisTask::CreateOutput
+inline AliRsnMiniOutput *AliRsnMiniAnalysisTask::CreateOutput
 (const char *name, AliRsnMiniOutput::EOutputType type, AliRsnMiniOutput::EComputation src)
 {
 //
@@ -140,13 +142,13 @@ inline AliRsnMiniOutput* AliRsnMiniAnalysisTask::CreateOutput
 // which is then returned to the user for its configuration
 //
 
-   Int_t n = fHistograms.GetEntries(); 
+   Int_t n = fHistograms.GetEntries();
    AliRsnMiniOutput *newDef = new (fHistograms[n]) AliRsnMiniOutput(name, type, src);
-   
+
    return newDef;
 }
 
-inline AliRsnMiniOutputAliRsnMiniAnalysisTask::CreateOutput
+inline AliRsnMiniOutput *AliRsnMiniAnalysisTask::CreateOutput
 (const char *name, const char *outType, const char *compType)
 {
 //
@@ -154,9 +156,9 @@ inline AliRsnMiniOutput* AliRsnMiniAnalysisTask::CreateOutput
 // which is then returned to the user for its configuration
 //
 
-   Int_t n = fHistograms.GetEntries(); 
+   Int_t n = fHistograms.GetEntries();
    AliRsnMiniOutput *newDef = new (fHistograms[n]) AliRsnMiniOutput(name, outType, compType);
-   
+
    return newDef;
 }
 #endif
index 9089eb995271fd9d103defa7aaac5c7fd468303f..bb5e182a4b02684fb56c0edef125a6a0f1aee760 100644 (file)
@@ -21,25 +21,25 @@ public:
    AliRsnMiniAxis(Int_t valID, Int_t nbins, Double_t min, Double_t max)   : fValueID(valID), fBins(0) {Set(nbins, min, max);}
    AliRsnMiniAxis(Int_t valID, Double_t min, Double_t max, Double_t step) : fValueID(valID), fBins(0) {Set(min, max, step);}
    AliRsnMiniAxis(Int_t valID, Int_t nbins, Double_t *bins)               : fValueID(valID), fBins(0) {Set(nbins, bins);}
-   AliRsnMiniAxis(const AliRsnMiniAxiscopy) : TObject(copy), fValueID(copy.fValueID), fBins(copy.fBins) { }
-  AliRsnMiniAxis& operator=(const AliRsnMiniAxis& copy) {if (this==&copy) return *this; fValueID = copy.fValueID; fBins = copy.fBins; return (*this);}
-   
+   AliRsnMiniAxis(const AliRsnMiniAxis &copy) : TObject(copy), fValueID(copy.fValueID), fBins(copy.fBins) { }
+   AliRsnMiniAxis &operator=(const AliRsnMiniAxis &copy) {if (this==&copy) return *this; fValueID = copy.fValueID; fBins = copy.fBins; return (*this);}
+
    void      SetValueID(Int_t id)     {fValueID = id;}
    Int_t     GetValueID() const       {return fValueID;}
-   
+
    Int_t     NBins()     {return  fBins.GetSize() - 1;}
    TArrayD  *Bins()      {return &fBins;}
    Double_t *BinArray()  {return  fBins.GetArray();}
-   
+
    void      Set(Int_t nbins, Double_t min, Double_t max);
    void      Set(Int_t nbins, Double_t *bins);
    void      Set(Double_t min, Double_t max, Double_t step);
-   
+
 private:
 
    Int_t    fValueID;  // index of used value in task collection
    TArrayD  fBins;     // bins
-   
+
    ClassDef(AliRsnMiniAxis,1)
 };
 
index c7e5106c42b7cea4d856142512fdabdb1419ba62..f59f58dc260fd1aad8444eff1d1ded5abc3a7432 100644 (file)
@@ -25,19 +25,19 @@ void AliRsnMiniEvent::AddParticle(AliRsnMiniParticle copy)
 }
 
 //__________________________________________________________________________________________________
-AliRsnMiniParticleAliRsnMiniEvent::GetParticle(Int_t i)
+AliRsnMiniParticle *AliRsnMiniEvent::GetParticle(Int_t i)
 {
 //
 // Return the leading particle
 //
 
    if (i < 0 || i > fParticles.GetEntriesFast()) return 0x0;
-   
-   return (AliRsnMiniParticle*)fParticles[i];
+
+   return (AliRsnMiniParticle *)fParticles[i];
 }
 
 //__________________________________________________________________________________________________
-AliRsnMiniParticleAliRsnMiniEvent::LeadingParticle()
+AliRsnMiniParticle *AliRsnMiniEvent::LeadingParticle()
 {
 //
 // Return the leading particle
@@ -45,8 +45,8 @@ AliRsnMiniParticle* AliRsnMiniEvent::LeadingParticle()
 
    if (fLeading < 0) return 0x0;
    if (fLeading >= fParticles.GetEntriesFast()) return 0x0;
-   
-   return (AliRsnMiniParticle*)fParticles[fLeading];
+
+   return (AliRsnMiniParticle *)fParticles[fLeading];
 }
 
 //__________________________________________________________________________________________________
@@ -61,11 +61,11 @@ Int_t AliRsnMiniEvent::CountParticles(TArrayI &found, Char_t charge, Int_t cutID
    Int_t i, npart = fParticles.GetEntriesFast();
    Int_t    count = 0;
    AliRsnMiniParticle *part = 0x0;
-   
+
    found.Set(npart);
-   
+
    for (i = 0; i < npart; i++) {
-      part = (AliRsnMiniParticle*)fParticles[i];
+      part = (AliRsnMiniParticle *)fParticles[i];
       if (charge == '+' || charge == '-' || charge == '0') {
          if (part->Charge() != charge) continue;
       }
@@ -75,7 +75,7 @@ Int_t AliRsnMiniEvent::CountParticles(TArrayI &found, Char_t charge, Int_t cutID
       found[count] = i;
       count++;
    }
-   
+
    found.Set(count);
    return count;
 }
index 42184774ad46e559690eab6bcfe55eeb27fecc21..84ec4b271f542526b7a9fbc085bb625fbb831117 100644 (file)
@@ -18,29 +18,29 @@ public:
 
    AliRsnMiniEvent() : fID(-1), fVz(0.0), fMult(0.0), fAngle(0.0), fLeading(-1), fParticles("AliRsnMiniParticle", 0) {}
    ~AliRsnMiniEvent() {fParticles.Delete();}
-   
-   Int_t&              ID()        {return fID;}
-   Float_t&            Vz()        {return fVz;}
-   Float_t&            Mult()      {return fMult;}
-   Float_t&            Angle()     {return fAngle;}
-   TClonesArray&       Particles() {return fParticles;}
+
+   Int_t              &ID()        {return fID;}
+   Float_t            &Vz()        {return fVz;}
+   Float_t            &Mult()      {return fMult;}
+   Float_t            &Angle()     {return fAngle;}
+   TClonesArray       &Particles() {return fParticles;}
    Bool_t              IsEmpty()   {return fParticles.IsEmpty();}
-   
+
    Int_t               CountParticles(TArrayI &found, Char_t charge = 0, Int_t cutID = -1);
-   AliRsnMiniParticleGetParticle(Int_t i);
-   AliRsnMiniParticleLeadingParticle();
+   AliRsnMiniParticle *GetParticle(Int_t i);
+   AliRsnMiniParticle *LeadingParticle();
    void                AddParticle(AliRsnMiniParticle copy);
-   
+
 private:
-   
+
    Int_t         fID;         // ID number
    Float_t       fVz;         // z-position of vertex
    Float_t       fMult;       // multiplicity or centrality
    Float_t       fAngle;      // angle of reaction plane to main reference frame
-   
+
    Int_t         fLeading;    // index of leading particle
    TClonesArray  fParticles;  // list of selected particles
-   
+
    ClassDef(AliRsnMiniEvent,2)
 };
 
index 0e69018e5479b08fd241f3d9aef9b15935f6ed30..acb4b2be5071b55f64cc468a1fdc4fa83d495920 100644 (file)
@@ -56,11 +56,11 @@ ClassImp(AliRsnMiniMonitor)
 
 //__________________________________________________________________________________________________
 AliRsnMiniMonitor::AliRsnMiniMonitor() :
-   TNamed(), 
-   fType(kTypes), 
-   fCutID(-1), 
+   TNamed(),
+   fType(kTypes),
+   fCutID(-1),
    fCharge(0),
-   fListID(-1), 
+   fListID(-1),
    fList(0x0)
 {
 //
@@ -70,49 +70,49 @@ AliRsnMiniMonitor::AliRsnMiniMonitor() :
 
 //__________________________________________________________________________________________________
 AliRsnMiniMonitor::AliRsnMiniMonitor(const char *name, EType type, Int_t cutID) :
-   TNamed(name, ""), 
-   fType(type), 
-   fCutID(cutID), 
+   TNamed(name, ""),
+   fType(type),
+   fCutID(cutID),
    fCharge(0),
-   fListID(-1), 
+   fListID(-1),
    fList(0x0)
 {
 //
 // Default constructor
 //
 }
-   
+
 //__________________________________________________________________________________________________
-AliRsnMiniMonitor::AliRsnMiniMonitor(const AliRsnMiniMonitorcopy) :
-   TNamed(copy), 
-   fType(copy.fType), 
-   fCutID(copy.fCutID), 
+AliRsnMiniMonitor::AliRsnMiniMonitor(const AliRsnMiniMonitor &copy) :
+   TNamed(copy),
+   fType(copy.fType),
+   fCutID(copy.fCutID),
    fCharge(copy.fCharge),
-   fListID(copy.fListID), 
+   fListID(copy.fListID),
    fList(copy.fList)
 {
 //
 // Copy constructor
 //
 }
-   
+
 //__________________________________________________________________________________________________
-AliRsnMiniMonitor& AliRsnMiniMonitor::operator=(const AliRsnMiniMonitor& copy) 
+AliRsnMiniMonitor &AliRsnMiniMonitor::operator=(const AliRsnMiniMonitor &copy)
 {
 //
 // Assignment operator
 //
-   
-   TNamed::operator=(copy); 
+
+   TNamed::operator=(copy);
    if (this == &copy)
-     return *this;
-   fType = copy.fType; 
-   fCutID = copy.fCutID; 
+      return *this;
+   fType = copy.fType;
+   fCutID = copy.fCutID;
    fCharge = copy.fCharge;
-   fListID = copy.fListID; 
-   fList = copy.fList; 
-   
-   return (*this); 
+   fListID = copy.fListID;
+   fList = copy.fList;
+
+   return (*this);
 }
 
 //__________________________________________________________________________________________________
@@ -126,14 +126,14 @@ Bool_t AliRsnMiniMonitor::Init(const char *name, TList *list)
    TString sname(name);
    sname += '_';
    sname += GetName();
-   
+
    // check list
    fList = list;
    if (!list) {
       AliError("No list!");
       return kFALSE;
    }
-   
+
    // reset histogram
    TH1 *histogram = 0x0;
 
@@ -143,7 +143,7 @@ Bool_t AliRsnMiniMonitor::Init(const char *name, TList *list)
          sname += fCutID;
          histogram = new TH1F(sname.Data(), "", 100, 0.0, 10.0);
          break;
-      case kdEdxTPCvsP: 
+      case kdEdxTPCvsP:
          sname += "_TPCsignal";
          histogram = new TH2F(sname.Data(), "", 500, 0.0, 5.0, 1000, 0.0, 1000.0);
          break;
@@ -162,7 +162,7 @@ Bool_t AliRsnMiniMonitor::Init(const char *name, TList *list)
          AliError("Wrong enum type");
          return kFALSE;
    }
-   
+
    // add to list
    if (histogram && fList) {
       histogram->Sumw2();
@@ -171,7 +171,7 @@ Bool_t AliRsnMiniMonitor::Init(const char *name, TList *list)
       AliInfo(Form("Histogram '%s' added to list in slot #%d", histogram->GetName(), fListID));
       return kTRUE;
    }
-   
+
    return kFALSE;
 }
 
@@ -195,11 +195,11 @@ Bool_t AliRsnMiniMonitor::Fill(AliRsnDaughter *track, AliRsnEvent *event)
 
    Double_t valueX, valueY;
    AliVTrack *vtrack = track->Ref2Vtrack();
-   
+
    AliPIDResponse *pid = event->GetPIDResponse();
 
    switch (fType) {
-      case kTrackPt: 
+      case kTrackPt:
          if (!vtrack) {
             AliWarning("Required vtrack for this value");
             return kFALSE;
@@ -208,16 +208,16 @@ Bool_t AliRsnMiniMonitor::Fill(AliRsnDaughter *track, AliRsnEvent *event)
          if (fCharge == '-' && vtrack->Charge() >= 0) return kFALSE;
          if (fCharge == '0' && vtrack->Charge() != 0) return kFALSE;
          valueX = vtrack->Pt();
-         ((TH1F*)obj)->Fill(valueX);
+         ((TH1F *)obj)->Fill(valueX);
          return kTRUE;
-      case kdEdxTPCvsP: 
+      case kdEdxTPCvsP:
          if (!vtrack) {
             AliWarning("Required vtrack for this value");
             return kFALSE;
          }
          valueX = vtrack->GetTPCmomentum();
          valueY = vtrack->GetTPCsignal();
-         ((TH2F*)obj)->Fill(valueX, valueY);
+         ((TH2F *)obj)->Fill(valueX, valueY);
          return kTRUE;
       case ktimeTOFvsPPion:
          if (!vtrack) {
@@ -228,7 +228,7 @@ Bool_t AliRsnMiniMonitor::Fill(AliRsnDaughter *track, AliRsnEvent *event)
          //valueY = vtrack->GetTOFsignal();
          valueY = 1E20;
          if (pid) valueY = pid->NumberOfSigmasTOF(vtrack, AliPID::kPion);
-         ((TH2F*)obj)->Fill(valueX, valueY);
+         ((TH2F *)obj)->Fill(valueX, valueY);
          return kTRUE;
       case ktimeTOFvsPKaon:
          if (!vtrack) {
@@ -239,7 +239,7 @@ Bool_t AliRsnMiniMonitor::Fill(AliRsnDaughter *track, AliRsnEvent *event)
          //valueY = vtrack->GetTOFsignal();
          valueY = 1E20;
          if (pid) valueY = pid->NumberOfSigmasTOF(vtrack, AliPID::kKaon);
-         ((TH2F*)obj)->Fill(valueX, valueY);
+         ((TH2F *)obj)->Fill(valueX, valueY);
          return kTRUE;
       case ktimeTOFvsPProton:
          if (!vtrack) {
@@ -250,7 +250,7 @@ Bool_t AliRsnMiniMonitor::Fill(AliRsnDaughter *track, AliRsnEvent *event)
          //valueY = vtrack->GetTOFsignal();
          valueY = 1E20;
          if (pid) valueY = pid->NumberOfSigmasTOF(vtrack, AliPID::kProton);
-         ((TH2F*)obj)->Fill(valueX, valueY);
+         ((TH2F *)obj)->Fill(valueX, valueY);
          return kTRUE;
       default:
          AliError("Invalid value type");
index 686ef6a8f7f4e648a2ff9ba2611c384f80575cc6..566143a4881aaf3cddbe261113e6910164ce5e9a 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Monitors
@@ -29,20 +29,20 @@ public:
 
    AliRsnMiniMonitor();
    AliRsnMiniMonitor(const char *name, EType type, Int_t cutID);
-   AliRsnMiniMonitor(const AliRsnMiniMonitorcopy);
-   AliRsnMiniMonitor& operator=(const AliRsnMiniMonitor& copy);
+   AliRsnMiniMonitor(const AliRsnMiniMonitor &copy);
+   AliRsnMiniMonitor &operator=(const AliRsnMiniMonitor &copy);
    virtual ~AliRsnMiniMonitor() { }
 
    EType              GetType()   {return fType;}
    Int_t              GetCutID()  {return fCutID;}
    Char_t             GetCharge() {return fCharge;}
    Int_t              GetListID() {return fListID;}
-   
+
    void               SetType(EType type)  {fType = type;}
    void               SetCutID(Int_t id)   {fCutID = id;}
    void               SetCharge(Char_t ch) {fCharge = ch;}
 
-   static const char* Label(EType type); 
+   static const char *Label(EType type);
    Bool_t             Init(const char *name, TList *list);
    Bool_t             Fill(AliRsnDaughter *track, AliRsnEvent *event);
 
@@ -53,11 +53,11 @@ protected:
    Char_t     fCharge;   //  charge to be used
    Int_t      fListID;   //  histogram ID in the list
    TList     *fList;     //! global output list
-                                       
+
    ClassDef(AliRsnMiniMonitor, 1)  //  AliRsnMiniMonitor class
 };
 
-inline const charAliRsnMiniMonitor::Label(EType type)
+inline const char *AliRsnMiniMonitor::Label(EType type)
 {
    switch (type) {
       case kdEdxTPCvsP      : return "TPCsignal";
index 4554faa4a4f6ae85b2536405c9cf77e1a39f1bf8..a83ef3087593268dddcf36a5c49aa8d43be25352 100644 (file)
@@ -82,7 +82,7 @@ AliRsnMiniMonitorTask::AliRsnMiniMonitorTask(const char *name, Bool_t useMC) :
 }
 
 //__________________________________________________________________________________________________
-AliRsnMiniMonitorTask::AliRsnMiniMonitorTask(const AliRsnMiniMonitorTaskcopy) :
+AliRsnMiniMonitorTask::AliRsnMiniMonitorTask(const AliRsnMiniMonitorTask &copy) :
    AliAnalysisTaskSE(copy),
    fUseMC(copy.fUseMC),
    fEvNum(0),
@@ -103,7 +103,7 @@ AliRsnMiniMonitorTask::AliRsnMiniMonitorTask(const AliRsnMiniMonitorTask& copy)
 }
 
 //__________________________________________________________________________________________________
-AliRsnMiniMonitorTask& AliRsnMiniMonitorTask::operator=(const AliRsnMiniMonitorTask& copy)
+AliRsnMiniMonitorTask &AliRsnMiniMonitorTask::operator=(const AliRsnMiniMonitorTask &copy)
 {
 //
 // Assignment operator.
@@ -112,7 +112,7 @@ AliRsnMiniMonitorTask& AliRsnMiniMonitorTask::operator=(const AliRsnMiniMonitorT
 //
    AliAnalysisTaskSE::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fUseMC = copy.fUseMC;
    fUseCentrality = copy.fUseCentrality;
    fCentralityType = copy.fCentralityType;
@@ -120,7 +120,7 @@ AliRsnMiniMonitorTask& AliRsnMiniMonitorTask::operator=(const AliRsnMiniMonitorT
    fEventCuts = copy.fEventCuts;
    fTrackCuts = copy.fTrackCuts;
    fBigOutput = copy.fBigOutput;
-   
+
    return (*this);
 }
 
@@ -128,7 +128,7 @@ AliRsnMiniMonitorTask& AliRsnMiniMonitorTask::operator=(const AliRsnMiniMonitorT
 AliRsnMiniMonitorTask::~AliRsnMiniMonitorTask()
 {
 //
-// Destructor. 
+// Destructor.
 // Clean-up the output list, but not the histograms that are put inside
 // (the list is owner and will clean-up these histograms). Protect in PROOF case.
 //
@@ -152,7 +152,7 @@ Int_t AliRsnMiniMonitorTask::AddTrackCuts(AliRsnCutSet *cuts)
 //
 
    TObject *obj = fTrackCuts.FindObject(cuts->GetName());
-   
+
    if (obj) {
       AliInfo(Form("A cut set named '%s' already exists", cuts->GetName()));
       return fTrackCuts.IndexOf(obj);
@@ -172,27 +172,27 @@ void AliRsnMiniMonitorTask::UserCreateOutputObjects()
 
    // reset counter
    fEvNum = 0;
-   
+
    // message
    AliInfo(Form("Selected event characterization: %s (%s)", (fUseCentrality ? "centrality" : "multiplicity"), fCentralityType.Data()));
-   
+
    // create list and set it as owner of its content (MANDATORY)
    if (fBigOutput) OpenFile(1);
    fOutput = new TList();
    fOutput->SetOwner();
-   
+
    // create one histogram per each stored definition (event histograms)
    Int_t i, ndef = fHistograms.GetEntries();
    AliRsnMiniMonitor *def = 0x0;
    for (i = 0; i < ndef; i++) {
-      def = (AliRsnMiniMonitor*)fHistograms[i];
+      def = (AliRsnMiniMonitor *)fHistograms[i];
       if (!def) continue;
       if (!def->Init(GetName(), fOutput)) {
          AliError(Form("Def '%s': failed initialization", def->GetName()));
          continue;
       }
    }
-   
+
    // post data for ALL output slots >0 here, to get at least an empty histogram
    PostData(1, fOutput);
 }
@@ -209,16 +209,16 @@ void AliRsnMiniMonitorTask::UserExec(Option_t *)
 
    // event counter
    fEvNum++;
-   
+
    // check current event
    Char_t check = CheckCurrentEvent();
    if (!check) return;
-   
+
    // setup PID response
-   AliAnalysisManager *man = AliAnalysisManager::GetAnalysisManager(); 
-       AliInputEventHandler *inputHandler = (AliInputEventHandler*)man->GetInputEventHandler(); 
-       fRsnEvent.SetPIDResponse(inputHandler->GetPIDResponse());
-   
+   AliAnalysisManager *man = AliAnalysisManager::GetAnalysisManager();
+   AliInputEventHandler *inputHandler = (AliInputEventHandler *)man->GetInputEventHandler();
+   fRsnEvent.SetPIDResponse(inputHandler->GetPIDResponse());
+
    // loop on monitors and fill them
    Int_t it, icut, nTracks = fRsnEvent.GetAbsoluteSum(), nCuts = fTrackCuts.GetEntriesFast();
    AliRsnDaughter cursor;
@@ -228,10 +228,10 @@ void AliRsnMiniMonitorTask::UserExec(Option_t *)
    for (it = 0; it < nTracks; it++) {
       fRsnEvent.SetDaughter(cursor, it, fUseMC);
       next.Reset();
-      while ( (mon = (AliRsnMiniMonitor*)next()) ) {
+      while ( (mon = (AliRsnMiniMonitor *)next()) ) {
          icut = mon->GetCutID();
          if (icut >= 0 && icut < nCuts) {
-            cut = (AliRsnCutSet*)fTrackCuts[icut];
+            cut = (AliRsnCutSet *)fTrackCuts[icut];
             if (!cut) {
                AliError("Cut not found");
                continue;
@@ -241,7 +241,7 @@ void AliRsnMiniMonitorTask::UserExec(Option_t *)
          mon->Fill(&cursor, &fRsnEvent);
       }
    }
-      
+
    // post data for computed stuff
    PostData(1, fOutput);
 }
@@ -254,10 +254,10 @@ void AliRsnMiniMonitorTask::Terminate(Option_t *)
 // Called once at the end of the query
 //
 
-   fOutput = dynamic_cast<TList*>(GetOutputData(1));
-   if (!fOutput) { 
-      AliError("Could not retrieve TList fOutput"); 
-      return; 
+   fOutput = dynamic_cast<TList *>(GetOutputData(1));
+   if (!fOutput) {
+      AliError("Could not retrieve TList fOutput");
+      return;
    }
 }
 
@@ -283,7 +283,7 @@ Char_t AliRsnMiniMonitorTask::CheckCurrentEvent()
 
    // string to sum messages
    TString msg("");
-   
+
    // check input type
    // exit points are provided in all cases an event is bad
    // if this block is passed, an event can be rejected only
@@ -295,7 +295,7 @@ Char_t AliRsnMiniMonitorTask::CheckCurrentEvent()
       output = 'E';
       // ESD specific check: Physics Selection
       // --> if this is failed, the event is rejected
-      isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB);
+      isSelected = (((AliInputEventHandler *)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB);
       if (!isSelected) {
          AliDebugClass(2, "Event does not pass physics selections");
          fRsnEvent.SetRef(0x0);
@@ -306,7 +306,7 @@ Char_t AliRsnMiniMonitorTask::CheckCurrentEvent()
       fRsnEvent.SetRef(fInputEvent);
       // add MC if requested and available
       if (fUseMC) {
-         if (fMCEvent) 
+         if (fMCEvent)
             fRsnEvent.SetRefMC(fMCEvent);
          else {
             AliWarning("MC event requested but not available");
@@ -333,7 +333,7 @@ Char_t AliRsnMiniMonitorTask::CheckCurrentEvent()
       fRsnEvent.SetRefMC(0x0);
       return 0;
    }
-   
+
    // if event cuts are defined, they are checked here
    // final decision on the event depends on this
    isSelected = kTRUE;
@@ -349,7 +349,7 @@ Char_t AliRsnMiniMonitorTask::CheckCurrentEvent()
       msg += " -- Local cuts = NONE";
       isSelected = kTRUE;
    }
-   
+
    // if the above exit point is not taken, the event is accepted
    AliDebugClass(2, Form("Stats for event %d: %s", fEvNum, msg.Data()));
    if (isSelected) {
@@ -380,13 +380,13 @@ Double_t AliRsnMiniMonitorTask::ComputeCentrality(Bool_t isESD)
          return fInputEvent->GetNumberOfTracks();
       else if (!fCentralityType.CompareTo("QUALITY"))
          if (isESD)
-            return AliESDtrackCuts::GetReferenceMultiplicity((AliESDEvent*)fInputEvent, kTRUE);
+            return AliESDtrackCuts::GetReferenceMultiplicity((AliESDEvent *)fInputEvent, kTRUE);
          else {
             Double_t count = 0.;
             Int_t iTrack, ntracksLoop = fInputEvent->GetNumberOfTracks();
-            for (iTrack = 0; iTrack < ntracksLoop; iTrack++) {    
-               AliVTrack   *track = (AliVTrack*)fInputEvent->GetTrack(iTrack);
-               AliAODTrack *aodt  = dynamic_cast<AliAODTrack*>(track);
+            for (iTrack = 0; iTrack < ntracksLoop; iTrack++) {
+               AliVTrack   *track = (AliVTrack *)fInputEvent->GetTrack(iTrack);
+               AliAODTrack *aodt  = dynamic_cast<AliAODTrack *>(track);
                if (!aodt) continue;
                if (!aodt->TestFilterBit(5)) continue;
                count++;
@@ -395,7 +395,7 @@ Double_t AliRsnMiniMonitorTask::ComputeCentrality(Bool_t isESD)
          }
       else if (!fCentralityType.CompareTo("TRACKLETS")) {
          if (isESD) {
-            const AliMultiplicity *mult = ((AliESDEvent*)fInputEvent)->GetMultiplicity();
+            const AliMultiplicity *mult = ((AliESDEvent *)fInputEvent)->GetMultiplicity();
             Float_t nClusters[6] = {0.0,0.0,0.0,0.0,0.0,0.0};
             for(Int_t ilay = 0; ilay < 6; ilay++) nClusters[ilay] = (Float_t)mult->GetNumberOfITSClusters(ilay);
             return AliESDUtils::GetCorrSPD2(nClusters[1], fInputEvent->GetPrimaryVertex()->GetZ());
index 549386f984ca03d24a9b6dd6b27cf48befabc93f..8d5a1ca9fcad974443ad1cc508939bd04cefcc73 100644 (file)
@@ -31,22 +31,22 @@ public:
    AliRsnMiniMonitorTask();
    AliRsnMiniMonitorTask(const char *name, Bool_t isMC = kFALSE);
    AliRsnMiniMonitorTask(const AliRsnMiniMonitorTask &copy);
-   AliRsnMiniMonitorTaskoperator=(const AliRsnMiniMonitorTask &copy);
+   AliRsnMiniMonitorTask &operator=(const AliRsnMiniMonitorTask &copy);
    virtual ~AliRsnMiniMonitorTask();
 
-   void                UseMC(Bool_t yn = kTRUE)           {fUseMC = yn;}                     
+   void                UseMC(Bool_t yn = kTRUE)           {fUseMC = yn;}
    void                UseCentrality(const char *type)    {fUseCentrality = kTRUE; fCentralityType = type; fCentralityType.ToUpper();}
    void                UseMultiplicity(const char *type)  {fUseCentrality = kFALSE; fCentralityType = type; fCentralityType.ToUpper();}
    void                SetEventCuts(AliRsnCutSet *cuts)   {fEventCuts    = cuts;}
    Int_t               AddTrackCuts(AliRsnCutSet *cuts);
    TClonesArray       *Outputs()                          {return &fHistograms;}
-   
+
    virtual void        UserCreateOutputObjects();
-   virtual void        UserExec(Option_t*);
-   virtual void        Terminate(Option_t*);
-   
+   virtual void        UserExec(Option_t *);
+   virtual void        Terminate(Option_t *);
+
    AliRsnMiniMonitor  *CreateMonitor(const char *name, AliRsnMiniMonitor::EType type, Int_t cutID);
-  
+
 private:
 
    Char_t   CheckCurrentEvent();
@@ -56,10 +56,10 @@ private:
    Int_t                fEvNum;           //! absolute event counter
    Bool_t               fUseCentrality;   //  if true, use centrality for event, otherwise use multiplicity
    TString              fCentralityType;  //  definition used to choose what centrality or multiplicity to use
-                       
+
    TList               *fOutput;          //  output list
    TClonesArray         fHistograms;      //  list of histogram definitions
-                       
+
    AliRsnCutSet        *fEventCuts;       //  cuts on events
    TObjArray            fTrackCuts;       //  list of single track cuts
    AliRsnEvent          fRsnEvent;        //! interface object to the event
@@ -68,7 +68,7 @@ private:
    ClassDef(AliRsnMiniMonitorTask, 1);   // AliRsnMiniMonitorTask
 };
 
-inline AliRsnMiniMonitorAliRsnMiniMonitorTask::CreateMonitor
+inline AliRsnMiniMonitor *AliRsnMiniMonitorTask::CreateMonitor
 (const char *name, AliRsnMiniMonitor::EType type, Int_t cutID)
 {
 //
@@ -76,9 +76,9 @@ inline AliRsnMiniMonitor* AliRsnMiniMonitorTask::CreateMonitor
 // which is then returned to the user for its configuration
 //
 
-   Int_t n = fHistograms.GetEntries(); 
+   Int_t n = fHistograms.GetEntries();
    AliRsnMiniMonitor *newDef = new (fHistograms[n]) AliRsnMiniMonitor(name, type, cutID);
-   
+
    return newDef;
 }
 
index b7d4f78f941c158c9028dfc2abf9279024a72c2e..5df3ea5134292bf61753b99db7eee288f693384a 100644 (file)
@@ -5,7 +5,7 @@
 // -- properties of resonance (mass, PDG code if needed)
 // -- properties of daughters (assigned mass, charges)
 // -- definition of output histogram
-// 
+//
 
 #include "Riostream.h"
 
@@ -103,8 +103,8 @@ AliRsnMiniOutput::AliRsnMiniOutput(const char *name, const char *outType, const
 // Output:
 //    -- "HIST"    --> common histogram (up to 3 dimensions)
 //    -- "SPARSE"  --> sparse histogram
-//                 
-// Computation:    
+//
+// Computation:
 //    -- "EVENT"   --> event-only computations
 //    -- "PAIR"    --> track pair computations (default)
 //    -- "MIX"     --> event mixing (like track pair, but different events)
@@ -115,7 +115,7 @@ AliRsnMiniOutput::AliRsnMiniOutput(const char *name, const char *outType, const
 //
 
    TString input;
-   
+
    // understand output type
    input = outType;
    input.ToUpper();
@@ -125,7 +125,7 @@ AliRsnMiniOutput::AliRsnMiniOutput(const char *name, const char *outType, const
       fOutputType = kHistogramSparse;
    else
       AliWarning(Form("String '%s' does not define a meaningful output type", outType));
-      
+
    // understand computation type
    input = compType;
    input.ToUpper();
@@ -145,7 +145,7 @@ AliRsnMiniOutput::AliRsnMiniOutput(const char *name, const char *outType, const
       fComputation = kMother;
    else
       AliWarning(Form("String '%s' does not define a meaningful computation type", compType));
-   
+
    fCutID[0] = fCutID[1] = -1;
    fDaughter[0] = fDaughter[1] = AliRsnDaughter::kUnknown;
    fCharge[0] = fCharge[1] = 0;
@@ -180,33 +180,33 @@ AliRsnMiniOutput::AliRsnMiniOutput(const AliRsnMiniOutput &copy) :
 }
 
 //__________________________________________________________________________________________________
-AliRsnMiniOutputAliRsnMiniOutput::operator=(const AliRsnMiniOutput &copy)
+AliRsnMiniOutput &AliRsnMiniOutput::operator=(const AliRsnMiniOutput &copy)
 {
 //
 // Assignment operator
 //
-  if (this == &copy)
-    return *this;
-  fOutputType = copy.fOutputType;
-  fComputation = copy.fComputation;
-  fMotherPDG = copy.fMotherPDG;
-  fMotherMass = copy.fMotherMass;
-  fPairCuts = copy.fPairCuts;
-  fOutputID = copy.fOutputID;
-  fAxes = copy.fAxes;
-  fComputed = copy.fComputed;
-  fList = copy.fList;
-  
-  Int_t i;
-  for (i = 0; i < 2; i++) {
-    fCutID[i] = copy.fCutID[i];
-    fDaughter[i] = copy.fDaughter[i];
-    fCharge[i] = copy.fCharge[i];
-  }
-  
-  fSel1.Set(0);
-  fSel2.Set(0);
-  
+   if (this == &copy)
+      return *this;
+   fOutputType = copy.fOutputType;
+   fComputation = copy.fComputation;
+   fMotherPDG = copy.fMotherPDG;
+   fMotherMass = copy.fMotherMass;
+   fPairCuts = copy.fPairCuts;
+   fOutputID = copy.fOutputID;
+   fAxes = copy.fAxes;
+   fComputed = copy.fComputed;
+   fList = copy.fList;
+
+   Int_t i;
+   for (i = 0; i < 2; i++) {
+      fCutID[i] = copy.fCutID[i];
+      fDaughter[i] = copy.fDaughter[i];
+      fCharge[i] = copy.fCharge[i];
+   }
+
+   fSel1.Set(0);
+   fSel2.Set(0);
+
    return (*this);
 }
 
@@ -218,7 +218,7 @@ void AliRsnMiniOutput::AddAxis(Int_t i, Int_t nbins, Double_t min, Double_t max)
 // Create a new axis reference
 //
 
-   Int_t size = fAxes.GetEntries();   
+   Int_t size = fAxes.GetEntries();
    new (fAxes[size]) AliRsnMiniAxis(i, nbins, min, max);
 }
 
@@ -229,7 +229,7 @@ void AliRsnMiniOutput::AddAxis(Int_t i, Double_t min, Double_t max, Double_t ste
 // Create a new axis reference
 //
 
-   Int_t size = fAxes.GetEntries();   
+   Int_t size = fAxes.GetEntries();
    new (fAxes[size]) AliRsnMiniAxis(i, min, max, step);
 }
 
@@ -240,7 +240,7 @@ void AliRsnMiniOutput::AddAxis(Int_t i, Int_t nbins, Double_t *values)
 // Create a new axis reference
 //
 
-   Int_t size = fAxes.GetEntries();   
+   Int_t size = fAxes.GetEntries();
    new (fAxes[size]) AliRsnMiniAxis(i, nbins, values);
 }
 
@@ -255,7 +255,7 @@ Bool_t AliRsnMiniOutput::Init(const char *prefix, TList *list)
       AliError("Required an output list");
       return kFALSE;
    }
-   
+
    fList = list;
    Int_t size = fAxes.GetEntries();
    if (size < 1) {
@@ -295,10 +295,10 @@ void AliRsnMiniOutput::CreateHistogram(const char *name)
 
    // we expect to have maximum 3 axes in this case
    AliRsnMiniAxis *xAxis = 0x0, *yAxis = 0x0, *zAxis = 0x0;
-   if (size >= 1) xAxis = (AliRsnMiniAxis*)fAxes[0];
-   if (size >= 2) yAxis = (AliRsnMiniAxis*)fAxes[1];
-   if (size >= 3) zAxis = (AliRsnMiniAxis*)fAxes[2];
-   
+   if (size >= 1) xAxis = (AliRsnMiniAxis *)fAxes[0];
+   if (size >= 2) yAxis = (AliRsnMiniAxis *)fAxes[1];
+   if (size >= 3) zAxis = (AliRsnMiniAxis *)fAxes[2];
+
    // create histogram depending on the number of axes
    TH1 *h1 = 0x0;
    if (xAxis && yAxis && zAxis) {
@@ -311,7 +311,7 @@ void AliRsnMiniOutput::CreateHistogram(const char *name)
       AliError("No axis was initialized");
       return;
    }
-   
+
    // switch the correct computation of errors
    if (h1 && fList) {
       h1->Sumw2();
@@ -330,13 +330,13 @@ void AliRsnMiniOutput::CreateHistogramSparse(const char *name)
 
    Int_t size = fAxes.GetEntries();
    AliInfo(Form("Sparse histogram name = '%s', with %d axes", name, size));
-   
+
    // retrieve binnings and sizes of all axes
    // since the check for null values is done in Init(),
    // we assume that here they must all be well defined
    Int_t i, *nbins = new Int_t[size];
    for (i = 0; i < size; i++) {
-      AliRsnMiniAxis *axis = (AliRsnMiniAxis*)fAxes[i];
+      AliRsnMiniAxis *axis = (AliRsnMiniAxis *)fAxes[i];
       nbins[i] = axis->NBins();
    }
 
@@ -345,13 +345,13 @@ void AliRsnMiniOutput::CreateHistogramSparse(const char *name)
 
    // update the various axes using the definitions given in the array of axes here
    for (i = 0; i < size; i++) {
-      AliRsnMiniAxis *axis = (AliRsnMiniAxis*)fAxes[i];
+      AliRsnMiniAxis *axis = (AliRsnMiniAxis *)fAxes[i];
       h1->GetAxis(i)->Set(nbins[i], axis->BinArray());
    }
 
    // clear heap
    delete [] nbins;
-   
+
    // add to list
    if (h1 && fList) {
       h1->Sumw2();
@@ -391,10 +391,10 @@ Bool_t AliRsnMiniOutput::FillMother(const AliRsnMiniPair *pair, AliRsnMiniEvent
       AliError("This method can be called only for mother-based computations");
       return kFALSE;
    }
-   
+
    // copy passed pair info
    fPair = (*pair);
-   
+
    // check pair against cuts
    if (fPairCuts) if (!fPairCuts->IsSelected(&fPair)) return kFALSE;
 
@@ -425,17 +425,17 @@ Int_t AliRsnMiniOutput::FillPair(AliRsnMiniEvent *event1, AliRsnMiniEvent *event
       AliError(Form("[%s] This method can be called only for pair-based computations", GetName()));
       return kFALSE;
    }
-   
+
    // loop variables
    Int_t i1, i2, start, nadded = 0;
    AliRsnMiniParticle *p1, *p2;
-   
+
    // it is necessary to know if criteria for the two daughters are the same
    // and if the two events are the same or not (mixing)
    //Bool_t sameCriteria = ((fCharge[0] == fCharge[1]) && (fCutID[0] == fCutID[1]));
    Bool_t sameCriteria = ((fCharge[0] == fCharge[1]) && (fDaughter[0] == fDaughter[1]));
    Bool_t sameEvent = (event1->ID() == event2->ID());
-   
+
    TString selList1  = "";
    TString selList2  = "";
    Int_t   n1 = event1->CountParticles(fSel1, fCharge[0], fCutID[0]);
@@ -448,7 +448,7 @@ Int_t AliRsnMiniOutput::FillPair(AliRsnMiniEvent *event1, AliRsnMiniEvent *event
       AliDebugClass(1, "No pairs to mix");
       return 0;
    }
-   
+
    // external loop
    for (i1 = 0; i1 < n1; i1++) {
       p1 = event1->GetParticle(fSel1[i1]);
@@ -498,11 +498,11 @@ Int_t AliRsnMiniOutput::FillPair(AliRsnMiniEvent *event1, AliRsnMiniEvent *event
          }
          // get computed values & fill histogram
          nadded++;
-         if (refFirst) ComputeValues(event1, valueList); else ComputeValues(event2, valueList); 
+         if (refFirst) ComputeValues(event1, valueList); else ComputeValues(event2, valueList);
          FillHistogram();
       } // end internal loop
    } // end external loop
-   
+
    AliDebugClass(1, Form("Pairs added in total = %4d", nadded));
    return nadded;
 }
@@ -520,10 +520,10 @@ void AliRsnMiniOutput::ComputeValues(AliRsnMiniEvent *event, TClonesArray *value
    if (fComputed.GetSize() != size) fComputed.Set(size);
 
    Int_t i, ival, nval = valueList->GetEntries();
-   
+
    for (i = 0; i < size; i++) {
       fComputed[i] = 1E20;
-      AliRsnMiniAxis *axis = (AliRsnMiniAxis*)fAxes[i];
+      AliRsnMiniAxis *axis = (AliRsnMiniAxis *)fAxes[i];
       if (!axis) {
          AliError("Null axis");
          continue;
@@ -533,11 +533,11 @@ void AliRsnMiniOutput::ComputeValues(AliRsnMiniEvent *event, TClonesArray *value
          AliError(Form("Required value #%d, while maximum is %d", ival, nval));
          continue;
       }
-      AliRsnMiniValue *val = (AliRsnMiniValue*)valueList->At(ival);
+      AliRsnMiniValue *val = (AliRsnMiniValue *)valueList->At(ival);
       if (!val) {
          AliError(Form("Value in position #%d is NULL", ival));
          continue;
-      } 
+      }
       // if none of the above exit points is taken, compute value
       fComputed[i] = val->Eval(&fPair, event);
    }
@@ -560,13 +560,13 @@ void AliRsnMiniOutput::FillHistogram()
    TObject *obj = fList->At(fOutputID);
 
    if (obj->InheritsFrom(TH1F::Class())) {
-      ((TH1F*)obj)->Fill(fComputed[0]);
+      ((TH1F *)obj)->Fill(fComputed[0]);
    } else if (obj->InheritsFrom(TH2F::Class())) {
-      ((TH2F*)obj)->Fill(fComputed[0], fComputed[1]);
+      ((TH2F *)obj)->Fill(fComputed[0], fComputed[1]);
    } else if (obj->InheritsFrom(TH3F::Class())) {
-      ((TH3F*)obj)->Fill(fComputed[0], fComputed[1], fComputed[2]);
+      ((TH3F *)obj)->Fill(fComputed[0], fComputed[1], fComputed[2]);
    } else if (obj->InheritsFrom(THnSparseF::Class())) {
-      ((THnSparseF*)obj)->Fill(fComputed.GetArray());
+      ((THnSparseF *)obj)->Fill(fComputed.GetArray());
    } else {
       AliError("No output initialized");
    }
index 600ee48194444a5922fccdf85caeef55e9431a36..93e76052668c71da8119deb553b8b6723e732a3d 100644 (file)
@@ -8,7 +8,7 @@
 // -- properties of resonance (mass, PDG code if needed)
 // -- properties of daughters (assigned mass, charges)
 // -- definition of output histogram
-// 
+//
 
 #include "AliRsnDaughter.h"
 #include "AliRsnMiniParticle.h"
@@ -33,7 +33,7 @@ public:
       kHistogramSparse,
       kTypes
    };
-   
+
    enum EComputation {
       kEventOnly,
       kTrackPair,
@@ -44,13 +44,13 @@ public:
       kMother,
       kComputations
    };
-   
+
    AliRsnMiniOutput();
    AliRsnMiniOutput(const char *name, EOutputType type, EComputation src = kTrackPair);
    AliRsnMiniOutput(const char *name, const char *outType, const char *compType);
    AliRsnMiniOutput(const AliRsnMiniOutput &copy);
-   AliRsnMiniOutputoperator=(const AliRsnMiniOutput &copy);
-   
+   AliRsnMiniOutput &operator=(const AliRsnMiniOutput &copy);
+
    Bool_t          IsEventOnly()        const {return (fComputation == kEventOnly);}
    Bool_t          IsTrackPair()        const {return (fComputation == kTrackPair);}
    Bool_t          IsTrackPairMix()     const {return (fComputation == kTrackPairMix);}
@@ -62,7 +62,7 @@ public:
    Bool_t          IsSameDaughter()     const {return (fDaughter[0] == fDaughter[1]);}
    //Bool_t          IsSymmetric()        const {return (IsLikeSign() && IsSameCut());}
    Bool_t          IsSymmetric()        const {return (IsLikeSign() && IsSameDaughter());}
-                                        
+
    EOutputType     GetOutputType()      const {return fOutputType;}
    EComputation    GetComputation()     const {return fComputation;}
    Int_t           GetCutID(Int_t i)    const {if (i <= 0) return fCutID [0]; else return fCutID [1];}
@@ -72,7 +72,7 @@ public:
    Int_t           GetCharge(Int_t i)   const {if (i <= 0) return fCharge[0]; else return fCharge[1];}
    Int_t           GetMotherPDG()       const {return fMotherPDG;}
    Double_t        GetMotherMass()      const {return fMotherMass;}
-                   
+
    void            SetOutputType(EOutputType type)    {fOutputType = type;}
    void            SetComputation(EComputation src)   {fComputation = src;}
    void            SetCutID(Int_t i, Int_t   value)   {if (i <= 0) fCutID [0] = value; else fCutID [1] = value;}
@@ -81,19 +81,19 @@ public:
    void            SetMotherPDG(Int_t pdg)            {fMotherPDG = pdg;}
    void            SetMotherMass(Double_t mass)       {fMotherMass = mass;}
    void            SetPairCuts(AliRsnCutSet *set)     {fPairCuts = set;}
-                   
+
    void            AddAxis(Int_t id, Int_t nbins, Double_t min, Double_t max);
    void            AddAxis(Int_t id, Double_t min, Double_t max, Double_t step);
    void            AddAxis(Int_t id, Int_t nbins, Double_t *values);
-   AliRsnMiniAxis* GetAxis(Int_t i)  {if (i >= 0 && i < fAxes.GetEntries()) return (AliRsnMiniAxis*)fAxes[i]; return 0x0;}
-   Double_t*       GetAllComputed()  {return fComputed.GetArray();}
-   
-   AliRsnMiniPairPair() {return fPair;}
+   AliRsnMiniAxis *GetAxis(Int_t i)  {if (i >= 0 && i < fAxes.GetEntries()) return (AliRsnMiniAxis *)fAxes[i]; return 0x0;}
+   Double_t       *GetAllComputed()  {return fComputed.GetArray();}
+
+   AliRsnMiniPair &Pair() {return fPair;}
    Bool_t          Init(const char *prefix, TList *list);
    Bool_t          FillMother(const AliRsnMiniPair *pair, AliRsnMiniEvent *event, TClonesArray *valueList);
    Bool_t          FillEvent(AliRsnMiniEvent *event, TClonesArray *valueList);
    Int_t           FillPair(AliRsnMiniEvent *event1, AliRsnMiniEvent *event2, TClonesArray *valueList, Bool_t refFirst = kTRUE);
-                  
+
 private:
 
    void   CreateHistogram(const char *name);
@@ -109,7 +109,7 @@ private:
    Int_t            fMotherPDG;        //  PDG code of resonance
    Double_t         fMotherMass;       //  nominal resonance mass
    AliRsnCutSet    *fPairCuts;         //  cuts on the pair
-                           
+
    Int_t            fOutputID;         //  index of output object in container list
    TClonesArray     fAxes;             //  definitions for the axes of each value
    TArrayD          fComputed;         //! temporary container for all computed values
@@ -117,7 +117,7 @@ private:
    TList           *fList;             //! pointer to the TList containing the output
    TArrayI          fSel1;             //! list of selected particles for definition 1
    TArrayI          fSel2;             //! list of selected particles for definition 2
-   
+
    ClassDef(AliRsnMiniOutput,1)  // AliRsnMiniOutput class
 };
 
index af3373447f8b034753ecfc959d4022e0f5d4673c..b4b1271f172dd64a3d086bc107ddb928b64dacf0 100644 (file)
@@ -16,13 +16,13 @@ void AliRsnMiniPair::Fill
    p2->Set4Vector(fP2[0], m2, kFALSE);
    p1->Set4Vector(fP1[1], m1, kTRUE );
    p2->Set4Vector(fP2[1], m2, kTRUE );
-   
+
    fMother = -1;
    if (p1->Mother() == p2->Mother()) {
       fMother = p1->Mother();
       fMotherPDG = p1->MotherPDG();
    }
-   
+
    Int_t i;
    for (i = 0; i < 2; i++) {
       fSum[i] = fP1[i] + fP2[i];
@@ -36,7 +36,7 @@ Double_t AliRsnMiniPair::CosThetaStar(Bool_t useMC)
 //
 // Return cosine of angle of one daughter to the resonance momentum in its rest frame
 //
-   
+
    TLorentzVector &mother    = fSum[ID(useMC)];
    TLorentzVector &daughter0 = fP1[ID(useMC)];
    TLorentzVector &daughter1 = fP2[ID(useMC)];
index 7b3c9a281643bfe3134d3797abb060793c7014f8..7b5317f5df635e4cb963cb1b383d433eec079f55 100644 (file)
@@ -3,9 +3,9 @@
 
 //
 // This object is used as lightweight temporary container
-// of all information needed from any input object and 
+// of all information needed from any input object and
 // useful for resonance analysis.
-// 
+//
 
 #include <TObject.h>
 #include <TLorentzVector.h>
@@ -17,25 +17,25 @@ public:
 
    AliRsnMiniPair() : fMother(-1), fMotherPDG(0) { }
 
-   Int_t&          Mother()    {return fMother;}
-   Int_t&          MotherPDG() {return fMotherPDG;}
+   Int_t          &Mother()    {return fMother;}
+   Int_t          &MotherPDG() {return fMotherPDG;}
    void            Fill(AliRsnMiniParticle *p1, AliRsnMiniParticle *p2, Double_t m1, Double_t m2, Double_t refMass);
    void            FillRef(Double_t mass);
    void            InvertP(Bool_t first);
-      
+
    Int_t           ID(Bool_t mc) const {if (mc) return 1; else return 0;}
-   
-   TLorentzVectorP1 (Bool_t mc) {return fP1 [ID(mc)];}
-   TLorentzVectorP2 (Bool_t mc) {return fP2 [ID(mc)];}
-   TLorentzVectorSum(Bool_t mc) {return fSum[ID(mc)];}
-   TLorentzVectorRef(Bool_t mc) {return fRef[ID(mc)];}
-   
+
+   TLorentzVector &P1 (Bool_t mc) {return fP1 [ID(mc)];}
+   TLorentzVector &P2 (Bool_t mc) {return fP2 [ID(mc)];}
+   TLorentzVector &Sum(Bool_t mc) {return fSum[ID(mc)];}
+   TLorentzVector &Ref(Bool_t mc) {return fRef[ID(mc)];}
+
    Double_t        Pt(Bool_t mc)             const  {return fSum[ID(mc)].Pt();}
    Double_t        Pz(Bool_t mc)             const  {return fSum[ID(mc)].Pz();}
    Double_t        Eta(Bool_t mc)            const  {return fSum[ID(mc)].Eta();}
    Double_t        InvMass(Bool_t mc)        const  {return fSum[ID(mc)].M();}
-   Double_t        InvMassRes()              const;            
-   Double_t        InvMassDiff()             const;            
+   Double_t        InvMassRes()              const;
+   Double_t        InvMassDiff()             const;
    Double_t        Mt(Bool_t mc)             const  {return fRef[ID(mc)].Mt();}
    Double_t        Y(Bool_t mc)              const  {return fRef[ID(mc)].Rapidity();}
    Double_t        PtRatio(Bool_t mc)        const;
@@ -48,10 +48,10 @@ private:
    TLorentzVector fP2 [2];    // 2nd daughter momentum
    TLorentzVector fSum[2];    // sum of momenta
    TLorentzVector fRef[2];    // same as 'fSum' but with nominal resonance mass
-                           
+
    Int_t          fMother;    // label of mothers (when common)
    Int_t          fMotherPDG; // PDG code of mother (when common)
-   
+
    ClassDef(AliRsnMiniPair,1)
 };
 
@@ -74,7 +74,7 @@ inline Double_t AliRsnMiniPair::InvMassRes() const
 //
 
    if (fSum[1].M() <= 0.0) return 1E20;
-   
+
    return (fSum[0].M() - fSum[1].M()) / fSum[1].M();
 }
 
@@ -85,7 +85,7 @@ inline Double_t AliRsnMiniPair::InvMassDiff() const
 //
 
    if (fSum[1].M() <= 0.0) return 1E20;
-   
+
    return (fSum[0].M() - fSum[1].M());
 }
 
@@ -97,9 +97,9 @@ inline Double_t AliRsnMiniPair::PtRatio(Bool_t mc) const
 
    Double_t num = TMath::Abs(fP1[ID(mc)].Perp() - fP2[ID(mc)].Perp());
    Double_t den = TMath::Abs(fP1[ID(mc)].Perp() + fP2[ID(mc)].Perp());
-   
+
    if (den <= 0.0) return 1E20;
-   
+
    return num / den;
 }
 
@@ -111,7 +111,7 @@ inline Double_t AliRsnMiniPair::DipAngle(Bool_t mc) const
 
    const TLorentzVector &p1 = fP1[ID(mc)];
    const TLorentzVector &p2 = fP2[ID(mc)];
-   
+
    return ((p1.Perp() * p2.Perp() + p1.Z() * p2.Z()) / p1.Mag() / p2.Mag());
 }
 
index 5bdabb68400867b93b7f4be6fa454ff1d7eec089..4770f4a5e49d72bc1a309c0fb71b43f04e8fc4ba 100644 (file)
@@ -1,6 +1,6 @@
 //
 // This object is used as lightweight temporary container
-// of all information needed from any input object and 
+// of all information needed from any input object and
 // useful for resonance analysis.
 // Lists of such objects are stored in a buffer, in order
 // to allow an event mixing.
@@ -32,14 +32,14 @@ void AliRsnMiniParticle::CopyDaughter(AliRsnDaughter *daughter)
       fCharge = '-';
    else
       fCharge = '0';
-   
+
    // rec info
    if (daughter->GetRef()) {
       fPrec[0] = daughter->GetRef()->Px();
       fPrec[1] = daughter->GetRef()->Py();
       fPrec[2] = daughter->GetRef()->Pz();
    }
-   
+
    // MC info
    if (daughter->GetRefMC()) {
       fPsim[0] = daughter->GetRefMC()->Px();
index 2e2f58efe13073fea10d5a72a51465730c4dd991..d793ea233b60b89d56307f91b5cda6246ecc83c5 100644 (file)
@@ -3,9 +3,9 @@
 
 //
 // This object is used as lightweight temporary container
-// of all information needed from any input object and 
+// of all information needed from any input object and
 // useful for resonance analysis.
-// 
+//
 
 #include <TMath.h>
 #include <TObject.h>
@@ -18,26 +18,26 @@ public:
 
    AliRsnMiniParticle() : fIndex(-1), fCharge(0), fPDG(0), fMother(0), fMotherPDG(0), fCutBits(0x0) {Int_t i = 3; while (i--) fPsim[i] = fPrec[i] = 0.0;}
 
-   Int_t&         Index()                    {return fIndex;}
-   Char_t&        Charge()                   {return fCharge;}
-   Float_t&       PsimX()                    {return fPsim[0];}
-   Float_t&       PsimY()                    {return fPsim[1];}
-   Float_t&       PsimZ()                    {return fPsim[2];}
-   Float_t&       PrecX()                    {return fPrec[0];}
-   Float_t&       PrecY()                    {return fPrec[1];}
-   Float_t&       PrecZ()                    {return fPrec[2];}
-   Float_t&       Px(Bool_t mc)              {return (mc ? fPsim[0] : fPrec[0]);}
-   Float_t&       Py(Bool_t mc)              {return (mc ? fPsim[1] : fPrec[1]);}
-   Float_t&       Pz(Bool_t mc)              {return (mc ? fPsim[2] : fPrec[2]);}
-   Short_t&       PDG()                      {return fPDG;}
+   Int_t         &Index()                    {return fIndex;}
+   Char_t        &Charge()                   {return fCharge;}
+   Float_t       &PsimX()                    {return fPsim[0];}
+   Float_t       &PsimY()                    {return fPsim[1];}
+   Float_t       &PsimZ()                    {return fPsim[2];}
+   Float_t       &PrecX()                    {return fPrec[0];}
+   Float_t       &PrecY()                    {return fPrec[1];}
+   Float_t       &PrecZ()                    {return fPrec[2];}
+   Float_t       &Px(Bool_t mc)              {return (mc ? fPsim[0] : fPrec[0]);}
+   Float_t       &Py(Bool_t mc)              {return (mc ? fPsim[1] : fPrec[1]);}
+   Float_t       &Pz(Bool_t mc)              {return (mc ? fPsim[2] : fPrec[2]);}
+   Short_t       &PDG()                      {return fPDG;}
    Short_t        PDGAbs()                   {return TMath::Abs(fPDG);}
-   Short_t&       Mother()                   {return fMother;}
-   Short_t&       MotherPDG()                {return fMotherPDG;}
-   UShort_t&      CutBits()                  {return fCutBits;}
+   Short_t       &Mother()                   {return fMother;}
+   Short_t       &MotherPDG()                {return fMotherPDG;}
+   UShort_t      &CutBits()                  {return fCutBits;}
    Bool_t         HasCutBit(Int_t i)         {UShort_t bit = 1 << i; return ((fCutBits & bit) != 0);}
    void           SetCutBit(Int_t i)         {UShort_t bit = 1 << i; fCutBits |=   bit;}
    void           ClearCutBit(Int_t i)       {UShort_t bit = 1 << i; fCutBits &= (~bit);}
-   
+
    void           Set4Vector(TLorentzVector &v, Float_t mass, Bool_t mc) {v.SetXYZM(Px(mc), Py(mc), Pz(mc), mass);}
    void           CopyDaughter(AliRsnDaughter *daughter);
 
@@ -51,7 +51,7 @@ private:
    Short_t   fMother;       // index of mother in its container
    Short_t   fMotherPDG;    // PDG code of mother
    UShort_t  fCutBits;      // list of bits used to know what cuts were passed by this track
-   
+
    ClassDef(AliRsnMiniParticle,2)
 };
 
index f5de6667888ecf8cb5d89dee144217563329c18b..823323513553526200d1f5ea8b1b392f50f818b0 100644 (file)
@@ -60,7 +60,7 @@ AliRsnMiniValue::AliRsnMiniValue(EType type, Bool_t useMC) :
 }
 
 //_____________________________________________________________________________
-AliRsnMiniValue::AliRsnMiniValue(const AliRsnMiniValuecopy) :
+AliRsnMiniValue::AliRsnMiniValue(const AliRsnMiniValue &copy) :
    TNamed(copy),
    fType(copy.fType),
    fUseMCInfo(copy.fUseMCInfo)
@@ -71,7 +71,7 @@ AliRsnMiniValue::AliRsnMiniValue(const AliRsnMiniValue& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnMiniValue& AliRsnMiniValue::operator=(const AliRsnMiniValue& copy)
+AliRsnMiniValue &AliRsnMiniValue::operator=(const AliRsnMiniValue &copy)
 {
 //
 // Assignment operator.
@@ -79,7 +79,7 @@ AliRsnMiniValue& AliRsnMiniValue::operator=(const AliRsnMiniValue& copy)
 //
    TNamed::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fType = copy.fType;
    fUseMCInfo = copy.fUseMCInfo;
 
@@ -87,7 +87,7 @@ AliRsnMiniValue& AliRsnMiniValue::operator=(const AliRsnMiniValue& copy)
 }
 
 //_____________________________________________________________________________
-const charAliRsnMiniValue::TypeName(EType type)
+const char *AliRsnMiniValue::TypeName(EType type)
 {
 //
 // This method returns a string to give a name to each possible
@@ -128,14 +128,14 @@ Float_t AliRsnMiniValue::Eval(AliRsnMiniPair *pair, AliRsnMiniEvent *event)
       AliError("Null pair passed!");
       return 1E20;
    }
-   
+
    // compute value depending on types in the enumeration
    // if the type does not match any available choice, or if
    // the computation is not doable due to any problem
    // (not initialized support object, wrong values, risk of floating point errors)
    // the method returng kFALSE and sets the computed value to a meaningless number
    switch (fType) {
-      // ---- event values -------------------------------------------------------------------------
+         // ---- event values -------------------------------------------------------------------------
       case kVz:
          return event->Vz();
       case kMult:
@@ -144,8 +144,8 @@ Float_t AliRsnMiniValue::Eval(AliRsnMiniPair *pair, AliRsnMiniEvent *event)
          return event->Angle();
       case kLeadingPt:
          return 0.0;
-      // ---- pair values --------------------------------------------------------------------------
-      case kPt: 
+         // ---- pair values --------------------------------------------------------------------------
+      case kPt:
          return pair->Pt(fUseMCInfo);
       case kInvMass:
          return pair->InvMass(fUseMCInfo);
index 684247a8370a3fbb39b1639ff7918796d8ebfce1..e938d0f22db619dada6348675cd0483ba999ca09 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Values which depend on 4-momentum of the pair.
@@ -38,36 +38,36 @@ public:
    };
 
    AliRsnMiniValue(EType type = kTypes, Bool_t useMC = kFALSE);
-   AliRsnMiniValue(const AliRsnMiniValuecopy);
-   AliRsnMiniValue& operator=(const AliRsnMiniValue& copy);
+   AliRsnMiniValue(const AliRsnMiniValue &copy);
+   AliRsnMiniValue &operator=(const AliRsnMiniValue &copy);
    virtual ~AliRsnMiniValue() { }
 
    void               SetType(EType type)   {fType = type;}
    EType              GetType()      const  {return fType;}
-   const char*        GetTypeName()  const  {return TypeName(fType);}
+   const char        *GetTypeName()  const  {return TypeName(fType);}
    Bool_t             IsEventValue() const  {return (fType < kEventCuts);}
-   
+
    Float_t            Eval(AliRsnMiniPair *pair, AliRsnMiniEvent *event = 0x0);
-   
-   static const charTypeName(EType type);
-   static const charValueName(EType type, Bool_t useMC);
+
+   static const char *TypeName(EType type);
+   static const char *ValueName(EType type, Bool_t useMC);
 
 protected:
 
    EType            fType;            //  type from enumeration
    Bool_t           fUseMCInfo;       //  switch to use rec/sim momentum
-                                       
+
    ClassDef(AliRsnMiniValue, 1)       //  AliRsnMiniValue class
 };
 
-inline const charAliRsnMiniValue::ValueName(EType type, Bool_t useMC)
+inline const char *AliRsnMiniValue::ValueName(EType type, Bool_t useMC)
 {
 //
 // Define a criterion to name these object.
 // They are not managed by the user, since each object is a singleton
 //
 
-   if (useMC) 
+   if (useMC)
       return Form("MC_%s", TypeName(type));
    else
       return TypeName(type);
index 2f4374816a33000b0d7b665104d4443760c16544..7be7ab05acaa1378c8413d8abefd1945d962dce9 100644 (file)
@@ -56,24 +56,24 @@ AliRsnMother::AliRsnMother(const AliRsnMother &obj) :
 }
 
 //__________________________________________________________________________________________________
-AliRsnMotherAliRsnMother::operator=(const AliRsnMother &obj)
+AliRsnMother &AliRsnMother::operator=(const AliRsnMother &obj)
 {
 //
 // Assignment operator.
 // Does not duplicate pointers.
 //
-  if (this == &obj)
-    return *this;
-  
-  fSum = obj.fSum;
-  fRef = obj.fRef;
-  fSumMC = obj.fSumMC;
-  fRefMC = obj.fRefMC;
-  fRefEvent = obj.fRefEvent;
-  fDaughter[0] = obj.fDaughter[0];
-  fDaughter[1] = obj.fDaughter[1];
-  
-  return (*this);
+   if (this == &obj)
+      return *this;
+
+   fSum = obj.fSum;
+   fRef = obj.fRef;
+   fSumMC = obj.fSumMC;
+   fRefMC = obj.fRefMC;
+   fRefEvent = obj.fRefEvent;
+   fDaughter[0] = obj.fDaughter[0];
+   fDaughter[1] = obj.fDaughter[1];
+
+   return (*this);
 }
 
 //__________________________________________________________________________________________________
@@ -107,21 +107,21 @@ Int_t AliRsnMother::CommonMother() const
 // If the mother label is the same, the function returns the PDG code of mother,
 // otherwise it returns 0.
 // The two arguments passed by reference contain the GEANT labels of the mother
-// of the two particles to which the two daughters point. This is for being able 
+// of the two particles to which the two daughters point. This is for being able
 // to check if they are really coming from a resonance (indexes >= 0) or not.
 //
 
    Int_t m1  = fDaughter[0]->GetMother();
    Int_t m2  = fDaughter[1]->GetMother();
    Int_t out = 0;
-   
+
    // a true mother makes sense only if both mothers
    // are not-negative and equal
    if (m1 >= 0 && m2 >= 0 && m1 == m2) {
       out = TMath::Abs(fDaughter[0]->GetMotherPDG());
       AliDebugClass(1, Form("Mothers are: %d %d --> EQUAL (PDG = %d)", m1, m2, out));
-   } 
-   
+   }
+
    return out;
 }
 
@@ -140,25 +140,25 @@ Double_t AliRsnMother::AngleToLeading(Bool_t &success)
       success = kFALSE;
       return -99.0;
    }
-   
+
    Int_t id1 = fDaughter[0]->GetID();
    Int_t id2 = fDaughter[1]->GetID();
    Int_t idL = fRefEvent->GetLeadingIndex();
-   
+
    if (id1 == idL || id2 == idL) {
       success = kFALSE;
       return -99.0;
    }
-   
+
    AliRsnDaughter leading = fRefEvent->GetDaughter(idL, kFALSE);
    AliVParticle  *ref     = leading.GetRef();
    Double_t       angle   = ref->Phi() - fSum.Phi();
-   
+
    //return angle w.r.t. leading particle in the range -pi/2, 3/2pi
    while (angle >= 1.5 * TMath::Pi()) angle -= 2 * TMath::Pi();
    while (angle < -0.5 * TMath::Pi()) angle += 2 * TMath::Pi();
    success = kTRUE;
-   
+
    return angle;
 }
 
@@ -177,7 +177,7 @@ void AliRsnMother::ComputeSum(Double_t mass0, Double_t mass1, Double_t motherMas
    // sum
    fSum   = fDaughter[0]->Prec() + fDaughter[1]->Prec();
    fSumMC = fDaughter[0]->Psim() + fDaughter[1]->Psim();
-   
+
    // reference
    fRef.SetXYZM(fSum.X(), fSum.Y(), fSum.Z(), motherMass);
    fRefMC.SetXYZM(fSumMC.X(), fSumMC.Y(), fSumMC.Z(), motherMass);
index 14408f4c17c7b2ff3ad2528246ae0b588ea5d49c..834ef3fcb7995254cfbe4b68273372fe2fd91e79 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Interface to candidate resonance decaying into 2 bodies.
@@ -22,35 +22,35 @@ public:
 
    AliRsnMother() : fRefEvent(0), fSum(), fSumMC(), fRef(), fRefMC() {fDaughter[0] = fDaughter[1] = 0;}
    AliRsnMother(const AliRsnMother &obj);
-   AliRsnMotheroperator=(const AliRsnMother &obj);
+   AliRsnMother &operator=(const AliRsnMother &obj);
    virtual ~AliRsnMother();
 
    // setters (4-vectors cannot be set)
    void  Reset();
    void  SetDaughter(Int_t i, AliRsnDaughter *d) {fDaughter[CkID(i)] = d;}
    void  SetRefEvent(AliRsnEvent *event)         {fRefEvent = event;}
-   
+
    // getters
-   AliRsnEvent*      GetRefEvent()               {return fRefEvent;}
-   AliRsnDaughter*   GetDaughter(const Int_t &i) {return fDaughter[CkID(i)];}
-   TLorentzVector&   Sum(Bool_t mc)              {return (mc ? fSumMC : fSum);}
-   TLorentzVector&   Ref(Bool_t mc)              {return (mc ? fRefMC : fRef);}
+   AliRsnEvent      *GetRefEvent()               {return fRefEvent;}
+   AliRsnDaughter   *GetDaughter(const Int_t &i) {return fDaughter[CkID(i)];}
+   TLorentzVector   &Sum(Bool_t mc)              {return (mc ? fSumMC : fSum);}
+   TLorentzVector   &Ref(Bool_t mc)              {return (mc ? fRefMC : fRef);}
    Bool_t            GetResolution(Double_t &value);
    Double_t          Rapidity(Bool_t mc)         {if (mc) return fRefMC.Rapidity(); else return fRef.Rapidity();}
-   
+
    // checks
    Bool_t    IsLabelEqual()  const {return TMath::Abs(fDaughter[0]->GetLabel()) == TMath::Abs(fDaughter[1]->GetLabel());}
    Bool_t    IsIndexEqual()  const {return (fDaughter[0]->GetID() == fDaughter[1]->GetID());}
    Bool_t    IsOwnerEqual()  const {return (fDaughter[0]->GetOwnerEvent() == fDaughter[1]->GetOwnerEvent());}
    Int_t     CommonMother()  const;
-   
+
    // angles
    Double_t  AngleTo(AliRsnDaughter *track, Bool_t mc = kFALSE) {return track->P(mc).Angle(Sum(mc).Vect());}
    Double_t  AngleToLeading(Bool_t &success);
-   
+
    // computations
    void      ComputeSum(Double_t mass1, Double_t mass2, Double_t motherMass);
-   Double_t  CosThetaStar(Bool_t first = kTRUE, Bool_t useMC = kFALSE);   
+   Double_t  CosThetaStar(Bool_t first = kTRUE, Bool_t useMC = kFALSE);
    void      PrintInfo(const Option_t *option = "ALL") const;
    Bool_t    CheckPair(Bool_t checkMC = kFALSE) const;
 
index 8ada0bcd7a8c9f90553ab68d4418374f7ee5d2cb..c3d59d92c4e03394493e38a13344c457dbe6b81b 100644 (file)
@@ -22,7 +22,7 @@
 //  This object contains two AliRsnDaughterDef which define a model for each
 //  of the two expected daughters (see also AliRsnDaughterDef class) plus a
 //  mass hypothesis for the resonance, which is used for computin quantities
-//  which need it (like rapidity or Mt), and a PDG code, which is used to 
+//  which need it (like rapidity or Mt), and a PDG code, which is used to
 //  check for true pairs, when needed. In all other cases, these two additional
 //  values can be left to their default (meaningless) value.
 //  Since this object must define a decay channel, the only provided constructor
@@ -41,9 +41,9 @@ ClassImp(AliRsnPairDef)
 
 //_____________________________________________________________________________
 AliRsnPairDef::AliRsnPairDef() :
-   fMotherMass(0.0), 
-   fMotherPDG(0), 
-   fDef1(), 
+   fMotherMass(0.0),
+   fMotherPDG(0),
+   fDef1(),
    fDef2()
 {
 //
@@ -55,9 +55,9 @@ AliRsnPairDef::AliRsnPairDef() :
 //_____________________________________________________________________________
 AliRsnPairDef::AliRsnPairDef
 (EPARTYPE type1, Char_t ch1, EPARTYPE type2, Char_t ch2, Int_t pdg, Double_t mass) :
-   fMotherMass(mass), 
-   fMotherPDG(pdg), 
-   fDef1(type1, ch1), 
+   fMotherMass(mass),
+   fMotherPDG(pdg),
+   fDef1(type1, ch1),
    fDef2(type2, ch2)
 {
 //
@@ -69,9 +69,9 @@ AliRsnPairDef::AliRsnPairDef
 //_____________________________________________________________________________
 AliRsnPairDef::AliRsnPairDef
 (AliRsnDaughter::ESpecies type1, Char_t ch1, AliRsnDaughter::ESpecies type2, Char_t ch2, Int_t pdg, Double_t mass) :
-   fMotherMass(mass), 
-   fMotherPDG(pdg), 
-   fDef1(type1, ch1), 
+   fMotherMass(mass),
+   fMotherPDG(pdg),
+   fDef1(type1, ch1),
    fDef2(type2, ch2)
 {
 //
@@ -79,7 +79,7 @@ AliRsnPairDef::AliRsnPairDef
 // If the two pointers are well initialized, they are used to init the members.
 //
 }
-   
+
 //_____________________________________________________________________________
 AliRsnPairDef::AliRsnPairDef(const AliRsnPairDef &copy) :
    TObject(copy),
@@ -94,17 +94,17 @@ AliRsnPairDef::AliRsnPairDef(const AliRsnPairDef &copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnPairDefAliRsnPairDef::operator=(const AliRsnPairDef &copy)
+AliRsnPairDef &AliRsnPairDef::operator=(const AliRsnPairDef &copy)
 {
 //
 // Assignment operator with standard behavior.
 //
-  if (this == &copy)
-    return *this;
-  fMotherMass = copy.fMotherMass;
-  fMotherPDG = copy.fMotherPDG;
-  fDef1 = copy.fDef1;
-  fDef2 = copy.fDef2;
-  
+   if (this == &copy)
+      return *this;
+   fMotherMass = copy.fMotherMass;
+   fMotherPDG = copy.fMotherPDG;
+   fDef1 = copy.fDef1;
+   fDef2 = copy.fDef2;
+
    return (*this);
 }
index 32f61516c4b1bed277771985b55b1fc3fb247821..e1268b361d9f19030bf2b73d95d2c4721d594c4a 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Resonance decay tree definition.
@@ -20,15 +20,15 @@ public:
    AliRsnPairDef(EPARTYPE type1, Char_t ch1, EPARTYPE type2, Char_t ch2, Int_t motherPDG = 0, Double_t motherMass = 0.0);
    AliRsnPairDef(AliRsnDaughter::ESpecies type1, Char_t ch1, AliRsnDaughter::ESpecies type2, Char_t ch2, Int_t motherPDG = 0, Double_t motherMass = 0.0);
    AliRsnPairDef(const AliRsnPairDef &copy);
-   AliRsnPairDefoperator= (const AliRsnPairDef &copy);
+   AliRsnPairDef &operator= (const AliRsnPairDef &copy);
    virtual ~AliRsnPairDef() { }
 
-   virtual const char*     GetName()       const {return Form("%s_%s", fDef1.GetName(), fDef2.GetName());}
+   virtual const char      *GetName()       const {return Form("%s_%s", fDef1.GetName(), fDef2.GetName());}
    Int_t                    GetMotherPDG()  const {return fMotherPDG;}
    Double_t                 GetMotherMass() const {return fMotherMass;}
-   AliRsnDaughterDef&       GetDef1()             {return fDef1;}
-   AliRsnDaughterDef&       GetDef2()             {return fDef2;}
-   AliRsnDaughterDef&       GetDef(Int_t i)       {if (i<1) return GetDef1(); else return GetDef2();}
+   AliRsnDaughterDef       &GetDef1()             {return fDef1;}
+   AliRsnDaughterDef       &GetDef2()             {return fDef2;}
+   AliRsnDaughterDef       &GetDef(Int_t i)       {if (i<1) return GetDef1(); else return GetDef2();}
 
    void SetMotherPDG(Int_t pdg)                 {fMotherPDG = pdg;}
    void SetMotherMass(Double_t mass)            {fMotherMass = mass;}
index 06ccce58d2541c62c491fa778d1a1b7ff45dc1f7..48699e90d553033d157e8661d1fa1f4bf4741f67 100644 (file)
@@ -16,7 +16,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Base class used wherever it is needed to check the class type of
-//  an object w.r. to the RSN framework analysis (daughter, mother, event) 
+//  an object w.r. to the RSN framework analysis (daughter, mother, event)
 //  which could be used for cut checking or value computing.
 //  Since most of these operation are implemented into classes that
 //  operate on any of such objects, then this class helps in making sure
@@ -47,7 +47,7 @@ Bool_t AliRsnTarget::TargetOK(TObject *object)
 // 1) check if the object class matches the required target type
 // 2) if (1) is successful, set the built-in pointer data member
 //    in order to point to it, after being casted accordingly
-// 3) if the target is a daughter or a mother, adjust the pointer 
+// 3) if the target is a daughter or a mother, adjust the pointer
 //    to reference event accordingly
 //
 
@@ -62,23 +62,23 @@ Bool_t AliRsnTarget::TargetOK(TObject *object)
       AliError("Passed a NULL object");
       return kFALSE;
    }
-   
+
    // checks matching between argument type and expected object type
    // the passed object is also casted into the appropriate pointer
    // when a daughter or mother is passed and the target type expects
    // and event, the check is yes successful and the owner event is used
    if (object->IsA() == AliRsnDaughter::Class() && (fTargetType == kDaughter || fTargetType == kEvent)) {
-      fDaughter = static_cast<AliRsnDaughter*>(object);
+      fDaughter = static_cast<AliRsnDaughter *>(object);
       fEvent = fDaughter->GetOwnerEvent();
       return kTRUE;
    }
    else if (object->IsA() == AliRsnMother::Class() && (fTargetType == kMother || fTargetType == kEvent)) {
-      fMother = static_cast<AliRsnMother*>(object);
+      fMother = static_cast<AliRsnMother *>(object);
       fEvent = fMother->GetRefEvent();
       return kTRUE;
    }
    else if (object->IsA() == AliRsnEvent::Class() && fTargetType == kEvent) {
-      fEvent = static_cast<AliRsnEvent*>(object);
+      fEvent = static_cast<AliRsnEvent *>(object);
       return kTRUE;
    }
    else {
@@ -107,7 +107,7 @@ Char_t AliRsnTarget::GetTargetTypeChar() const
 }
 
 //______________________________________________________________________________
-const charAliRsnTarget::GetTargetTypeName() const
+const char *AliRsnTarget::GetTargetTypeName() const
 {
 //
 // Returns a string with the name of the cut target type-
index 0b7a922cbc7c9bb18b8097937c6ca4e346a3ea28..abe94476e726146aee3574aa1eddb4005f2ac64b 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  General class for cut/computation target objects (daughter/pair/event).
@@ -29,22 +29,22 @@ public:
 
    AliRsnTarget() : fTargetType(kTargetTypes), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
    AliRsnTarget(const char *name, ETargetType type = kTargetTypes) : TNamed(name, ""), fTargetType(type), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
-   AliRsnTarget(const AliRsnTargetcopy) : TNamed(copy), fTargetType(copy.fTargetType), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
-   AliRsnTarget& operator=(const AliRsnTarget& copy) { TNamed::operator=(copy); if (this==&copy) return *this; fTargetType = copy.fTargetType; return (*this); }
+   AliRsnTarget(const AliRsnTarget &copy) : TNamed(copy), fTargetType(copy.fTargetType), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
+   AliRsnTarget &operator=(const AliRsnTarget &copy) { TNamed::operator=(copy); if (this==&copy) return *this; fTargetType = copy.fTargetType; return (*this); }
    virtual ~AliRsnTarget() { /*nothing*/ }
 
    Bool_t           IsAllNull() const                      {return (!fDaughter && !fMother && !fEvent);}
    Bool_t           IsTarget(ETargetType targetType) const {return (fTargetType == targetType);}
    Bool_t           TargetOK(TObject *object);
-   
+
    void             SetTargetType(ETargetType type)        {fTargetType = type;}
    ETargetType      GetTargetType() const                  {return fTargetType;}
-   Char_t           GetTargetTypeChar() const;            
-   const char*      GetTargetTypeName() const;            
-                                                         
-   AliRsnDaughter*  GetTargetDaughter()                    {return fDaughter;}
-   AliRsnMother*    GetTargetMother()                      {return fMother;}
-   AliRsnEvent*     GetTargetEvent()                       {return fEvent;}
+   Char_t           GetTargetTypeChar() const;
+   const char      *GetTargetTypeName() const;
+
+   AliRsnDaughter  *GetTargetDaughter()                    {return fDaughter;}
+   AliRsnMother    *GetTargetMother()                      {return fMother;}
+   AliRsnEvent     *GetTargetEvent()                       {return fEvent;}
 
 protected:
 
index e5f6730dbfd32f60181b72110805a7b60f6424cd..806ff2615976bf5b5d162b1911687dcca33028ac 100644 (file)
@@ -66,7 +66,7 @@ AliRsnValue::AliRsnValue(const char *name, AliRsnTarget::ETargetType type) :
 }
 
 //_____________________________________________________________________________
-AliRsnValue::AliRsnValue(const AliRsnValuecopy) :
+AliRsnValue::AliRsnValue(const AliRsnValue &copy) :
    AliRsnTarget(copy),
    fUseMCInfo(copy.fUseMCInfo),
    fComputedValue(copy.fComputedValue),
@@ -79,7 +79,7 @@ AliRsnValue::AliRsnValue(const AliRsnValue& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnValue& AliRsnValue::operator=(const AliRsnValue& copy)
+AliRsnValue &AliRsnValue::operator=(const AliRsnValue &copy)
 {
 //
 // Assignment operator.
@@ -88,7 +88,7 @@ AliRsnValue& AliRsnValue::operator=(const AliRsnValue& copy)
 
    AliRsnTarget::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fUseMCInfo = copy.fUseMCInfo;
    fComputedValue = copy.fComputedValue;
    fBinArray = copy.fBinArray;
index 8ed7a93cb47f9f28a249f40b43e501bc9b956c24..dd2c2a8757bbe20cdaf87280810d1e650027c7c6 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Collection of all values which can be computed within the package
@@ -18,12 +18,12 @@ class AliRsnValue : public AliRsnTarget {
 public:
 
    AliRsnValue(const char *name = "", AliRsnTarget::ETargetType type = AliRsnTarget::kTargetTypes);
-   AliRsnValue(const AliRsnValuecopy);
-   AliRsnValue& operator=(const AliRsnValue& copy);
+   AliRsnValue(const AliRsnValue &copy);
+   AliRsnValue &operator=(const AliRsnValue &copy);
    virtual ~AliRsnValue() { }
 
-   TArrayD&        GetArray()               {return fBinArray;}
-   const Double_tGetArrayValues() const   {return fBinArray.GetArray();}
+   TArrayD        &GetArray()               {return fBinArray;}
+   const Double_t *GetArrayValues() const   {return fBinArray.GetArray();}
    Double_t        GetComputedValue() const {return fComputedValue;}
 
    void            SetUseMCInfo(Bool_t yn = kTRUE) {fUseMCInfo = yn;}
index e311ef81d7cfc34cd74ca1556d5eb3e36c27b05a..233b3b75b4fc1f4688f266e1b3b09174bcfd1e31 100644 (file)
@@ -68,7 +68,7 @@ AliRsnValueDaughter::AliRsnValueDaughter(const char *name, EType type) :
 }
 
 //_____________________________________________________________________________
-AliRsnValueDaughter::AliRsnValueDaughter(const AliRsnValueDaughtercopy) :
+AliRsnValueDaughter::AliRsnValueDaughter(const AliRsnValueDaughter &copy) :
    AliRsnValue(copy),
    fType(copy.fType)
 {
@@ -78,7 +78,7 @@ AliRsnValueDaughter::AliRsnValueDaughter(const AliRsnValueDaughter& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnValueDaughter& AliRsnValueDaughter::operator=(const AliRsnValueDaughter& copy)
+AliRsnValueDaughter &AliRsnValueDaughter::operator=(const AliRsnValueDaughter &copy)
 {
 //
 // Assignment operator.
@@ -87,14 +87,14 @@ AliRsnValueDaughter& AliRsnValueDaughter::operator=(const AliRsnValueDaughter& c
 
    AliRsnValue::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fType = copy.fType;
-   
+
    return (*this);
 }
 
 //_____________________________________________________________________________
-const charAliRsnValueDaughter::GetTypeName() const
+const char *AliRsnValueDaughter::GetTypeName() const
 {
 //
 // This method returns a string to give a name to each possible
@@ -129,8 +129,8 @@ Bool_t AliRsnValueDaughter::Eval(TObject *object)
 // The output of the function tells if computing was successful,
 // and the values must be taken with GetValue().
 //
-   
-   // coherence check, which also casts object 
+
+   // coherence check, which also casts object
    // to AliRsnTarget data members and returns kFALSE
    // in case the object is NULL
    if (!TargetOK(object)) return kFALSE;
@@ -147,7 +147,7 @@ Bool_t AliRsnValueDaughter::Eval(TObject *object)
       AliError("No DATA");
       return kFALSE;
    }
-   
+
    // compute value depending on types in the enumeration
    // if the type does not match any available choice, or if
    // the computation is not doable due to any problem
index a9f638617dca884d50f647fac2a3a8d81bd49130..e2f5c4cd795cb917c0cd30d561996b09a7e92f67 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Values which depend on 4-momentum of the daughters.
@@ -33,13 +33,13 @@ public:
    };
 
    AliRsnValueDaughter(const char *name = "valDaughter", EType type = kTypes);
-   AliRsnValueDaughter(const AliRsnValueDaughtercopy);
-   AliRsnValueDaughter& operator=(const AliRsnValueDaughter& copy);
+   AliRsnValueDaughter(const AliRsnValueDaughter &copy);
+   AliRsnValueDaughter &operator=(const AliRsnValueDaughter &copy);
    virtual ~AliRsnValueDaughter() { }
 
    void             SetType(EType type)  {fType = type;}
    EType            GetType()     const  {return fType;}
-   const char*      GetTypeName() const;
+   const char      *GetTypeName() const;
 
    virtual Bool_t   Eval(TObject *object);
 
index 9be11dd07c4523cb96ed8a7675c05216e736dd15..403cba9dd1fdde077c5e083770e7ef9b8dd1ce9b 100644 (file)
@@ -66,7 +66,7 @@ AliRsnValueEvent::AliRsnValueEvent(const char *name, EType type) :
 }
 
 //_____________________________________________________________________________
-AliRsnValueEvent::AliRsnValueEvent(const AliRsnValueEventcopy) :
+AliRsnValueEvent::AliRsnValueEvent(const AliRsnValueEvent &copy) :
    AliRsnValue(copy),
    fType(copy.fType)
 {
@@ -76,23 +76,23 @@ AliRsnValueEvent::AliRsnValueEvent(const AliRsnValueEvent& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnValueEvent& AliRsnValueEvent::operator=(const AliRsnValueEvent& copy)
+AliRsnValueEvent &AliRsnValueEvent::operator=(const AliRsnValueEvent &copy)
 {
 //
 // Assignment operator.
 // Works like copy constructor.
 //
 
-  AliRsnValue::operator=(copy);
-  if (this == &copy)
-    return *this;
-  fType = copy.fType;
-  
-  return (*this);
+   AliRsnValue::operator=(copy);
+   if (this == &copy)
+      return *this;
+   fType = copy.fType;
+
+   return (*this);
 }
 
 //_____________________________________________________________________________
-const charAliRsnValueEvent::GetTypeName() const
+const char *AliRsnValueEvent::GetTypeName() const
 {
 //
 // This method returns a string to give a name to each possible
@@ -121,8 +121,8 @@ Bool_t AliRsnValueEvent::Eval(TObject *object)
 // In this implementation, fills the member 4-vectors with data
 // coming from the object passed as argument, and then returns the value
 //
-   
-   // coherence check, which also casts object 
+
+   // coherence check, which also casts object
    // to AliRsnTarget data members and returns kFALSE
    // in case the object is NULL
    if (!TargetOK(object)) return kFALSE;
@@ -130,10 +130,10 @@ Bool_t AliRsnValueEvent::Eval(TObject *object)
       AliWarning("NULL ref");
       return kFALSE;
    }
-   
+
    // declare support variables
    AliCentrality *centrality = fEvent->GetRef()->GetCentrality();
-   
+
    // compute value depending on types in the enumeration
    // if the type does not match any available choice, or if
    // the computation is not doable due to any problem
@@ -146,11 +146,11 @@ Bool_t AliRsnValueEvent::Eval(TObject *object)
       case kMultMC:
          fComputedValue = -999.0;
          if (fEvent->GetRefMC()) {
-            if (fEvent->IsESD()) 
+            if (fEvent->IsESD())
                fComputedValue = (Double_t)fEvent->GetRefMC()->GetNumberOfTracks();
             else {
-               AliAODEvent *aod = (AliAODEvent*)fEvent->GetRefMC();
-               TClonesArray *mcArray = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
+               AliAODEvent *aod = (AliAODEvent *)fEvent->GetRefMC();
+               TClonesArray *mcArray = (TClonesArray *)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
                if (mcArray) fComputedValue = (Double_t)mcArray->GetEntries();
             }
          }
@@ -176,7 +176,7 @@ Bool_t AliRsnValueEvent::Eval(TObject *object)
             return kFALSE;
          }
          return (fComputedValue >= 0);
-      case kLeadingPt: 
+      case kLeadingPt:
          if (fEvent->GetLeadingIndex() >= 0) {
             AliRsnDaughter leadingPart;
             fEvent->SetLeadingParticle(leadingPart);
index f4a128686a2dd4e3d5b97ba636cd9fef7493e499..373647ee1b03aa8af9d0937ad5a45e823a313239 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Values which depend on 4-momentum of the pair.
@@ -25,17 +25,17 @@ public:
       kCentralityV0,    // event centrality (V0 method)
       kCentralityTrack, // event centrality (tracks method)
       kCentralityCL1,   // event centrality (CL1 method)
-      kTypes            
+      kTypes
    };
 
    AliRsnValueEvent(const char *name = "valEvent", EType type = kTypes);
-   AliRsnValueEvent(const AliRsnValueEventcopy);
-   AliRsnValueEvent& operator=(const AliRsnValueEvent& copy);
+   AliRsnValueEvent(const AliRsnValueEvent &copy);
+   AliRsnValueEvent &operator=(const AliRsnValueEvent &copy);
    virtual ~AliRsnValueEvent() { }
 
    void             SetType(EType type)  {fType = type;}
    EType            GetType()     const  {return fType;}
-   const char*      GetTypeName() const;
+   const char      *GetTypeName() const;
 
    virtual Bool_t   Eval(TObject *object);
 
index ab06659bfc3e9e0e949f778b28b92ee7e2098fc0..313492aa8ee923883d4b311a19d8c58a9a1ec4a8 100644 (file)
@@ -67,7 +67,7 @@ AliRsnValuePair::AliRsnValuePair(const char *name, EType type) :
 }
 
 //_____________________________________________________________________________
-AliRsnValuePair::AliRsnValuePair(const AliRsnValuePaircopy) :
+AliRsnValuePair::AliRsnValuePair(const AliRsnValuePair &copy) :
    AliRsnValue(copy),
    fType(copy.fType)
 {
@@ -77,7 +77,7 @@ AliRsnValuePair::AliRsnValuePair(const AliRsnValuePair& copy) :
 }
 
 //_____________________________________________________________________________
-AliRsnValuePair& AliRsnValuePair::operator=(const AliRsnValuePair& copy)
+AliRsnValuePair &AliRsnValuePair::operator=(const AliRsnValuePair &copy)
 {
 //
 // Assignment operator.
@@ -86,14 +86,14 @@ AliRsnValuePair& AliRsnValuePair::operator=(const AliRsnValuePair& copy)
 
    AliRsnValue::operator=(copy);
    if (this == &copy)
-     return *this;
+      return *this;
    fType = copy.fType;
 
    return (*this);
 }
 
 //_____________________________________________________________________________
-const charAliRsnValuePair::GetTypeName() const
+const char *AliRsnValuePair::GetTypeName() const
 {
 //
 // This method returns a string to give a name to each possible
@@ -125,20 +125,20 @@ Bool_t AliRsnValuePair::Eval(TObject *object)
 // coming from the object passed as argument, and then returns the value
 //
 
-   // coherence check, which also casts object 
+   // coherence check, which also casts object
    // to AliRsnTarget data members and returns kFALSE
    // in case the object is NULL
    if (!TargetOK(object)) return kFALSE;
-   
+
    // set a reference to the mother momentum
    TLorentzVector &sum   = fMother->Sum(fUseMCInfo);
    TLorentzVector &ref   = fMother->Ref(fUseMCInfo);
    TLorentzVector &p1    = fMother->GetDaughter(0)->P(fUseMCInfo);
    TLorentzVector &p2    = fMother->GetDaughter(1)->P(fUseMCInfo);
-   
+
    // utility variables
    Bool_t success;
-   
+
    // compute value depending on types in the enumeration
    // if the type does not match any available choice, or if
    // the computation is not doable due to any problem
index ec26b932dde060be20210b24d398d96804e6956e..cf15db5986110a65bf96fc90d4b8e351ca05d42e 100644 (file)
@@ -3,7 +3,7 @@
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Values which depend on 4-momentum of the pair.
@@ -31,13 +31,13 @@ public:
    };
 
    AliRsnValuePair(const char *name = "valPair", EType type = kTypes);
-   AliRsnValuePair(const AliRsnValuePaircopy);
-   AliRsnValuePair& operator=(const AliRsnValuePair& copy);
+   AliRsnValuePair(const AliRsnValuePair &copy);
+   AliRsnValuePair &operator=(const AliRsnValuePair &copy);
    virtual ~AliRsnValuePair() { }
 
    void             SetType(EType type)  {fType = type;}
    EType            GetType()     const  {return fType;}
-   const char*      GetTypeName() const;
+   const char      *GetTypeName() const;
 
    virtual Bool_t   Eval(TObject *object);
 
index 8a15b0db79684951471188e4a961d7bfbfb7f8a5..be059276db032d99604cd1376012cee22e1749be 100644 (file)
@@ -16,7 +16,7 @@ class AliRsnVariableExpression: public AliRsnExpression {
 public:
    AliRsnVariableExpression(TString a) : AliRsnExpression() { fVname = a;  };
    ~AliRsnVariableExpression() {}
-   virtual Bool_t    Value(TObjArraypgm);
+   virtual Bool_t    Value(TObjArray &pgm);
    virtual TString    Unparse() const { return fVname; }
 
    ClassDef(AliRsnVariableExpression, 1);    // Class to define a variable expression