]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/TenderSupplies/AliPHOSTenderSupply.h
o automatic detection of 11a pass4 (Alla)
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliPHOSTenderSupply.h
1 #ifndef ALIPHOSTENDERSUPPLY_H
2 #define ALIPHOSTENDERSUPPLY_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 ////////////////////////////////////////////////////////////////////////
8 //                                                                    //
9 //  PHOS tender, apply corrections to PHOS clusters                   //
10 //  and do track matching                                             //
11 //  Author : Dmitri Peressounko (RRC KI)                              //
12 //                                                                    //
13 ////////////////////////////////////////////////////////////////////////
14
15 #include <AliTenderSupply.h>
16
17 class TVector3;
18 class AliPHOSGeometry;
19 class AliPHOSCalibData ;
20 class TH2I ;
21
22 class AliPHOSTenderSupply: public AliTenderSupply {
23   
24 public:
25   AliPHOSTenderSupply();
26   AliPHOSTenderSupply(const char *name, const AliTender *tender=NULL);
27   virtual ~AliPHOSTenderSupply();
28
29   virtual void   Init(){}
30   virtual void   ProcessEvent();
31   
32   void  SetNonlinearityVersion(const char * ver="Gustavo2005"){fNonlinearityVersion=ver;}
33   void  SetNonlinearityParams(Int_t n, const Double_t * par){
34             if(n>10){printf("Only 10 parameters allowed \n"); return ;}
35             for(Int_t i=0;i<n;i++)fNonlinearityParams[i]=par[i]; }
36   void  SetReconstructionPass(Int_t ipass=2){fRecoPass=ipass;}
37   
38   //If you want to override automatic choise of bad maps and calibration
39   void ForceUsingBadMap(const char * filename="alien:///alice/cern.ch/user/p/prsnko/BadMaps/BadMap_LHC10b.root") ;
40   void ForceUsingCalibration(const char * filename="alien:///alice/cern.ch/user/p/prsnko/Recalibrations/LHC10b_pass1.root") ;
41
42 protected:
43   AliPHOSTenderSupply(const AliPHOSTenderSupply&c);
44   AliPHOSTenderSupply& operator= (const AliPHOSTenderSupply&c);
45   void   InitTender();
46   void   FindTrackMatching(Int_t mod,TVector3 *locpos,Double_t &dx, Double_t &dz, Double_t &pttrack, Int_t &charge); 
47   Float_t CorrectNonlinearity(Float_t en) ;
48   Double_t TestCPV(Double_t dx, Double_t dz, Double_t pt, Int_t charge) ;
49   Double_t TestLambda(Double_t pt,Double_t l1,Double_t l2) ;
50   Bool_t IsGoodChannel(Int_t mod, Int_t ix, Int_t iz) ;
51
52 private:
53
54   TString fOCDBpass ;                        //! Pass to OCDB recalibration object, local or alien
55   TString fNonlinearityVersion;              //! Version of non-linearity correction to aaply
56   AliPHOSGeometry   *fPHOSGeo;               //! PHOS geometry
57   Double_t fNonlinearityParams[10] ;         //! Parameters for non-linearity calculation
58   TH2I * fPHOSBadMap[5] ;                    //! Bad channels map
59   Int_t fRunNumber ;                         //! Current run number
60   Int_t fRecoPass ;                          //! Reconstruction pass
61   Bool_t fUsePrivateBadMap ;
62   Bool_t fUsePrivateCalib ;
63   
64   AliPHOSCalibData *fPHOSCalibData;          //! PHOS calibration object
65
66  
67   ClassDef(AliPHOSTenderSupply, 1); // PHOS tender task
68 };
69
70
71 #endif
72