/[PAMELA software]/trieste/pamVMC/src/PamVMCVolCrossMgr.cxx
ViewVC logotype

Contents of /trieste/pamVMC/src/PamVMCVolCrossMgr.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Mar 4 12:51:18 2009 UTC (15 years, 9 months ago) by pamelats
Branch point for: MAIN, pamVMC
Initial revision

1 #include "PamVMCVolCrossMgr.h"
2
3 #include "PamVMCCrossTOF.h"
4 #include "PamVMCCrossTRK.h"
5 #include "PamVMCCrossMAG.h"
6
7 PamVMCVolCrossMgr::PamVMCVolCrossMgr(){
8
9 TString t;
10 t="S11Y";
11 fvolmap.Add(new TObjString(t), new PamVMCCrossS11Y());
12 t="S12X";
13 fvolmap.Add(new TObjString(t), new PamVMCCrossS12X());
14 t="S21X";
15 fvolmap.Add(new TObjString(t), new PamVMCCrossS21X());
16 t="S22Y";
17 fvolmap.Add(new TObjString(t), new PamVMCCrossS22Y());
18 t="S31Y";
19 fvolmap.Add(new TObjString(t), new PamVMCCrossS31Y());
20 t="S32X";
21 fvolmap.Add(new TObjString(t), new PamVMCCrossS32X());
22 t="TSPA";
23 fvolmap.Add(new TObjString(t), new PamVMCCrossTRK());
24 t="MGPL";
25 fvolmap.Add(new TObjString(t), new PamVMCCrossMGPL());
26 t="MGPA";
27 fvolmap.Add(new TObjString(t), new PamVMCCrossMGPA());
28
29 }
30
31 PamVMCVolCrossMgr * PamVMCVolCrossMgr::fcrm = 0;
32
33 PamVMCVolCrossMgr * PamVMCVolCrossMgr::Instance(){
34 if(fcrm == 0) {
35 fcrm = new PamVMCVolCrossMgr();
36 }
37 return fcrm;
38 }
39
40 Bool_t PamVMCVolCrossMgr::IsTrackGood(){
41
42
43 Bool_t S11=((PamVMCVolCross*)fvolmap.GetValue("S11Y"))->IsVolCross();
44 Bool_t S12=((PamVMCVolCross*)fvolmap.GetValue("S12X"))->IsVolCross();
45 Bool_t S1=kFALSE;
46 if (S11||S12) S1=kTRUE;
47 Bool_t S21=((PamVMCVolCross*)fvolmap.GetValue("S21X"))->IsVolCross();
48 Bool_t S22=((PamVMCVolCross*)fvolmap.GetValue("S22Y"))->IsVolCross();
49 Bool_t S2=kFALSE;
50 if(S21||S22) S2=kTRUE;
51 Bool_t S31=((PamVMCVolCross*)fvolmap.GetValue("S31Y"))->IsVolCross();
52 Bool_t S32=((PamVMCVolCross*)fvolmap.GetValue("S32X"))->IsVolCross();
53 Bool_t S3=kFALSE;
54 if(S31||S32) S3=kTRUE;
55
56 Bool_t TOF=((PamVMCVolCross*)fvolmap.GetValue("TSPA"))->IsVolCross();
57 Bool_t MGPL=((PamVMCVolCross*)fvolmap.GetValue("MGPL"))->IsVolCross();
58 Bool_t MGPA=((PamVMCVolCross*)fvolmap.GetValue("MGPA"))->IsVolCross();
59
60
61 return S1*S2*S3*TOF*MGPL*MGPA;
62 }
63
64 void PamVMCVolCrossMgr::Reset(){
65 TMapIter *n= (TMapIter *)fvolmap.MakeIterator();
66 TObject *o; while( o=(TObject *) n->Next()) {
67 ((PamVMCVolCross*)fvolmap.GetValue(o))->Reset();
68 }
69 }

  ViewVC Help
Powered by ViewVC 1.1.23