X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONVDigit.cxx;h=4f705f18ad570e01582f17980d513e49a24f9079;hb=963783aeca7f7ca6e8702b72240cd339072ad6d1;hp=6a26e7b15118235618ab83d26d52a9f7e863bb5c;hpb=22dce0e3cf0e9043e6bbb0cab7822f29974805fb;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONVDigit.cxx b/MUON/AliMUONVDigit.cxx index 6a26e7b1511..4f705f18ad5 100644 --- a/MUON/AliMUONVDigit.cxx +++ b/MUON/AliMUONVDigit.cxx @@ -15,6 +15,7 @@ // $Id$ +//----------------------------------------------------------------------------- /// \class AliMUONVDigit /// /// This is the base class of a MUON digit that most client code should deal with. @@ -37,13 +38,31 @@ /// Also, if HasGeometryInformation is true, the digit knows the position and /// the (half) dimensions (in cm) of the pad it corresponds to. /// +/// Note 1. +/// +/// Please note that IsCalibrated and IsChargeInFC are two +/// concepts closely related, but not equivalent, at least for SDigits. +/// +/// For instance a SDigit can have its charge in fC but not being calibrated. +/// +/// { SDigits coming from a simulation are yet to be merged (i.e. the +/// SDigitStore can contain several SDigits objects per channel), so, while +/// their charge is in femto-coulomb, they are not calibrated (e.g. pedestal +/// is not subtracted yet). } +/// +/// Conversely, a calibrated (s)digit always has its charge in fC. +/// /// \author Laurent Aphecetche, Subatech +//----------------------------------------------------------------------------- #include "AliMUONVDigit.h" #include #include +using std::cout; +using std::endl; +using std::setw; /// \cond CLASSIMP ClassImp(AliMUONVDigit) /// \endcond @@ -59,6 +78,7 @@ AliMUONVDigit::AliMUONVDigit(Int_t detElemId, Int_t eCardId, //_____________________________________________________________________________ AliMUONVDigit::AliMUONVDigit() +: TObject() { /// Default ctor } @@ -114,17 +134,24 @@ AliMUONVDigit::Compare(const TObject* object) const } else { - if ( ManuId() < d->ManuId() ) + if ( ManuId() > d->ManuId() ) { return 1; } - else if ( ManuId() > d->ManuId() ) + else if ( ManuId() < d->ManuId() ) { return -1; } else { - return ( ManuChannel() < d->ManuChannel() ) ? 1 : -1; + if ( ManuChannel() > d->ManuChannel() ) + { + return 1; + } + else if ( ManuChannel() < d->ManuChannel() ) + { + return -1; + } } } } @@ -200,12 +227,39 @@ void AliMUONVDigit::Print(Option_t* opt) const { /// Dump to screen. + /// /// If opt=="tracks", info on tracks are printed too. + /// + /// The last part of the printout indicated the status of the digit : + /// (S) means that digit is saturated + /// (C) means that digit has been calibrated + /// [fC] means that digit's charge is in femto-coulombs (fC) + /// (U) means that digit is part of (has been used in) a cluster + /// (+) is noise-only digit (added by the simulation) + /// (X) has the IsConverted flag on (e.g. has been embedded) + + TString options(opt); + options.ToLower(); + + if ( options.Contains("zs") ) + { + if ( IsCalibrated() && Charge() <= 0 ) + { + return; + } + + if ( !IsCalibrated() && ADC() <= 0 ) + { + return; + } + } cout << Form("<%s>: ID %12u DE %4d Cath %d (Ix,Iy)=(%3d,%3d) (Manu,Channel)=(%4d,%2d)" ", Charge=%7.2f", ClassName(),GetUniqueID(), DetElemId(),Cathode(),PadX(),PadY(),ManuId(),ManuChannel(),Charge()); + + if ( IsSaturated() ) { cout << "(S)"; @@ -224,6 +278,15 @@ AliMUONVDigit::Print(Option_t* opt) const cout << " "; } + if ( IsChargeInFC() ) + { + cout << "[fC]"; + } + else + { + cout << " "; + } + if ( IsUsed() ) { cout << "(U)"; @@ -233,10 +296,33 @@ AliMUONVDigit::Print(Option_t* opt) const cout << " "; } - cout << Form(" ADC=%4d StatusMap=%04x",ADC(),StatusMap()); + if ( IsNoiseOnly() ) + { + cout << "(+)"; + } + else + { + cout << " "; + } + + if ( IsConverted() ) + { + cout << "(X)"; + } + else + { + cout << " "; + } + + cout << Form(" ADC=%4d",ADC()); + + if ( IsCalibrated() ) + { + // StatusMap is not set before calibration has occured (e.g. + // SDigits cannot have it meaningfully filled) + cout << Form(" StatusMap=%04x",StatusMap()); + } - TString options(opt); - options.ToLower(); if ( options.Contains("tracks") && HasMCInformation() ) { cout << " Hit " << setw(3) << Hit();