CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcxHits.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: MdcxHits.cxx,v 1.8 2009/12/16 08:59:13 zhangy Exp $
4//
5// Description:
6// Class |MdcxHits| - container for |MdcxHit|s
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author List:
12// A. Snyder
13// S. Wagner
14// Zhang Yao([email protected]) Migrate to BESIII
15//
16// Copyright Information:
17// Copyright (C) 1994 BEPCII
18//
19// History:
20// Migration for BESIII MDC
21//
22//------------------------------------------------------------------------
23#include "MdcxReco/MdcxHits.h"
24#include "CLHEP/Alist/AIterator.h"
25#include "MdcData/MdcHit.h"
26#include "Identifier/Identifier.h"
27#include "Identifier/MdcID.h"
28
29using std::cout;
30using std::endl;
31using std::ostream;
32
33double MdcxHits::timecut = -50.0;
34
35MdcxHits::MdcxHits() : m_debug(0) { }
36/*
37MdcxHits::MdcxHits(MdcDigiCol* mdcDigiCol, float c0, float cresol)
38 : m_debug(0) {
39
40 int ij = mdcDigiCol->size();
41 if (ij <= 0) return;
42 MdcDigi* theDigi;
43 MdcDigiCol::iterator iter = mdcDigiCol->begin();
44 for (; iter != mdcDigiCol->end(); iter++ ) {
45 theDigi = (*iter);
46 MdcxHit* temp = new MdcxHit(theDigi, c0, cresol);
47 mdcxHitList.append(temp);
48 }
49 return;
50}
51*/
52
53MdcxHits::~MdcxHits() { KillList(); }
54
56 HepAListDeleteAll(mdcxHitList);
57}
58
59void MdcxHits::create(MdcDigiVec mdcDigiVec, float c0, float cresol) {
60 MdcDigiVec::iterator iter = mdcDigiVec.begin();
61 for (; iter != mdcDigiVec.end(); iter++ ) {
62 const MdcDigi* aDigi = *iter;
63 MdcxHit* temp = new MdcxHit(aDigi, c0, cresol);
64 //const Identifier id= aDigi->identify();
65 //int layer = MdcID::layer(id);
66 //int wire = MdcID::wire(id);
67 //std::cout<< " ("<<layer<<","<<wire<<") "<<aDigi->getTimeChannel()<<" "<<aDigi->getChargeChannel() << std::endl;//yzhang debug
68 mdcxHitList.append(temp);
69 }
70}
71
72void MdcxHits::print(ostream &o, int pmax) const {
73 int mcheck = pmax;
74 if (mdcxHitList.length() < pmax) mcheck = mdcxHitList.length();
75 o << " First " << mcheck << " Main Drift Chamber Hits:" << endl;
76 for(int i = 0; i < mcheck; i++) {
77 mdcxHitList[i]->print(o, i);
78 }
79}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
void print(std::ostream &o, int pmax=10) const
void reset()
Definition: MdcxHits.cxx:55
MdcxHits()
Definition: MdcxHits.cxx:35
virtual ~MdcxHits()
Definition: MdcxHits.cxx:53
void create(MdcDigiVec digiVec, float c0=0.0, float cresol=0.0180)
Definition: MdcxHits.cxx:59