FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMCMatchSelectorTask.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // -------------------------------------------------------------------------
9 // ----- FAIRMCMATCHSELECTORTASK header file -----
10 // ----- Created 18/01/10 by T.Stockmanns -----
11 // -------------------------------------------------------------------------
12 
19 #ifndef FAIRMCMATCHSELECTORTASK_H
20 #define FAIRMCMATCHSELECTORTASK_H
21 
22 #include "FairTask.h" // for FairTask, InitStatus
23 
24 #include <Rtypes.h> // for Int_t, Float_t, etc
25 #include <TString.h> // for TString
26 #include <utility> // for pair
27 #include <vector> // for vector
28 
29 class FairMCMatch;
30 
32 {
33  public:
36 
37  FairMCMatchSelectorTask(TString start, TString stop);
38 
39  FairMCMatchSelectorTask(Int_t start, Int_t stop);
40 
42  virtual ~FairMCMatchSelectorTask();
43 
45  virtual void SetParContainers();
46  virtual InitStatus Init();
47 
49  virtual void Exec(Option_t* opt);
50 
51  virtual void Finish();
52 
53  virtual void SetStart(Int_t type) { fStart = type; }
54  virtual void SetStop(Int_t type) { fStop = type; }
55 
56  virtual void SetAllWeights(Float_t weight) { fCommonWeight = weight; }
57  virtual void SetWeightStage(Int_t type, Float_t weight)
58  {
59  fStageWeights.push_back(std::pair<Int_t, Float_t>(static_cast<Int_t>(type), weight));
60  }
61 
62  virtual void SetWeights();
63 
64  private:
65  FairMCMatch* fMCMatch;
66  Int_t fStart;
67  Int_t fStop;
68 
69  TString fStartString;
70  TString fStopString;
71 
72  std::vector<std::pair<Int_t, Float_t>> fStageWeights;
73  Float_t fCommonWeight;
74 
75  void Register();
76 
77  void Reset();
78 
79  void ProduceHits();
80 
83 
84  ClassDef(FairMCMatchSelectorTask, 1);
85 };
86 
87 #endif
virtual void SetStart(Int_t type)
InitStatus
Definition: FairTask.h:33
virtual void SetWeightStage(Int_t type, Float_t weight)
virtual void SetStop(Int_t type)
virtual void Exec(Option_t *opt)
virtual void SetAllWeights(Float_t weight)