11 #ifndef STAR_StStrangeMuDstMaker
12 #define STAR_StStrangeMuDstMaker
14 #include "TClonesArray.h"
15 #include "StStrangeControllerBase.h"
48 static const char* strTypeNames[strDstT] = {
"Ev",
"V0",
"Xi",
"Kink"};
50 enum StrangeEnum {StrangeNoKeep, StrangeNoFile, StrangeWrite, StrangeRead};
56 void DoT0JitterAbort(Bool_t doIt=kTRUE);
62 void SetCorrectionFile(
char*);
63 void SetFractionFile(
char*);
68 void SetRead (
const char* eFile=0,
const char* treeName=0);
69 void SetRead (
StFile* eFiles,
const char* treeName=0);
78 void DoV0(Bool_t doIt=kTRUE);
79 void DoXi(Bool_t doIt=kTRUE);
80 void DoKink(Bool_t doIt=kTRUE);
81 void DoMc(Bool_t doIt=kTRUE);
82 void Do(Int_t dstType, Bool_t doIt=kTRUE);
83 void Do(
const char* name, Bool_t doIt=kTRUE);
89 Int_t GetNV0I(Bool_t MC=kFALSE) {
return (MC ? GetNV0Mc() : GetNV0()); }
90 Int_t GetNXiI(Bool_t MC=kFALSE) {
return (MC ? GetNXiMc() : GetNXi()); }
91 Int_t GetNKinkI(Bool_t MC=kFALSE) {
return (MC ? GetNKinkMc() : GetNKink()); }
93 Int_t GetNV0() {
return v0->GetN(); }
94 Int_t GetNV0Mc() {
return v0->GetNMc(); }
95 Int_t GetNV0Assoc() {
return v0->GetNAssoc(); }
96 Int_t GetNXi() {
return xi->GetN(); }
97 Int_t GetNXiMc() {
return xi->GetNMc(); }
98 Int_t GetNXiAssoc() {
return xi->GetNAssoc(); }
99 Int_t GetNKink() {
return kink->GetN(); }
100 Int_t GetNKinkMc() {
return kink->GetNMc(); }
101 Int_t GetNKinkAssoc() {
return kink->GetNAssoc(); }
110 StV0I* GetV0I(Int_t i=0, Bool_t MC=kFALSE);
111 StXiI* GetXiI(Int_t i=0, Bool_t MC=kFALSE);
140 TClonesArray* GetEvClonesArray();
141 TClonesArray* GetEvMcArray();
142 TClonesArray* GetCutsArray();
144 TClonesArray* GetV0ClonesArray() {
return v0->GetDataArray(); }
145 TClonesArray* GetV0McArray() {
return v0->GetMcArray(); }
146 TClonesArray* GetV0AssocArray() {
return v0->GetAssocArray(); }
147 TClonesArray* GetXiClonesArray() {
return xi->GetDataArray(); }
148 TClonesArray* GetXiMcArray() {
return xi->GetMcArray(); }
149 TClonesArray* GetXiAssocArray() {
return xi->GetAssocArray(); }
150 TClonesArray* GetKinkClonesArray() {
return kink->GetDataArray(); }
151 TClonesArray* GetKinkMcArray() {
return kink->GetMcArray(); }
152 TClonesArray* GetKinkAssocArray() {
return kink->GetAssocArray(); }
157 virtual Int_t Init();
158 virtual Int_t
Make();
159 virtual void Clear(Option_t *option=
"");
161 virtual const char *GetCVS()
const {
162 static const char cvs[]=
"Tag $Name: $ $Id: StStrangeMuDstMaker.h,v 3.21 2014/08/06 11:43:44 jeromel Exp $ built " __DATE__
" " __TIME__ ;
171 void SubDst(
const char* maker_name);
182 void SelectV0(Int_t i=-1) { v0->Select(i); }
183 void SelectXi(Int_t i=-1) { xi->Select(i); }
184 void SelectKink(Int_t i=-1) { kink->Select(i); }
185 void UnselectV0(Int_t i=-1) { v0->Unselect(i); }
186 void UnselectXi(Int_t i=-1) { xi->Unselect(i); }
187 void UnselectKink(Int_t i=-1) { kink->Unselect(i); }
192 void SetV0BufferSize(Int_t b) { bsize[
v0T]=b; }
193 void SetXiBufferSize(Int_t b) { bsize[
xiT]=b; }
194 void SetKinkBufferSize(Int_t b) { bsize[
kinkT]=b; }
207 virtual void InitReadDst();
208 virtual void InitCreateDst();
209 virtual void InitCreateSubDst();
210 virtual Int_t MakeReadDst();
211 virtual Int_t MakeCreateDst();
212 virtual Int_t MakeCreateMcDst();
213 virtual Int_t MakeCreateSubDst();
218 void SetFile(
const char* eFile);
219 void SetTreeName(
const char* treeName);
225 Int_t MatchName(
const char* name)
const;
241 Int_t bsize[strDstT];
243 Bool_t doT0JitterAbort;
245 TClonesArray* evClonesArray;
246 TClonesArray* evMcArray;
247 TClonesArray* cutsArray;
259 virtual void ClearForReal(Option_t *option=
"");
264 inline void StStrangeMuDstMaker::DoT0JitterAbort(Bool_t doIt)
265 { doT0JitterAbort = doIt; }
266 inline void StStrangeMuDstMaker::DoV0(Bool_t doIt)
268 inline void StStrangeMuDstMaker::DoXi(Bool_t doIt)
270 inline void StStrangeMuDstMaker::DoKink(Bool_t doIt)
271 { doT[
kinkT] = doIt; }
272 inline void StStrangeMuDstMaker::Do(Int_t dstType, Bool_t doIt)
273 { doT[dstType] = doIt; }
274 inline void StStrangeMuDstMaker::Do(
const char* name, Bool_t doIt)
275 { Do(MatchName(name),doIt); }
276 inline void StStrangeMuDstMaker::DoMc(Bool_t doIt)
278 inline Bool_t StStrangeMuDstMaker::GetDoMc()
280 inline TClonesArray* StStrangeMuDstMaker::GetEvClonesArray()
281 {
return evClonesArray; }
282 inline TClonesArray* StStrangeMuDstMaker::GetEvMcArray()
283 {
return evMcArray; }
284 inline TClonesArray* StStrangeMuDstMaker::GetCutsArray()
285 {
return cutsArray; }
288 {
if (dstType)
return cont[dstType]->Get(i,(
int) MC);
291 {
return (evClonesArray ?
294 {
return (evMcArray ?
298 inline StV0I* StStrangeMuDstMaker::GetV0I(Int_t i, Bool_t MC)
299 {
return (
StV0I*) (MC ? v0->GetMc(i) : v0->Get(i)); }
300 inline StXiI* StStrangeMuDstMaker::GetXiI(Int_t i, Bool_t MC)
301 {
return (
StXiI*) (MC ? xi->GetMc(i) : xi->Get(i)); }
303 {
return (
StKinkI*) (MC ? kink->GetMc(i) : kink->Get(i)); }
304 inline StV0MuDst* StStrangeMuDstMaker::GetV0(Int_t i)
306 inline StXiMuDst* StStrangeMuDstMaker::GetXi(Int_t i)
308 inline StKinkMuDst* StStrangeMuDstMaker::GetKink(Int_t i)
311 {
return (
StV0Mc*) v0->GetMc(i); }
313 {
return (
StXiMc*) xi->GetMc(i); }
315 {
return (
StKinkMc*) kink->GetMc(i); }
317 {
return v0->GetAssoc(i); }
319 {
return xi->GetAssoc(i); }
321 {
return kink->GetAssoc(i); }
322 inline TTree* StStrangeMuDstMaker::GetTree()
328 inline void StStrangeMuDstMaker::SubDst(
const char* maker_name)
333 {
return cont[dstType]; }
335 {
return cont[MatchName(name)]; }
336 inline Int_t StStrangeMuDstMaker::MatchName(
const char* name)
const
337 {
for (Int_t i=1; i<strDstT; i++)
338 if (!(strcmp(name,strTypeNames[i])))
return i;
StXiMc * GetXiMc(Int_t i=0)
StStrangeAssoc * GetKinkAssoc(Int_t i=0)
Data-MC association maps.
StV0Mc * GetV0Mc(Int_t i=0)
See StV0I interface for available functions.
virtual void Clear(Option_t *option="")
User defined functions.
void UnselectEvent()
Unselect whole event for sub DST.
StKinkI * GetKinkI(Int_t i=0, Bool_t MC=kFALSE)
Interfaces for data and MC.
StStrangeMuDst * GetDatum(Int_t i=0, Bool_t MC=kFALSE, Int_t dstType=evT)
General datum, where dstType is of the enumeration StrDstType.
StStrangeEvMuDst * GetMcEvent()
Event information.
void AbortEvent()
turn off filling of TTree for this event, regardless
StKinkMc * GetKinkMc(Int_t i=0)
See StKinkI interface for available functions.
void SelectEvent()
Select whole event for sub DST.