--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+//____________________________________________________________________
+//
+// This class implements the FMD offline trigger as requested for
+// ALICE first physics.
+//
+//
+//
+//
+#include "AliFMDOfflineTrigger.h"
+#include <iostream>
+#include "AliESDFMD.h"
+
+//____________________________________________________________________
+ClassImp(AliFMDOfflineTrigger)
+#if 0
+ ; // This is here to keep Emacs for indenting the next line
+#endif
+
+//____________________________________________________________________
+AliFMDOfflineTrigger::AliFMDOfflineTrigger() :
+ fLowCut(0.2),
+ fHitCut(0.5)
+{
+ // CTOR
+
+}
+
+//____________________________________________________________________
+AliFMDOfflineTrigger::AliFMDOfflineTrigger(const AliFMDOfflineTrigger& o)
+ : TObject(o),
+ fLowCut(o.fLowCut),
+ fHitCut(o.fHitCut)
+{
+
+ // Copy Ctor
+}
+
+//____________________________________________________________________
+AliFMDOfflineTrigger&
+AliFMDOfflineTrigger::operator=(const AliFMDOfflineTrigger& o)
+{
+ // Assignment operator
+ return (*this);
+}
+//_____________________________________________________________________
+Bool_t AliFMDOfflineTrigger::ASideHasHit(AliESDFMD* fmd) {
+
+ Float_t totalMult = 0;
+ for(UShort_t det=1;det<=2;det++) {
+ Int_t nRings = (det == 1 ? 1 : 2);
+ for (UShort_t ir = 0; ir < nRings; ir++) {
+ Char_t ring = (ir == 0 ? 'I' : 'O');
+ UShort_t nsec = (ir == 0 ? 20 : 40);
+ UShort_t nstr = (ir == 0 ? 512 : 256);
+ for(UShort_t sec =0; sec < nsec; sec++) {
+ for(UShort_t strip = 0; strip < nstr; strip++) {
+ Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
+ if(mult == AliESDFMD::kInvalidMult) continue;
+
+ if(mult > fLowCut)
+ totalMult = totalMult + mult;
+ else
+ {
+ if( totalMult > fHitCut) {
+ return kTRUE;
+ }
+ else totalMult = 0 ;
+ }
+ }
+ }
+ }
+ }
+ return kFALSE;
+
+}
+//_____________________________________________________________________
+Bool_t AliFMDOfflineTrigger::CSideHasHit(AliESDFMD* fmd) {
+
+ Float_t totalMult = 0;
+ UShort_t det = 3;
+ Int_t nRings = 2;
+ for (UShort_t ir = 0; ir < nRings; ir++) {
+ Char_t ring = (ir == 0 ? 'I' : 'O');
+ UShort_t nsec = (ir == 0 ? 20 : 40);
+ UShort_t nstr = (ir == 0 ? 512 : 256);
+ for(UShort_t sec =0; sec < nsec; sec++) {
+ for(UShort_t strip = 0; strip < nstr; strip++) {
+ Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
+ if(mult == AliESDFMD::kInvalidMult) continue;
+
+ if(mult > fLowCut)
+ totalMult = totalMult + mult;
+ else
+ {
+ if( totalMult > fHitCut) {
+ return kTRUE;
+ }
+ else totalMult = 0 ;
+ }
+ }
+ }
+ }
+
+ return kFALSE;
+}
+//____________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+#ifndef ALIFMDOFFLINETRIGGER_H
+#define ALIFMDOFFLINETRIGGER_H
+/* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
+ * reserved.
+ *
+ * See cxx source for full Copyright notice
+ */
+//____________________________________________________________________
+//
+// This class implements the FMD offline trigger as requested for
+// ALICE first physics.
+//
+//
+
+
+#include "TObject.h"
+
+class AliESDFMD;
+//____________________________________________________________________
+/** @brief FMD offline trigger class
+ @ingroup FMD_rec
+*/
+class AliFMDOfflineTrigger : public TObject
+{
+public:
+ /** CTOR */
+ AliFMDOfflineTrigger();
+ /** DTOR */
+ ~AliFMDOfflineTrigger() {}
+ /** Copy ctor
+ @param o Object to copy from */
+ AliFMDOfflineTrigger(const AliFMDOfflineTrigger& o);
+
+ AliFMDOfflineTrigger& operator=(const AliFMDOfflineTrigger& o);
+
+ Bool_t ASideHasHit(AliESDFMD* fmd);
+ Bool_t CSideHasHit(AliESDFMD* fmd);
+ void SetLowCut(Float_t lowcut) {fLowCut = lowcut;}
+ void SetHitCut(Float_t hitcut) {fHitCut = hitcut;}
+private:
+
+ Float_t fLowCut;
+ Float_t fHitCut;
+
+ ClassDef(AliFMDOfflineTrigger, 1)
+};
+
+
+#endif
+//____________________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
+
+
fPulseGain(0),
fDeadMap(0),
fAltroMap(0),
- fStripRange(0),
- fOfflineTriggerLowCut(0.1),
- fOfflineTriggerHitCut(0.6)
+ fStripRange(0)
{
// Default constructor
SetVA1MipRange();
static const char* GetGainShuttleID() {return fkGainShuttleID;}
static const char* GetConditionsShuttleID() {return fkConditionsShuttleID;}
- Float_t GetOfflineTriggerLowCut() {return fOfflineTriggerLowCut;}
- Float_t GetOfflineTriggerHitCut() {return fOfflineTriggerHitCut;}
- void SetOfflineTriggerLowCut(Float_t cut) {fOfflineTriggerLowCut = cut;}
- void SetOfflineTriggerHitCut(Float_t cut) {fOfflineTriggerHitCut = cut;}
-
protected:
/** CTOR */
AliFMDParameters();
fPulseGain(o.fPulseGain),
fDeadMap(o.fDeadMap),
fAltroMap(o.fAltroMap),
- fStripRange(o.fStripRange),
- fOfflineTriggerLowCut(o.fOfflineTriggerLowCut),
- fOfflineTriggerHitCut(o.fOfflineTriggerHitCut)
+ fStripRange(o.fStripRange)
{}
/** Assignement operator
@return Reference to this */
AliFMDAltroMapping* fAltroMap; // Map of hardware
AliFMDCalibStripRange* fStripRange; // Strip range
- Float_t fOfflineTriggerLowCut; //offline trigger low cut
- Float_t fOfflineTriggerHitCut; //offline trigger hit cut
-
ClassDef(AliFMDParameters,6) // Manager of parameters
};
TTree* dummy = 0;
FillESD(dummy, clusterTree, esd);
}
-//_____________________________________________________________________
-Bool_t AliFMDReconstructor::GetFMDAsideBit(AliESDFMD* fmd) {
-
- AliFMDParameters* pars = AliFMDParameters::Instance();
- Float_t totalMult = 0;
- for(UShort_t det=1;det<=2;det++) {
- Int_t nRings = (det == 1 ? 1 : 2);
- for (UShort_t ir = 0; ir < nRings; ir++) {
- Char_t ring = (ir == 0 ? 'I' : 'O');
- UShort_t nsec = (ir == 0 ? 20 : 40);
- UShort_t nstr = (ir == 0 ? 512 : 256);
- for(UShort_t sec =0; sec < nsec; sec++) {
- for(UShort_t strip = 0; strip < nstr; strip++) {
- Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
- if(mult == AliESDFMD::kInvalidMult) continue;
-
- if(mult > pars->GetOfflineTriggerLowCut())
- totalMult = totalMult + mult;
- else
- {
- if( totalMult > pars->GetOfflineTriggerHitCut()) {
- return kTRUE;
- }
- else totalMult = 0 ;
- }
- }
- }
- }
- }
- return kFALSE;
-
-}
-//_____________________________________________________________________
-Bool_t AliFMDReconstructor::GetFMDCsideBit(AliESDFMD* fmd) {
-
- AliFMDParameters* pars = AliFMDParameters::Instance();
- Float_t totalMult = 0;
- UShort_t det = 3;
- Int_t nRings = 2;
- for (UShort_t ir = 0; ir < nRings; ir++) {
- Char_t ring = (ir == 0 ? 'I' : 'O');
- UShort_t nsec = (ir == 0 ? 20 : 40);
- UShort_t nstr = (ir == 0 ? 512 : 256);
- for(UShort_t sec =0; sec < nsec; sec++) {
- for(UShort_t strip = 0; strip < nstr; strip++) {
- Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
- if(mult == AliESDFMD::kInvalidMult) continue;
-
- if(mult > pars->GetOfflineTriggerLowCut())
- totalMult = totalMult + mult;
- else
- {
- if( totalMult > pars->GetOfflineTriggerHitCut()) {
- return kTRUE;
- }
- else totalMult = 0 ;
- }
- }
- }
- }
-
- return kFALSE;
-}
//____________________________________________________________________
//
// EOF
* @param use If true, make the diagnostics file
*/
void SetDiagnose(Bool_t use=kTRUE) { fDiagnostics = use; }
- /**
- * Functions to use the FMD as an offline trigger. The idea is to read
- * the data until we are certain we have one particle. If no particle is
- * found the functions return kFALSE. These functions were added as a
- * result of the discussions in the First Physics Working Group.
- * *
- * @param AliESDFMD* fmd the FMD data from one event.
- */
- static Bool_t GetFMDAsideBit(AliESDFMD* fmd);
- static Bool_t GetFMDCsideBit(AliESDFMD* fmd);
-
+
protected:
/**
* Copy CTOR
#pragma link C++ class AliFMDRawStream+;
#pragma link C++ class AliFMDRawReader+;
#pragma link C++ class AliFMDQADataMakerRec+;
+#pragma link C++ class AliFMDOfflineTrigger+;
#else
# error Not for compilation
AliFMDRawStream.cxx \
AliFMDRawReader.cxx \
AliFMDRecPoint.cxx \
- AliFMDQADataMakerRec.cxx
+ AliFMDQADataMakerRec.cxx \
+ AliFMDOfflineTrigger.cxx
HDRS = $(SRCS:.cxx=.h)
DHDR := FMDrecLinkDef.h