1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 //____________________________________________________________________
17 // This class implements the FMD offline trigger as requested for
18 // ALICE first physics.
23 #include "AliFMDOfflineTrigger.h"
25 #include "AliESDFMD.h"
27 //____________________________________________________________________
28 ClassImp(AliFMDOfflineTrigger)
30 ; // This is here to keep Emacs for indenting the next line
33 //____________________________________________________________________
34 AliFMDOfflineTrigger::AliFMDOfflineTrigger() :
42 //____________________________________________________________________
43 AliFMDOfflineTrigger::AliFMDOfflineTrigger(const AliFMDOfflineTrigger& o)
52 //____________________________________________________________________
54 AliFMDOfflineTrigger::operator=(const AliFMDOfflineTrigger& /*o*/)
56 // Assignment operator
59 //_____________________________________________________________________
60 Bool_t AliFMDOfflineTrigger::ASideHasHit(AliESDFMD* fmd) {
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;
75 totalMult = totalMult + mult;
78 if( totalMult > fHitCut) {
90 //_____________________________________________________________________
91 Bool_t AliFMDOfflineTrigger::CSideHasHit(AliESDFMD* fmd) {
93 Float_t totalMult = 0;
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;
106 totalMult = totalMult + mult;
109 if( totalMult > fHitCut) {
120 //____________________________________________________________________