7         kDCH,
kDRC,
kDSK,
kEMC,
kGEM,
kLUMI,
kMDT,
kMVD,
kRPC,
kSTT,
kTPC,
kTOF,
kFTS,
kHYPG,
kHYP};
 
   12     gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/rootlogon.C");
 
   18     TString simFileName = 
"Sim_Dpm_500.root";
 
   19     TString parFileName = 
"Sim_Dpm_500_params.root";
 
   20     TString digiFileName = 
"Sim_Dpm_500_digi.root";
 
   21     TString recoFileName = 
"Sim_Dpm_500_reco.root";
 
   22     TString outFileName = 
"Sim_Dpm_500_streamdisplay.root";
 
   26     TFile filerecopixel(recoFileName.Data());
 
   32     TTree *recotree = (TTree*) 
filereco.Get(
"pndsim");
 
   39     FairRunAna *
fRun = 
new FairRunAna();
 
   40     fRun->SetInputFile(simFileName.Data());
 
   41     fRun->AddFriend(recoFileName.Data());
 
   42     fRun->AddFriend(digiFileName.Data());
 
   43     fRun->SetOutputFile(outFileName.Data());
 
   46     FairRuntimeDb* 
rtdb = fRun->GetRuntimeDb();
 
   53     PndOnlineGeometryManager *online_geometry = 
new PndOnlineGeometryManager(rtdb, parFileName.Data());
 
   70     PndOnlineHitProducer *online_hit_producer = 
new PndOnlineHitProducer();
 
   71     online_hit_producer->LoadStream(
kSTT, 
"STTSortedHits");
 
   72     online_hit_producer->LoadStream(
kMVD, 
"MVDHitsStrip");
 
   73     online_hit_producer->LoadStream(
kMVD, 
"MVDHitsPixel");
 
   76     PndOnlineManager *online = 
new PndOnlineManager();
 
   77     online->AddHitProducer(online_hit_producer);
 
   78     online->AddGeometryManager(online_geometry);
 
   79     online->SetActiveDetector(
kSTT,stthitlifetime);
 
   82     TClonesArray* tubearray = online_geometry->GetDetectorGeometry(
kSTT);
 
   85     PndOnlineSttTripletFinder *triplet_finder = 
new PndOnlineSttTripletFinder(online, tubearray);
 
   87     online->AddTask((FairTask*)triplet_finder);
 
   93     TText* mytext = 
new TText();
 
  100     int final_time = 300;
 
  103         Int_t timeviolationcount = 0;
 
  105     while( current_time < final_time ) {
 
  107         online->LoadHits( delta_t );
 
  111         current_time += delta_t;
 
  119         DrawIsochrones(current_time-stthitlifetime, online->GetFairHitObjectList(
kSTT), tubearray, &timeviolationcount);
 
  131         TObjArray *tracks = online->GetTrackObjectList();
 
  132         for(
int i=0; 
i<tracks->GetEntriesFast(); ++
i) {
 
  133             PndOnlineTrack *trk_ptr = (PndOnlineTrack *)(tracks->At(
i));
 
  146         cout << endl << endl << endl << 
"-----" << endl << 
"Number of Time Window Violations: " << timeviolationcount << endl << 
"-----" << endl;
 
  152     cout << endl << endl;
 
  153     cout << 
"Macro finished succesfully." << endl;
 
  154     cout << 
"Real time " << rtime << 
" s, CPU time " << ctime << 
" s" << endl;
 
  163 void DrawIsochrones(Int_t currenttime, TObjArray* stthits, TObjArray* stttubes, Int_t* timeviolationcount) {
 
  165         mylipse.SetFillStyle(0);
 
  179         stt.
TConst(0.5, 2, 0.8, 0.2);
 
  184         cout << 
"----- Checking Isochrones at " << currenttime << 
" with " << stthits->GetEntriesFast() << 
" active Hits." << endl;
 
  185         for(
int j = 0; j < stthits->GetEntriesFast(); j++) {
 
  188                         cout << 
" Error: No Hit Pointer in drawstack." << endl;
 
  194                         cout << 
" Error: Hit pointed to invalid tube." << endl;
 
  199                 timestamp = drawhit->GetTimeStamp();
 
  200                 if (timestamp>currenttime+200) {
 
  201                         cout << 
" Error: Hit time " << timestamp << 
" larger than Window end time " << currenttime+200 << endl;
 
  202                         (*timeviolationcount)++;
 
  207                 drifttime = timestamp - currenttime;
 
  209                 if (drifttime < 0) drifttime = 0;
 
  210                 if (drifttime > 245) drifttime = 245;
 
  213                 if (recoisochrone < 0) recoisochrone = 0;
 
  214                 if (recoisochrone > 0.5) recoisochrone = 0.5;
 
  227                 mylipse.SetR1(recoisochrone);
 
  228                 mylipse.SetR2(recoisochrone);
 
  230                 if (
TMath::Abs(recoisochrone-isochrone) < 0.04) {
 
  231                         mylipse.SetLineColor(kGreen);
 
  232                 } 
else if (recoisochrone+0.04 < isochrone) {
 
  233                         mylipse.SetLineColor(kRed);
 
  236                                 mylipse.SetLineColor(kBlack);
 
  238                                 mylipse.SetLineColor(kBlue);
 
TFile filereco("MvdStt_Test_reco.root")
void PutWireXYZ(Double_t w1, Double_t w2, Double_t w3, Double_t w4, Double_t w5, Double_t w6)
void DrawIsochrones(Int_t currenttime, TObjArray *stthits, TObjArray *stttubes, Int_t *timeviolationcount)
Double_t GetIsochrone() const 
TFile filedigi("testdigi.root")
Double_t TimnsToDiscm(Double_t time)
void TConst(Double_t Radius, Double_t pSTP, Double_t ArP, Double_t CO2P)
TVector3 GetWireDirection()