]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muondep/AliMuonAccEffSubmitter.h
Handle calculation of the normalization factor for MSL and MSH (Diego)
[u/mrichter/AliRoot.git] / PWG / muondep / AliMuonAccEffSubmitter.h
1 #ifndef ALIMUONACCEFFSUBMITTER_H
2 #define ALIMUONACCEFFSUBMITTER_H
3
4 //
5 // AliMuonAccEffSubmitter : a class to help submit Acc x Eff simulations
6 // anchored to real runs for J/psi, upsilon, single muons, etc...
7 //
8 // author: Laurent Aphecetche (Subatech)
9 //
10
11 #include "AliMuonGridSubmitter.h"
12
13 class AliMuonAccEffSubmitter : public AliMuonGridSubmitter
14 {
15 public:
16   AliMuonAccEffSubmitter(const char* generator="GenParamCustom");
17
18   virtual Bool_t Generate(const char* jdlname) const;
19   virtual Bool_t Run(const char* mode);
20
21   virtual ~AliMuonAccEffSubmitter();
22
23   void MakeNofEventsPropToTriggerCount(const char* trigger="CMUL7-B-NOPF-MUON", Float_t ratio=1.0);
24   
25   void MakeNofEventsFixed(Int_t nevents);
26   
27   void UseOCDBSnapshots(Bool_t flag);
28   
29   void UseExternalConfig(const char* externalConfigFullFilePath);
30   
31   void UseAODMerging(Bool_t flag);
32   
33   Bool_t Merge(Int_t stage, Bool_t dryRun=kTRUE);
34
35   Int_t Submit(Bool_t dryRun=kTRUE);
36   
37   TString RunJDLName() const { return "run.jdl"; }
38
39   TString MergeJDLName(Bool_t final) const { return (final ? "AOD_merge_final.jdl" : "AOD_merge.jdl"); }
40
41   virtual void Print(Option_t* opt="") const;
42
43   void SetSplitMaxInputFileNumber(Int_t n) { fSplitMaxInputFileNumber = n; }
44   
45   Int_t GetSplitMaxInputFileNumber() const { return fSplitMaxInputFileNumber; }
46   
47   Int_t CompactMode() const { return fCompactMode; }
48   
49   void SetCompactMode(Int_t mode) { fCompactMode=mode; }
50   
51   Bool_t MakeOCDBSnapshots();
52   
53   void SetOCDBPath(const char* ocdbPath);
54
55   void SetOCDBSnapshotDir(const char* dir);
56
57   Bool_t SetGenerator(const char* generator);
58
59   void CleanLocal(const char* excludeList="OCDB_") const;
60   
61   Int_t MaxEventsPerChunk() const { return fMaxEventsPerChunk; }
62   void SetMaxEventsPerChunk(Int_t n) { fMaxEventsPerChunk = n; }
63
64   TString OCDBPath() const { return GetMapValue("OCDBPath"); }
65   
66   TString SnapshotDir() const { return GetMapValue("OCDBsnapshot"); }
67
68 private:
69   
70   Bool_t GenerateRunJDL(const char* name) const;
71   
72   Bool_t GenerateMergeJDL(const char* name) const;
73   
74   TString ReferenceTrigger() const { return GetMapValue("ReferenceTrigger"); }
75   
76   void UpdateLocalFileList(Bool_t clearSnapshots=kFALSE);
77
78 private:
79   AliMuonAccEffSubmitter(const AliMuonAccEffSubmitter& rhs);
80   AliMuonAccEffSubmitter& operator=(const AliMuonAccEffSubmitter& rhs);
81   
82 private:
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
93   
94   ClassDef(AliMuonAccEffSubmitter,2) // Helper class to submit AccxEff single particle simulations
95 };
96
97 #endif
98