1 /**************************************************************************
2 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /* $Id: AliVAnalysisMuon.cxx 47782 2011-02-24 18:37:31Z martinez $ */
18 //-----------------------------------------------------------------------------
19 /// \class AliVAnalysisMuon
20 /// Base class with utilities for muon analysis
22 /// \author Diego Stocco
23 //-----------------------------------------------------------------------------
25 #include "AliVAnalysisMuon.h"
35 #include "TObjString.h"
36 #include "TObjArray.h"
37 #include "THashList.h"
39 //#include "TMCProcess.h"
40 #include "TLorentzVector.h"
44 #include "AliInputEventHandler.h"
45 #include "AliCentrality.h"
47 #include "AliAODEvent.h"
48 #include "AliAODTrack.h"
49 #include "AliAODMCParticle.h"
50 #include "AliMCEvent.h"
51 #include "AliMCParticle.h"
52 //#include "AliStack.h"
53 #include "AliESDEvent.h"
54 #include "AliESDMuonTrack.h"
55 #include "AliCounterCollection.h"
56 #include "AliVVertex.h"
59 #include "AliAnalysisManager.h"
60 #include "AliAnalysisTaskSE.h"
61 #include "AliAnalysisDataSlot.h"
62 #include "AliAnalysisDataContainer.h"
65 #include "AliCFGridSparse.h"
68 #include "AliMergeableCollection.h"
69 #include "AliMuonEventCuts.h"
70 #include "AliMuonTrackCuts.h"
71 #include "AliMuonPairCuts.h"
72 #include "AliAnalysisMuonUtility.h"
75 ClassImp(AliVAnalysisMuon) // Class implementation in ROOT context
79 //________________________________________________________________________
80 AliVAnalysisMuon::AliVAnalysisMuon() :
87 fTerminateOptions(0x0),
93 fMergeableCollection(0x0),
95 fOutputPrototypeList(0x0)
100 //________________________________________________________________________
101 AliVAnalysisMuon::AliVAnalysisMuon(const char *name, const AliMuonTrackCuts& trackCuts, const AliMuonPairCuts& pairCuts) :
102 AliAnalysisTaskSE(name),
103 fMuonEventCuts(new AliMuonEventCuts("stdEventCuts","stdEventCuts")),
104 fMuonTrackCuts(new AliMuonTrackCuts(trackCuts)),
105 fMuonPairCuts(new AliMuonPairCuts(pairCuts)),
108 fTerminateOptions(0x0),
112 fWeights(new THashList()),
114 fMergeableCollection(0x0),
116 fOutputPrototypeList(0x0)
123 SetTrigClassPatterns("");
124 SetCentralityClasses();
125 fWeights->SetOwner();
127 DefineOutput(1, TObjArray::Class());
130 //________________________________________________________________________
131 AliVAnalysisMuon::AliVAnalysisMuon(const char *name, const AliMuonTrackCuts& trackCuts) :
132 AliAnalysisTaskSE(name),
133 fMuonEventCuts(new AliMuonEventCuts("stdEventCuts","stdEventCuts")),
134 fMuonTrackCuts(new AliMuonTrackCuts(trackCuts)),
138 fTerminateOptions(0x0),
142 fWeights(new THashList()),
144 fMergeableCollection(0x0),
146 fOutputPrototypeList(0x0)
153 SetTrigClassPatterns("");
154 SetCentralityClasses();
155 fWeights->SetOwner();
157 DefineOutput(1, TObjArray::Class());
161 //________________________________________________________________________
162 AliVAnalysisMuon::AliVAnalysisMuon(const char *name, const AliMuonPairCuts& pairCuts) :
163 AliAnalysisTaskSE(name),
164 fMuonEventCuts(new AliMuonEventCuts("stdEventCuts","stdEventCuts")),
166 fMuonPairCuts(new AliMuonPairCuts(pairCuts)),
169 fTerminateOptions(0x0),
173 fWeights(new THashList()),
175 fMergeableCollection(0x0),
177 fOutputPrototypeList(0x0)
183 SetTrigClassPatterns("");
184 SetCentralityClasses();
185 fWeights->SetOwner();
187 DefineOutput(1, TObjArray::Class());
191 //________________________________________________________________________
192 AliVAnalysisMuon::~AliVAnalysisMuon()
198 delete fMuonEventCuts;
199 delete fMuonTrackCuts;
200 delete fMuonPairCuts;
201 delete fTerminateOptions;
206 delete fOutputPrototypeList;
209 // For proof: do not delete output containers
210 if ( ! AliAnalysisManager::GetAnalysisManager() || ! AliAnalysisManager::GetAnalysisManager()->IsProofMode() ) {
215 //___________________________________________________________________________
216 void AliVAnalysisMuon::FinishTaskOutput()
219 /// Remove empty histograms to reduce the number of histos to be merged
223 fMergeableCollection->PruneEmptyObjects();
225 // Add stat. info from physics selection
226 // (usefull when running on AODs)
227 if ( fInputHandler ) {
228 for ( Int_t istat=0; istat<2; istat++ ) {
229 TString statType = ( istat == 0 ) ? "ALL" : "BIN0";
230 TH2* hStat = dynamic_cast<TH2*>(fInputHandler->GetStatistics(statType.Data()));
232 TString objectName = Form("%s_%s", hStat->GetName(), GetName());
233 TH2* cloneStat = static_cast<TH2*>(hStat->Clone(objectName.Data()));
234 cloneStat->SetDirectory(0);
235 fOutputList->Add(cloneStat);
238 AliWarning("Stat histogram not available");
241 } // loop on stat type
246 //___________________________________________________________________________
247 void AliVAnalysisMuon::NotifyRun()
249 /// Set run number for cuts
250 if ( fMuonTrackCuts ) fMuonTrackCuts->SetRun(fInputHandler);
251 if ( fMuonPairCuts ) fMuonPairCuts->SetRun(fInputHandler);
254 //___________________________________________________________________________
255 void AliVAnalysisMuon::UserCreateOutputObjects()
258 /// Create output objects
260 AliInfo(Form(" CreateOutputObjects of task %s\n", GetName()));
262 fOutputList = new TObjArray();
263 fOutputList->SetOwner();
265 fEventCounters = new AliCounterCollection("eventCounters");
267 if ( ! GetCentralityClasses() ) SetCentralityClasses();
268 TString centralityClasses = "";
269 for ( Int_t icent=1; icent<=GetCentralityClasses()->GetNbins(); ++icent ) {
270 if ( ! centralityClasses.IsNull() ) centralityClasses += "/";
271 centralityClasses += GetCentralityClasses()->GetBinLabel(icent);
273 fEventCounters->AddRubric("selected", "yes/no");
274 fEventCounters->AddRubric("trigger", 100);
275 fEventCounters->AddRubric("centrality", centralityClasses);
276 fEventCounters->AddRubric("run", 10000);
277 fEventCounters->Init();
278 fOutputList->Add(fEventCounters);
280 fMergeableCollection = new AliMergeableCollection("outputObjects");
281 fOutputList->Add(fMergeableCollection);
283 PostData(1, fOutputList);
285 fMuonEventCuts->Print();
287 MyUserCreateOutputObjects();
291 //________________________________________________________________________
292 void AliVAnalysisMuon::UserExec(Option_t * /*option*/)
296 /// Called for each event
299 fAODEvent = dynamic_cast<AliAODEvent*> (InputEvent());
301 fESDEvent = dynamic_cast<AliESDEvent*> (InputEvent());
303 if ( ! fAODEvent && ! fESDEvent ) {
304 AliError ("AOD or ESD event not found. Nothing done!");
308 if ( ! fMuonEventCuts->IsSelected(fInputHandler) ) return;
310 Int_t physSel = ( fInputHandler->IsEventSelected() & AliVEvent::kAny ) ? kPhysSelPass : kPhysSelReject;
315 TObjArray* selectTrigClasses = fMuonEventCuts->GetSelectedTrigClassesInEvent(InputEvent());
317 Double_t centrality = fMuonEventCuts->GetCentrality(InputEvent());
318 Int_t centralityBin = GetCentralityClasses()->FindBin(centrality);
319 TString centralityBinLabel = GetCentralityClasses()->GetBinLabel(centralityBin);
321 TString selKey = ( physSel == kPhysSelPass ) ? "yes" : "no";
322 for ( Int_t itrig=0; itrig<selectTrigClasses->GetEntries(); ++itrig ) {
323 TString trigName = selectTrigClasses->At(itrig)->GetName();
324 fEventCounters->Count(Form("trigger:%s/selected:%s/centrality:%s/run:%i", trigName.Data(), selKey.Data(), centralityBinLabel.Data(),fCurrentRunNumber));
327 ProcessEvent(fPhysSelKeys->At(physSel)->GetName(), *selectTrigClasses, centralityBinLabel);
329 // Post final data. It will be written to a file with option "RECREATE"
330 PostData(1, fOutputList);
333 //________________________________________________________________________
334 void AliVAnalysisMuon::Terminate(Option_t *)
337 /// Draw some histogram at the end.
340 if ( ! fTerminateOptions ) SetTerminateOptions();
342 if ( gROOT->IsBatch() ) return;
344 fOutputList = dynamic_cast<TObjArray*>(GetOutputData(1));
345 if ( ! fOutputList ) return;
346 fEventCounters = static_cast<AliCounterCollection*>(fOutputList->FindObject("eventCounters"));
347 fMergeableCollection = static_cast<AliMergeableCollection*>(fOutputList->FindObject("outputObjects"));
349 if ( ! fMergeableCollection ) return;
350 AliInfo(Form("Mergeable collection size %g MB", fMergeableCollection->EstimateSize()/1024.0/1024.0));
351 if ( fTerminateOptions->At(3) ) {
352 TString sopt = fTerminateOptions->At(3)->GetName();
353 if ( sopt.Contains("verbose") ) fMergeableCollection->Print("*");
355 SetCentralityClassesFromOutput();
359 //________________________________________________________________________
360 Int_t AliVAnalysisMuon::GetParticleType(AliVParticle* track)
363 /// Get particle type from mathced MC track
366 Int_t trackSrc = kUnidentified;
367 Int_t trackLabel = track->GetLabel();
368 if ( trackLabel >= 0 ) {
369 AliVParticle* matchedMCTrack = MCEvent()->GetTrack(trackLabel);
370 if ( matchedMCTrack ) trackSrc = RecoTrackMother(matchedMCTrack);
371 } // track has MC label
376 //________________________________________________________________________
377 Int_t AliVAnalysisMuon::RecoTrackMother(AliVParticle* mcParticle)
380 /// Find track mother from kinematics
383 Int_t recoPdg = mcParticle->PdgCode();
385 // Track is not a muon
386 if ( TMath::Abs(recoPdg) != 13 ) return kRecoHadron;
388 Int_t imother = AliAnalysisMuonUtility::GetMotherIndex(mcParticle);
390 Int_t den[3] = {100, 1000, 1};
392 Int_t motherType = kDecayMu;
393 while ( imother >= 0 ) {
394 AliVParticle* part = MCEvent()->GetTrack(imother);
395 //if ( ! part ) return motherType;
397 Int_t absPdg = TMath::Abs(part->PdgCode());
399 Bool_t isPrimary = AliAnalysisMuonUtility::IsPrimary(part, MCEvent());
402 if ( absPdg == 24 ) return kWbosonMu;
404 for ( Int_t idec=0; idec<3; idec++ ) {
405 Int_t flv = (absPdg%100000)/den[idec];
406 if ( flv > 0 && flv < 4 ) return kDecayMu;
407 else if ( flv == 0 || flv > 5 ) continue;
409 if ( den[idec] == 100 ) motherType = kQuarkoniumMu;
410 else if ( flv == 4 ) motherType = kCharmMu;
411 else motherType = kBeautyMu;
412 break; // break loop on pdg code
413 // but continue the global loop to find higher mass HF
415 } // loop on pdg code
416 if ( absPdg < 10 ) break; // particle loop
419 if ( part->Zv() < -90. ) {
420 // If hadronic process => secondary
421 //if ( part->GetUniqueID() == kPHadronic ) {
427 imother = AliAnalysisMuonUtility::GetMotherIndex(part);
435 //________________________________________________________________________
436 Bool_t AliVAnalysisMuon::AddObjectToCollection(TObject* object, Int_t index)
439 /// Add object to collection
442 if ( ! fOutputPrototypeList ) {
443 fOutputPrototypeList = new TObjArray();
444 fOutputPrototypeList->SetOwner();
446 if ( fOutputPrototypeList->FindObject(object->GetName() ) ) {
447 AliWarning(Form("Object with name %s already in the list", object->GetName()));
450 if ( index < 0 ) fOutputPrototypeList->Add(object);
451 else fOutputPrototypeList->AddAtAndExpand(object, index);
456 //________________________________________________________________________
457 TObject* AliVAnalysisMuon::GetMergeableObject(TString physSel, TString trigClassName, TString centrality, TString objectName)
460 /// Get mergeable object
461 /// (create collection if necessary)
464 TString identifier = Form("/%s/%s/%s/", physSel.Data(), trigClassName.Data(), centrality.Data());
466 TObject* obj = fMergeableCollection->GetObject(identifier.Data(), objectName.Data());
468 CreateMergeableObjects(physSel, trigClassName, centrality);
469 obj = fMergeableCollection->GetObject(identifier.Data(), objectName.Data());
470 AliInfo(Form("Mergeable object collection size %g MB", fMergeableCollection->EstimateSize()/1024.0/1024.0));
475 //________________________________________________________________________
476 TObject* AliVAnalysisMuon::GetSum(TString physSel, TString trigClassNames, TString centrality, TString objectPattern)
480 /// - physSel, trigClassNames must be in the form: key1,key2
481 /// - centrality must be in the form minValue_maxValue
482 /// - objectPattern must be in the form match1,match2
483 /// meaning that the object name must contain match1 or match2
484 /// wildcard * is allowed
486 if ( ! fMergeableCollection ) return 0x0;
488 // Get centrality range
489 Int_t firstCentrality = 1;
490 Int_t lastCentrality = GetCentralityClasses()->GetNbins();
492 TObjArray* centralityRange = centrality.Tokenize("_");
493 Float_t range[2] = {0., 100.};
494 if ( centralityRange->GetEntries() >= 2 ) {
495 for ( Int_t irange=0; irange<2; ++irange ) {
496 range[irange] = ((TObjString*)centralityRange->At(irange))->GetString().Atof();
498 firstCentrality = GetCentralityClasses()->FindBin(range[0]+0.0001);
499 lastCentrality = GetCentralityClasses()->FindBin(range[1]-0.0001);
501 delete centralityRange;
503 TString sumCentralityString = "";
504 for ( Int_t icent=firstCentrality; icent<=lastCentrality; ++icent ) {
505 if ( ! sumCentralityString.IsNull() ) sumCentralityString += ",";
506 sumCentralityString += GetCentralityClasses()->GetBinLabel(icent);
509 // objectPattern.ReplaceAll(" ","");
510 // TObjArray* objPatternList = objectPattern.Tokenize("&");
511 // TObjArray objPatternMatrix(objPatternList->GetEntries());
512 // objPatternMatrix.SetOwner();
513 // for ( Int_t ikey=0; ikey<objPatternList->GetEntries(); ikey++ ) {
514 // TObjArray* subKeyList = ((TObjString*)objPatternList->At(ikey))->GetString().Tokenize(",");
515 // objPatternMatrix.AddAt(subKeyList, ikey);
517 // delete objPatternList;
520 TObjArray objectNameInCollection;
521 objectNameInCollection.SetOwner();
522 TObjArray* physSelList = physSel.Tokenize(",");
523 TObjArray* trigClassList = trigClassNames.Tokenize(",");
524 TObjArray* centralityList = sumCentralityString.Tokenize(",");
525 for ( Int_t isel=0; isel<physSelList->GetEntries(); isel++ ) {
526 for ( Int_t itrig = 0; itrig<trigClassList->GetEntries(); itrig++ ) {
527 for ( Int_t icent=0; icent<centralityList->GetEntries(); icent++ ) {
528 TString currId = Form("/%s/%s/%s/", physSelList->At(isel)->GetName(), trigClassList->At(itrig)->GetName(),centralityList->At(icent)->GetName());
529 TList* objNameList = fMergeableCollection->CreateListOfObjectNames(currId.Data());
530 for ( Int_t iobj=0; iobj<objNameList->GetEntries(); iobj++ ) {
531 TString objName = objNameList->At(iobj)->GetName();
532 if ( ! objectNameInCollection.FindObject(objName.Data()) ) objectNameInCollection.Add(new TObjString(objName.Data()));
539 delete trigClassList;
540 delete centralityList;
542 TObjArray* objPatternList = objectPattern.Tokenize(",");
544 TString matchingObjectNames = "";
545 for ( Int_t iobj=0; iobj<objectNameInCollection.GetEntries(); iobj++ ) {
546 TString objName = objectNameInCollection.At(iobj)->GetName();
547 for ( Int_t ipat=0; ipat<objPatternList->GetEntries(); ipat++ ) {
548 TString currPattern = ((TObjString*)objPatternList->At(ipat))->GetString();
549 if ( currPattern.Contains("*") ) {
550 if ( ! objName.Contains(TRegexp(currPattern.Data(),kTRUE)) ) continue;
552 else if ( objName != currPattern ) continue;
554 if ( ! matchingObjectNames.IsNull() ) matchingObjectNames.Append(",");
555 matchingObjectNames += objName;
558 delete objPatternList;
560 // for ( Int_t iobj=0; iobj<objectNameInCollection.GetEntries(); iobj++ ) {
561 // TString objName = objectNameInCollection.At(iobj)->GetName();
562 // Bool_t matchAnd = kTRUE;
563 // for ( Int_t ikey=0; ikey<objPatternMatrix.GetEntries(); ikey++ ) {
564 // TObjArray* subKeyList = (TObjArray*)objPatternMatrix.At(ikey);
565 // Bool_t matchOr = kFALSE;
566 // for ( Int_t isub=0; isub<subKeyList->GetEntries(); isub++ ) {
567 // TString subKeyString = ((TObjString*)subKeyList->At(isub))->GetString();
568 // if ( subKeyString.Contains("*") ) {
569 // if ( objName.Contains(TRegexp(subKeyString.Data())) ) {
574 // else if ( objName == subKeyString ) {
579 // if ( ! matchOr ) {
580 // matchAnd = kFALSE;
584 // if ( ! matchAnd ) continue;
585 // if ( ! matchingObjectNames.IsNull() ) matchingObjectNames.Append(",");
586 // matchingObjectNames += objName;
589 TString idPattern = Form("/%s/%s/%s/%s", physSel.Data(), trigClassNames.Data(), sumCentralityString.Data(), matchingObjectNames.Data());
590 idPattern.ReplaceAll(" ","");
592 AliDebug(1,Form("Sum pattern %s", idPattern.Data()));
594 return fMergeableCollection->GetSum(idPattern.Data());
597 //___________________________________________________________________________
598 void AliVAnalysisMuon::CreateMergeableObjects(TString physSel, TString trigClassName, TString centrality)
601 TString objectName = "";
602 TString identifier = Form("/%s/%s/%s/", physSel.Data(), trigClassName.Data(), centrality.Data());
603 for ( Int_t iobj=0; iobj<fOutputPrototypeList->GetEntries(); ++iobj ) {
604 objectName = fOutputPrototypeList->At(iobj)->GetName();
605 obj = fOutputPrototypeList->At(iobj)->Clone(objectName.Data());
606 fMergeableCollection->Adopt(identifier, obj);
611 //_______________________________________________________________________
612 Bool_t AliVAnalysisMuon::SetSparseRange(AliCFGridSparse* gridSparse,
613 Int_t ivar, TString labelName,
614 Double_t varMin, Double_t varMax,
618 /// Set range in a smart way.
619 /// Allows to select a bin from the label.
620 /// Check the bin limits.
623 // Keep for backward compatibility
625 return AliAnalysisMuonUtility::SetSparseRange(gridSparse,ivar,labelName,varMin, varMax,option);
628 //________________________________________________________________________
629 TString AliVAnalysisMuon::GetDefaultTrigClassPatterns() const
631 /// Get default trigger class patterns
632 return fMuonEventCuts->GetDefaultTrigClassPatterns();
635 //________________________________________________________________________
636 void AliVAnalysisMuon::SetTrigClassPatterns(const TString pattern)
638 /// Set trigger classes
639 TString currPattern = pattern;
640 if ( currPattern.IsNull() ) {
641 currPattern = GetDefaultTrigClassPatterns();
642 currPattern.Append(",!CMUP*"); // by default do not account for UltraPeripheral events
644 fMuonEventCuts->SetTrigClassPatterns(currPattern);
647 //________________________________________________________________________
648 TList* AliVAnalysisMuon::GetAllSelectedTrigClasses() const
650 /// Get trigger classes
651 return fMuonEventCuts->GetAllSelectedTrigClasses();
654 //________________________________________________________________________
655 void AliVAnalysisMuon::SetCentralityClasses(Int_t nCentralityBins, Double_t* centralityBins)
658 /// Set centrality classes
660 fMuonEventCuts->SetCentralityClasses(nCentralityBins, centralityBins);
663 //________________________________________________________________________
664 TAxis* AliVAnalysisMuon::GetCentralityClasses() const
667 /// Set centrality classes
669 return fMuonEventCuts->GetCentralityClasses();
672 //________________________________________________________________________
673 Bool_t AliVAnalysisMuon::SetCentralityClassesFromOutput()
676 /// Get axis of centrality classes from output key
678 if ( ! fMergeableCollection ) return kFALSE;
679 TList* centrKeyList = fMergeableCollection->CreateListOfKeys(2);
680 TObjArray centrLimitsList;
681 centrLimitsList.SetOwner();
682 if ( ! centrKeyList ) return kFALSE;
683 for ( Int_t ikey=0; ikey<centrKeyList->GetEntries(); ikey++ ) {
684 TString centr = static_cast<TObjString*>(centrKeyList->At(ikey))->GetString();
685 TObjArray* array = centr.Tokenize("_");
686 for ( Int_t ilim=0; ilim<array->GetEntries(); ilim++ ) {
687 TString currLim = static_cast<TObjString*>(array->At(ilim))->GetString();
688 if ( ! centrLimitsList.FindObject(currLim.Data()) ) centrLimitsList.Add(new TObjString(currLim));
694 // Get unsorted array
695 TArrayD bins(centrLimitsList.GetEntries());
696 for ( Int_t ibin=0; ibin<centrLimitsList.GetEntries(); ibin++ ) {
697 bins[ibin] = static_cast<TObjString*>(centrLimitsList.At(ibin))->GetString().Atof();
701 Int_t index[bins.GetSize()];
702 TMath::Sort(bins.GetSize(),bins.GetArray(),index, kFALSE);
704 TArrayD sortedBins(bins.GetSize());
705 for ( Int_t ibin=0; ibin<centrLimitsList.GetEntries(); ibin++ ) {
706 sortedBins[ibin] = bins[index[ibin]];
709 SetCentralityClasses(sortedBins.GetSize()-1, sortedBins.GetArray());
713 //________________________________________________________________________
714 void AliVAnalysisMuon::SetTerminateOptions(TString physSel, TString trigClass, TString centralityRange, TString furtherOpts)
717 /// Set terminate options
719 if ( ! fTerminateOptions ) {
720 fTerminateOptions = new TObjArray(4);
721 fTerminateOptions->SetOwner();
723 fTerminateOptions->AddAt(new TObjString(physSel), 0);
724 fTerminateOptions->AddAt(new TObjString(trigClass), 1);
725 fTerminateOptions->AddAt(new TObjString(centralityRange),2);
726 fTerminateOptions->AddLast(new TObjString(furtherOpts));
729 //________________________________________________________________________
730 void AliVAnalysisMuon::InitKeys()
735 TString chargeKeys = "MuMinus MuPlus";
736 fChargeKeys = chargeKeys.Tokenize(" ");
738 TString srcKeys = "CharmMu BeautyMu QuarkoniumMu WbosonMu DecayMu SecondaryMu Hadron Unidentified";
739 fSrcKeys = srcKeys.Tokenize(" ");
741 TString physSelKeys = "PhysSelPass PhysSelReject";
742 fPhysSelKeys = physSelKeys.Tokenize(" ");
746 //________________________________________________________________________
747 void AliVAnalysisMuon::SetWeight ( TObject* wgtObj )
750 if ( fWeights->FindObject(wgtObj->GetName()) ) {
751 AliWarning(Form("Weight object %s is already in the list",wgtObj->GetName()));
754 fWeights->Add(wgtObj);
757 //________________________________________________________________________
758 TObject* AliVAnalysisMuon::GetWeight ( const Char_t* wgtName )
761 return fWeights->FindObject(wgtName);