StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St2011W_trigger.cxx
1 // $Id: St2011W_trigger.cxx,v 1.2 2011/02/25 06:03:52 stevens4 Exp $
2 //
3 //*-- Author : Ross Corliss, MIT
4 
5 #include "St2011WMaker.h"
6 #include <StMuDSTMaker/COMMON/StMuDstMaker.h>
7 
8 //________________________________________________
9 //________________________________________________
10 bool
11 St2011WMaker::passes_L0(){
12  /*
13  In 2011, L2W fed off the BHT3 L0 trigger, which required a single
14  high tower to have an ADC of greater than 30. This is the default
15  threshold, but can be set from the macro if a different value is
16  needed.
17  */
18 
19  StMuEvent* muEve = mMuDstMaker->muDst()->event();
20  for (int m=0;m<300;m++)
21  if(muEve->emcTriggerDetector().highTower(m)>par_l0emulAdcThresh) return true;
22  return false;
23 }
24 
25 //________________________________________________
26 //________________________________________________
27 bool
28 St2011WMaker::passes_L2(){
29  /*
30  In 2011, the L2W trigger required a 2x2 patch of barrel towers
31  where one tower has more than 5.0GeV and the sum of all four is
32  E_T>12.0GeV. These thresholds are the defaults, but can be set
33  from the macro if a different value is needed.
34  */
35  for (int i=0;i<mxBtow;i++)
36  if (wEve->bemc.statTile[0][i]==0)//zero means good
37  if (wEve->bemc.eneTile[0][i]>par_l2emulSeedThresh){
38  int ieta=-1; int iphi=-1;
39  float etaF=positionBtow[i].Eta();
40  float phiF=positionBtow[i].Phi();
41  L2algoEtaPhi2IJ(etaF, phiF,ieta,iphi);
42  WeveCluster c=maxBtow2x2(ieta,iphi,0);
43  if (c.ET>par_l2emulClusterThresh) return true;
44  }
45  return false;
46 }
47 
48  void
49  St2011WMaker::patchToEtaPhi(int patch, int*eta, int*phi)
50  {
51  if (patch<0 || patch>299)
52  {
53  printf("patchToEtaPhi p=%d, out of range. Eta phi not defined.\n",patch);
54  return;
55  }
56  if (patch<150)
57  {
58  int m=14-patch/10;
59  int n=patch%10;
60  *eta=n/2+5;
61  *phi=n%2+m*2;
62  }
63  else
64  {
65  int m=29-patch/10;
66  int n=patch%10;
67  *eta=4-n/2;
68  *phi=1-n%2+m*2;
69  }
70  return;
71  }
72 
73 //$Log: St2011W_trigger.cxx,v $
74 //Revision 1.2 2011/02/25 06:03:52 stevens4
75 //addes some histos and enabled running on MC
76 //
77 //Revision 1.1 2011/02/10 20:33:23 balewski
78 //start
79 //
StMuDst * muDst()
Definition: StMuDstMaker.h:425
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
Definition: StMuDst.h:320