#include "MDT_Response/MDT_Response.h"
#include "CLHEP/Random/RandomEngine.h"
#include "CLHEP/Random/RanluxEngine.h"
#include "CLHEP/Random/RandPoisson.h"
#include "CLHEP/Random/RandFlat.h"
#include "TH1.h"
#include "TFile.h"
#include <cerrno>
#include <climits>
#include <cstdlib>
#include <iostream>
#include "CxxUtils/checker_macros.h"
Go to the source code of this file.
◆ generateEvents()
void generateEvents |
( |
int |
eventMax | ) |
|
Definition at line 46 of file MDT_ResponseTest.cxx.
47 TH1* adcHist =
new TH1F(
"adc",
"adc",400,0,200);
48 TH1* driftHist =
new TH1F(
"driftTime",
"driftTime",1000,0,1000);
49 TH1* radiusHit =
new TH1F(
"radiusHit",
"radiusHit",100,0,
tubeMax);
50 TH1* radiusNoHit =
new TH1F(
"radiusNoHit",
"radiusNoHit",100,0,
tubeMax);
51 TH1* posLengthHit =
new TH1F(
"posLengthHit",
"posLengthHit",100,0,
tubeLength);
52 TH1* posLengthNoHit =
new TH1F(
"posLengthNoHit",
"posLengthNoHit",100,0,
tubeLength);
53 for(
int i=0;
i<eventMax; ++
i ){
69 posLengthHit->Fill(positionAlongTube);
72 posLengthNoHit->Fill(positionAlongTube);
◆ generateFlat()
◆ generatePositionAlongTube()
double generatePositionAlongTube |
( |
| ) |
|
◆ generateRadius()
double generateRadius |
( |
| ) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 79 of file MDT_ResponseTest.cxx.
85 long convArg = strtol(
argv[1], &endptr, 0);
86 if(errno == ERANGE || *endptr !=
'\0' ||
argv[1] == endptr) {
87 std::cout<<
"Invalid parameter! Quit now!"<<std::endl;
91 if(convArg < INT_MIN || convArg > INT_MAX) {
92 std::cout<<
"Invalid parameter! Quit now!"<<std::endl;
95 int tempMax = (
int) convArg;
96 if (tempMax > 0) eventMax = tempMax;
99 std::cout <<
" Starting simulation of MDT_response, events " << eventMax << std::endl;
101 TFile*
outputFile =
new TFile(
"MDT_ResponseTest.root",
"RECREATE");
116 double increasedPathLength = 0.25;
◆ ranFlat()
◆ ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY |
◆ ranEngine
CLHEP::RanluxEngine ranEngine |
◆ response
◆ tubeLength
double tubeLength = 5000. |
◆ tubeMax