1 #ifndef ALIMUONACCEFFSUBMITTER_H
2 #define ALIMUONACCEFFSUBMITTER_H
5 // AliMuonAccEffSubmitter : a class to help submit Acc x Eff simulations
6 // anchored to real runs for J/psi, upsilon, single muons, etc...
8 // author: Laurent Aphecetche (Subatech)
11 #include "AliMuonGridSubmitter.h"
13 class AliMuonAccEffSubmitter : public AliMuonGridSubmitter
16 AliMuonAccEffSubmitter(const char* generator="GenParamCustom");
18 virtual Bool_t Generate(const char* jdlname) const;
19 virtual Bool_t Run(const char* mode);
21 virtual ~AliMuonAccEffSubmitter();
23 void MakeNofEventsPropToTriggerCount(const char* trigger="CMUL7-B-NOPF-MUON", Float_t ratio=1.0);
25 void MakeNofEventsFixed(Int_t nevents);
27 void UseOCDBSnapshots(Bool_t flag);
29 void UseExternalConfig(const char* externalConfigFullFilePath);
31 void UseAODMerging(Bool_t flag);
33 Bool_t Merge(Int_t stage, Bool_t dryRun=kTRUE);
35 Int_t Submit(Bool_t dryRun=kTRUE);
37 TString RunJDLName() const { return "run.jdl"; }
39 TString MergeJDLName(Bool_t final) const { return (final ? "AOD_merge_final.jdl" : "AOD_merge.jdl"); }
41 virtual void Print(Option_t* opt="") const;
43 void SetSplitMaxInputFileNumber(Int_t n) { fSplitMaxInputFileNumber = n; }
45 Int_t GetSplitMaxInputFileNumber() const { return fSplitMaxInputFileNumber; }
47 Int_t CompactMode() const { return fCompactMode; }
49 void SetCompactMode(Int_t mode) { fCompactMode=mode; }
51 Bool_t MakeOCDBSnapshots();
53 void SetOCDBPath(const char* ocdbPath);
55 void SetOCDBSnapshotDir(const char* dir);
57 Bool_t SetGenerator(const char* generator);
59 void CleanLocal(const char* excludeList="OCDB_") const;
61 Int_t MaxEventsPerChunk() const { return fMaxEventsPerChunk; }
62 void SetMaxEventsPerChunk(Int_t n) { fMaxEventsPerChunk = n; }
64 TString OCDBPath() const { return GetMapValue("OCDBPath"); }
66 TString SnapshotDir() const { return GetMapValue("OCDBsnapshot"); }
70 Bool_t GenerateRunJDL(const char* name) const;
72 Bool_t GenerateMergeJDL(const char* name) const;
74 TString ReferenceTrigger() const { return GetMapValue("ReferenceTrigger"); }
76 void UpdateLocalFileList(Bool_t clearSnapshots=kFALSE);
79 AliMuonAccEffSubmitter(const AliMuonAccEffSubmitter& rhs);
80 AliMuonAccEffSubmitter& operator=(const AliMuonAccEffSubmitter& rhs);
83 Float_t fRatio; // ratio simulated events vs real events
84 Int_t fFixedNofEvents; // fixed number of events to be used per run
85 Int_t fMaxEventsPerChunk; // max events to generate per subjob
86 TString fOCDBPath; // OCDB path
87 Int_t fSplitMaxInputFileNumber; // used for merging jdl
88 Int_t fCompactMode; // controls which outputs are kept (0=everything, 1=only aods)
89 TString fExternalConfig; // path to an (optional) external config file
90 Bool_t fUseOCDBSnapshots; // whether to use OCDB snapshots or not
91 TString fSnapshotDir; // directory for OCDB snapshots
92 Bool_t fUseAODMerging; // whether or not to perform (aod) merging
94 ClassDef(AliMuonAccEffSubmitter,2) // Helper class to submit AccxEff single particle simulations