1 #ifndef ALIPHOSTRIGGERUTILS_H
2 #define ALIPHOSTRIGGERUTILS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //_________________________________________________________________________
7 // class to test trigger information of PHOS trigger
8 // and to model it in MC simulations
10 //*-- Author: Dmitri Peressounko (RRC "KI")
12 // --- ROOT system ---
17 // --- AliRoot header files ---
20 class AliPHOSGeoUtils;
22 class AliPHOSTriggerUtils : public TNamed {
26 AliPHOSTriggerUtils() ;
27 AliPHOSTriggerUtils(const Text_t* name, const Text_t* title="") ;
28 AliPHOSTriggerUtils(const AliPHOSTriggerUtils & utils) ;
30 virtual ~AliPHOSTriggerUtils(void){} ;
31 AliPHOSTriggerUtils & operator = (const AliPHOSTriggerUtils & rvalue) ;
33 void SetEvent(AliVEvent * event); //sets ref. to current event; inits class for new run if necessary
35 Bool_t IsFiredTrigger(AliVCluster * clu) ; //Returns true if this cluster fired PHOS trigger in event
37 Bool_t IsFiredTriggerMC(AliVCluster * clu) ; //For MC simulations without detailed PHOS trigger
38 //Returns true if this cluster should fire PHOS trigger
39 //according to parameterization of turn-on curve and trigger bad map
41 void ReadTriggerParams(const char * filename); //Read trigger info (bad map, parameterizations) from specific file, ignore OADB
43 void SetTileOffset(Int_t left=-1, Int_t right=3){fbdrL=left;fbdrR=right ;}
47 void InitForRun(Int_t run) ; //read trigger bad map for this run from OADB. Should be called once per run
48 Bool_t TestBadMap(Int_t mod, Int_t ix,Int_t iz) ; //Check if trigger is in good/active region
49 Int_t FindBranch(Int_t nX, Int_t nZ) ; //Calculate number of PHOS branch
53 Int_t fbdrL ; //Offset between cell and trigger 4x4 tile
54 Int_t fbdrR ; //in left/right (top/bottom) directions
56 Int_t fRun ; //current run number (-1 not set yet, -2 use input file set with ReadTriggerParams)
57 AliVEvent * fEvent ; //! Ref to current ESD/AOD event
59 //Trigger bad map for 5 modules
60 TH2I * fPHOSBadMap[5] ;
61 AliPHOSGeoUtils* fGeom ; //! PHOS geometry
63 //Parameterization of turn-on curves
64 TF1 * fTOC[5][8]; //parameterization of turn-on curves for 5 modules and 8 branches/module
66 Int_t fNtrg4x4 ; //! Number of triggers in current event
67 Int_t fTrMod4x4[1000]; //! trigger modules
68 Int_t fTrX4x4[1000] ; //! trigger X coordinates
69 Int_t fTrZ4x4[1000] ; //! trigger Z coordinates
72 ClassDef(AliPHOSTriggerUtils,1) // PHOS trigger analysis class
76 #endif // AliPHOSTRIGERUTILS_H