AliHMPIDParam* AliHMPIDParam::fgInstance=0x0; //singleton pointer
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPIDParam::AliHMPIDParam():TNamed("HmpidParam","default version")
+AliHMPIDParam::AliHMPIDParam(Bool_t noGeo=kFALSE):TNamed("HmpidParam","default version")
{
// Here all the intitializition is taken place when AliHMPIDParam::Instance() is invoked for the first time.
-// In particulare, matrices to be used for LORS<->MARS trasnformations are initialized from TGeo structure.
+// In particular, matrices to be used for LORS<->MARS trasnformations are initialized from TGeo structure.
// Note that TGeoManager should be already initialized from geometry.root file
-if(!gGeoManager)
-{
- TGeoManager::Import("geometry.root");
- if(!gGeoManager) AliFatal("!!!!!!No geometry loaded!!!!!!!");
-}
-
+ if(noGeo==kTRUE){fgCellX=0.8;fgCellY=0.84;}
+
+ if(noGeo==kFALSE && !gGeoManager)
+ {
+ TGeoManager::Import("geometry.root");
+ if(!gGeoManager) AliFatal("!!!!!!No geometry loaded!!!!!!!");
+ }
+
+ Float_t dead=2.6;// cm of the dead zones between PCs-> See 2CRC2099P1
+ TGeoVolume *pCellVol = gGeoManager->GetVolume("Hcel");
+
+ if(!pCellVol) {
+ fgCellX=0.8;fgCellY=0.84;
+ } else {
+ TGeoBBox *bcell = (TGeoBBox *)pCellVol->GetShape();
+ fgCellX=2.*bcell->GetDX(); fgCellY = 2.*bcell->GetDY();
+ }
+
+ fgPcX=80.*fgCellX; fgPcY = 48.*fgCellY;
+ fgAllX=2.*fgPcX+dead;
+ fgAllY=3.*fgPcY+2.*dead;
- Float_t dead=2.6;// cm of the dead zones between PCs-> See 2CRC2099P1
- TGeoVolume *pCellVol = gGeoManager->GetVolume("Hcel");
- if(!pCellVol) {
- fgCellX=0.8;fgCellY=0.84;
- } else {
- TGeoBBox *bcell = (TGeoBBox *)pCellVol->GetShape();
- fgCellX=2.*bcell->GetDX(); fgCellY = 2.*bcell->GetDY();
- }
- fgPcX=80.*fgCellX; fgPcY = 48.*fgCellY;
- fgAllX=2.*fgPcX+dead;
- fgAllY=3.*fgPcY+2.*dead;
+ fgkMinPcX[1]=fgPcX+dead; fgkMinPcX[3]=fgkMinPcX[1]; fgkMinPcX[5]=fgkMinPcX[3];
+ fgkMaxPcX[0]=fgPcX; fgkMaxPcX[2]=fgkMaxPcX[0]; fgkMaxPcX[4]=fgkMaxPcX[2];
+ fgkMaxPcX[1]=fgAllX; fgkMaxPcX[3]=fgkMaxPcX[1]; fgkMaxPcX[5]=fgkMaxPcX[3];
- fgkMinPcX[1]=fgPcX+dead; fgkMinPcX[3]=fgkMinPcX[1]; fgkMinPcX[5]=fgkMinPcX[3];
- fgkMaxPcX[0]=fgPcX; fgkMaxPcX[2]=fgkMaxPcX[0]; fgkMaxPcX[4]=fgkMaxPcX[2];
- fgkMaxPcX[1]=fgAllX; fgkMaxPcX[3]=fgkMaxPcX[1]; fgkMaxPcX[5]=fgkMaxPcX[3];
-
- fgkMinPcY[2]=fgPcY+dead; fgkMinPcY[3]=fgkMinPcY[2];
- fgkMinPcY[4]=2.*fgPcY+2.*dead; fgkMinPcY[5]=fgkMinPcY[4];
- fgkMaxPcY[0]=fgPcY; fgkMaxPcY[1]=fgkMaxPcY[0];
- fgkMaxPcY[2]=2.*fgPcY+dead; fgkMaxPcY[3]=fgkMaxPcY[2];
- fgkMaxPcY[4]=fgAllY; fgkMaxPcY[5]=fgkMaxPcY[4];
+ fgkMinPcY[2]=fgPcY+dead; fgkMinPcY[3]=fgkMinPcY[2];
+ fgkMinPcY[4]=2.*fgPcY+2.*dead; fgkMinPcY[5]=fgkMinPcY[4];
+ fgkMaxPcY[0]=fgPcY; fgkMaxPcY[1]=fgkMaxPcY[0];
+ fgkMaxPcY[2]=2.*fgPcY+dead; fgkMaxPcY[3]=fgkMaxPcY[2];
+ fgkMaxPcY[4]=fgAllY; fgkMaxPcY[5]=fgkMaxPcY[4];
fX=0.5*SizeAllX();
fY=0.5*SizeAllY();
+
for(Int_t i=kMinCh;i<=kMaxCh;i++)
if(gGeoManager && gGeoManager->IsClosed()) {
-// fM[i]=(TGeoHMatrix*)gGeoManager->GetVolume("ALIC")->GetNode(Form("HMPID_%i",i))->GetMatrix(); // previous style
TGeoPNEntry* pne = gGeoManager->GetAlignableEntry(Form("/HMPID/Chamber%i",i));
if (!pne) {
AliErrorClass(Form("The symbolic volume %s does not correspond to any physical entry!",Form("HMPID_%i",i)));
virtual ~AliHMPIDParam() {for(Int_t i=0;i<7;i++) delete fM[i]; delete fgInstance; fgInstance=0;}
void Print(Option_t *opt="") const; //print current parametrization
static inline AliHMPIDParam* Instance(); //pointer to AliHMPIDParam singleton
-
+ static inline AliHMPIDParam* InstanceNoGeo(); //pointer to AliHMPIDParam singleton without geometry.root for MOOD, displays, ...
//geo info
enum EChamberData{kMinCh=0,kMaxCh=6,kMinPc=0,kMaxPc=5}; //Segmenation
enum EPadxData{kPadPcX=80,kMinPx=0,kMaxPx=79,kMaxPcx=159}; //Segmentation structure along x
TVector3 Norm (Int_t c )const{Double_t n[3]; Norm(c,n); return TVector3(n); }//norm
void Norm (Int_t c,Double_t *n )const{Double_t l[3]={0,0,1};fM[c]->LocalToMasterVect(l,n); }//norm
void Point (Int_t c,Double_t *p,Int_t plane )const{Lors2Mars(c,0,0,p,plane);} //point of given chamber plane
+
enum EPlaneId {kPc,kRad,kAnod}; //3 planes in chamber
static Int_t fgSigmas; //sigma Cut
+
protected:
static /*const*/ Float_t fgkMinPcX[6]; //limits PC
static /*const*/ Float_t fgkMinPcY[6]; //limits PC
static /*const*/ Float_t fgkMaxPcY[6];
static Float_t fgCellX, fgCellY, fgPcX, fgPcY, fgAllX, fgAllY;
- AliHMPIDParam(); //default ctor is protected to enforce it to be singleton
+ AliHMPIDParam(Bool_t noGeo); //default ctor is protected to enforce it to be singleton
static AliHMPIDParam *fgInstance; //static pointer to instance of AliHMPIDParam singleton
Float_t fX; //x shift of LORS with respect to rotated MARS
Float_t fY; //y shift of LORS with respect to rotated MARS
+
+
ClassDef(AliHMPIDParam,0) //HMPID main parameters class
};
// Return pointer to the AliHMPIDParam singleton.
// Arguments: none
// Returns: pointer to the instance of AliHMPIDParam or 0 if no geometry
- if(!fgInstance) new AliHMPIDParam;
+ if(!fgInstance) new AliHMPIDParam(kFALSE); //default setting for reconstruction, if no geometry.root -> AliFatal
+ return fgInstance;
+}//Instance()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDParam* AliHMPIDParam::InstanceNoGeo()
+{
+// Return pointer to the AliHMPIDParam singleton without the geometry.root.
+// Arguments: none
+// Returns: pointer to the instance of AliHMPIDParam or 0 if no geometry
+ if(!fgInstance) new AliHMPIDParam(kTRUE); //to avoid AliFatal, for MOOD and displays, use ideal geometry parameters
return fgInstance;
}//Instance()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++