1 #include "../AliHLTTriggerDetectorGeomRectangle.h"
2 #include "../AliHLTTriggerDecisionParameters.h"
4 void CreateDetectorGeomsPhos()
7 bool mod[5] = {false, false, true, true, true};
9 TObjArray *geomConf = new TObjArray();
11 // geomConf->SetName("GeomConfig");
14 // Make the geometry objects
15 for(int i = 0; i < 5; i++)
19 AliHLTTriggerDetectorGeom *tmpDet= new AliHLTTriggerDetectorGeomRectangle();
22 sprintf(tmpName, "PHOS_%d", i);
23 TString name = tmpName;
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);
34 Double_t nX = TMath::Cos(TMath::DegToRad()*phiModule);
35 Double_t nY = TMath::Sin(TMath::DegToRad()*phiModule);
37 Double_t normVector[3] = {nX, nY, nZ};
39 Double_t pX = TMath::Cos(TMath::DegToRad()*phiModule)*460;
40 Double_t pY = TMath::Sin(TMath::DegToRad()*phiModule)*460;
42 Double_t initialPoint[3] = {pX, pY, pZ};
44 tmpDet->SetNormVector(normVector);
45 tmpDet->SetInitialPoint(initialPoint);
46 tmpDet->PrintDetectorGeom(cout);
47 geomConf->AddLast(tmpDet);
51 // Make the decision object
53 AliHLTTriggerDecisionParameters *pars = new AliHLTTriggerDecisionParameters();
54 pars->SetTriggerName(TString("PHOSgeomtrigger"));
55 pars->SetReadoutListParameter(AliHLTReadoutList::kPHOS);
56 pars->SetDescription(TString("Track in PHOS"));
58 geomConf->AddLast(pars);
60 TFile *fin = TFile::Open("PHOSgeomtrigger.root", "RECREATE");
62 geomConf->Write("GeomConf", TObject::kSingleKey);