28 #define triggerBit(n) (1 << (n))
29 #define hitFlagBit(n) (1 << (n))
73 void print(std::ostream& os = std::cout)
const
145 Hit getHit(Short_t detectorID, Short_t elementID);
146 void setHitFlag(Int_t index, Short_t flag) {
if(index < 0)
return; fAllHits[index].setFlag(flag); }
154 void setEventInfo(Int_t runID, Int_t spillID, Int_t eventID);
155 void setHit(Int_t index,
Hit h) { fAllHits[index] = h; }
163 Int_t
findHit(Short_t detectorID, Short_t elementID);
166 void reIndex(
bool doSort =
false);
191 void setNRoads(Short_t nRoads[]) {
for(Int_t i = 0; i < 4; ++i) fNRoads[i] = nRoads[i]; }
192 void setNRoads(Int_t nRoads[]) {
for(Int_t i = 0; i < 4; ++i) fNRoads[i] = nRoads[i]; }
203 Int_t
getIntensitySumBefore(Int_t n = 16) { Int_t sum = 0;
for(Int_t i = n; i < 16; ++i) sum += fIntensity[i];
return sum; }
204 Int_t
getIntensitySumAfter(Int_t n = 16) { Int_t sum = 0;
for(Int_t i = 16; i < n+16; ++i) sum += fIntensity[i];
return sum; }
209 void setIntensity(
const Int_t intensity[]) {
for(Int_t i = 0; i < 33; ++i) fIntensity[i] = intensity[i]; }
223 void empty() { fAllHits.clear(); fTriggerHits.clear(); }
228 void print (std::ostream& os = std::cout)
const;
264 Int_t fIntensity[33];
272 std::vector<Hit> fAllHits;
273 std::vector<Hit> fTriggerHits;
#define nDarkPhotonPlanes
Definition of hit structure.
void resetFlag(UShort_t flag_input)
Int_t getElementID(Int_t uniqueID)
Int_t getDetectorID(Int_t uniqueID)
bool isTriggerMask() const
void setFlag(UShort_t flag_input)
void setHodoMask(bool f=true)
void setTriggerMask(bool f=true)
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
void setInTime(bool f=true)
void print(std::ostream &os=std::cout) const
bool operator==(const Hit &elem) const
bool operator<(const Hit &elem) const
int isValid() const
isValid returns non zero if object contains vailid data
void clear()
Clear the internal event structure.
void reIndex(bool doSort=false)
Reset the number hits on each plane.
void setTurnID(Int_t turnID)
Int_t getIntensity(Int_t i)
void mergeEvent(const SRawEvent &rawEvent)
Merge a event to this event.
SRawEvent * Clone() const
std::vector< Hit > & getTriggerHits()
std::pair< Int_t, Int_t > hit_pair
Type of pair with two adjacent wires.
int isValid() const
isValid returns non zero if object contains vailid data
void setTargetPos(Short_t targetPos)
std::list< Int_t > getHitsIndexInDetectors(std::vector< Int_t > &detectorIDs)
Int_t * getIntensityAll()
std::list< SRawEvent::hit_pair > getPartialHitPairsInSuperDetector(Short_t detectorID)
void setTriggerEmu(bool flag)
void insertTriggerHit(Hit h)
void setTriggerBits(Int_t triggers[])
void empty()
only empty the hit list, leave other information untouched
Int_t getIntensitySumAfter(Int_t n=16)
Hit getTriggerHit(Int_t index)
void insertHit(Hit h)
Insert a new hit.
Int_t getTriggerBits()
Set/get the trigger types.
void setNRoads(Short_t nRoads[])
void setTriggerBits(Int_t triggers)
void setIntensity(Int_t i, Int_t val)
Int_t getIntensitySumBefore(Int_t n=16)
Int_t getNHitsInSuperDetector(Short_t detectorID)
Int_t getNHitsInDetector(Short_t detectorID)
void setHit(Int_t index, Hit h)
std::list< Int_t > getHitsIndexInSuperDetector(Short_t detectorID)
void setHitFlag(Short_t detectorID, Short_t elementID, Short_t flag)
void setNRoads(Int_t nRoads[])
void print(std::ostream &os=std::cout) const
Print for debugging purposes.
void setIntensity(const Int_t intensity[])
void setTriggerHit(Int_t index, Hit h)
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
void setIntensity(Int_t val)
std::vector< Hit > & getAllHits()
std::list< Int_t > getHitsIndexInDetector(Short_t detectorID)
Gets.
std::list< Int_t > getAdjacentHitsIndex(Hit &_hit)
void DeepClone(SRawEvent *c)
Int_t getNChamberHitsAll()
void setEventInfo(Int_t runID, Int_t spillID, Int_t eventID)
Sets.
Int_t getNHitsInDetectors(std::vector< Int_t > &detectorIDs)
void setHitFlag(Int_t index, Short_t flag)
Int_t findHit(Short_t detectorID, Short_t elementID)
Find a hit – binary search since hit list is sorted.
bool isTriggeredBy(Int_t trigger)