AliRoot Core  3dc7879 (3dc7879)
AliFMDOfflineTrigger.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 //____________________________________________________________________
16 //
17 // This class implements the FMD offline trigger as requested for
18 // ALICE first physics.
19 //
20 //
21 //
22 //
23 #include "AliFMDOfflineTrigger.h"
24 #include <iostream>
25 #include "AliESDFMD.h"
26 
27 //____________________________________________________________________
28 ClassImp(AliFMDOfflineTrigger)
29 #if 0
30  ; // This is here to keep Emacs for indenting the next line
31 #endif
32 
33 //____________________________________________________________________
35  fLowCut(0.2),
36  fHitCut(0.5)
37 {
38  // CTOR
39 
40 }
41 
42 //____________________________________________________________________
44  : TObject(o),
45  fLowCut(o.fLowCut),
46  fHitCut(o.fHitCut)
47 {
48 
49  // Copy Ctor
50 }
51 
52 //____________________________________________________________________
55 {
56  // Assignment operator
57  return (*this);
58 }
59 //_____________________________________________________________________
61 
62  Float_t totalMult = 0;
63  for(UShort_t det=1;det<=2;det++) {
64  Int_t nRings = (det == 1 ? 1 : 2);
65  for (UShort_t ir = 0; ir < nRings; ir++) {
66  Char_t ring = (ir == 0 ? 'I' : 'O');
67  UShort_t nsec = (ir == 0 ? 20 : 40);
68  UShort_t nstr = (ir == 0 ? 512 : 256);
69  for(UShort_t sec =0; sec < nsec; sec++) {
70  for(UShort_t strip = 0; strip < nstr; strip++) {
71  Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
72  if(mult == AliESDFMD::kInvalidMult) continue;
73 
74  if(mult > fLowCut)
75  totalMult = totalMult + mult;
76  else
77  {
78  if( totalMult > fHitCut) {
79  return kTRUE;
80  }
81  else totalMult = 0 ;
82  }
83  }
84  }
85  }
86  }
87  return kFALSE;
88 
89 }
90 //_____________________________________________________________________
92 
93  Float_t totalMult = 0;
94  UShort_t det = 3;
95  Int_t nRings = 2;
96  for (UShort_t ir = 0; ir < nRings; ir++) {
97  Char_t ring = (ir == 0 ? 'I' : 'O');
98  UShort_t nsec = (ir == 0 ? 20 : 40);
99  UShort_t nstr = (ir == 0 ? 512 : 256);
100  for(UShort_t sec =0; sec < nsec; sec++) {
101  for(UShort_t strip = 0; strip < nstr; strip++) {
102  Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
103  if(mult == AliESDFMD::kInvalidMult) continue;
104 
105  if(mult > fLowCut)
106  totalMult = totalMult + mult;
107  else
108  {
109  if( totalMult > fHitCut) {
110  return kTRUE;
111  }
112  else totalMult = 0 ;
113  }
114  }
115  }
116  }
117 
118  return kFALSE;
119 }
120 //____________________________________________________________________
121 //
122 // EOF
123 //
Bool_t CSideHasHit(AliESDFMD *fmd)
AliFMDOfflineTrigger & operator=(const AliFMDOfflineTrigger &o)
FMD offline trigger class.
Float_t Multiplicity(UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip) const
Definition: AliESDFMD.cxx:185
Bool_t ASideHasHit(AliESDFMD *fmd)
Event Summary Data for the Forward Multiplicity Detector.This stores the psuedo-multiplicity and -rap...
Definition: AliESDFMD.h:30