- In AliMUON, there is now the possibility of setting time limits in the age of a hit in order to be taken (or not) into account in the digitization process: SetTimeLimits(min, max) in Config file.
- In AliMUONSDigitizerV2 the sDigits now contain the age of the original hit, shifted by the time of the triggered event.
- In AliMUONDigitizarV3 only sdigits with age within the limits are used for digitization
(Mercedes)
fDigitMaker(0x0),
fHitStore(0x0),
fDigitStoreConcreteClassName(),
- fCalibrationData(0x0)
+ fCalibrationData(0x0),
+ fTimeMin(-100000),
+ fTimeMax(100000)
{
/// Default Constructor
fDigitMaker(new AliMUONDigitMaker),
fHitStore(0x0),
fDigitStoreConcreteClassName("AliMUONDigitStoreV2S"),
- fCalibrationData()
+ fCalibrationData(),
+ fTimeMin(-100000),
+ fTimeMax(100000)
{
/// Standard constructor
/// Parametrised tail effect in resolution histogram
virtual void SetTailEffect(Bool_t isTailEffect) { fIsTailEffect=isTailEffect; }
+ // For pileup studies
+ //
+ /// Set time limits for sdigits to be digitized
+ virtual void SetTimeLimits(Float_t time1, Float_t time2) {fTimeMin=time1; fTimeMax=time2;}
+ /// Return minimum time(*10^9) for a sdigit to be digitized
+ virtual Float_t GetTimeMin() {return fTimeMin;}
+ /// Return maximum time(*10^9) for a sdigit to be digitized
+ virtual Float_t GetTimeMax() {return fTimeMax;}
+
// Getters
/// Return reference to Chamber \a id
virtual AliMUONChamber& Chamber(Int_t id)
Int_t fDigitizerWithNoise; ///< Flag to switch on/off generation of noisy digits
Bool_t fIsTailEffect; ///< Switch to turn on/off the tail effect
+ Float_t fTimeMin; // minimum time(*10^9) for an sdigit to be digitized
+ Float_t fTimeMax; // maximum time(*10^9) for an sdigit to be digitized
+
AliMUONRawWriter* fRawWriter; //!< Raw data writer
AliMUONDigitMaker* fDigitMaker; //!< pointer to the digit maker class
AliMUONCalibrationData* fCalibrationData; ///< pointer of calibration data
- ClassDef(AliMUON,17) // MUON Detector base class
+ ClassDef(AliMUON,18) // MUON Detector base class
};
#endif
TIter next(input.CreateIterator());
AliMUONVDigit* sdigit;
+ const float kTime1 = muon()->GetTimeMin();
+ const float kTime2 = muon()->GetTimeMax();
+
while ( ( sdigit = static_cast<AliMUONVDigit*>(next()) ) )
{
+ float time = sdigit->Time()*1E9;
+ if (time<kTime1 || time>kTime2) continue;
+
// Update the track references using the mask.
// FIXME: this is dirty, for backward compatibility only.
// Should re-design all this way of keeping track of MC information...
// $Id$
#include <TClonesArray.h>
+#include <TParticle.h>
#include "AliMUONSDigitizerV2.h"
#include "AliLoader.h"
#include "AliRun.h"
#include "AliRunLoader.h"
+#include "AliStack.h"
//-----------------------------------------------------------------------------
/// The sdigitizer performs the transformation from hits (energy deposits by
AliDebug(1,Form("iEvent=%d",iEvent));
runLoader->GetEvent(iEvent);
+ // for pile up studies
+ runLoader->LoadKinematics();
+ AliStack* stack = runLoader->Stack();
+ Int_t nparticles = (Int_t) stack->GetNtrack();
+ float T0=10; // time of the triggered event
+ // loop to find the time of the triggered event (this may change)
+ for (Int_t iparticle=0; iparticle<nparticles; ++iparticle) {
+ float t = stack->Particle(iparticle)->T();
+ if (TMath::Abs(t)<TMath::Abs(T0)) T0 = t;
+ }
+
loader->MakeSDigitsContainer();
TTree* treeS = loader->TreeS();
while ( ( hit = static_cast<AliMUONHit*>(next()) ) )
{
Int_t chamberId = hit->Chamber()-1;
- Float_t age = hit->Age();
+ Float_t age = hit->Age()-T0;
AliMUONChamber& chamber = muon->Chamber(chamberId);
AliMUONResponse* response = chamber.ResponseModel();