/** CbmMuchDigi.h **@author M.Ryzhinskiy **@since 19.03.07 **@version 1.0 ** **@author Vikas Singhal **@since 17/05/16 **@version 2.0 ** Data class for digital MUCH information ** Data level: RAW ** ** **/ #ifndef CBMMUCHDIGI_H #define CBMMUCHDIGI_H 1 #include "CbmDigi.h" #include "CbmDetectorList.h" #include "CbmMuchDigiMatch.h" #include "CbmMuchAddress.h" #ifndef __CINT__ #include #include #endif //__CINT__ class CbmMuchDigi : public CbmDigi{ public: /** Default Constructor */ CbmMuchDigi(): CbmDigi(), fAddress(0), fTime(0), fCharge(0){} /** Standard constructor ** @param address Unique element address ** @param time Measurement time [ns] ** @param charge Charge [ADC units] **/ CbmMuchDigi(UInt_t address, UShort_t charge=0, ULong64_t time=0) : CbmDigi(), fAddress(address), fCharge(charge), fTime(time){} //fMatch will be created in the CbmMuchSignal and should be deleted by that class destructor only. //fMatch = new CbmMatch();} CbmMuchDigi(CbmMuchDigi* digi); CbmMuchDigi(CbmMuchDigi* digi,CbmMuchDigiMatch* match); CbmMuchDigi(const CbmMuchDigi&); CbmMuchDigi& operator=(const CbmMuchDigi&); /** Destructor **/ virtual ~CbmMuchDigi(){} //Getters Int_t GetSystemId() const { return kMUCH; } Int_t GetAddress() const { return fAddress; } UShort_t GetAdc() const { return fCharge; } Double_t GetTime() const { return fTime; } // Specially for littrack // TODO remove after littrack fix Int_t GetDetectorId() const { return CbmMuchAddress::GetElementAddress(GetAddress(),kMuchModule); } Int_t GetChannelId() const { return GetAddress(); } Int_t GetADCCharge() const { return GetAdc(); } Int_t GetDTime() const { return 0; } // Setters void SetAdc(Int_t adc); void SetTime(ULong64_t time); void SetSaturation(Bool_t saturate) {fSaturationFlag = saturate;} // void SetPileUp(); // Compute is pileup or not // void SetDiffEvent(); //Compute is Diff Event or not void SetAddress(UInt_t address) {fAddress = address;} template void serialize(Archive& ar, const unsigned int version) { ar& fAddress; ar& fTime; ar& fCharge; ar& fSaturationFlag; // ar& fPileUpFlag; // ar& fDiffEventFlag; } private: #ifndef __CINT__ // for BOOST serialization friend class boost::serialization::access; #endif // CbmMuchDigiMatch* fMatch; //removed and using CbmMatch only UInt_t fAddress; //Unique detector address ULong64_t fTime; // Absolute Time Stamp[ns] UShort_t fCharge;// Charge [ADC Units] //Below flag has to be set during the CbmMuchDigi Creation only. Bool_t fSaturationFlag = 0; //If adc value crosses the Maximum Adc value of actual electronics then SaturationFlag will be set. //Removed below 2 flags as can be calculated with the Match information. // Bool_t fPileUpFlag = 0; //If Charge is calculated on the basis of 2 MCPoints then PileUpFlag will be set. // Bool_t fDiffEventFlag = 0; //If (PileUp) then MCPoints are from different event then fDiffEventFlag will be set. ClassDef(CbmMuchDigi,2); }; #endif