From: pulvir Date: Thu, 17 Jul 2008 11:20:20 +0000 (+0000) Subject: Removed unused classes X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=fa997ddcd6723a53ef531827d5684d36dcbcd1e5 Removed unused classes --- diff --git a/PWG2/RESONANCES/AliRsnAnalysis.cxx b/PWG2/RESONANCES/AliRsnAnalysis.cxx deleted file mode 100644 index 0f9d209b74c..00000000000 --- a/PWG2/RESONANCES/AliRsnAnalysis.cxx +++ /dev/null @@ -1,339 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * * - * Author: The ALICE Off-line Project. * - * Contributors are mentioned in the code where appropriate. * - * * - * Permission to use, copy, modify and distribute this software and its * - * documentation strictly for non-commercial purposes is hereby granted * - * without fee, provided that the above copyright notice appears in all * - * copies and that both the copyright notice and this permission notice * - * appear in the supporting documentation. The authors make no claims * - * about the suitability of this software for any purpose. It is * - * provided "as is" without express or implied warranty. * - **************************************************************************/ - -//------------------------------------------------------------------------- -// Class AliRsnAnalysis -//------------------------------------------------------------------------- -// This class is a manager to process one or more pair analysis with a -// given event sample, specified as a TTree passed to this object. -// Each single pair analysis must be defined with its specifications, like -// histogram binning, cuts and everything else. -// This class utiliy consists in defining a unique event sample which is -// used for all pairs analysis, and all kinds of event mixing (if required). -// All histograms computed in a single execution, are then saved into a file. -// This object contains a two TObjArray's: -// - one to contain single event pair analysis objects (signal, like-sign) -// - one to contain all event-mixing pair analysis objects -// When a new pair is added, it must be then specified in what container it -// must be placed, in order to avoid meaningless results. -// -// author: A. Pulvirenti -// email : alberto.pulvirenti@ct.infn.it -//------------------------------------------------------------------------- - -#include -#include -#include -#include -#include - -#include "AliLog.h" -#include "AliRsnPID.h" -#include "AliRsnDaughter.h" -#include "AliRsnDaughterCut.h" -#include "AliRsnDaughterCutPair.h" -#include "AliRsnEvent.h" -#include "AliRsnPair.h" -#include "AliRsnAnalysis.h" - -ClassImp(AliRsnAnalysis) - -//_____________________________________________________________________________ -AliRsnAnalysis::AliRsnAnalysis(const char *branchName) : - TObject(), - fSkipUnbalanced(kFALSE), - fStep(1000), - fBranchName(branchName), - fMixMultCut(10), - fMixVzCut(0.5), - fNEvents(0), - fPID(0x0), - fPairs(0x0), - fMixPairs(0x0), - fTree(0x0), - fMatches(0x0), - fEvents(0x0) -{ -// -// Constructor -// Initializes all pointers and collections to NULL. -// -} - - -//_____________________________________________________________________________ -void AliRsnAnalysis::Clear(Option_t *option) -{ -// -// Clear heap -// - fPairs->Clear(option); - delete [] fMatches; - fMatches = 0; - delete fPID; - fPID = 0; -} - -//_____________________________________________________________________________ -void AliRsnAnalysis::SetEventsTree(TTree *tree) -{ -// -// Set the tree containing the events to be processed. -// Counts also the number of events and stores it in a private datamember. -// This can avoid the time-wasting entries count in a long TChain. -// - fTree = tree; - fNEvents = tree->GetEntries(); - AliInfo(Form("Total number of events to be processed: %d", fNEvents)); - - // link branch - if (fEvents) delete fEvents; - fEvents = new TClonesArray("AliRsnEvent", 0); - fTree->SetBranchAddress(fBranchName.Data(), &fEvents); -} - - -//_____________________________________________________________________________ -void AliRsnAnalysis::AddPair(AliRsnPair *pair) -{ -// -// Add a pair of particle types to be analyzed. -// Second argument tells if the added object is for event mixing. -// - Bool_t mixing = pair->IsForMixing(); - TObjArray* &target = mixing ? fMixPairs : fPairs; - if (!target) target = new TObjArray(0); - target->AddLast(pair); -} - - -//_____________________________________________________________________________ -Stat_t AliRsnAnalysis::Process() -{ -// -// Computes all invariant mass distributions defined in the AliRsnPair objects collected. -// Depending on the kind of background evaluation method, computes also this one. -// - AliInfo("Processing"); - - // create an iterator which run over all pairs - TObjArrayIter pairIterator(fPairs); - AliRsnPair *pair = 0; - - Bool_t usePID; - Stat_t nPairs = 0; - Int_t i; - - // loop on events - for (i = 0; i < fNEvents; i++) { - // get entry - AliRsnEvent *event = Evt(i); - if (!event) continue; - // if requested, skip unbalanced events - if (fSkipUnbalanced && (event->GetNPos() == 0 || event->GetNNeg() == 0)) continue; - // adjust PID - usePID = AdjustPID(event); - // loop over the collection of pair defs - pairIterator.Reset(); - while ( (pair = (AliRsnPair*)pairIterator.Next()) ) { - nPairs += pair->Process(event, event, usePID); - } - // message - if ((i+1) % fStep == 0) AliInfo(Form("%d events processed: %d pairs collected", i+1, (Int_t)nPairs)); - } - - return nPairs; -} - - -//_____________________________________________________________________________ -Stat_t AliRsnAnalysis::EventMixing(Int_t nEventsToMix) -{ -// -// Performs event mixing. -// It takes the array of fMixPairDefs and stores results in fMixHistograms. -// First parameter defines how many events must be mixed with each one. -// Events to be mixed are chosen using the other parameters: -// -// - multDiffMax defines the maximum allowed difference in particle multiplicity, -// a) when last argument is kFALSE (default) the multiplicity comparison is made with respect -// to the particles of 'type 2' in the pair -// b) when last argument is kTRUE, the multiplicity comparison is made with respect of total -// particle multiplicity in the events -// -// - vzDiffMax defines maximum allowed difference in Z coordinate of prim. vertex. -// -// If one wants to exchange the particle types, one has to add both combinations of particles -// as different pair defs. -// - - AliInfo("Processing"); - // create an iterator which run over all pairs - if (!fMixPairs) { - AliError("Uninitialized MIX array"); - return 0.0; - } - if (fMixPairs->IsEmpty()) { - AliError("No mixing pairs defined"); - return 0.0; - } - TObjArrayIter pairIterator(fMixPairs); - AliRsnPair *pair = 0; - - // find matches for all events - if (fMatches) delete [] fMatches; - FindMatches(nEventsToMix); - - // define variables to store data about particles - Bool_t usePID; - Stat_t nPairs = 0; - Int_t iev, imatch, imatched, nEvents = fNEvents; - for (iev = 0; iev < nEvents; iev++) { - // get event - AliRsnEvent *evtry = Evt(iev); - if (!evtry) continue; - AdjustPID(evtry); - AliRsnEvent *event1 = new AliRsnEvent(*evtry); - // loop on matches - for (imatch = 0; imatch < nEventsToMix; imatch++) { - imatched = (fMatches[iev])[imatch]; - if (imatched < 0 || imatched > nEvents) continue; - // get other event - AliRsnEvent *event2 = Evt(imatched); - if (!event2) continue; - usePID = AdjustPID(event2); - if (fPID) event2->FillPIDArrays(); - // loop on pair definitions - pairIterator.Reset(); - while ( (pair = (AliRsnPair*)pairIterator.Next()) ) { - // processing is done twice, exchanging the event arguments - // mix particles of type #1 from event #1 with particles of type #2 in event #2 - nPairs += pair->Process(event1, event2, usePID); - // mix particles of type #1 from event #2 with particles of type #2 in event #1 - nPairs += pair->Process(event2, event1, usePID); - } - } - delete event1; - event1 = 0; - // message - if ((iev+1) % fStep == 0) AliInfo(Form("%d events processed: %d pairs collected", iev+1, (Int_t)nPairs)); - } // end loop on events - - return nPairs; -} - - -//_____________________________________________________________________________ -void AliRsnAnalysis::SaveOutput(const char *fileName, const char *fileOpt) const -{ -// -// Writes histograms in current directory -// - TFile *file = TFile::Open(fileName, fileOpt); - AliRsnPair *pair = 0; - TObjArrayIter pairIterator(fPairs); - while ( (pair = (AliRsnPair*)pairIterator.Next()) ) pair->GetHistogram()->Write(); - if (fMixPairs && !fMixPairs->IsEmpty()) { - TObjArrayIter mixIterator(fMixPairs); - while ( (pair = (AliRsnPair*)mixIterator.Next()) ) pair->GetHistogram()->Write(); - } - file->Close(); -} - -//_____________________________________________________________________________ -AliRsnEvent* AliRsnAnalysis::Evt(Int_t i) -{ -// -// Return the event stored in the TClonesArray corresponding -// to the entry number passed as argument -// - - if (!fEvents) return 0x0; - if (i < 0 || i >= fNEvents) return 0x0; - - fTree->GetEntry(i); - TObjArrayIter iter(fEvents); - AliRsnEvent *evt = (AliRsnEvent*)iter.Next(); - return evt; -} - -//_____________________________________________________________________________ -void AliRsnAnalysis::FindMatches(Int_t nEventsToMatch) -{ -// -// Initializes the "fMatch" array and computes, for each event, the good matches -// for event mixing computations (if requested). -// - Int_t *mult = new Int_t[fNEvents]; - Double_t *vz = new Double_t[fNEvents]; - - // loop on events - Int_t iev; - for (iev = 0; iev < fNEvents; iev++) { - AliRsnEvent *event = Evt(iev); - if (!event) continue; - if (fSkipUnbalanced && (event->GetNPos() == 0 || event->GetNNeg() == 0)) continue; - vz[iev] = event->GetPrimaryVertexZ(); - mult[iev] = event->GetMultiplicity(); - } - - // initialize arrays of matches and compute - Int_t imatch, nmatch, diffMult; - Double_t diffVz; - fMatches = new TArrayI[fNEvents]; - for (iev = 0; iev < fNEvents; iev++) { - fMatches[iev].Set(nEventsToMatch); - imatch = iev; - nmatch = 0; - while (nmatch < nEventsToMatch) { - imatch++; - if (imatch >= fNEvents) imatch -= fNEvents; - if (imatch == iev) break; - diffMult = TMath::Abs(mult[iev] - mult[imatch]); - diffVz = TMath::Abs(vz[iev] - vz[imatch]); - if (diffMult <= fMixMultCut && diffVz <= fMixVzCut) { - (fMatches[iev])[nmatch] = imatch; - nmatch++; - } - } - } - - delete [] mult; - delete [] vz; -} - - -//_____________________________________________________________________________ -Bool_t AliRsnAnalysis::AdjustPID(AliRsnEvent* &event) -{ -// -// if a PID different from "native" has been chosen, particles are identified again -// the AliRsnPair::Process method wants an argument (3rd) which is TRUE when PID must -// be taken into account, and FALSE otherwise. -// Returns de corresponding value of this flag for that method, according to the choice done. -// -// - - // if the fPID object is NULL, the native PID is used - if (!fPID) { - return kTRUE; - } - else { - fPID->Identify(event); - AliRsnPID::EMethod method = fPID->GetMethod(); - if (method == AliRsnPID::kNone) return kFALSE; - else return kTRUE; - } -} diff --git a/PWG2/RESONANCES/AliRsnAnalysis.h b/PWG2/RESONANCES/AliRsnAnalysis.h deleted file mode 100644 index 8dc2cfbceb5..00000000000 --- a/PWG2/RESONANCES/AliRsnAnalysis.h +++ /dev/null @@ -1,81 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice * - **************************************************************************/ - -//------------------------------------------------------------------------- -// Class AliRsnAnalysis -// Reconstruction and analysis of K* Rsn -// ........................................ -// ........................................ -// ........................................ -// ........................................ -// -// author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) -//------------------------------------------------------------------------- - -#ifndef AliRsnAnalysis_H -#define AliRsnAnalysis_H - -#include "AliRsnPID.h" - -class TTree; -class TArrayI; -class TObjArray; -class AliRsnPair; -class AliRsnPID; - -class AliRsnAnalysis : public TObject -{ -public: - - AliRsnAnalysis(const char *branchname = "events"); - AliRsnAnalysis(const AliRsnAnalysis ©) : - TObject(copy),fSkipUnbalanced(kFALSE),fStep(1000),fBranchName("events"), - fMixMultCut(10),fMixVzCut(0.5),fNEvents(0),fPID(0x0), - fPairs(0x0),fMixPairs(0x0),fTree(0x0),fMatches(0x0),fEvents(0x0) { } - AliRsnAnalysis& operator=(const AliRsnAnalysis & /*copy*/) { return (*this); } - virtual ~AliRsnAnalysis() {Clear();} - virtual void Clear(Option_t *option = "C"); - - /* setters */ - void SetPID(AliRsnPID *pid) {fPID = pid;} - void SetEventsTree(TTree *tree); - void SetStep(Int_t step) {fStep = step;} - void SetBranchName(const char *name) {fBranchName = name;} - void SetMixMultiplicityCut(Int_t cut) {fMixMultCut = cut;} - void SetMixVzCut(Double_t cut) {fMixVzCut = cut;} - void SetSkipUnbalanced(Bool_t doit = kTRUE) {fSkipUnbalanced = doit;} - - /* working routines */ - void AddPair(AliRsnPair *pair); - Stat_t Process(); - Stat_t EventMixing(Int_t nEventsToMix); - void SaveOutput(const char *fileName, const char *fileOpt) const; - -private: - - /* service methods (private) */ - AliRsnEvent *Evt(Int_t i); - void FindMatches(Int_t nEventsToMatch); - Bool_t AdjustPID(AliRsnEvent* &event); - - Bool_t fSkipUnbalanced; // reject events with no pos or no neg particles - Int_t fStep; // step for progress message - TString fBranchName; // name of event branch - Int_t fMixMultCut; // multiplicity cut for event mixing - Double_t fMixVzCut; // difference in VZ cut for event mixing - Int_t fNEvents; // number of events (it cannot be accessed by user) - - AliRsnPID *fPID; //! if necessary, a new alternative PID object can be added - TObjArray *fPairs; //! collection of particle pairs to be read for 1-event analysis - TObjArray *fMixPairs; //! collection of particle pairs to be read for event-mixing - TTree *fTree; //! TTree of events (can not be created here, must be passed) - TArrayI *fMatches; //! collection of indexes of all events that match each one for mixing - TClonesArray *fEvents; //! collection of events --> branch of fTree - - // Rsn analysis implementation - ClassDef(AliRsnAnalysis,1) -}; - -#endif diff --git a/PWG2/RESONANCES/AliRsnDaughterCut.cxx b/PWG2/RESONANCES/AliRsnDaughterCut.cxx deleted file mode 100644 index 4e00174d7f8..00000000000 --- a/PWG2/RESONANCES/AliRsnDaughterCut.cxx +++ /dev/null @@ -1,63 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * * - * Author: The ALICE Off-line Project. * - * Contributors are mentioned in the code where appropriate. * - * * - * Permission to use, copy, modify and distribute this software and its * - * documentation strictly for non-commercial purposes is hereby granted * - * without fee, provided that the above copyright notice appears in all * - * copies and that both the copyright notice and this permission notice * - * appear in the supporting documentation. The authors make no claims * - * about the suitability of this software for any purpose. It is * - * provided "as is" without express or implied warranty. * - **************************************************************************/ - -//------------------------------------------------------------------------- -// Class AliRsnDaughterCut -// ------------------------- -// Implementation of track cuts for analysis. -// These cuts must be added to the AliRsnAnalysis -// object in order to make cut on single particles -// or on pairs of particles. -// -// author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) -//------------------------------------------------------------------------- - -#include - -#include "AliRsnDaughter.h" -#include "AliRsnDaughterCut.h" - -ClassImp(AliRsnDaughterCut) - -//-------------------------------------------------------------------------------------------------------- -Bool_t AliRsnDaughterCut::Pass(AliRsnDaughter *track) const -{ -// -// Virtual method for cut passing. -// This function checks that passed argument is not NULL. -// - if (!track) return kFALSE; - return kTRUE; -} -//-------------------------------------------------------------------------------------------------------- -Bool_t AliRsnDaughterCutPt::Pass(AliRsnDaughter *track) const -{ -// -// Cut on single track momentum. -// - if (!AliRsnDaughterCut::Pass(track)) return kFALSE; - if (track->Pt() < fPtMin) return kFALSE; - if (track->Pt() > fPtMax) return kFALSE; - - return kTRUE; -} -//-------------------------------------------------------------------------------------------------------- -Bool_t AliRsnDaughterCutVt::Pass(AliRsnDaughter *track) const -{ -// -// Cut on impact parameter -// - return (track->Vt() <= fVtMax); -} diff --git a/PWG2/RESONANCES/AliRsnDaughterCut.h b/PWG2/RESONANCES/AliRsnDaughterCut.h deleted file mode 100644 index d4c9880c7f8..00000000000 --- a/PWG2/RESONANCES/AliRsnDaughterCut.h +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice * - **************************************************************************/ - -//------------------------------------------------------------------------- -// Class AliRsnDaughterCut -// -// Implementation of various cut which can be applied -// during resonance analysis. -// First is the virtual base class. -// -// author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) -//------------------------------------------------------------------------- - -#ifndef ALIRSNDAUGHTERCUT_H -#define ALIRSNDAUGHTERCUT_H - -class AliRsnDaughter; - -class AliRsnDaughterCut : public TObject -{ -public: - AliRsnDaughterCut() { } - virtual ~AliRsnDaughterCut() { } - virtual Bool_t Pass(AliRsnDaughter *track) const; -private: - ClassDef(AliRsnDaughterCut,1) -}; -// -//------------------------------------------------------------------------- -// -class AliRsnDaughterCutPt : public AliRsnDaughterCut -{ -public: - AliRsnDaughterCutPt(Double_t min, Double_t max) : fPtMin(min),fPtMax(max) {} - virtual ~AliRsnDaughterCutPt() {} - virtual Bool_t Pass(AliRsnDaughter *track) const; -private: - Double_t fPtMin; // smallest allowed Pt - Double_t fPtMax; // largest allowed Pt - - ClassDef(AliRsnDaughterCutPt,1) -}; -// -//------------------------------------------------------------------------- -// -class AliRsnDaughterCutVt : public AliRsnDaughterCut -{ -public: - AliRsnDaughterCutVt(Double_t max) : fVtMax(max) {} - virtual ~AliRsnDaughterCutVt() {} - virtual Bool_t Pass(AliRsnDaughter *track) const; -private: - Double_t fVtMax; // largest allowed transverse impact parameter - - ClassDef(AliRsnDaughterCutVt,1) -}; - -#endif diff --git a/PWG2/RESONANCES/AliRsnDaughterCutPair.cxx b/PWG2/RESONANCES/AliRsnDaughterCutPair.cxx deleted file mode 100644 index 883a7d6c5f8..00000000000 --- a/PWG2/RESONANCES/AliRsnDaughterCutPair.cxx +++ /dev/null @@ -1,136 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * * - * Author: The ALICE Off-line Project. * - * Contributors are mentioned in the code where appropriate. * - * * - * Permission to use, copy, modify and distribute this software and its * - * documentation strictly for non-commercial purposes is hereby granted * - * without fee, provided that the above copyright notice appears in all * - * copies and that both the copyright notice and this permission notice * - * appear in the supporting documentation. The authors make no claims * - * about the suitability of this software for any purpose. It is * - * provided "as is" without express or implied warranty. * - **************************************************************************/ - -//------------------------------------------------------------------------- -// Class AliRsnDaughterCut -// ------------------------- -// Implementation of track cuts for analysis. -// These cuts must be added to the AliRsnAnalysis -// object in order to make cut on single particles -// or on pairs of particles. -// -// author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) -//------------------------------------------------------------------------- - -#include - -#include "AliRsnDaughter.h" -#include "AliRsnDaughterCutPair.h" - -ClassImp(AliRsnDaughterCutPair) -// -//-------------------------------------------------------------------------------------------------------- -// -Bool_t AliRsnDaughterCutPair::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const -{ -// -// Virtual method for cut passing. -// This function checks only that the two arguments are not NULL. -// - if (!track1 || !track2) return kFALSE; - - return kTRUE; -} -// -//-------------------------------------------------------------------------------------------------------- -// -Bool_t AliRsnDaughterCutPairPt::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const -{ -// -// Cut on single track momentum. -// - if (!AliRsnDaughterCutPair::Pass(track1, track2)) return kFALSE; - - AliRsnDaughter sum = AliRsnDaughter::Sum(*track1, *track2); - - if (sum.Pt() < fPtMin) return kFALSE; - if (sum.Pt() > fPtMax) return kFALSE; - - return kTRUE; -} -// -//-------------------------------------------------------------------------------------------------------- -// -Bool_t AliRsnDaughterCutPairAngle::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const -{ -// -// Cut on single track momentum. -// - if (!AliRsnDaughterCutPair::Pass(track1, track2)) return kFALSE; - - AliRsnDaughter sum = AliRsnDaughter::Sum(*track1, *track2); - - Double_t num1 = sum.Px()*track1->Px() + sum.Py()*track1->Py() + sum.Pz()*track1->Pz(); - Double_t den1 = sum.P() * track1->P(); - Double_t cos1 = num1 / den1; - Double_t num2 = sum.Px()*track2->Px() + sum.Py()*track2->Py() + sum.Pz()*track2->Pz(); - Double_t den2 = sum.P() * track2->P(); - Double_t cos2 = num2 / den2; - if (cos1 < fAngleMin || cos2 < fAngleMin) return kFALSE; - if (cos1 > fAngleMax || cos2 > fAngleMax) return kFALSE; - - return kTRUE; -} -// -//-------------------------------------------------------------------------------------------------------- -// -void AliRsnDaughterCutPairArmenteros::Compute(AliRsnDaughter *track1, AliRsnDaughter *track2, Double_t &qt, Double_t &alpha) const -{ -// -// Compute variables for Armenteros plot. -// Put as separate method to allow some monitoring -// - - if (!AliRsnDaughterCutPair::Pass(track1, track2)) return; - - AliRsnDaughter sum = AliRsnDaughter::Sum(*track1, *track2); - - // compute projection of both track momenta along mother's one - Double_t qLpos = 0.0, qLneg = 0.0, qL1 = 0.0; - if (track1->Charge() > 0) { - qLpos = track1->Px()*sum.Px() + track1->Py()*sum.Py() + track1->Pz()*sum.Pz(); - qLneg = track2->Px()*sum.Px() + track2->Py()*sum.Py() + track2->Pz()*sum.Pz(); - qL1 = qLpos; - } else { - qLneg = track1->Px()*sum.Px() + track1->Py()*sum.Py() + track1->Pz()*sum.Pz(); - qLpos = track2->Px()*sum.Px() + track2->Py()*sum.Py() + track2->Pz()*sum.Pz(); - qL1 = qLneg; - } - qLpos /= sum.P(); - qLneg /= sum.P(); - - // compute Qt - qt = TMath::Sqrt(track1->P2() - qL1*qL1); - - // compute alpha - alpha = (qLpos - qLneg) / (qLpos + qLneg); -} -// -//-------------------------------------------------------------------------------------------------------- -// -Bool_t AliRsnDaughterCutPairArmenteros::Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const -{ -// -// Check Armenteros variables -// - if (!AliRsnDaughterCutPair::Pass(track1, track2)) return kFALSE; - - Double_t qt, alpha; - Compute(track1, track2, qt, alpha); - - if (qt < fQtMin || qt > fQtMax) return kFALSE; - if (alpha < fAlphaMin || alpha > fAlphaMax) return kFALSE; - return kTRUE; -} diff --git a/PWG2/RESONANCES/AliRsnDaughterCutPair.h b/PWG2/RESONANCES/AliRsnDaughterCutPair.h deleted file mode 100644 index 51af5159729..00000000000 --- a/PWG2/RESONANCES/AliRsnDaughterCutPair.h +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice * - **************************************************************************/ - -//------------------------------------------------------------------------- -// Class AliRsnDaughterCutPair -// -// Implementation of various cut which can be applied -// during resonance analysis. -// First is the virtual base class. -// -// author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) -//------------------------------------------------------------------------- - -#ifndef ALIRSNDAUGHTERCUTPAIR_H -#define ALIRSNDAUGHTERCUTPAIR_H - -class AliRsnDaughter; - -class AliRsnDaughterCutPair : public TObject -{ -public: - AliRsnDaughterCutPair() {} - virtual ~AliRsnDaughterCutPair() {} - virtual Bool_t Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const; -private: - ClassDef(AliRsnDaughterCutPair,1) -}; -// -//------------------------------------------------------------------------- -// -class AliRsnDaughterCutPairPt : public AliRsnDaughterCutPair -{ -public: - AliRsnDaughterCutPairPt(Double_t min, Double_t max) : fPtMin(min),fPtMax(max) {} - virtual ~AliRsnDaughterCutPairPt() {} - virtual Bool_t Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const; -protected: - Double_t fPtMin; // smallest allowed Pt - Double_t fPtMax; // largest allowed Pt - - ClassDef(AliRsnDaughterCutPairPt,1) -}; -// -//------------------------------------------------------------------------- -// -class AliRsnDaughterCutPairAngle : public AliRsnDaughterCutPair -{ -public: - AliRsnDaughterCutPairAngle(Double_t min, Double_t max) : fAngleMin(min),fAngleMax(max) {} - virtual ~AliRsnDaughterCutPairAngle() {} - virtual Bool_t Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const; -protected: - Double_t fAngleMin; // smallest allowed relative angle - Double_t fAngleMax; // largest allowed relative angle - - ClassDef(AliRsnDaughterCutPairAngle,1) -}; -// -//------------------------------------------------------------------------- -// -class AliRsnDaughterCutPairArmenteros : public AliRsnDaughterCutPair -{ -public: - AliRsnDaughterCutPairArmenteros(Double_t qMin, Double_t qMax, Double_t aMin, Double_t aMax) : - fQtMin(qMin),fQtMax(qMax),fAlphaMin(aMin),fAlphaMax(aMax) {} - virtual ~AliRsnDaughterCutPairArmenteros() {} - virtual Bool_t Pass(AliRsnDaughter *track1, AliRsnDaughter *track2) const; - void Compute(AliRsnDaughter *track1, AliRsnDaughter *track2, Double_t &qt, Double_t &alpha) const; -private: - Double_t fQtMin; // minimum Qt - Double_t fQtMax; // minimum Qt - Double_t fAlphaMin; // minimum alpha - Double_t fAlphaMax; // minimum alpha - - ClassDef(AliRsnDaughterCutPairArmenteros,1) -}; - -#endif diff --git a/PWG2/RESONANCES/AliRsnParticle.cxx b/PWG2/RESONANCES/AliRsnParticle.cxx deleted file mode 100644 index d40140fb837..00000000000 --- a/PWG2/RESONANCES/AliRsnParticle.cxx +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * * - * Author: The ALICE Off-line Project. * - * Contributors are mentioned in the code where appropriate. * - * * - * Permission to use, copy, modify and distribute this software and its * - * documentation strictly for non-commercial purposes is hereby granted * - * without fee, provided that the above copyright notice appears in all * - * copies and that both the copyright notice and this permission notice * - * appear in the supporting documentation. The authors make no claims * - * about the suitability of this software for any purpose. It is * - * provided "as is" without express or implied warranty. * - **************************************************************************/ - -// *********************** -// *** AliRsnParticle **** -// *********************** -// -// This is a light-weight class which contains -// informations from a MC particle, needed for resonance analysis. -// -// author: A. Pulvirenti --- email: alberto.pulvirenti@ct.infn.it - - -#include - -#include "AliLog.h" - -#include "AliRsnParticle.h" - -ClassImp(AliRsnParticle) - -//_____________________________________________________________________________ -AliRsnParticle::AliRsnParticle() : - fPDG(0), - fMother(-1), - fMotherPDG(0) -{ -//========================================================= -// Default constructor. -// Initializes all data-members with meaningless values. -//========================================================= -} - -//_____________________________________________________________________________ -void AliRsnParticle::Adopt(TParticle *particle) -{ -//========================================================= -// Copies data from a TParticle into "this": -// - PDG code -// - GEANT label of mother (if any, otherwise -1) -// If the argument is NULL, nothing is done, and an alert -// is given by the method. -//========================================================= - - if (!particle) { - AliError("NULL argument passed. Nothing done."); - return; - } - - fPDG = particle->GetPdgCode(); - fMother = particle->GetFirstMother(); - fMotherPDG = (Short_t)0; -} diff --git a/PWG2/RESONANCES/AliRsnParticle.h b/PWG2/RESONANCES/AliRsnParticle.h deleted file mode 100644 index b6158777ad7..00000000000 --- a/PWG2/RESONANCES/AliRsnParticle.h +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice * - **************************************************************************/ - -//------------------------------------------------------------------------- -// Class AliRsnParticle -// -// A simple object which describes a reconstructed track -// with some references to its related generated particle -// and some facilities which could help in composing its -// 4-momentum, for resonance study. -// -// author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) -//------------------------------------------------------------------------- - -#ifndef ALIRSNPARTICLE_H -#define ALIRSNPARTICLE_H - -class TParticle; - -class AliRsnParticle : public TObject -{ -public: - - AliRsnParticle(); - virtual ~AliRsnParticle() { } - - void Adopt(TParticle *part); - - Int_t PDG() const {return fPDG;} - Int_t Mother() const {return fMother;} - Short_t MotherPDG() const {return fMotherPDG;} - void SetPDG(Int_t pdg) {fPDG = pdg;} - void SetMother(Int_t mlabel) {fMother = mlabel;} - void SetMotherPDG(Int_t pdg) {fMotherPDG = (Short_t)pdg;} - -private: - - Int_t fPDG; // PDG code - Int_t fMother; // GEANT label of mother particle - Short_t fMotherPDG; // PDG code of mother particle - - ClassDef(AliRsnParticle,1) -}; - -#endif