]>
Commit | Line | Data |
---|---|---|
1183ee65 | 1 | #include "../AliHLTTriggerDetectorGeomRectangle.h" |
2 | #include "../AliHLTTriggerDecisionParameters.h" | |
3 | ||
4 | void CreateDetectorGeomsPhos() | |
5 | { | |
6 | ||
7 | bool mod[5] = {false, false, true, true, true}; | |
8 | ||
9 | TObjArray *geomConf = new TObjArray(); | |
10 | ||
11 | // geomConf->SetName("GeomConfig"); | |
12 | ||
13 | ||
14 | // Make the geometry objects | |
15 | for(int i = 0; i < 5; i++) | |
16 | { | |
17 | if(mod[i]) | |
18 | { | |
19 | AliHLTTriggerDetectorGeom *tmpDet= new AliHLTTriggerDetectorGeomRectangle(); | |
20 | ||
21 | char tmpName[128]; | |
22 | sprintf(tmpName, "PHOS_%d", i); | |
23 | TString name = tmpName; | |
24 | ||
25 | tmpDet->SetDetName(name); | |
26 | tmpDet->SetEtaMin(-0.12); | |
27 | tmpDet->SetEtaMax(0.12); | |
28 | float phiModule = 230 + i*20; | |
29 | float phiMin = (phiModule - 10)*TMath::DegToRad(); | |
30 | float phiMax = (phiModule + 10)*TMath::DegToRad(); | |
31 | tmpDet->SetPhiMin(phiMin); | |
32 | tmpDet->SetPhiMax(phiMax); | |
33 | ||
34 | Double_t nX = TMath::Cos(TMath::DegToRad()*phiModule); | |
35 | Double_t nY = TMath::Sin(TMath::DegToRad()*phiModule); | |
36 | Double_t nZ = 0; | |
37 | Double_t normVector[3] = {nX, nY, nZ}; | |
38 | ||
39 | Double_t pX = TMath::Cos(TMath::DegToRad()*phiModule)*460; | |
40 | Double_t pY = TMath::Sin(TMath::DegToRad()*phiModule)*460; | |
41 | Double_t pZ = 0; | |
42 | Double_t initialPoint[3] = {pX, pY, pZ}; | |
43 | ||
44 | tmpDet->SetNormVector(normVector); | |
45 | tmpDet->SetInitialPoint(initialPoint); | |
46 | tmpDet->PrintDetectorGeom(cout); | |
47 | geomConf->AddLast(tmpDet); | |
48 | } | |
49 | } | |
50 | ||
51 | // Make the decision object | |
52 | ||
53 | AliHLTTriggerDecisionParameters *pars = new AliHLTTriggerDecisionParameters(); | |
54 | pars->SetTriggerName(TString("PHOSgeomtrigger")); | |
55 | pars->SetReadoutListParameter(AliHLTReadoutList::kPHOS); | |
56 | pars->SetDescription(TString("Track in PHOS")); | |
57 | ||
58 | geomConf->AddLast(pars); | |
59 | ||
60 | TFile *fin = TFile::Open("PHOSgeomtrigger.root", "RECREATE"); | |
61 | ||
62 | geomConf->Write("GeomConf", TObject::kSingleKey); | |
63 | ||
64 | } |