1 //=================================================
3 // last modified FK 6.NOV 2009
4 //=================================================
21 #include <TObjArray.h>
22 #include <TObjString.h>
29 #include <THashList.h>
32 #include "AliJConst.h"
33 #include "AliJBaseCard.h"
36 #include "AliJPhoton.h"
42 class AliJCard : public AliJBaseCard {
46 AliJCard(); // constructor
47 AliJCard(const char *filename); // constructor
48 AliJCard(const AliJCard& obj);
49 AliJCard& operator=(const AliJCard& obj);
53 void MakeFastCorrTypeIndex();
57 float Get(TString keyword, int VectorComponent=0){ return AliJBaseCard::Get(keyword, VectorComponent); }
58 float Get(corrType ctype, int VectorComponent =0); //get TVector component
59 float GetFast(corrType ctype, int VectorComponent=0); //get TVector component
60 int GetN(TString keyword){ return AliJBaseCard::GetN(keyword); } //get TVector dimension
61 int GetN(corrType ctype); //get TVector dimension
62 int GetNFast(corrType ctype); //get TVector dimension
64 //---- Collision Species --
65 float GetCollisionType() { return Get("CollisionType");}
67 //------ v e r t e x -----
69 float VertInZRange(float Z) {
70 //cout<< "zv " << Z <<" "<< ( GetBinBorder(kZVertType,0) < Z && Z < GetBinBorder(kZVertType, GetNoOfBins(kZVertType)) ) <<endl;
71 return ( GetBinBorder(kZVertType,0) < Z && Z < GetBinBorder(kZVertType, GetNoOfBins(kZVertType)) ); }
74 bool CheckEventZVetrex(double fZVertex, double ZVertErr){
75 if(Get("ZVertexRange",0)<fZVertex && fZVertex <Get("ZVertexRange",1) && (Get("MaxZVertexError") > ZVertErr)) return true;
79 int IsLessThanUpperPairPtCut(double inPairPt);
82 //--- c o r r e l a t i o n bins & borders --
83 int GetNoOfBins (corrType ctype){ return GetNFast(ctype)-1; }
84 float GetBinBorder(corrType ctype, int ii){ return GetFast(ctype,ii); }
85 int GetBin(corrType ctype, float val);
86 int GetBinFast(corrType ctype, float val);
87 double GetBinCenter(corrType ctype, int ii){ return (GetFast(ctype,ii)+GetFast(ctype,ii+1))/2.;}
89 //----- m i x i n g ----
90 int GetEventPoolDepth(int cBin){ return (int) Get("EventPoolDepth",cBin);}
91 bool SimilarVertZ(float Z1, float Z2);
92 bool SimilarMultiplicity(float mult1, float mult2);
93 bool SimilarCentrality(float c1, float c2, int cbin);
96 bool IsGoodRun(int runID);
99 bool MbTrigger(int triggin) const;
102 bool IsPhoton(AliJPhoton *g){ return g->GetProbPhot() > Get("probPhot"); }
103 float GetPhotEnergyCut(){ return Get("minEnergy"); }
105 bool InPhiRange(float Phi);
106 bool IsInZEDandThetaRange(float zedDC, float theta){
107 return (fabs(zedDC)<Get("zedRange") && fabs(kJPi/2-theta)<Get("thetaRange"));
110 bool IsInEtaRange(float eta){return fabs(eta)<Get("EtaRange"); }
111 // bool likeSgnCheck(PhJCgl *cgl1, PhJCgl *cgl2);
112 bool DeltaEtaCheck(const AliJBaseTrack *ftk1, const AliJBaseTrack *ftk2);
113 bool NotGhost(float zedDC, float PhiDC){
114 return (zedDC > Get("deltaZEDPhiDC",0) && fabs(PhiDC) > Get("deltaZEDPhiDC",1));
117 /* bool CheckCovDiagonalElements(double *element){
118 if(Get("MaxCovDiagonalElements",0)<0) return true;
119 bool isGoodTrack = true;
120 for(Int_t i=0;i<5;i++){
121 if(Get("MaxCovDiagonalElements",i) < element[i]) isGoodTrack = false;
126 bool CheckTrackParamsInTPC(int NClustersTPC,float Chi2PerClusterTPC);
128 bool CheckMinNumTPCClustPt(int NClustersTPC, float fpt);
130 bool CheckTrackImpact(float xyIm, float zIm, float fpt);
133 bool AcceptKinkDaughters(int kinkIndex){
134 if(( ! (bool) Get("AcceptKinkDaughters")) && kinkIndex > 0 ) return false;//we do not want kinks but kink findex>0
139 double GetCutOnBkgActivity(){
140 return (double) Get("CutOnBkgActivity");
143 void SetEventV3kv(double inV3kv) {feventV3kv = inV3kv;}
144 double GetEventV3kv() const {return feventV3kv;}
147 bool ReadEmcalSm(int sm){ return (bool) Get("EMCAL_SM",sm);}
148 bool ReadPhosSm(int sm){ return (bool) Get("PHOS_SM",sm);}
150 bool MixPhotonForPi0Mass() {return ((int) Get("massMix")==1);}//FK//
151 bool MixMBForPi0Mass() {return ((int) Get("massMixMB")>0);}
152 bool MixMBMBForPi0Mass() {return ((int) Get("massMixMB")==2);}
154 virtual void InitCard(); //TODO
155 void FinishCard(); // TODO
162 TString GetKeyWord(corrType ctype);
163 corrType GetCorrType( TString inStr );
165 //==== D a t a M e m b e r s ========
167 // double effPar[16];
168 // double corrCent[10]; //FK// additional scaling factor to effPar to correct on hi fcentrality
169 TH2D *fhCorr; // comment me
171 double feventV3kv; // comment me
173 vector< int > fIndexVector; //array of float number confg parameter vectors
175 Double_t **fpi0massbin; //! faster access to pi0 mass bins
177 //ClassDef(AliJCard, 1); // EMCAL for jcorran