ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
AFP_TDZVertex Class Reference

#include <AFP_TDZVertex.h>

Collaboration diagram for AFP_TDZVertex:

Public Member Functions

 AFP_TDZVertex ()
 
 ~AFP_TDZVertex ()
 
StatusCode Initialize (float fAmpThresh, int iDataType)
 
StatusCode Execute (const std::list< TDHIT > &ListTDHits)
 
StatusCode Finalize (std::list< TDRESULT > *pListResults)
 
void GetData ()
 

Private Attributes

float m_AmpThresh
 
int m_iDataType
 
std::list< TDRESULTm_listResults
 

Detailed Description

Definition at line 22 of file AFP_TDZVertex.h.

Constructor & Destructor Documentation

◆ AFP_TDZVertex()

AFP_TDZVertex::AFP_TDZVertex ( )

Definition at line 7 of file AFP_TDZVertex.cxx.

8 {
9  m_listResults.clear();
10 
11  m_AmpThresh = 0.;
12  m_iDataType = 0;
13 
14 }

◆ ~AFP_TDZVertex()

AFP_TDZVertex::~AFP_TDZVertex ( )

Definition at line 16 of file AFP_TDZVertex.cxx.

17 {
18  m_listResults.clear();
19 }

Member Function Documentation

◆ Execute()

StatusCode AFP_TDZVertex::Execute ( const std::list< TDHIT > &  ListTDHits)

Definition at line 29 of file AFP_TDZVertex.cxx.

30 {
31 
32 
33  const int NST = 4;
34  const int NDET = 4;
35  const int NTRAINS = 4;
36  //const int NBARS = 32;
37 
38  std::vector<float> vecTDHit[NST][NDET][NTRAINS];
39 
40  for (int i=0; i<NST; ++i)
41  {
42  for (int j=0; j<NDET; ++j)
43  {
44  for (int k=0; k<NTRAINS; ++k)
45  {
46  vecTDHit[i][j][k].clear();
47  }
48  }
49  }
50 
51 
52  std::list<TDHIT>::const_iterator iter;
53  for (iter=ListTDHits.begin(); iter!=ListTDHits.end(); ++iter)
54  {
55  if ((*iter).fADC > m_AmpThresh)
56  {
57  //reco time + position correction + saturation
58  //cout<<"qqq "<<(*iter).nStationID<<"\t"<<(*iter).nSensitiveElementID<<"\t"<<((*iter).nDetectorID)%4<<endl;
59  if ((*iter).fADC < 100) vecTDHit[(*iter).nStationID][(*iter).nSensitiveElementID][((*iter).nDetectorID)%4].push_back( (*iter).fTDC + int(((*iter).nDetectorID)/4)*0.001 );
60  else {
61  vecTDHit[(*iter).nStationID][(*iter).nSensitiveElementID][((*iter).nDetectorID)%4].push_back(0.0);
62  }
63  }
64  }
65 
66 
67 
68  for (int i=0; i<NST; ++i)
69  {
70  for (int j=0; j<NDET; ++j)
71  {
72  for (int k=0; k<NTRAINS; ++k)
73  {
74  int TrSize = vecTDHit[i][j][k].size();
75  float TrTime = 0.;
76  int TrSat = 0;
77  if ( TrSize>0 )
78  {
79  for (int l=0; l<TrSize; ++l)
80  {
81  TrTime += (vecTDHit[i][j][k].at(l));
82  if ( vecTDHit[i][j][k].at(l)==0.0) ++TrSat;
83  }
84  // time average
85  if( TrSize!=TrSat) TrTime /= (TrSize-TrSat);
86 
88  if (1)
89  {
90  Results.nStationID = i;
91  Results.nDetectorID = j;
92  Results.nTrainID = k;
93  Results.fTrainTime = TrTime;
94  Results.nTrainSize = TrSize;
95  Results.nTrainNSat = TrSat;
96  m_listResults.push_back(Results);
97  }
98 
99  }
100  }
101  }
102  }
103 
104 
105 
106 
107  return StatusCode::SUCCESS;
108 }

◆ Finalize()

StatusCode AFP_TDZVertex::Finalize ( std::list< TDRESULT > *  pListResults)

Definition at line 110 of file AFP_TDZVertex.cxx.

111 {
112  *pListResults = m_listResults;
113 
114  return StatusCode::SUCCESS;
115 }

◆ GetData()

void AFP_TDZVertex::GetData ( )

Definition at line 119 of file AFP_TDZVertex.cxx.

120 {
121  MsgStream LogStream(Athena::getMessageSvc(), "AFP_TDZVertex::GetData()");
122  LogStream << MSG::DEBUG << "begin AFP_TDZVertex::GetData()" << endmsg;
123 
126 
127  LogStream << MSG::DEBUG << "end AFP_TDZVertex::GetData()" << endmsg;
128 }

◆ Initialize()

StatusCode AFP_TDZVertex::Initialize ( float  fAmpThresh,
int  iDataType 
)

Definition at line 21 of file AFP_TDZVertex.cxx.

22 {
23  m_AmpThresh = (float)fAmpThresh;
24  m_iDataType = iDataType;
25 
26  return StatusCode::SUCCESS;
27 }

Member Data Documentation

◆ m_AmpThresh

float AFP_TDZVertex::m_AmpThresh
private

Definition at line 29 of file AFP_TDZVertex.h.

◆ m_iDataType

int AFP_TDZVertex::m_iDataType
private

Definition at line 30 of file AFP_TDZVertex.h.

◆ m_listResults

std::list<TDRESULT> AFP_TDZVertex::m_listResults
private

Definition at line 33 of file AFP_TDZVertex.h.


The documentation for this class was generated from the following files:
AFP_TDZVertex::m_listResults
std::list< TDRESULT > m_listResults
Definition: AFP_TDZVertex.h:33
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
AFP_TDZVertex::m_iDataType
int m_iDataType
Definition: AFP_TDZVertex.h:30
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
AFP_TDZVertex::m_AmpThresh
float m_AmpThresh
Definition: AFP_TDZVertex.h:29
Results
std::vector< Result > Results
Definition: CscSplitClusterFitter.cxx:22
DEBUG
#define DEBUG
Definition: page_access.h:11
_TDRESULT
Definition: AFP_UserObjects.h:24
readCCLHist.float
float
Definition: readCCLHist.py:83
fitman.k
k
Definition: fitman.py:528