]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
new opt to set Align and RecoParam spec. storages + flag to consider decays as fake...
authorpcrochet <Philippe.Crochet@cern.ch>
Thu, 9 Oct 2014 17:56:15 +0000 (19:56 +0200)
committerpcrochet <Philippe.Crochet@cern.ch>
Thu, 9 Oct 2014 17:56:15 +0000 (19:56 +0200)
PWG/muondep/AliAnalysisTaskESDMCLabelAddition.cxx
PWG/muondep/AliAnalysisTaskESDMCLabelAddition.h

index cd70fe3c9c76b37d9d24affefc99565ddd1126cb..2f4d6a83b8968b57af1715a9d9d20a9ed434bbbb 100644 (file)
@@ -53,12 +53,15 @@ ClassImp(AliAnalysisTaskESDMCLabelAddition)
 AliAnalysisTaskESDMCLabelAddition::AliAnalysisTaskESDMCLabelAddition():
 AliAnalysisTaskSE(),
 fDefaultStorage(""),
+fAlignOCDBpath(""),
+fRecoParamOCDBpath(""),
 fRequestedStationMask(0),
 fRequest2ChInSameSt45(kFALSE),
 fExternalTrkSigmaCut(-1.),
 fSigmaCut(-1.),
 fExternalTrgSigmaCut(-1.),
-fSigmaCutTrig(-1.)
+fSigmaCutTrig(-1.),
+fDecayAsFake(kFALSE)
 {
   /// Default constructor
 }
@@ -68,12 +71,15 @@ fSigmaCutTrig(-1.)
 AliAnalysisTaskESDMCLabelAddition::AliAnalysisTaskESDMCLabelAddition(const char* name):
 AliAnalysisTaskSE(name),
 fDefaultStorage("raw://"),
+fAlignOCDBpath(""),
+fRecoParamOCDBpath(""),
 fRequestedStationMask(0),
 fRequest2ChInSameSt45(kFALSE),
 fExternalTrkSigmaCut(-1.),
 fSigmaCut(-1.),
 fExternalTrgSigmaCut(-1.),
-fSigmaCutTrig(-1.)
+fSigmaCutTrig(-1.),
+fDecayAsFake(kFALSE)
 {
   /// Constructor
 }
@@ -97,7 +103,11 @@ void AliAnalysisTaskESDMCLabelAddition::NotifyRun()
   // set OCDB location
   AliCDBManager* cdbm = AliCDBManager::Instance();
   if (cdbm->IsDefaultStorageSet()) printf("MCLabelAddition: CDB default storage already set!\n");
-  else cdbm->SetDefaultStorage(fDefaultStorage.Data());
+  else {
+    cdbm->SetDefaultStorage(fDefaultStorage.Data());
+    if (!fAlignOCDBpath.IsNull()) cdbm->SetSpecificStorage("MUON/Align/Data",fAlignOCDBpath.Data());
+    if (!fRecoParamOCDBpath.IsNull()) cdbm->SetSpecificStorage("MUON/Calib/RecoParam",fRecoParamOCDBpath.Data());
+  }
   if (cdbm->GetRun() > -1) printf("MCLabelAddition: run number already set!\n");
   else cdbm->SetRun(fCurrentRunNumber);
   
@@ -250,7 +260,7 @@ void AliAnalysisTaskESDMCLabelAddition::UserExec(Option_t */*option*/)
        esdTrack->SetBit(BIT(22), kFALSE);
        esdTrack->SetBit(BIT(23), isMatchedYet);
        
-      } else if (decayLabel >= 0) {
+      } else if (decayLabel >= 0 && !fDecayAsFake) {
        
        esdTrack->SetLabel(decayLabel);
        esdTrack->SetBit(BIT(22), kTRUE);
index 5cf73454bf70724edb0a4819ca447a09dd94dab0..ce37af32dec8582544bbbe006f507bc384524caa 100644 (file)
@@ -29,12 +29,21 @@ public:
   /// Set location of the default OCDB storage (if not set use "raw://")
   void SetDefaultStorage(const char* ocdbPath) { fDefaultStorage = ocdbPath; }
   
+  /// Set the OCDB path to the alignment file used in the reco (if not set use default storage)
+  void SetAlignStorage(const char* ocdbPath) { fAlignOCDBpath = ocdbPath; }
+  
+  /// Set the OCDB path to the recoParam file used in the reco (if not set use default storage)
+  void SetRecoParamStorage(const char* ocdbPath) { fRecoParamOCDBpath = ocdbPath; }
+  
   /// Set the sigma cut to associate clusters with TrackRefs by position (instead of using recoParam)
   void SetExternalTrkSigmaCut(Double_t cut) { fExternalTrkSigmaCut = cut; }
   
   /// Set the sigma cut to associate trigger to triggerable track by position (instead of using recoParam)
   void SetExternalTrgSigmaCut(Double_t cut) { fExternalTrgSigmaCut = cut; }
   
+  /// Set the flag to consider decays as fake tracks or not
+  void DecayAsFake(Bool_t flag = kTRUE) { fDecayAsFake = flag; }
+  
   
 private:
   
@@ -56,14 +65,17 @@ private:
                          Bool_t &isReconstructible, Int_t &lastCh) const;
   
   TString  fDefaultStorage;       ///< location of the default OCDB storage
+  TString  fAlignOCDBpath;        ///< OCDB path to the alignment file
+  TString  fRecoParamOCDBpath;    ///< OCDB path to the recoParam file
   UInt_t   fRequestedStationMask; //!< mask of requested stations
   Bool_t   fRequest2ChInSameSt45; //!< 2 fired chambers requested in the same station (4 or 5) or not
   Double_t fExternalTrkSigmaCut;  ///< sigma cut to associate clusters with TrackRefs (instead of using recoParam)
   Double_t fSigmaCut;             //!< sigma cut to associate clusters with TrackRefs
   Double_t fExternalTrgSigmaCut;  ///< sigma cut to associate trigger to triggerable track (instead of using recoParam)
   Double_t fSigmaCutTrig;         //!< sigma cut to associate trigger to triggerable track
-      
-  ClassDef(AliAnalysisTaskESDMCLabelAddition, 3); // Analysis task for standard ESD filtering
+  Bool_t   fDecayAsFake;          ///< consider decays as fake tracks or not
+  
+  ClassDef(AliAnalysisTaskESDMCLabelAddition, 5); // Analysis task for standard ESD filtering
   
 };